Remove stupid dependencies (picom,dunst), notification in unix way (tiramisu).
Rebinding some keys.
This commit is contained in:
@ -53,9 +53,8 @@ separator-foreground = ${colors.disabled}
|
||||
|
||||
font-0 = CaskaydiaCove Nerd Font Mono:pixelsize=14;3
|
||||
|
||||
modules-left = xworkspaces xwindow
|
||||
modules-right = memory cpu date
|
||||
# filesystem
|
||||
modules-left = xworkspaces xwindow
|
||||
modules-right = polytiramisu memory cpu date
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
@ -118,6 +117,13 @@ date-alt = %Y-%m-%d %H:%M:%S
|
||||
label = %date%
|
||||
label-foreground = ${colors.altprime}
|
||||
|
||||
[module/polytiramisu]
|
||||
type = custom/script
|
||||
# Path to where you put polytiramisu.sh:
|
||||
exec = ~/.config/polybar/scripts/polytiramisu.sh
|
||||
format = <label>
|
||||
tail = true
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
25
polybar/scripts/polytiramisu.sh
Executable file
25
polybar/scripts/polytiramisu.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# Show tiramisu notifications in polybar.
|
||||
|
||||
# How many seconds notification is displayed:
|
||||
display_duration=7.0
|
||||
|
||||
# Maximum number of characters:
|
||||
char_limit=150
|
||||
|
||||
# Stop old tiramisu processes if any:
|
||||
pgrep -x tiramisu >/dev/null && killall tiramisu
|
||||
|
||||
# Start a new tiramisu process:
|
||||
tiramisu -o '#summary #body' |
|
||||
while read -r line; do
|
||||
# Cut notification by character limit:
|
||||
if [ "${#line}" -gt "$char_limit" ]; then
|
||||
line="$(echo "$line" | cut -c1-$((char_limit-1)))…"
|
||||
fi
|
||||
|
||||
# Display notification for the duration time:
|
||||
echo "$line"
|
||||
sleep "$display_duration"
|
||||
echo " "
|
||||
done
|
Reference in New Issue
Block a user