Setup power rofi menu
This commit is contained in:
parent
64d53fc193
commit
f23f7983d9
3 changed files with 20 additions and 0 deletions
|
@ -37,6 +37,7 @@ in {
|
||||||
file = {
|
file = {
|
||||||
"/home/${username}/.scripts/audio/get-sink-name.sh".source = ./home/scripts/audio/get-sink-name.sh;
|
"/home/${username}/.scripts/audio/get-sink-name.sh".source = ./home/scripts/audio/get-sink-name.sh;
|
||||||
"/home/${username}/.cache/scripts/get-sink-name.txt".source = ./home/cache/audio/get-sink-name.txt;
|
"/home/${username}/.cache/scripts/get-sink-name.txt".source = ./home/cache/audio/get-sink-name.txt;
|
||||||
|
"/home/${username}/.cache/scripts/power.sh".source = ./home/scripts/system/power.sh;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
18
config/home/scripts/system/power.sh
Normal file
18
config/home/scripts/system/power.sh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
option=$(printf "Sleep\nLogout\nShutdown\nRestart" | rofi -dmenu -theme Arc-Dark -font 'hack 18')
|
||||||
|
|
||||||
|
if [ "$option" = "Sleep" ];
|
||||||
|
then
|
||||||
|
i3lock-fancy -g -t "System Locked" -f Hack-Regular
|
||||||
|
systemctl sleep
|
||||||
|
elif [ "$option" = "Logout" ];
|
||||||
|
i3-msg exit
|
||||||
|
then
|
||||||
|
elif [ "$option" = "Shutdown" ];
|
||||||
|
poweroff
|
||||||
|
then
|
||||||
|
elif [ "$option" = "Restart" ];
|
||||||
|
reboot
|
||||||
|
then
|
||||||
|
fi
|
|
@ -191,6 +191,7 @@ bindsym $mod+Mod1+r reload
|
||||||
bindsym $mod+Shift+r restart
|
bindsym $mod+Shift+r restart
|
||||||
# exit i3 (logs you out of your X session)
|
# exit i3 (logs you out of your X session)
|
||||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||||
|
bindsym $mod+Mod1+delete exec "bash /home/vylpes/.cache/scripts/power.sh"
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
# resize window (you can also use the mouse for that)
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
|
|
Loading…
Reference in a new issue