This commit is contained in:
Clay Gomera 2022-09-12 21:37:03 -04:00
parent 18b8db6c31
commit dfb8084340
2 changed files with 13 additions and 13 deletions

View file

@ -330,15 +330,15 @@ awful.keyboard.append_global_keybindings({
awful.keygrabber.run( awful.keygrabber.run(
function(_, key, event) function(_, key, event)
if event == "release" then return end if event == "release" then return end
if key == "d" then awful.spawn.with_shell("dmenu_drun") if key == "d" then awful.spawn.with_shell("rofi -show drun -show-icons")
elseif key == "r" then awful.spawn.with_shell("dmenu_run -b -l 10 -i") elseif key == "r" then awful.spawn.with_shell("rofi -show run")
elseif key == "e" then awful.spawn.with_shell("dmenu_edit") elseif key == "e" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_edit")
elseif key == "q" then awful.spawn.with_shell("dmenu_power") elseif key == "q" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_power")
elseif key == "i" then awful.spawn.with_shell("dmenu_wifi") elseif key == "i" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_wifi")
elseif key == "b" then awful.spawn.with_shell("dmenu_blue") elseif key == "b" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_blue")
elseif key == "s" then awful.spawn.with_shell("dmenu_scrot") elseif key == "s" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_scrot")
elseif key == "z" then awful.spawn.with_shell("dmenu_emoji") elseif key == "z" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_emoji")
elseif key == "w" then awful.spawn.with_shell("dmenu_wall") elseif key == "w" then awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_wall")
end end
awful.keygrabber.stop(grabber) awful.keygrabber.stop(grabber)
end end

View file

@ -26,21 +26,21 @@ pwr4="(X) Cancel"
pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4" pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4"
## MAIN ACTION COMMAND ## ## MAIN ACTION COMMAND ##
action=$(echo -e "$options" | rofi -dmenu -b -i -p " ") action=$(echo -e "$options" | rofi -dmenu -b -l 7 -i -p " ")
case "$action" in case "$action" in
$option1*) $option1*)
whoami | xargs -I % sh -c 'pkill -KILL -u %';; whoami | xargs -I % sh -c 'pkill -KILL -u %';;
$option2*) $option2*)
systemctl reboot;; systemctl reboot || loginctl reboot;;
$option3*) $option3*)
systemctl poweroff;; systemctl poweroff || loginctl poweroff;;
$option4*) $option4*)
betterlockscreen --suspend;; betterlockscreen --suspend;;
$option5*) $option5*)
betterlockscreen -l;; betterlockscreen -l;;
$option6*) $option6*)
currentpwr=$(powerprofilesctl get) currentpwr=$(powerprofilesctl get)
pwraction=$(echo -e "$pwrs" | rofi -dmenu -b -i -p "Current profile is: ${currentpwr} | Select profile:") pwraction=$(echo -e "$pwrs" | rofi -dmenu -b -l 3 -i -p "Current profile is: ${currentpwr} | Select profile:")
case "$pwraction" in case "$pwraction" in
$pwr1*) $pwr1*)
powerprofilesctl set performance && notify-send "Power profile switched to performance";; powerprofilesctl set performance && notify-send "Power profile switched to performance";;