update notifications, bar
This commit is contained in:
24
.config/bspwm/bspwmrc
Executable file
24
.config/bspwm/bspwmrc
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||
|
||||
bspc monitor DP-2 -d 1 2 3 4 5
|
||||
bspc monitor HDMI-0 -d 6 7 8 9 0
|
||||
|
||||
bspc config border_width 2
|
||||
bspc config window_gap 12
|
||||
|
||||
bspc config split_ratio 0.52
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
|
||||
bspc rule -a Lxappearance state=floating
|
||||
bspc rule -a Nvidia-settings state=floating
|
||||
bspc rule -a openrgb state=floating
|
||||
bspc rule -a Sxiv state=floating
|
||||
|
||||
dunst &
|
||||
|
||||
~/.config/bspwm/scripts/notify.sh &
|
||||
|
||||
picom &
|
22
.config/bspwm/scripts/notify.sh
Executable file
22
.config/bspwm/scripts/notify.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
previous_track=""
|
||||
while true; do
|
||||
# Check if feishin player exists
|
||||
player_exists=$(playerctl --player=Feishin status > /dev/null 2>&1; echo $?)
|
||||
if (( player_exists != 0 )); then
|
||||
echo "Feishin player not found."
|
||||
sleep 5
|
||||
continue
|
||||
fi
|
||||
|
||||
current_track=$(playerctl -p Feishin metadata --format '{{ title }}\n{{ artist }}\n{{ album }}')
|
||||
album_art_url=$(playerctl -p Feishin metadata mpris:artUrl)
|
||||
album_art_file="/tmp/album_art.jpg"
|
||||
wget -q -O $album_art_file $album_art_url
|
||||
if [[ "$current_track" != "$previous_track" ]]; then
|
||||
notify-send "Now Playing" "$current_track" -i $album_art_file
|
||||
previous_track="$current_track"
|
||||
fi
|
||||
sleep 1
|
||||
done
|
Reference in New Issue
Block a user