Browse Source

Added dzen2 power menu to panel.

master
Daniel Sissom 5 years ago
parent
commit
b1f0a8d807
Signed by untrusted user who does not match committer: djsissom GPG Key ID: 2C30FFB796852389
3 changed files with 42 additions and 2 deletions
  1. + 1
    - 1
      bspwm/panel/panel_bar
  2. + 40
    - 0
      bspwm/panel/scripts/powermenu
  3. + 1
    - 1
      bspwm/panel/scripts/sysmenu

+ 1
- 1
bspwm/panel/panel_bar

@ -67,5 +67,5 @@ while read -r line ; do
wm_infos="$wm_infos%{F-} %{F-}"
;;
esac
printf "%s\n" "%{S+}%{l}%{A:sysmenu:}  %{A}$title%{c}$wm_infos%{r}%{A:togglecal:}$sys_infos%{A} ⏻ "
printf "%s\n" "%{S+}%{l}%{A:sysmenu:}  %{A}$title%{c}$wm_infos%{r}%{A:togglecal:}$sys_infos%{A} %{A:powermenu:}%{A} "
done

+ 40
- 0
bspwm/panel/scripts/powermenu

@ -0,0 +1,40 @@
#!/usr/bin/env sh
wm_name='powermenu'
if xdo id -a "$wm_name" > /dev/null; then
pkill -f "dzen2 -title-name $wm_name"
exit
fi
color0="#000000"
color5="#FFFFFF"
screen=1
out="Power
lock
reboot
shutdown"
lines=$(echo -e "$out" | wc -l)
echo -e "$out" | dzen2 \
-title-name "$wm_name" \
-bg "$color0" \
-fg "$color5" \
-x "-242" \
-y "20" \
-l $((lines-1)) \
-h 30 \
-w 240 \
-fn "Source Code Pro" \
-e "onstart=uncollapse;button1=menuexec,exit;button3=exit" \
-ta c \
-sa c \
-xs $screen \
-m \
-p &

+ 1
- 1
bspwm/panel/scripts/sysmenu

@ -24,7 +24,7 @@ lines=$(echo -e "$out" | wc -l)
echo -e "$out" | dzen2 \
-title-name "sysmenu" \
-title-name "$wm_name" \
-bg "$color0" \
-fg "$color5" \
-x "2" \

Loading…
Cancel
Save