You are not logged in.

#1 2019-01-25 10:42:34

S7.L
Member
Registered: 2018-09-16
Posts: 338

dmenu keybind to logout shutdown reboot

Found this on the arch forums from back in 2012.

This is pretty useful now im on dwm. 1st one is a script i use for dwm second could be integrated into debian/bunsenlabs openbox.
I think you would just have to bind "super+shift+q" for the "Logout" or your choice of keybind to command

$ openbox --exit

Not that it would be very useful considering bunsenlabs has its own exit script but could be handy to someone interested in dmenu.

1.

#!/bin/bash

RET=$(echo -e "shutdown\nreboot\nlogout\ncancel" | dmenu -l 5 -p "Logout")

case $RET in
	shutdown) sudo poweroff ;;
	reboot) sudo reboot ;;
	logout) xdotool key "super+shift+q" ;;
	*) ;;
esac

2.

#!/bin/bash

RET=$(echo -e "shutdown\nreboot\nlogout\ncancel" | dmenu -l 5 -p "Logout")

case $RET in
	shutdown) systemctl poweroff ;;
	reboot) systemctl reboot ;;
	logout) xdotool key "super+shift+q" ;;
	*) ;;
esac

Offline

Board footer

Powered by FluxBB