move to playerctl
This commit is contained in:
parent
609f3569e4
commit
1f18c3eff3
7 changed files with 16 additions and 5 deletions
|
@ -47,7 +47,7 @@ M.whichkey = {
|
|||
general = {
|
||||
n = {
|
||||
["w"] = { "<cmd>w!<CR>", "Save" },
|
||||
["q"] = { function() require("funcs").buf_kill() end, "Close" },
|
||||
["'"] = { function() require("funcs").buf_kill() end, "Close" },
|
||||
["f"] = { function() require("lf").start("~") end, "File Picker" },
|
||||
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
||||
u = {
|
||||
|
|
|
@ -13,5 +13,4 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
|
|||
else
|
||||
. "$HOME/.xprofile"
|
||||
fi
|
||||
|
||||
dwm
|
||||
|
|
|
@ -6,10 +6,11 @@ setbg &
|
|||
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$!
|
||||
remaps &
|
||||
|
||||
autostart="picom checkup mpd dunst unclutter pipewire dwmblocks"
|
||||
autostart="picom checkup dunst unclutter pipewire dwmblocks"
|
||||
for program in $autostart; do
|
||||
pidof -s "$program" || "$program" &
|
||||
done >/dev/null 2>&1
|
||||
playerctld daemon
|
||||
|
||||
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
||||
gpg-connect-agent /bye 1> /dev/null 2>&1
|
||||
|
@ -33,7 +34,7 @@ export XSECURELOCK_PASSWORD_PROMPT="time_hex"
|
|||
export XSECURELOCK_AUTH_TIMEOUT=10
|
||||
export XSECURELOCK_SHOW_DATETIME=1
|
||||
export XSECURELOCK_COMPOSITE_OBSCURER=0
|
||||
export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid"
|
||||
export XSECURELOCK_SAVER="/usr/lib/xscreensaver/cubicgrid"
|
||||
export XSECURELOCK_SHOW_DATETIME=1
|
||||
export XSECURELOCK_SHOW_HOSTNAME=1
|
||||
xset s 300
|
||||
|
|
|
@ -12,3 +12,4 @@ filter() {
|
|||
fi
|
||||
}
|
||||
pidof -x sbd-music >/dev/null 2>&1 || sbd-music >/dev/null 2>&1 &
|
||||
filter
|
||||
|
|
8
.local/bin/statusbar/sb-playerctl
Executable file
8
.local/bin/statusbar/sb-playerctl
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 &
|
||||
[ "$(playerctl status 2>&1)" = "No players found" ] && echo ""ﱙ && exit 1
|
||||
# song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)"
|
||||
song="$(playerctl metadata xesam:title)"
|
||||
[ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…"
|
||||
icon=$(playerctl status | sed "s/Playing//;s/Paused//;")
|
||||
echo "$icon $song"
|
|
@ -1,3 +1,3 @@
|
|||
#/bin/sh
|
||||
pidof -x sbd-xkbmap >/dev/null 2>&1 || sbd-xkbmap >/dev/null 2>&1 &
|
||||
# pidof -x sbd-xkbmap >/dev/null 2>&1 || sbd-xkbmap >/dev/null 2>&1 &
|
||||
printf "\033[11m\033[10m %s\n" "$(setxkbmap -query | grep -oP '(layout|variant):\s*\K\w+' | sed ':a;N;s/\n/ /')"
|
||||
|
|
2
.local/bin/statusbar/sbd-playerctl
Executable file
2
.local/bin/statusbar/sbd-playerctl
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
playerctl status -F | tee "/tmp/playerctl-status" | (while read -r _; do pkill -RTMIN+11 dwmblocks; done;)
|
Loading…
Add table
Reference in a new issue