Ricing rofi

This commit is contained in:
marc
2022-11-21 15:02:20 +01:00
parent ae6a2fafa3
commit 8617646685
10 changed files with 460 additions and 48 deletions

View File

@@ -3,9 +3,6 @@
let
cfg = config.samfelag.modules.desktop.i3;
mod = "Mod4";
system_mode = "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown";
in {
options.samfelag.modules.desktop.i3 = with lib; {
@@ -15,10 +12,6 @@ in {
laptop = mkEnableOption "Enable features for a laptop (trackpad, battery, etc...)";
launcher = mkOption { type = types.str; };
terminal = mkOption { type = types.str; };
locker = mkOption { type = types.str; };
extraKeybindings = my.mkOpt (types.attrsOf types.str) {};
extraStartup = my.mkOpt (types.listOf types.attrs) [ ];
@@ -110,18 +103,6 @@ in {
"Return" = "mode \"default\"";
"Escape" = "mode \"default\"";
};
"${system_mode}" = {
"l" = "exec --no-startup-id ${cfg.locker}, mode \"default\"";
"e" = "exec --no-startup-id i3-msg exit, mode \"default\"";
"s" = "exec --no-startup-id ${cfg.locker} && systemctl suspend, mode \"default\"";
"h" = "exec --no-startup-id ${cfg.locker} && systemctl hibernate, mode \"default\"";
"r" = "exec --no-startup-id systemctl reboot, mode \"default\"";
"Shift+s" = "exec --no-startup-id systemctl poweroff -i, mode \"default\"";
"Return" = "mode \"default\"";
"Escape" = "mode \"default\"";
};
};
keybindings = {
@@ -171,7 +152,6 @@ in {
# - Modes ------------------------------
"${mod}+r" = "mode \"resize\"";
"${mod}+End" = "mode \"${system_mode}\"";
# - Media ------------------------------
@@ -211,9 +191,6 @@ in {
"${mod}+Shift+8" = "move container to workspace 8; workspace 8";
"${mod}+Shift+9" = "move container to workspace 9; workspace 9";
"${mod}+Shift+0" = "move container to workspace 10; workspace 10";
"${mod}+Return" = "exec ${cfg.terminal}";
"${mod}+space" = "exec ${cfg.launcher}";
} // cfg.extraKeybindings;
};
};