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 = {
|
general = {
|
||||||
n = {
|
n = {
|
||||||
["w"] = { "<cmd>w!<CR>", "Save" },
|
["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" },
|
["f"] = { function() require("lf").start("~") end, "File Picker" },
|
||||||
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
["h"] = { "<cmd>nohlsearch<CR>", "Clear Highlights" },
|
||||||
u = {
|
u = {
|
||||||
|
|
|
@ -13,5 +13,4 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
|
||||||
else
|
else
|
||||||
. "$HOME/.xprofile"
|
. "$HOME/.xprofile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dwm
|
dwm
|
||||||
|
|
|
@ -6,10 +6,11 @@ setbg &
|
||||||
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$!
|
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$!
|
||||||
remaps &
|
remaps &
|
||||||
|
|
||||||
autostart="picom checkup mpd dunst unclutter pipewire dwmblocks"
|
autostart="picom checkup dunst unclutter pipewire dwmblocks"
|
||||||
for program in $autostart; do
|
for program in $autostart; do
|
||||||
pidof -s "$program" || "$program" &
|
pidof -s "$program" || "$program" &
|
||||||
done >/dev/null 2>&1
|
done >/dev/null 2>&1
|
||||||
|
playerctld daemon
|
||||||
|
|
||||||
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
||||||
gpg-connect-agent /bye 1> /dev/null 2>&1
|
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_AUTH_TIMEOUT=10
|
||||||
export XSECURELOCK_SHOW_DATETIME=1
|
export XSECURELOCK_SHOW_DATETIME=1
|
||||||
export XSECURELOCK_COMPOSITE_OBSCURER=0
|
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_DATETIME=1
|
||||||
export XSECURELOCK_SHOW_HOSTNAME=1
|
export XSECURELOCK_SHOW_HOSTNAME=1
|
||||||
xset s 300
|
xset s 300
|
||||||
|
|
|
@ -12,3 +12,4 @@ filter() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
pidof -x sbd-music >/dev/null 2>&1 || sbd-music >/dev/null 2>&1 &
|
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
|
#/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/ /')"
|
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