Laptop files
This commit is contained in:
28
eww/widgets/bar.yuck
Normal file
28
eww/widgets/bar.yuck
Normal file
@ -0,0 +1,28 @@
|
||||
(include "widgets/date_time.yuck")
|
||||
(include "widgets/nowplaying.yuck")
|
||||
(include "widgets/divider.yuck")
|
||||
(include "widgets/quick_power.yuck")
|
||||
(include "widgets/workspaces.yuck")
|
||||
(include "widgets/system_info.yuck")
|
||||
(include "widgets/desktop_button.yuck")
|
||||
(include "widgets/weather.yuck")
|
||||
|
||||
(defwidget bar []
|
||||
(box :orientation "h" :class "bar" :spacing "10" :space-evenly false
|
||||
(centerbox :orientation "h" :hexpand true :class "center bar_section"
|
||||
(box :class "left" :halign "start"
|
||||
(workspaces)
|
||||
)
|
||||
(box :class "center" :halign "end"
|
||||
)
|
||||
(box :halign "end" :space-evenly "false"
|
||||
(weather)
|
||||
(systeminfo)
|
||||
(date_time)
|
||||
)
|
||||
)
|
||||
(box :class "right bar_section" :halign "end" :space-evenly false
|
||||
(quickpower)
|
||||
)
|
||||
)
|
||||
)
|
0
eww/widgets/briefmedia.yuck
Normal file
0
eww/widgets/briefmedia.yuck
Normal file
3
eww/widgets/cava.yuck
Normal file
3
eww/widgets/cava.yuck
Normal file
@ -0,0 +1,3 @@
|
||||
(defwidget cava []
|
||||
|
||||
)
|
30
eww/widgets/date_time.yuck
Normal file
30
eww/widgets/date_time.yuck
Normal file
@ -0,0 +1,30 @@
|
||||
(defpoll day :interval "1s" `date +\"%A\"`)
|
||||
(defpoll month :interval "1s" `date +\"%b\"`)
|
||||
(defpoll date :interval "1s" `date +\"%d\"`)
|
||||
|
||||
(defpoll h :interval "1s" `date +\"%H\"`)
|
||||
(defpoll m :interval "1s" `date +\"%M\"`)
|
||||
(defpoll s :interval "1s" `date +\"%S\"`)
|
||||
|
||||
(defvar show_date false)
|
||||
|
||||
(defwidget date_time []
|
||||
(eventbox :onhover "${eww} update show_date=true" :onhoverlost "${eww} update show_date=false"
|
||||
(box :class "datetime_module" :space-evenly "false"
|
||||
(revealer :reveal show_date :transition "slideleft"
|
||||
(box :class "bardate" :space-evenly "false" :orientation "h" :spacing "2"
|
||||
(label :text day :class "datetime")
|
||||
(label :text ", " :class "datetime")
|
||||
(label :text month :class "datetime")
|
||||
(label :text " ")
|
||||
(label :text date :class "datetime")
|
||||
)
|
||||
)
|
||||
(box :space-evenly "false" :orientation "h" :spacing "2"
|
||||
(label :text h :class "datetime" )
|
||||
(label :text ":" :class "datetime" )
|
||||
(label :text m :class "datetime")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
7
eww/widgets/desktop.yuck
Normal file
7
eww/widgets/desktop.yuck
Normal file
@ -0,0 +1,7 @@
|
||||
(include "widgets/desktop_clock.yuck")
|
||||
|
||||
(defwidget desktop []
|
||||
(box :class "bar_section" :orientation "v" :space-evenly "false" :spacing "3"
|
||||
(desktop_clock)
|
||||
)
|
||||
)
|
5
eww/widgets/desktop_button.yuck
Normal file
5
eww/widgets/desktop_button.yuck
Normal file
@ -0,0 +1,5 @@
|
||||
(defwidget desktopbutton []
|
||||
(eventbox :onclick "${eww} open desktop --toggle" :tooltip "Toggle Desktop Menu"
|
||||
(image :path "/home/sharpe/.config/eww/images/kanagawa-button.png" :image-width 20)
|
||||
)
|
||||
)
|
18
eww/widgets/desktop_clock.yuck
Normal file
18
eww/widgets/desktop_clock.yuck
Normal file
@ -0,0 +1,18 @@
|
||||
(defpoll p :interval "1s" `date +\"%p\"`)
|
||||
(defpoll I :interval "1s" `date +\"%I\"`)
|
||||
|
||||
(defwidget desktop_clock []
|
||||
(eventbox
|
||||
(box :class "desktop_clock" :space-evenly "false" :orientation "v" :spacing "3"
|
||||
(box :space-evenly "false" :orientation "h" :spacing "3" :halign "center"
|
||||
(label :text I :class "desktop_time desktop_time_h")
|
||||
(label :text " :" :class "desktop_time desktop_time_colon")
|
||||
(label :text m :class "desktop_time desktop_time_m")
|
||||
(label :text " " :class "desktop_time")
|
||||
(label :text p :class "desktop_time desktop_time_p"))
|
||||
(box :class "desktop_date_box" :space-evenly "false" :orientation "h" :spacing "3" :halign "center"
|
||||
(label :text day :class "desktop_date desktop_date_day")
|
||||
(label :text ", " :class "desktop_date desktop_date_comma")
|
||||
(label :text month :class "desktop_date desktop_date_month")
|
||||
(label :text " " :class "desktop_date")
|
||||
(label :text date :class "desktop_date desktop_date_date")))))
|
7
eww/widgets/desktop_mode.yuck
Normal file
7
eww/widgets/desktop_mode.yuck
Normal file
@ -0,0 +1,7 @@
|
||||
(defwidget desktop_mode []
|
||||
(box
|
||||
(button :class "desktop_mode_button" "")
|
||||
(button :class "desktop_mode_button" "")
|
||||
(button :class "desktop_mode_button" "")
|
||||
)
|
||||
)
|
5
eww/widgets/divider.yuck
Normal file
5
eww/widgets/divider.yuck
Normal file
@ -0,0 +1,5 @@
|
||||
(defwidget divider []
|
||||
(box
|
||||
(label :text "|")
|
||||
)
|
||||
)
|
8
eww/widgets/nowplaying.yuck
Normal file
8
eww/widgets/nowplaying.yuck
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
(defwidget nowplaying []
|
||||
(eventbox
|
||||
(box :space-evenly "false"
|
||||
(label :class "weather" :text "Now Playing")
|
||||
)
|
||||
)
|
||||
)
|
0
eww/widgets/quick_media.yuck
Normal file
0
eww/widgets/quick_media.yuck
Normal file
17
eww/widgets/quick_power.yuck
Normal file
17
eww/widgets/quick_power.yuck
Normal file
@ -0,0 +1,17 @@
|
||||
(defvar power_reveal false)
|
||||
|
||||
(defwidget quickpower []
|
||||
(eventbox :onhover "${eww} update power_reveal=true" :onhoverlost "${eww} update power_reveal=false"
|
||||
(box :space-evenly "false"
|
||||
(revealer :reveal power_reveal :transition "slideright"
|
||||
(box
|
||||
;(button :class "power sleep" :onclick "systemctl suspend" :tooltip "Sleep" " ")
|
||||
(button :class "power lock" :onclick "bash ./scripts/lock.sh" :tooltip "Lock" " ")
|
||||
(button :class "power logout" :onclick "hyprctl dispatch exit" :tooltip "Logout" " ")
|
||||
(button :class "power restart" :onclick "reboot" :tooltip "Restart" " ")
|
||||
)
|
||||
)
|
||||
(button :class "power shutdown" :onclick "shutdown now" :tooltip "Shut Down" "")
|
||||
)
|
||||
)
|
||||
)
|
54
eww/widgets/system_info.yuck
Normal file
54
eww/widgets/system_info.yuck
Normal file
@ -0,0 +1,54 @@
|
||||
(defpoll volume :interval "0.5s" `bash $HOME/.config/eww/scripts/audio.sh` )
|
||||
(defpoll speaker_state :interval "1s" `bash $HOME/.config/eww/scripts/speakerstate.sh`)
|
||||
|
||||
(defpoll net_status :interval "60s" `bash $HOME/.config/eww/scripts/network.sh`)
|
||||
(defpoll net_name :interval "60s" `nmcli | grep -Po '(?<=connected to ).*'`)
|
||||
|
||||
(defpoll rx_bandwidth :interval "5s" `bash $HOME/.config/eww/scripts/rx_bandwidth.sh`)
|
||||
(defpoll tx_bandwidth :interval "5s" `bash $HOME/.config/eww/scripts/tx_bandwidth.sh`)
|
||||
|
||||
(defpoll battery :interval "10s" `cat /sys/class/power_supply/BAT0/capacity`)
|
||||
(defpoll battery_status :interval "5s" `cat /sys/class/power_supply/BAT0/status`)
|
||||
|
||||
(defvar net_reveal false)
|
||||
(defvar vol_reveal false)
|
||||
|
||||
(defwidget systeminfo []
|
||||
(box :space-evenly "false" :class "system_module" :spacing 5
|
||||
(box :space-evenly false :tooltip "${battery}%"
|
||||
(label :class "sysinfo" :text {battery > 10 ? "" : ""})
|
||||
(label :class "sysinfo" :text {battery > 90 ? " " : battery > 65 ? " " : battery > 40 ? " " : battery > 15 ? " " : " "})
|
||||
(label :class "sysinfo" :text {battery_status == "Charging" ? "" : ""})
|
||||
)
|
||||
(eventbox :onhover "${eww} update vol_reveal=true" :onhoverlost "${eww} update vol_reveal=false"
|
||||
(box :space-evenly "false"
|
||||
(label :class "volume" :text {volume > 50 ? " " : volume > 0 ? " ": " "})
|
||||
(revealer :reveal vol_reveal :transition "slideright"
|
||||
(scale :class "volbar"
|
||||
:value volume
|
||||
:orientation "h"
|
||||
:tooltip "${volume}%"
|
||||
:max 100
|
||||
:min 0
|
||||
:onchange "amixer sset Master {}%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(eventbox :onhover "${eww} update net_reveal=true" :onhoverlost "${eww} update net_reveal=false"
|
||||
(box :space-evenly "false" :tooltip net_name
|
||||
(label :class "net_status" :text { net_status ? " " : " " })
|
||||
(revealer :reveal net_reveal :transition "slideright"
|
||||
(box :space-evenly false
|
||||
(label :class "net_status" :text "")
|
||||
(label :class "net_status" :text tx_bandwidth)
|
||||
(label :class "net_status" :text "")
|
||||
(label :class "net_status" :text rx_bandwidth)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
7
eww/widgets/updates.yuck
Normal file
7
eww/widgets/updates.yuck
Normal file
@ -0,0 +1,7 @@
|
||||
(defpoll update_no :interval "60s" `bash /home/sharpe/.config/eww/scripts/flatpak_updates.sh`)
|
||||
|
||||
(defwidget updates []
|
||||
(box :class "module" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(label :text " " :class "updates")
|
||||
(label :text update_no :class "updates" )
|
||||
(label :text "package updates" :class "updates")))
|
5
eww/widgets/weather.yuck
Normal file
5
eww/widgets/weather.yuck
Normal file
@ -0,0 +1,5 @@
|
||||
(defpoll weather :interval "10m" `python scripts/weather.py`)
|
||||
|
||||
(defwidget weather []
|
||||
(label :class "weather" :text weather)
|
||||
)
|
26
eww/widgets/workspaces.yuck
Normal file
26
eww/widgets/workspaces.yuck
Normal file
@ -0,0 +1,26 @@
|
||||
(defpoll workspace_1 :interval "0.1s" "bash scripts/workspace_class.sh 1")
|
||||
(defpoll workspace_2 :interval "0.1s" "bash scripts/workspace_class.sh 2")
|
||||
(defpoll workspace_3 :interval "0.1s" "bash scripts/workspace_class.sh 3")
|
||||
(defpoll workspace_4 :interval "0.1s" "bash scripts/workspace_class.sh 4")
|
||||
(defpoll workspace_5 :interval "0.1s" "bash scripts/workspace_class.sh 5")
|
||||
(defpoll workspace_6 :interval "0.1s" "bash scripts/workspace_class.sh 6")
|
||||
(defpoll workspace_7 :interval "0.1s" "bash scripts/workspace_class.sh 7")
|
||||
(defpoll workspace_8 :interval "0.1s" "bash scripts/workspace_class.sh 8")
|
||||
(defpoll workspace_9 :interval "0.1s" "bash scripts/workspace_class.sh 9")
|
||||
|
||||
|
||||
( defwidget workspaces []
|
||||
(eventbox
|
||||
(box :space-evenly "false" :orientation "h" :spacing "0"
|
||||
(button :class workspace_1 :onclick "hyprctl dispatch workspace 1" "₁")
|
||||
(button :class workspace_2 :onclick "hyprctl dispatch workspace 2" "₂")
|
||||
(button :class workspace_3 :onclick "hyprctl dispatch workspace 3" "₃")
|
||||
(button :class workspace_4 :onclick "hyprctl dispatch workspace 4" "₄")
|
||||
(button :class workspace_5 :onclick "hyprctl dispatch workspace 5" "₅")
|
||||
(button :class workspace_6 :onclick "hyprctl dispatch workspace 6" "₆")
|
||||
(button :class workspace_7 :onclick "hyprctl dispatch workspace 7" "₇")
|
||||
(button :class workspace_8 :onclick "hyprctl dispatch workspace 8" "₈")
|
||||
(button :class workspace_9 :onclick "hyprctl dispatch workspace 9" "₉")
|
||||
)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user