[polybar] Add sxhkd mode display module

This commit is contained in:
Marty Oehme 2020-05-26 13:09:45 +02:00
parent cb5f09c414
commit d4fda84c3b
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
3 changed files with 21 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -57,7 +57,7 @@ padding-left = 0
padding-right = 0
module-margin-left = 2
modules-left = workspaces pomo
modules-left = workspaces sxhkdmode pomo
modules-center = music date papersdue
modules-right = networkspeed archupdates cpu temp backlight volume battery
; do not use offsets for the bar, would only work with override-redirect
@ -91,6 +91,17 @@ font-2 = Iosevka:size=18;1
cursor-click = pointer
[module/sxhkdmode]
type = custom/script
exec = sxhkd-chain-labels
exec-if = type sxhkd-chain-labels
tail = true
format = <label>
format-padding = 5
format-prefix = "狀 "
format-background = ${colors.primary}
format-foreground = ${colors.background}
[module/workspaces]
; module type
type = internal/i3
@ -231,7 +242,6 @@ tail = true
click-left = exist rofi-bib-due normal "opening due papers" && rofi-bib-due -p1 -u $(date --date='fri this week' +%Y-%m-%d)
; show list with all
click-right = exist rofi-bib-due normal "opening due papers" && rofi-bib-due -p3 -u $(date --date='fri this week' +%Y-%m-%d)
; format-foreground = ${colors.primary}
format-prefix = " "
interval = 120

View file

@ -22,7 +22,7 @@ full-load and temperature warning:
In general, the bar's colors are derived from the colors defined in xresources. It follows the base16 color template, as does every module in these dotfiles. That means the bar can be quickly re-themed using base16 color themes and the process can be automated (e.g. with styler).
## i3 Workspaces
## i3 workspaces
![normal](.assets/polybar/i3-normal.png) -- focus on workspace 4
@ -30,12 +30,19 @@ The i3 workspaces module is pretty simple and self-explanatory. It shows all exi
![highlight](.assets/polybar/i3-highlight.png) -- focus on workspace 2, workspace 1 highlighted
Additionally, if an i3 mode is active, it will be displayed next to the workspaces in a stark color to notice the mode being active.
Additionally, if an i3 mode is active, it will be displayed next to the workspaces in a stark color to notice the mode being active. This is slowly being deprecated in favor of sxhkd modes -- e.g. media mode is now displayed by the sxhkd module instead. The only remaining mode is resize for the moment.
![mode](.assets/polybar/i3-mode.png) -- focus on workspace 3, 'Media' mode active
Workspaces can be cycled with the mouse-wheel when hovering over the module, or can be invoked by clicking on the icons.
## sxhkd modes
The current mode of the desktop is being passed from sxhkd to polybar for display.
Its look is based on the i3 workspace mode display, though by default they appear to the right of the workspaces.
![sxhkd mode](.assets/polybar/sxhkd_mode.png) -- academia sxhkd mode activated
## Current track information
By default, the track information panel is very minimal. It simply displays a note when something is currently playing, a pause symbol when the current track is pause, and nothing at all when no track is currently available. (no media player open, all tracks stopped, etc.)