tweaks to simplify eww
This commit is contained in:
parent
472ab71a95
commit
8c9d0a03db
5 changed files with 429 additions and 351 deletions
|
@ -32,8 +32,21 @@
|
|||
;; widgets
|
||||
|
||||
(defwidget workspaces []
|
||||
(literal
|
||||
:content workspace))
|
||||
(eventbox
|
||||
:onscroll "echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace"
|
||||
:valign "center"
|
||||
(box
|
||||
:class "works"
|
||||
:orientation "h"
|
||||
:spacing 5
|
||||
:space-evenly "false"
|
||||
:valign "center"
|
||||
(button :onclick "hyprctl dispatch workspace 1" :class "0$o1$f1" "")
|
||||
(button :onclick "hyprctl dispatch workspace 2" :class "0$o2$f2" "")
|
||||
(button :onclick "hyprctl dispatch workspace 3" :class "0$o3$f3" "")
|
||||
(button :onclick "hyprctl dispatch workspace 4" :class "0$o4$f4" ""))))
|
||||
|
||||
|
||||
|
||||
(defwidget appnames []
|
||||
(eventbox
|
||||
|
@ -83,7 +96,7 @@
|
|||
:text ESSID_WLAN))
|
||||
(button
|
||||
:class "module-wifi"
|
||||
:onclick "networkmanager_dmenu"
|
||||
:onclick "alacritty -e nmtui"
|
||||
WLAN_ICON))))
|
||||
|
||||
(defwidget bat []
|
||||
|
@ -91,6 +104,7 @@
|
|||
:class "bat_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly true
|
||||
:spacing 0
|
||||
:visible {HOST == "kaladin" ? "false" : "true"}
|
||||
(button
|
||||
|
@ -107,6 +121,7 @@
|
|||
:class "disk_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly true
|
||||
:spacing 0
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
|
@ -122,6 +137,7 @@
|
|||
:class "bright_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly true
|
||||
:visible {HOST == "kaladin" ? "false" : "true"}
|
||||
(button
|
||||
:class "iconbright"
|
||||
|
@ -138,6 +154,7 @@
|
|||
:class "vol_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly true
|
||||
(button
|
||||
:class "iconvol"
|
||||
:onclick "scripts/pop audio"
|
||||
|
@ -152,6 +169,7 @@
|
|||
:class "cpu_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
;; :space-evenly true
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
:class "iconcpu"
|
||||
|
@ -164,7 +182,8 @@
|
|||
(defwidget mem []
|
||||
(box
|
||||
:class "mem_module"
|
||||
:vexpand "false"
|
||||
:space-evenly true
|
||||
:vexpand "true"
|
||||
:hexpand "false"
|
||||
(button
|
||||
:onclick "scripts/pop system"
|
||||
|
@ -207,21 +226,17 @@
|
|||
(defwidget nextcloud_button []
|
||||
(box
|
||||
:class "notif_button"
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
(button
|
||||
:onclick "nextcloud"
|
||||
(label
|
||||
:text ""))))
|
||||
:text ""
|
||||
:visible true))))
|
||||
|
||||
(defwidget sep []
|
||||
(box
|
||||
:class "separator"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(label
|
||||
:class "separ"
|
||||
:text "|")))
|
||||
(label
|
||||
:class "separ"
|
||||
:text "|"))
|
||||
|
||||
(defwidget gap []
|
||||
(box
|
||||
|
@ -241,7 +256,7 @@
|
|||
:valign "center"
|
||||
:class "left_modules"
|
||||
:spacing 8
|
||||
(workspaces)
|
||||
;; (workspaces)
|
||||
(appnames)))
|
||||
(defwidget center []
|
||||
(box
|
||||
|
@ -256,14 +271,22 @@
|
|||
:space-evenly false
|
||||
:halign "end"
|
||||
:class "right_modules"
|
||||
(sep)
|
||||
(disk)
|
||||
(cpu)
|
||||
(mem)
|
||||
(volume)
|
||||
(bright)
|
||||
(bat)
|
||||
(sep)
|
||||
(label
|
||||
:class "left_sep"
|
||||
:text "|")
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:class "sysmodules"
|
||||
(disk)
|
||||
(cpu)
|
||||
(mem)
|
||||
(volume)
|
||||
(bright)
|
||||
(bat))
|
||||
(label
|
||||
:class "right_sep"
|
||||
:text "|")
|
||||
(wifi)
|
||||
(notif_button)
|
||||
(nextcloud_button)))
|
||||
|
@ -315,255 +338,255 @@
|
|||
|
||||
|
||||
|
||||
(defwidget audio []
|
||||
(box
|
||||
:class "audio-box"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(box
|
||||
:halign "v"
|
||||
:space-evenly "false"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(box
|
||||
:class "speaker_icon"
|
||||
:orientation "v")
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(label
|
||||
:class "speaker_text"
|
||||
:text "speaker"
|
||||
:valign "center"
|
||||
:halign "left" )
|
||||
(box
|
||||
:class "speaker_bar"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(scale
|
||||
:value volume_percent
|
||||
:orientation "h"
|
||||
:onchange "amixer -D pulse sset Master {}%"
|
||||
:tooltip "volume on ${volume_percent}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label
|
||||
:text "_____________________________________"
|
||||
:class "audio_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:halign "v"
|
||||
:space-evenly "false"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(box
|
||||
:class "mic_icon"
|
||||
:orientation "v")
|
||||
(box
|
||||
:orientation "v"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(label
|
||||
:class "mic_text"
|
||||
:text "mic"
|
||||
:valign "center"
|
||||
:halign "left" )
|
||||
(box
|
||||
:class "mic_bar"
|
||||
:halign "center"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(scale
|
||||
:value mic_percent
|
||||
:orientation "h"
|
||||
:tooltip "mic on ${mic_percent}%"
|
||||
:onchange "amixer -D pulse sset Capture {}%"
|
||||
:max 100
|
||||
:min 0))))))
|
||||
(defwindow audio_ctl
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
:screen 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "20"
|
||||
:y "7%"
|
||||
:anchor "top right"
|
||||
:width "280px"
|
||||
:height "60px")
|
||||
(audio))
|
||||
;; (defwidget audio []
|
||||
;; (box
|
||||
;; :class "audio-box"
|
||||
;; :orientation "v"
|
||||
;; :space-evenly "false"
|
||||
;; :vexpand "false"
|
||||
;; :hexpand "false"
|
||||
;; (box
|
||||
;; :halign "v"
|
||||
;; :space-evenly "false"
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; (box
|
||||
;; :class "speaker_icon"
|
||||
;; :orientation "v")
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :halign "center"
|
||||
;; :vexpand "false"
|
||||
;; :hexpand "false"
|
||||
;; (label
|
||||
;; :class "speaker_text"
|
||||
;; :text "speaker"
|
||||
;; :valign "center"
|
||||
;; :halign "left" )
|
||||
;; (box
|
||||
;; :class "speaker_bar"
|
||||
;; :halign "center"
|
||||
;; :vexpand "false"
|
||||
;; :hexpand "false"
|
||||
;; (scale
|
||||
;; :value volume_percent
|
||||
;; :orientation "h"
|
||||
;; :onchange "amixer -D pulse sset Master {}%"
|
||||
;; :tooltip "volume on ${volume_percent}%"
|
||||
;; :max 100
|
||||
;; :min 0))))
|
||||
;; (label
|
||||
;; :text "_____________________________________"
|
||||
;; :class "audio_sep"
|
||||
;; :halign "center")
|
||||
;; (box
|
||||
;; :halign "v"
|
||||
;; :space-evenly "false"
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; (box
|
||||
;; :class "mic_icon"
|
||||
;; :orientation "v")
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :halign "center"
|
||||
;; :vexpand "false"
|
||||
;; :hexpand "false"
|
||||
;; (label
|
||||
;; :class "mic_text"
|
||||
;; :text "mic"
|
||||
;; :valign "center"
|
||||
;; :halign "left" )
|
||||
;; (box
|
||||
;; :class "mic_bar"
|
||||
;; :halign "center"
|
||||
;; :vexpand "false"
|
||||
;; :hexpand "false"
|
||||
;; (scale
|
||||
;; :value mic_percent
|
||||
;; :orientation "h"
|
||||
;; :tooltip "mic on ${mic_percent}%"
|
||||
;; :onchange "amixer -D pulse sset Capture {}%"
|
||||
;; :max 100
|
||||
;; :min 0))))))
|
||||
;; (defwindow audio_ctl
|
||||
;; :stacking "fg"
|
||||
;; :focusable "false"
|
||||
;; :screen 1
|
||||
;; :monitor 0
|
||||
;; :geometry (geometry
|
||||
;; :x "20"
|
||||
;; :y "7%"
|
||||
;; :anchor "top right"
|
||||
;; :width "280px"
|
||||
;; :height "60px")
|
||||
;; (audio))
|
||||
|
||||
|
||||
;;Define System widget
|
||||
(defwidget system []
|
||||
(box
|
||||
:class "sys_win"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
:spacing 0
|
||||
(box
|
||||
:class "sys_bat_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
(circular-progress
|
||||
:value {EWW_BATTERY["BAT1"].capacity}
|
||||
:class "sys_bat"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_bat"
|
||||
:limit-width 2
|
||||
:wrap false))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "battery"
|
||||
:halign "start"
|
||||
:class "sys_text_bat"
|
||||
:limit-width 9
|
||||
:wrap false)
|
||||
(label
|
||||
:text "${EWW_BATTERY["BAT1"].capacity}%"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
(label :text "${EWW_BATTERY["BAT1"].status}"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:wrap false)))
|
||||
(label
|
||||
:text "____________________________________"
|
||||
:class "sys_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:class "sys_mem_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value {EWW_CPU.avg}
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label
|
||||
:text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "processor"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:wrap false)
|
||||
(label
|
||||
:text "${EWW_CPU.avg} | ${round((EWW_RAM.total_mem / 1024), 0)}mb "
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
(label :text "3.4 GHZ"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
))
|
||||
(label
|
||||
:text "____________________________________"
|
||||
:class "sys_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:class "sys_mem_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value {EWW_RAM.used_mem_perc}
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label
|
||||
:text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "memory"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:wrap false)
|
||||
(label
|
||||
:text "${round((EWW_RAM.available_mem / 1024), 0)} | ${round((EWW_RAM.total_mem / 1024), 0)}mb "
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
(label :text "${round((EWW_RAM.used_mem / 1024), 0)}mb free"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:wrap false)
|
||||
))))
|
||||
(defwindow system
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
:screen 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "20"
|
||||
:y "0"
|
||||
:anchor "bottom right"
|
||||
:width "290px"
|
||||
:height "120px")
|
||||
(system))
|
||||
;; ;;Define System widget
|
||||
;; (defwidget system []
|
||||
;; (box
|
||||
;; :class "sys_win"
|
||||
;; :orientation "v"
|
||||
;; :space-evenly "false"
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; :spacing 0
|
||||
;; (box
|
||||
;; :class "sys_bat_box"
|
||||
;; :orientation "h"
|
||||
;; :space-evenly "false"
|
||||
;; (circular-progress
|
||||
;; :value {EWW_BATTERY["BAT1"].capacity}
|
||||
;; :class "sys_bat"
|
||||
;; :thickness 9
|
||||
;; (label :text ""
|
||||
;; :class "sys_icon_bat"
|
||||
;; :limit-width 2
|
||||
;; :wrap false))
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :space-evenly "false"
|
||||
;; :spacing 0
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; (label
|
||||
;; :text "battery"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_bat"
|
||||
;; :limit-width 9
|
||||
;; :wrap false)
|
||||
;; (label
|
||||
;; :text "${EWW_BATTERY["BAT1"].capacity}%"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_bat_sub"
|
||||
;; :limit-width 22
|
||||
;; :wrap false)
|
||||
;; (label :text "${EWW_BATTERY["BAT1"].status}"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_bat_sub"
|
||||
;; :limit-width 22
|
||||
;; :wrap false)))
|
||||
;; (label
|
||||
;; :text "____________________________________"
|
||||
;; :class "sys_sep"
|
||||
;; :halign "center")
|
||||
;; (box
|
||||
;; :class "sys_mem_box"
|
||||
;; :orientation "h"
|
||||
;; :space-evenly "false"
|
||||
;; :halign "start"
|
||||
;; (circular-progress
|
||||
;; :value {EWW_CPU.avg}
|
||||
;; :class "sys_mem"
|
||||
;; :thickness 9
|
||||
;; (label
|
||||
;; :text ""
|
||||
;; :class "sys_icon_mem"
|
||||
;; :limit-width 2
|
||||
;; :wrap false
|
||||
;; :angle 0.0))
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :space-evenly "false"
|
||||
;; :spacing 0
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; (label
|
||||
;; :text "processor"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_mem"
|
||||
;; :limit-width 9
|
||||
;; :wrap false)
|
||||
;; (label
|
||||
;; :text "${EWW_CPU.avg} | ${round((EWW_RAM.total_mem / 1024), 0)}mb "
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_mem_sub"
|
||||
;; :limit-width 22
|
||||
;; :wrap false)
|
||||
;; (label :text "3.4 GHZ"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_mem_sub"
|
||||
;; :limit-width 22
|
||||
;; :wrap false)
|
||||
;; ))
|
||||
;; (label
|
||||
;; :text "____________________________________"
|
||||
;; :class "sys_sep"
|
||||
;; :halign "center")
|
||||
;; (box
|
||||
;; :class "sys_mem_box"
|
||||
;; :orientation "h"
|
||||
;; :space-evenly "false"
|
||||
;; :halign "start"
|
||||
;; (circular-progress
|
||||
;; :value {EWW_RAM.used_mem_perc}
|
||||
;; :class "sys_mem"
|
||||
;; :thickness 9
|
||||
;; (label
|
||||
;; :text ""
|
||||
;; :class "sys_icon_mem"
|
||||
;; :limit-width 2
|
||||
;; :wrap false
|
||||
;; :angle 0.0))
|
||||
;; (box
|
||||
;; :orientation "v"
|
||||
;; :space-evenly "false"
|
||||
;; :spacing 0
|
||||
;; :hexpand "false"
|
||||
;; :vexpand "false"
|
||||
;; (label
|
||||
;; :text "memory"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_mem"
|
||||
;; :limit-width 9
|
||||
;; :wrap false)
|
||||
;; (label
|
||||
;; :text "${round((EWW_RAM.available_mem / 1024), 0)} | ${round((EWW_RAM.total_mem / 1024), 0)}mb "
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_mem_sub"
|
||||
;; :limit-width 22
|
||||
;; :wrap false)
|
||||
;; (label :text "${round((EWW_RAM.used_mem / 1024), 0)}mb free"
|
||||
;; :halign "start"
|
||||
;; :class "sys_text_mem_sub"
|
||||
;; :limit-width 22
|
||||
;; :wrap false)
|
||||
;; ))))
|
||||
;; (defwindow system
|
||||
;; :stacking "fg"
|
||||
;; :focusable "false"
|
||||
;; :screen 1
|
||||
;; :monitor 0
|
||||
;; :geometry (geometry
|
||||
;; :x "20"
|
||||
;; :y "0"
|
||||
;; :anchor "bottom right"
|
||||
;; :width "290px"
|
||||
;; :height "120px")
|
||||
;; (system))
|
||||
|
||||
|
||||
|
||||
;;Calendar Widget
|
||||
(defwidget cal []
|
||||
(box
|
||||
:class "cal"
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "cal-in"
|
||||
(calendar
|
||||
:day calendar_day
|
||||
:year calendar_year))))
|
||||
(defwindow calendar
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
:screen 1
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "20"
|
||||
:y "0"
|
||||
:anchor "bottom right"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
(cal))
|
||||
;; ;;Calendar Widget
|
||||
;; (defwidget cal []
|
||||
;; (box
|
||||
;; :class "cal"
|
||||
;; :orientation "v"
|
||||
;; (box
|
||||
;; :class "cal-in"
|
||||
;; (calendar
|
||||
;; :day calendar_day
|
||||
;; :year calendar_year))))
|
||||
;; (defwindow calendar
|
||||
;; :stacking "fg"
|
||||
;; :focusable "false"
|
||||
;; :screen 1
|
||||
;; :monitor 0
|
||||
;; :geometry (geometry
|
||||
;; :x "20"
|
||||
;; :y "0"
|
||||
;; :anchor "bottom right"
|
||||
;; :width "270px"
|
||||
;; :height "60px")
|
||||
;; (cal))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue