More xmonad keybindings and menus

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-05-28 19:08:28 +02:00
parent bbf97117ff
commit 6013c57702
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 13 additions and 1 deletions

View file

@ -54,6 +54,7 @@ in {
"screenshot" = lib.getExe pkgs.magic_rb.screenshot;
"emacs-rofi" = lib.getExe pkgs.emacs-rofi;
"notify" = lib.getExe pkgs.libnotify;
"playerctl" = lib.getExe pkgs.playerctl;
"reload" = pkgs.writeShellScript "xmonad-reload"
''
${lib.getExe pkgs.libnotify} -t 5000 "recompiling xmonad"
@ -70,7 +71,7 @@ in {
''
export SUDO_ASKPASS=${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass
_options="toggle-mic\ntoggle-radio\nscreenshot-all\nscreenshot-select\nscreenshot-focused\nsuspend\nreboot\nkexec\npoweroff"
_options="toggle-mic\ntoggle-radio\nscreenshot-all\nscreenshot-select\nscreenshot-focused\nsuspend\nreboot\nkexec\npoweroff\nlogout\nnmtui"
_option="$(echo -e $_options | emacs-rofi "command: " 90 30 | awk '{print $1}' | tr -d '\r\n')"
if [ ''${#_option} -gt 0 ]
@ -109,6 +110,12 @@ in {
sudo -A kexec -l /run/current-system/kernel --initrd=/run/current-system/initrd --reuse-cmdline
systemctl kexec
;;
logout)
loginctl terminate-session $XDG_SESSION_ID
;;
nmtui)
alacritty -e nmtui
;;
*)
;;
esac

View file

@ -144,6 +144,11 @@ myKeymap c =
, ("<XF86MonBrightnessUp>" , spawn "@brightnessctl@ set +5%")
, ("<XF86MonBrightnessDown>" , spawn "@brightnessctl@ set 5%-")
, ("<XF86AudioPlay>" , spawn "@notify@ -t 5000 \"Music: Play\"" >> spawn "@playerctl@ play-pause")
, ("<XF86AudioStop>" , spawn "@notify@ -t 5000 \"Music: Stop\"" >> spawn "@playerctl@ stop")
, ("<XF86AudioPrev>" , spawn "@notify@ -t 5000 \"Music: Prev\"" >> spawn "@playerctl@ previous")
, ("<XF86AudioNext>" , spawn "@notify@ -t 5000 \"Music: Next\"" >> spawn "@playerctl@ next")
, ("M-<F1>", spawn "@auxmenu@")
]
++