mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-06-08 00:33:43 +02:00
refactor: eww control panel window
This commit is contained in:
parent
d2c7b40f3c
commit
e78c4d3c1d
2 changed files with 22 additions and 159 deletions
|
@ -33,13 +33,6 @@
|
||||||
; (defpoll cpu :interval "1s" "bash ./scripts/sys_info --cpu")
|
; (defpoll cpu :interval "1s" "bash ./scripts/sys_info --cpu")
|
||||||
; (defpoll mem :interval "1s" "bash ./scripts/sys_info --mem")
|
; (defpoll mem :interval "1s" "bash ./scripts/sys_info --mem")
|
||||||
|
|
||||||
; Reveals
|
|
||||||
(defvar reveal1 false)
|
|
||||||
(defvar reveal2 false)
|
|
||||||
(defvar reveal4 false)
|
|
||||||
(defvar reveal5 false)
|
|
||||||
(defvar reveal6 false)
|
|
||||||
|
|
||||||
; Desktop
|
; Desktop
|
||||||
(defpoll trashcanPath :interval "24h" "./scripts/iconfetch.py trashcan_empty")
|
(defpoll trashcanPath :interval "24h" "./scripts/iconfetch.py trashcan_empty")
|
||||||
|
|
||||||
|
@ -87,12 +80,12 @@
|
||||||
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
|
;; (deflisten pside "playerctl -F metadata -f '{ \"volume\": {{volume*100}}, \"shuffle\": \"{{shuffle}}\", \"loop\": \"{{loop}}\" }'")
|
||||||
|
|
||||||
; Controlpanel
|
; Controlpanel
|
||||||
(defvar revealControlpanel true)
|
(defvar revealControlpanel false)
|
||||||
(defvar revealWeather false)
|
(defvar revealWeather false)
|
||||||
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
|
(defpoll hostname :initial "idk" :interval "24h" 'echo "$(whoami)"')
|
||||||
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
|
(defpoll uptime :initial "idk" :interval "1m" "uptime -p")
|
||||||
(defpoll datehour :initial "12" :interval "30m" "date +'%H'")
|
(defpoll datehour :initial "12" :interval "30m" "date +'%H'")
|
||||||
(defpoll notesc :interval "2s" :run-while reveal4 "cat -s ~/Documents/fuck.txt")
|
(defpoll notesc :interval "2s" "cat -s ~/Documents/fuck.txt")
|
||||||
|
|
||||||
; Python
|
; Python
|
||||||
(defpoll quotejson :interval "1h" "./scripts/python/quote.py")
|
(defpoll quotejson :interval "1h" "./scripts/python/quote.py")
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
(User)
|
(User)
|
||||||
(SystemMonitor)
|
(SystemMonitor)
|
||||||
; (weather)
|
|
||||||
|
|
||||||
; (MediaPlayer :h 160 :permashow true)
|
; (MediaPlayer :h 160 :permashow true)
|
||||||
|
|
||||||
|
@ -42,108 +41,6 @@
|
||||||
(button :onclick "./scripts/pop scrop" (label :text ""))
|
(button :onclick "./scripts/pop scrop" (label :text ""))
|
||||||
(button :onclick "~/.config/eww/themeswitch/scripts/pop" (label :text "")))))
|
(button :onclick "~/.config/eww/themeswitch/scripts/pop" (label :text "")))))
|
||||||
|
|
||||||
(defwidget chooser []
|
|
||||||
(box
|
|
||||||
:orientation "v"
|
|
||||||
:height 60
|
|
||||||
:class "panel-widget"
|
|
||||||
:space-evenly false
|
|
||||||
|
|
||||||
(box
|
|
||||||
:orientation "h"
|
|
||||||
|
|
||||||
(button
|
|
||||||
:onclick "${EWW_CMD} update reveal4=${!reveal4} reveal5=false reveal6=false"
|
|
||||||
:onrightclick "foot nvim ~/Documents/fuck.txt"
|
|
||||||
(label :class {reveal4 ? "titlesel" : "title"} :text "Notes"))
|
|
||||||
(button
|
|
||||||
:onclick "${EWW_CMD} update reveal5=${!reveal5} reveal4=false reveal6=false"
|
|
||||||
(label :class {reveal5 ? "titlesel" : "title"} :text "System"))
|
|
||||||
(button
|
|
||||||
:onclick "${EWW_CMD} update reveal6=${!reveal6} reveal5=false reveal4=false"
|
|
||||||
(label :class {reveal6 ? "titlesel" : "title"} :text "Hyprland")))
|
|
||||||
|
|
||||||
(notes)
|
|
||||||
(sysinfo)
|
|
||||||
(wmctrl)))
|
|
||||||
|
|
||||||
|
|
||||||
(defwidget notes []
|
|
||||||
(revealer
|
|
||||||
:reveal reveal4
|
|
||||||
:transition "slideup"
|
|
||||||
(box
|
|
||||||
:height 140
|
|
||||||
(box
|
|
||||||
:orientation "h"
|
|
||||||
(scroll
|
|
||||||
:hscroll true
|
|
||||||
:vscroll true
|
|
||||||
(label :text notesc))))))
|
|
||||||
|
|
||||||
(defwidget wmctrl []
|
|
||||||
(revealer
|
|
||||||
:reveal reveal6
|
|
||||||
:transition "slideup"
|
|
||||||
(scroll
|
|
||||||
:hscroll false
|
|
||||||
:vscroll true
|
|
||||||
:height 140
|
|
||||||
(box
|
|
||||||
:orientation "v"
|
|
||||||
:valign "fill"
|
|
||||||
:space-evenly false
|
|
||||||
:spacing 5
|
|
||||||
(wmslider
|
|
||||||
:name "gaps outer"
|
|
||||||
:val gapsouter
|
|
||||||
:onchange "swaymsg gaps outer all set {}"
|
|
||||||
:max 300
|
|
||||||
:reset "${EWW_CMD} update gapsouter=0 && swaymsg gaps outer all set 0")
|
|
||||||
(wmslider
|
|
||||||
:name "gaps inner"
|
|
||||||
:val gapsinner
|
|
||||||
:onchange "swaymsg gaps inner all set {}"
|
|
||||||
:max 150
|
|
||||||
:reset "${EWW_CMD} update gapsinner=15 && swaymsg gaps inner all set 15")
|
|
||||||
(wmslider
|
|
||||||
:name "border size"
|
|
||||||
:val borderpixel
|
|
||||||
:onchange "swaymsg default_border pixel {} && swaymsg '[app_id=\".*\"] border pixel {}'"
|
|
||||||
:max 50
|
|
||||||
:reset "${EWW_CMD} update borderpixel=2 && swaymsg default_border pixel 2 && swaymsg '[app_id=\".*\"] border pixel 2'")
|
|
||||||
(box
|
|
||||||
:orientation "h"
|
|
||||||
:space-evenly false
|
|
||||||
:halign "center"
|
|
||||||
:spacing 10
|
|
||||||
(label :text "natural scrolling")
|
|
||||||
(checkbox
|
|
||||||
:onchecked "swaymsg input \"type:touchpad\" natural_scroll enable"
|
|
||||||
:onunchecked "swaymsg input \"type:touchpad\" natural_scroll disable"))
|
|
||||||
(box
|
|
||||||
:orientation "h"
|
|
||||||
:space-evenly false
|
|
||||||
:halign "center"
|
|
||||||
:spacing 10
|
|
||||||
(label :text "disable when typing")
|
|
||||||
(checkbox
|
|
||||||
:onchecked "swaymsg input \"type:touchpad\" dwt enable"
|
|
||||||
:onunchecked "swaymsg input \"type:touchpad\" dwt disable"
|
|
||||||
))
|
|
||||||
|
|
||||||
(box
|
|
||||||
:orientation "h"
|
|
||||||
:space-evenly false
|
|
||||||
:halign "center"
|
|
||||||
:spacing 10
|
|
||||||
(label :text "caffeine")
|
|
||||||
(checkbox
|
|
||||||
:onchecked "swaymsg [app_id='.*'] inhibit_idle open && ${EWW_CMD} update caffeine=true"
|
|
||||||
:onunchecked "swaymsg [app_id='.*'] inhibit_idle none && ${EWW_CMD} update caffeine=false"
|
|
||||||
))
|
|
||||||
))))
|
|
||||||
|
|
||||||
(defwidget SystemMonitor []
|
(defwidget SystemMonitor []
|
||||||
(box
|
(box
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
|
@ -155,35 +52,8 @@
|
||||||
(SystemStatus :icon "" :val { EWW_BATTERY.BAT0.capacity })
|
(SystemStatus :icon "" :val { EWW_BATTERY.BAT0.capacity })
|
||||||
))
|
))
|
||||||
|
|
||||||
(defwidget wmslider [name val onchange max reset]
|
|
||||||
(box
|
|
||||||
:orientation "h"
|
|
||||||
:space-evenly false
|
|
||||||
:halign "center"
|
|
||||||
:width 20
|
|
||||||
:vexpand false
|
|
||||||
:valign "center"
|
|
||||||
:spacing 10
|
|
||||||
(label
|
|
||||||
:text name)
|
|
||||||
(scale
|
|
||||||
:min 0
|
|
||||||
:max max
|
|
||||||
:class "wmctrlslide"
|
|
||||||
:tooltip val
|
|
||||||
:value val
|
|
||||||
:onchange onchange)
|
|
||||||
(button
|
|
||||||
:onclick reset
|
|
||||||
:style "padding: 0px 8px 0px 3px;"
|
|
||||||
"")))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defwidget User []
|
(defwidget User []
|
||||||
(revealer
|
|
||||||
:reveal {!reveal4 && !reveal5 && !reveal6}
|
|
||||||
:transition "slideup"
|
|
||||||
(box
|
(box
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
@ -205,7 +75,7 @@
|
||||||
:valign "center"
|
:valign "center"
|
||||||
:halign "center"
|
:halign "center"
|
||||||
(label :halign "start" :text "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}")
|
(label :halign "start" :text "${datehour < 12 ? 'Good morning' : datehour < 18 ? 'Good afternoon' : datehour < 22 ? 'Good evening' : 'Good night'} ${hostname}")
|
||||||
(label :halign "start" :text uptime :style "font-size: 12px;"))))))
|
(label :halign "start" :text uptime :style "font-size: 12px;")))))
|
||||||
|
|
||||||
(defwidget NotificationsWeatherBox []
|
(defwidget NotificationsWeatherBox []
|
||||||
(box
|
(box
|
||||||
|
|
Loading…
Add table
Reference in a new issue