Compare commits
2 Commits
2f675e96f0
...
9a5bc3e981
| Author | SHA1 | Date | |
|---|---|---|---|
|
9a5bc3e981
|
|||
|
fe69d39769
|
@ -161,6 +161,7 @@ in {
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
font-family: ${color.font};
|
||||
}
|
||||
|
||||
.normal-icons {
|
||||
@ -605,8 +606,21 @@ in {
|
||||
action = spawn "walker" "-m" "providerlist";
|
||||
hotkey-overlay = {title = "Toggle the launcher.";};
|
||||
};
|
||||
"Mod+Escape" = {
|
||||
action = spawn "walker";
|
||||
"Mod+Escape" = let
|
||||
powerMenu = mylib.rofi.mkSimpleMenu rec {
|
||||
prompt = "Session";
|
||||
attrs = {
|
||||
" Poweroff" = "poweroff";
|
||||
" Reboot" = "reboot";
|
||||
" Lock" = "loginctl lock-session";
|
||||
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
||||
# " Reload Hyprland" = "hyprctl reload";
|
||||
# " Exit Hyprland" = "hyprctl dispatch exit";
|
||||
};
|
||||
command = "walker -d -p ${prompt}";
|
||||
};
|
||||
in {
|
||||
action = spawn "${powerMenu}/bin/rofi-menu-Session";
|
||||
hotkey-overlay = {title = "Toggle the session menu.";};
|
||||
};
|
||||
"Mod+C" = {
|
||||
|
||||
@ -21,7 +21,11 @@
|
||||
|> builtins.attrValues
|
||||
|> builtins.concatStringsSep "\n";
|
||||
in
|
||||
prompt: attrs:
|
||||
{
|
||||
prompt,
|
||||
attrs,
|
||||
command ? ''rofi -dmenu -p " ${prompt} " -i'',
|
||||
}:
|
||||
pkgs.writeScriptBin "rofi-menu-${prompt}" ''
|
||||
#! ${pkgs.fish}/bin/fish
|
||||
|
||||
@ -29,7 +33,7 @@
|
||||
set OPTIONS ${unpack-options attrs}
|
||||
|
||||
# We choose a single OPTION using Rofi
|
||||
set OPTION (echo -e (string join "\n" $OPTIONS) | rofi -dmenu -p " ${prompt} " -i)
|
||||
set OPTION (echo -e (string join "\n" $OPTIONS) | ${command})
|
||||
|
||||
# Check if the chosen OPTION is a valid choice from OPTIONS
|
||||
if not contains $OPTION $OPTIONS
|
||||
|
||||
Reference in New Issue
Block a user