diff --git a/eww-bar/.config/eww-bar/audio.sh b/eww-bar/.config/eww-bar/audio.sh index ff86694..8712cda 100755 --- a/eww-bar/.config/eww-bar/audio.sh +++ b/eww-bar/.config/eww-bar/audio.sh @@ -5,8 +5,9 @@ case "$1" in "symbol") pactl subscribe | grep --line-buffered "Event 'change' on client" | while read -r; do case "$(pactl get-default-sink)" in - *Arctis_9*) echo "🎧";; - *) echo "📢";; + *Arctis_9*) echo "";; + #*Arctis_9*) echo "";; + *) echo "";; esac done ;; diff --git a/eww-bar/.config/eww-bar/eww.scss b/eww-bar/.config/eww-bar/eww.scss index 5294976..e5d21e2 100644 --- a/eww-bar/.config/eww-bar/eww.scss +++ b/eww-bar/.config/eww-bar/eww.scss @@ -15,6 +15,7 @@ window { button { background: none; margin: 3px; + padding-left: 1px; &.inactive { color: #888974; } @@ -53,7 +54,8 @@ window { scale trough highlight { all: unset; - background-color: #8ec07c; + //background-color: #8ec07c; + background-color: #665c54; border-bottom-right-radius: 5px; } scale trough { @@ -80,4 +82,16 @@ window { .time { padding-top: 7px; padding-bottom: 7px; + color: #a89984; +} + + + + + +.music-popup { + all: unset; + background-color: #1d2021; + padding: 0px 20px; + margin: 0; } diff --git a/eww-bar/.config/eww-bar/eww.yuck b/eww-bar/.config/eww-bar/eww.yuck index c5338fa..64ad85e 100644 --- a/eww-bar/.config/eww-bar/eww.yuck +++ b/eww-bar/.config/eww-bar/eww.yuck @@ -2,7 +2,7 @@ (box :orientation "v" (box (box :valign "start" - :halign "center" + :halign "fill" :class "segment-top" (top :screen screen))) (box @@ -23,7 +23,7 @@ (defwidget middle [] (time)) (defwidget time [] (box :orientation "v" - :class "metric time" + :class "time" hour min sec)) (defwidget bottom [] @@ -31,18 +31,26 @@ :valign "end" :space-evenly true :spacing "5" + (box :class "metric" :orientation "v" + (button :onclick "eww -c /home/leon/.config/eww-bar open --toggle music-popup" "") + (music-button)) (volume) (box :class "metric" :orientation "v" - (large-sym :sym "" ) "${round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}%") + (label :class "metric-icon" :style "font-size: 0.8rem;" :text "") + "${round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}%") (box :class "metric" :orientation "v" (label :class "metric-icon":text "") "${round(EWW_RAM, 0)}%") (box :class "metric" :orientation "v" - (label :class "metric-icon":text "") + (label :class "metric-icon" :text "") "${round(EWW_CPU_USAGE.avg, 0)}%") - (box :class "metric" + (box :class "metric" (date)))) +(defwidget music-button [] + (button :onclick "playerctl play-pause" + "${music_data.status == "Playing" ? "⏸" : "▶"}")) + (defwidget volume [] (box :class "volume-metric" :orientation "v" @@ -58,11 +66,14 @@ :valign "fill" :vexpand true (button :onclick "./audio.sh toggle" - (large-sym :sym audio_sink)) + (label :style "font-size: 1.2em; font-family: DejaVuSansMono Nerd Font Mono" + :text audio_sink)) (button :onclick "pavucontrol &" "${volume}%")))) + + (defwidget large-sym [sym] (label :class "metric-icon large-symbol" :text sym)) @@ -74,6 +85,10 @@ (deflisten audio_sink "./audio.sh symbol") (deflisten volume :initial "0" "./audio.sh volume") +(deflisten music_data + :initial `{"status": ""}` + `playerctl --follow metadata --format '{ "status": "{{status}}", "artist": "{{artist}}", "title": "{{title}}"}'`) + (defpoll hour :interval "1s" "date +%H") (defpoll min :interval "1s" "date +%M") (defpoll sec :interval "1s" "date +%S") @@ -99,3 +114,18 @@ :anchor "top left" :reserve (struts :distance "40px" :side "left") (bar :screen 2)) + + + + +(defwidget music-popup [] + (box :class "music-popup" :orientation "h" :space-evenly false :spacing 10 + (button :onclick "playerctl previous" "⏮") + "${music_data.artist} - ${music_data.title}" + (button :onclick "playerctl next" "⏭")) + ) + +(defwindow music-popup + :monitor 1 + :geometry (geometry :x "30px" :y "70%" :height "65px") + (music-popup)) diff --git a/xmonad/.xmonad/lib/Config.hs b/xmonad/.xmonad/lib/Config.hs index 7a1e86d..193f0d8 100644 --- a/xmonad/.xmonad/lib/Config.hs +++ b/xmonad/.xmonad/lib/Config.hs @@ -276,6 +276,7 @@ myStartupHook = do --spawnOnce "/home/leon/Downloads/picom --config /home/leon/.config/picom.conf --experimental-backends --backend xrender" --no-fading-openclose" spawnOnce "picom --config /home/leon/.config/picom.conf --experimental-backends --backend glx" --no-fading-openclose" spawn "/home/leon/.config/polybar/launch.sh" + spawn "xsetroot -cursor_name left_ptr" spawnOnce "nitrogen --restore" spawnOnce "mailnag" spawnOnce "flameshot"