mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Move all variable definitions under a single file
This commit is contained in:
parent
d583587360
commit
0734993789
|
@ -1,5 +1,7 @@
|
|||
(defvar terminal "alacritty -e")
|
||||
|
||||
(include "./modules/variables.yuck")
|
||||
|
||||
(include "./modules/clock.yuck")
|
||||
(include "./modules/volume.yuck")
|
||||
(include "./modules/bitcoin.yuck")
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
(defpoll battery
|
||||
:interval "1s"
|
||||
:initial '{"percent":"0","plugged":"false","status":"N/A","capacity_icon":"","extra_icon":"","manufacturer":"N/A","model_name":"N/A","technology":"N/A","energy_now":"0","enerfy_full":"0","enerfy_full_design":"0","cycle_count":"0","critical":"false","full":"false"}'
|
||||
`scripts/battery`)
|
||||
|
||||
(defwidget battery_module []
|
||||
(eventbox
|
||||
:class "module battery"
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
(defpoll bitcoin
|
||||
:interval "5m"
|
||||
:initial "$N/A"
|
||||
`~/.local/bin/scripts/cli/bitcoin`)
|
||||
|
||||
(defwidget bitcoin_module []
|
||||
(eventbox
|
||||
:onclick "~/.local/bin/scripts/cli/bitcoin | xargs -I_ ${EWW_CMD} update bitcoin=_"
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
(defpoll time
|
||||
:interval "5s"
|
||||
:initial '{"date": "01 Jan", "hour": "00", "minute": "00", "day": "Monday"}'
|
||||
`date +'{"date": "%d %b", "hour": "%H", "minute": "%M", "day": "%A"}'`)
|
||||
|
||||
(defwidget clock_module []
|
||||
|
||||
(eventbox
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
(deflisten temperature `scripts/gammarelay temperature watch`)
|
||||
(deflisten brightness `scripts/gammarelay brightness watch`)
|
||||
; (deflisten gamma `scripts/gammarelay gamma watch`)
|
||||
|
||||
(defwidget gammarelay_module []
|
||||
(box
|
||||
:class "module gammarelay"
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
; TODO: Figure out how to store this one-time
|
||||
|
||||
(defpoll kernel
|
||||
:interval "10000h"
|
||||
:initial 'N/A'
|
||||
; `uname -r | sed -r 's/(.+)-arch(.+)/\\1/'`
|
||||
`uname -r`)
|
||||
|
||||
(defwidget kernel_module []
|
||||
(eventbox
|
||||
:class "module kernel"
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
(defpoll uptime
|
||||
:interval "1m"
|
||||
:initial 'N/A'
|
||||
`uptime -p | sed \\
|
||||
-e 's/^up //' \\
|
||||
-e 's/ years\\?,\\?/y/' \\
|
||||
-e 's/ months\\?,\\?/m/' \\
|
||||
-e 's/ weeks\\?,\\?/w/' \\
|
||||
-e 's/ days\\?,\\?/d/' \\
|
||||
-e 's/ hours\\?,\\?/h/' \\
|
||||
-e 's/ minutes\\?,\\?/m/' \\
|
||||
-e 's/ seconds\\?,\\?/s/' \\
|
||||
| cut -d' ' -f-2`)
|
||||
|
||||
(defwidget uptime_module []
|
||||
(eventbox
|
||||
:class "module uptime"
|
||||
|
|
51
home/.config/eww/modules/variables.yuck
Normal file
51
home/.config/eww/modules/variables.yuck
Normal file
|
@ -0,0 +1,51 @@
|
|||
(defpoll time
|
||||
:interval "5s"
|
||||
:initial '{"date": "01 Jan", "hour": "00", "minute": "00", "day": "Monday"}'
|
||||
`date +'{"date": "%d %b", "hour": "%H", "minute": "%M", "day": "%A"`)
|
||||
|
||||
(deflisten volume
|
||||
:initial '{ "speaker_vol": "100", "speaker_mute": false, "speaker_icon": "", "microphone_mute": false, "microphone_vol": "100", "microphone_icon": "" }'
|
||||
`scripts/volume loop`)
|
||||
|
||||
(deflisten window_name
|
||||
:initial `{"class":"","name":"","formatted_name":""}`
|
||||
`scripts/window_name`)
|
||||
|
||||
(deflisten workspaces
|
||||
:initial `[{"id": 1,"name": "N/A","monitor": "N/A","windows": 1,"hasfullscreen": false,"lastwindow": "N/A","lastwindowtitle": "N/A","format_name": "N/A","active": true}]`
|
||||
`scripts/workspaces --loop`)
|
||||
|
||||
(defpoll battery
|
||||
:interval "1s"
|
||||
:initial '{"percent":"0","plugged":"false","status":"N/A","capacity_icon":"","extra_icon":"","manufacturer":"N/A","model_name":"N/A","technology":"N/A","energy_now":"0","enerfy_full":"0","enerfy_full_design":"0","cycle_count":"0","critical":"false","full":"false"}'
|
||||
`scripts/battery`)
|
||||
|
||||
(defpoll uptime
|
||||
:interval "1m"
|
||||
:initial 'N/A'
|
||||
`uptime -p | sed \\
|
||||
-e 's/^up //' \\
|
||||
-e 's/ years\\?,\\?/y/' \\
|
||||
-e 's/ months\\?,\\?/m/' \\
|
||||
-e 's/ weeks\\?,\\?/w/' \\
|
||||
-e 's/ days\\?,\\?/d/' \\
|
||||
-e 's/ hours\\?,\\?/h/' \\
|
||||
-e 's/ minutes\\?,\\?/m/' \\
|
||||
-e 's/ seconds\\?,\\?/s/' \\
|
||||
| cut -d' ' -f-2`)
|
||||
|
||||
(defpoll bitcoin
|
||||
:interval "5m"
|
||||
:initial "$N/A"
|
||||
`~/.local/bin/scripts/cli/bitcoin`)
|
||||
|
||||
; TODO: Figure out how to store this one-time
|
||||
(defpoll kernel
|
||||
:interval "10000h"
|
||||
:initial 'N/A'
|
||||
; `uname -r | sed -r 's/(.+)-arch(.+)/\\1/'`
|
||||
`uname -r`)
|
||||
|
||||
(deflisten temperature `scripts/gammarelay temperature watch`)
|
||||
(deflisten brightness `scripts/gammarelay brightness watch`)
|
||||
(deflisten gamma `scripts/gammarelay gamma watch`)
|
|
@ -1,9 +1,5 @@
|
|||
(defvar mic_rev false)
|
||||
|
||||
(deflisten volume
|
||||
:initial '{ "speaker_vol": "100", "speaker_mute": false, "speaker_icon": "", "microphone_mute": false, "microphone_vol": "100", "microphone_icon": "" }'
|
||||
`scripts/volume loop`)
|
||||
|
||||
(defwidget volume_module []
|
||||
(box
|
||||
:class "module volume"
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
(deflisten window_name
|
||||
:initial `{"class":"","name":"","formatted_name":""}`
|
||||
`scripts/window_name`)
|
||||
|
||||
; Consider making the window name clickable, opening up a full window that's showing
|
||||
; the selected window details (class, unformatted name, and perhaps even more, like
|
||||
; xwayland status, ...)
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
(deflisten workspaces
|
||||
:initial `[{"id": 1,"name": "N/A","monitor": "N/A","windows": 1,"hasfullscreen": false,"lastwindow": "N/A","lastwindowtitle": "N/A","format_name": "N/A","active": true}]`
|
||||
`scripts/workspaces --loop`)
|
||||
|
||||
|
||||
; (defwidget sep []
|
||||
; (label :class "separ module" :text "|"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue