Ricing rofi
This commit is contained in:
@@ -61,14 +61,16 @@ in
|
||||
desktop.i3 = {
|
||||
enable = true;
|
||||
laptop = cfg.laptop;
|
||||
launcher = "${pkgs.rofi}/bin/rofi rofi -show run";
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
locker = "${pkgs.i3lock-blur}/bin/i3lock-color -c 808F85 && sleep 1";
|
||||
|
||||
extraStartup = [
|
||||
{ command = "systemctl --user restart polybar"; always = true; notification = false; }
|
||||
{ command = "feh --bg-center -B \"${cfg.bgColour}\" -z --no-fehbg ${cfg.wallpapers}"; always = true; notification = false; }
|
||||
];
|
||||
|
||||
extraKeybindings = {
|
||||
"${cfg.i3.mod}+space" = "exec $HOME/.config/rofi/launcher/launcher.sh";
|
||||
"${cfg.i3.mod}+End" = "exec $HOME/.config/rofi/powermenu/powermenu.sh";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,5 +11,7 @@ in
|
||||
environment.systemPackages = with pkgs; [
|
||||
rofi
|
||||
];
|
||||
|
||||
hm.xdg.configFile."rofi".source = ../../config/.config/rofi;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user