Fully implement string interpolation with ${} syntax
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
(workspaces)
|
||||
(music)
|
||||
(sidestuff)))
|
||||
|
||||
(defwidget sidestuff []
|
||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
||||
(slider-vol)
|
||||
@@ -23,12 +24,12 @@
|
||||
|
||||
(defwidget music []
|
||||
(box :class "music" :orientation "h" :space-evenly false :halign "center"
|
||||
{ ' ' + music}))
|
||||
' ${music}'))
|
||||
|
||||
(defwidget slider-vol []
|
||||
(box :class "slider-vol" :orientation "h" :space-evenly "false"
|
||||
(box :class "label-vol" ""
|
||||
(scale :min 0 :max 101 :value volume :onchange "amixer -D pulse sset Master {}%"))))
|
||||
(scale :min 0 :max 101 :value volume :onchange "amixer -D pulse sset Master \{}%"))))
|
||||
|
||||
(defwidget slider-ram []
|
||||
(box :orientation "h" :class "slider-ram" :space-evenly false
|
||||
@@ -38,14 +39,10 @@
|
||||
|
||||
(defwidget time []
|
||||
(box :class "time"
|
||||
{"{hour}:{min} {month + "the month" * 2} {number_day}, {year_full}"}))
|
||||
;{hour + ":" + min + " " + month + " " + number_day + ", " + year_full}))
|
||||
"${hour}:${min} ${month} ${number_day}, ${year_full}"))
|
||||
|
||||
(defvar music "bruh")
|
||||
|
||||
;(defpoll music :interval "5s" "playerctl metadata --format '{{ artist }} - {{ title }}' || true")
|
||||
(defvar volume "20")
|
||||
;(defpoll volume :interval "16s" "scripts/getvol")
|
||||
(defpoll music :interval "5s" "playerctl metadata --format '{{ artist }} - {{ title }}' || true")
|
||||
(defpoll volume :interval "1s" "scripts/getvol")
|
||||
|
||||
(defpoll number_day :interval "5h" "date '+%d'")
|
||||
(defpoll month :interval "10h" "date '+%b'")
|
||||
@@ -61,5 +58,3 @@
|
||||
:geometry (geometry :x "0%" :y "0%" :width "100%" :height "4%")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
(bar))
|
||||
|
||||
; asdf
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'
|
||||
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1
|
||||
|
||||
Reference in New Issue
Block a user