mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
more bar stuff
This commit is contained in:
parent
64ac3ad811
commit
6e816303c5
4 changed files with 55 additions and 9 deletions
|
@ -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
|
||||
;;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
(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))
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue