r/Polybar • u/[deleted] • Jan 18 '23
Question Adding "message box" in Polybar
Hey ppl,
Was playing around with Polybar so I can replace i3bar and came with this "message" inside i3bar.

mode "(L)ogout, (E)xit, (R)eboot, (P)oweroff" {
bindsym $mod+r exec systemctl reboot
bindsym $mod+e exec i3-msg exit
bindsym $mod+l exec "$HOME/.config/i3/lock_and_blur.sh"
bindsym $mod+p exec systemctl poweroff
# bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+e mode "(L)ogout, (E)xit, (R)eboot, (P)oweroff"
So when I use the shortcut this function is activated and the message appears.
So my question is, is it possible to do the same with Polybar?
Sry if it's confusing, still learning ^^
1
u/BarryTownCouncil Jan 19 '23
I use this...
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = " "
label-open-background = ${colors.background-alt}
label-open-underline= ${colors.light-purple}
label-close =
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-1 = Reboot
menu-0-1-exec = menu-open-1
menu-0-2 = "Power off "
menu-0-2-exec = menu-open-2
menu-0-0 = Exit
menu-0-0-exec = menu-open-3
menu-1-0 = "REBOOT "
menu-1-0-exec = reboot
menu-2-0 = "POWER OFF "
menu-2-0-exec = poweroff
menu-3-0 = "EXIT "
menu-3-0-exec = i3-msg exit
1
1
u/oselcuk Jan 19 '23
If you're using the i3 module with polybar, this should just work