chore,feat,fix(qtile): improve config
This commit is contained in:
parent
4a2ee46f7f
commit
e7eb78329d
1 changed files with 66 additions and 54 deletions
|
@ -77,6 +77,13 @@ let
|
||||||
revert
|
revert
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
initScreen = pkgs.writeScript "initScreen" ''
|
||||||
|
# ${pkgs.xorg.xinput}/bin/xinput set-prop "ZSA Moonlander Mark I Mouse" "libinput Natural Scrolling Enabled" 1
|
||||||
|
${pkgs.autorandr}/bin/autorandr -c
|
||||||
|
${pkgs.feh}/bin/feh --bg-scale ${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png
|
||||||
|
${dpmsScript} default
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
qtileConfig = pkgs.writeScript "qtile_config.py" ''
|
qtileConfig = pkgs.writeScript "qtile_config.py" ''
|
||||||
from libqtile.config import Key, Screen, Group, Drag, Click
|
from libqtile.config import Key, Screen, Group, Drag, Click
|
||||||
|
@ -108,7 +115,7 @@ keys = [
|
||||||
Key([key_alt, key_super], "l", lazy.spawn('${pkgs.bash}/bin/sh -c "loginctl lock-session $XDG_SESSION_ID"')),
|
Key([key_alt, key_super], "l", lazy.spawn('${pkgs.bash}/bin/sh -c "loginctl lock-session $XDG_SESSION_ID"')),
|
||||||
Key([key_alt, key_super], "s", lazy.spawn("${pkgs.systemd}/bin/systemctl suspend")),
|
Key([key_alt, key_super], "s", lazy.spawn("${pkgs.systemd}/bin/systemctl suspend")),
|
||||||
|
|
||||||
Key([key_super, key_control], "r", lazy.spawn("${pkgs.autorandr}/bin/autorandr -c && ${dpmsScript} default")),
|
Key([key_super, key_control], "r", lazy.spawn("${initScreen}")),
|
||||||
Key([key_super, key_control], "q", lazy.shutdown()),
|
Key([key_super, key_control], "q", lazy.shutdown()),
|
||||||
|
|
||||||
# Toggle between different layouts as defined below
|
# Toggle between different layouts as defined below
|
||||||
|
@ -117,16 +124,7 @@ keys = [
|
||||||
# this is usefull when floating windows get buried
|
# this is usefull when floating windows get buried
|
||||||
Key([key_super], "Escape", lazy.window.bring_to_front()),
|
Key([key_super], "Escape", lazy.window.bring_to_front()),
|
||||||
|
|
||||||
# MonadTall keybindings
|
# common to all layouts
|
||||||
Key([key_super], "h", lazy.layout.left()),
|
|
||||||
Key([key_super], "l", lazy.layout.right()),
|
|
||||||
Key([key_super], "j", lazy.layout.down()),
|
|
||||||
Key([key_super], "k", lazy.layout.up()),
|
|
||||||
Key([key_super, key_control], "h", lazy.layout.shuffle_left()),
|
|
||||||
Key([key_super, key_control], "l", lazy.layout.shuffle_right()),
|
|
||||||
Key([key_super, key_control], "j", lazy.layout.shuffle_down()),
|
|
||||||
Key([key_super, key_control], "k", lazy.layout.shuffle_up()),
|
|
||||||
Key([key_super, key_control], "space", lazy.layout.toggle_split()),
|
|
||||||
Key([key_control, key_alt], "h", lazy.layout.grow_left()),
|
Key([key_control, key_alt], "h", lazy.layout.grow_left()),
|
||||||
Key([key_control, key_alt], "j", lazy.layout.grow_down()),
|
Key([key_control, key_alt], "j", lazy.layout.grow_down()),
|
||||||
Key([key_control, key_alt], "k", lazy.layout.grow_up()),
|
Key([key_control, key_alt], "k", lazy.layout.grow_up()),
|
||||||
|
@ -134,25 +132,36 @@ keys = [
|
||||||
Key([key_super], "n", lazy.layout.normalize()),
|
Key([key_super], "n", lazy.layout.normalize()),
|
||||||
Key([key_super], "o", lazy.layout.maximize()),
|
Key([key_super], "o", lazy.layout.maximize()),
|
||||||
|
|
||||||
|
# MonadTall keybindings
|
||||||
|
Key([key_super], "h", lazy.layout.left().when(layout="monad")),
|
||||||
|
Key([key_super], "l", lazy.layout.right().when(layout="monad")),
|
||||||
|
Key([key_super], "j", lazy.layout.down().when(layout="monad")),
|
||||||
|
Key([key_super], "k", lazy.layout.up().when(layout="monad")),
|
||||||
|
Key([key_super, key_control], "h", lazy.layout.shuffle_left().when(layout="monad")),
|
||||||
|
Key([key_super, key_control], "l", lazy.layout.shuffle_right().when(layout="monad")),
|
||||||
|
Key([key_super, key_control], "j", lazy.layout.shuffle_down().when(layout="monad")),
|
||||||
|
Key([key_super, key_control], "k", lazy.layout.shuffle_up().when(layout="monad")),
|
||||||
|
Key([key_super, key_control], "space", lazy.layout.toggle_split().when(layout="monad")),
|
||||||
|
|
||||||
# Stack
|
# Stack
|
||||||
Key([key_super], "h", lazy.layout.previous().when('stack')),
|
Key([key_super], "h", lazy.layout.previous().when(layout='stack')),
|
||||||
Key([key_super], "l", lazy.layout.next().when('stack')),
|
Key([key_super], "l", lazy.layout.next().when(layout='stack')),
|
||||||
Key([key_super], "j", lazy.layout.up().when('stack')),
|
Key([key_super], "j", lazy.layout.up().when(layout='stack')),
|
||||||
Key([key_super], "k", lazy.layout.down().when('stack')),
|
Key([key_super], "k", lazy.layout.down().when(layout='stack')),
|
||||||
Key([key_super, key_control], "j", lazy.layout.shuffle_up().when('stack')),
|
Key([key_super, key_control], "j", lazy.layout.shuffle_up().when(layout='stack')),
|
||||||
Key([key_super, key_control], "k", lazy.layout.shuffle_down().when('stack')),
|
Key([key_super, key_control], "k", lazy.layout.shuffle_down().when(layout='stack')),
|
||||||
Key([key_super, key_control], "h", lazy.layout.client_to_previous().when('stack')),
|
Key([key_super, key_control], "h", lazy.layout.client_to_previous().when(layout='stack')),
|
||||||
Key([key_super, key_control], "l", lazy.layout.client_to_next().when('stack')),
|
Key([key_super, key_control], "l", lazy.layout.client_to_next().when(layout='stack')),
|
||||||
|
|
||||||
# Columns
|
# Columns
|
||||||
Key([key_super], "h", lazy.layout.left().when('columns')),
|
Key([key_super], "h", lazy.layout.left().when(layout='columns')),
|
||||||
Key([key_super], "l", lazy.layout.right().when('columns')),
|
Key([key_super], "l", lazy.layout.right().when(layout='columns')),
|
||||||
Key([key_super], "j", lazy.layout.down().when('columns')),
|
Key([key_super], "j", lazy.layout.down().when(layout='columns')),
|
||||||
Key([key_super], "k", lazy.layout.up().when('columns')),
|
Key([key_super], "k", lazy.layout.up().when(layout='columns')),
|
||||||
Key([key_super, key_control], "j", lazy.layout.shuffle_down().when('columns')),
|
Key([key_super, key_control], "j", lazy.layout.shuffle_down().when(layout='columns')),
|
||||||
Key([key_super, key_control], "k", lazy.layout.shuffle_up().when('columns')),
|
Key([key_super, key_control], "k", lazy.layout.shuffle_up().when(layout='columns')),
|
||||||
Key([key_super, key_control], "h", lazy.layout.shuffle_left().when('columns')),
|
Key([key_super, key_control], "h", lazy.layout.shuffle_left().when(layout='columns')),
|
||||||
Key([key_super, key_control], "l", lazy.layout.shuffle_right().when('columns')),
|
Key([key_super, key_control], "l", lazy.layout.shuffle_right().when(layout='columns')),
|
||||||
|
|
||||||
# Max
|
# Max
|
||||||
Key([key_super], "j", lazy.layout.next()),
|
Key([key_super], "j", lazy.layout.next()),
|
||||||
|
@ -222,12 +231,12 @@ for i in range(0, screens_count+1):
|
||||||
|
|
||||||
dgroups_key_binder = None
|
dgroups_key_binder = None
|
||||||
dgroups_app_rules = []
|
dgroups_app_rules = []
|
||||||
main = None
|
|
||||||
follow_mouse_focus = False
|
follow_mouse_focus = False
|
||||||
bring_front_click = False
|
bring_front_click = False
|
||||||
cursor_warp = False
|
cursor_warp = False
|
||||||
auto_fullscreen = True
|
auto_fullscreen = True
|
||||||
focus_on_window_activation = "urgent"
|
auto_minimize = False
|
||||||
|
# focus_on_window_activation = "urgent"
|
||||||
|
|
||||||
|
|
||||||
# Drag floating layouts.
|
# Drag floating layouts.
|
||||||
|
@ -245,24 +254,12 @@ def disable_floating_for_all_new_windows(window):
|
||||||
@hook.subscribe.client_new
|
@hook.subscribe.client_new
|
||||||
def print_new_window(window):
|
def print_new_window(window):
|
||||||
print("new window: ", window)
|
print("new window: ", window)
|
||||||
|
|
||||||
wmname = "LG3D"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in {
|
in {
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
startServices = true;
|
startServices = true;
|
||||||
services = {
|
services = {
|
||||||
redshift-gtk = mkSimpleTrayService {
|
|
||||||
execStart = "${pkgs.redshift}/bin/redshift-gtk -v -l 47.6691:9.1698 -t 7000:4500 -m randr";
|
|
||||||
};
|
|
||||||
|
|
||||||
pasystray = mkSimpleTrayService {
|
|
||||||
execStart = "${pkgs.pasystray}/bin/pasystray";
|
|
||||||
};
|
|
||||||
|
|
||||||
cbatticon = mkSimpleTrayService {
|
|
||||||
execStart = "${pkgs.cbatticon}/bin/cbatticon";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,23 +282,37 @@ in {
|
||||||
extraConfig = "";
|
extraConfig = "";
|
||||||
};
|
};
|
||||||
flameshot.enable = true;
|
flameshot.enable = true;
|
||||||
|
pasystray.enable = true;
|
||||||
|
cbatticon.enable = true;
|
||||||
|
redshift = {
|
||||||
|
enable = true;
|
||||||
|
longitude = "47.6691";
|
||||||
|
latitude = "9.1698";
|
||||||
|
temperature = {
|
||||||
|
day = 7000;
|
||||||
|
night = 4500;
|
||||||
|
};
|
||||||
|
tray = true;
|
||||||
|
settings = {
|
||||||
|
redshift = {
|
||||||
|
adjustment-method = "randr";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.pointerCursor = {
|
||||||
|
name = "Vanilla-DMZ";
|
||||||
|
package = pkgs.vanilla-dmz;
|
||||||
|
size = 32;
|
||||||
|
x11.enable = true;
|
||||||
|
gtk.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
xsession = {
|
xsession = {
|
||||||
enable = true;
|
enable = true;
|
||||||
windowManager.command = "${pkgs.qtile}/bin/qtile start -c ${qtileConfig}";
|
windowManager.command = "${pkgs.qtile}/bin/qtile start -c ${qtileConfig}";
|
||||||
initExtra = ''
|
initExtra = "${initScreen}";
|
||||||
${pkgs.xorg.xinput}/bin/xinput set-prop "ZSA Moonlander Mark I Mouse" "libinput Natural Scrolling Enabled" 1
|
|
||||||
${pkgs.autorandr}/bin/autorandr -c
|
|
||||||
${pkgs.feh}/bin/feh --bg-scale ${pkgs.nixos-artwork.wallpapers.simple-blue}/share/artwork/gnome/nix-wallpaper-simple-blue.png
|
|
||||||
${dpmsScript} default
|
|
||||||
'';
|
|
||||||
|
|
||||||
pointerCursor = {
|
|
||||||
name = "Vanilla-DMZ-AA";
|
|
||||||
package = pkgs.vanilla-dmz;
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -310,6 +321,7 @@ in {
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
autorandr
|
autorandr
|
||||||
arandr
|
arandr
|
||||||
|
gnome-icon-theme
|
||||||
gnome.gnome-themes-extra
|
gnome.gnome-themes-extra
|
||||||
gnome.adwaita-icon-theme
|
gnome.adwaita-icon-theme
|
||||||
lxappearance
|
lxappearance
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue