New backup 2026-02-17 20:45:02
This commit is contained in:
parent
e1cbf25a5c
commit
91f24a287a
6 changed files with 54 additions and 78 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
(defvar reveal_network false)
|
(defvar reveal_network false)
|
||||||
|
|
||||||
(defwidget network []
|
(defwidget network []
|
||||||
(revealer-on-hover
|
(revealer-on-hover
|
||||||
:class "${reveal_network} networks"
|
:class "${reveal_network} networks"
|
||||||
|
|
@ -11,16 +12,12 @@
|
||||||
(network_children :array "${network_manager.interfaces}")))
|
(network_children :array "${network_manager.interfaces}")))
|
||||||
|
|
||||||
(defwidget network_children [array]
|
(defwidget network_children [array]
|
||||||
(box :class "reveal-children"
|
(box :class "reveal-children"
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:halign "center"
|
:halign "center"
|
||||||
(for interface in array
|
(for interface in array
|
||||||
(button :onclick "nmcli device ${( interface.state == 'connected' ? 'down' : 'up' )} ${interface.device}"
|
(button :onclick "nmcli device ${( interface.state == 'connected' ? 'down' : 'up' )} ${interface.device}"
|
||||||
:class {( interface.state == "connected" ? 'active' : 'inactive' )}
|
:class {( interface.state == "connected" ? 'active' : 'inactive' )}
|
||||||
:tooltip "${interface.connection} (${interface.device})"
|
:tooltip "${interface.connection} (${interface.device})"
|
||||||
{( interface.type == "wifi" ? "" : ( interface.type == "ethernet" ? "" : "" ))}
|
{( interface.type == "wifi" ? "" : ( interface.type == "ethernet" ? "" : "" ))}))))
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
"swaync-client -s")
|
"swaync-client -s")
|
||||||
|
|
||||||
(defwidget notification_center []
|
(defwidget notification_center []
|
||||||
(box
|
(box :class "notification-center ${(jq(notification_center_info,'.count','r') > 0 ) ? 'active' : 'inactive'}"
|
||||||
:class "notification-center ${(jq(notification_center_info,'.count','r') > 0 ) ? 'active' : 'inactive'}"
|
|
||||||
(button :onclick 'swaync-client -t'
|
(button :onclick 'swaync-client -t'
|
||||||
:onrightclick 'swaync-client -d'
|
:onrightclick 'swaync-client -d'
|
||||||
:tooltip "${jq(notification_center_info,'.count','r')} unread notifications"
|
:tooltip "${jq(notification_center_info,'.count','r')} unread notifications"
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,29 @@
|
||||||
(defvar reveal_powermenu false)
|
(defvar reveal_powermenu false)
|
||||||
|
|
||||||
(defwidget powermenu []
|
(defwidget powermenu []
|
||||||
(revealer-on-hover
|
(revealer-on-hover :revealvar reveal_powermenu
|
||||||
:revealvar reveal_powermenu
|
:class "powermenu ${reveal_powermenu}"
|
||||||
:class "powermenu ${reveal_powermenu}"
|
:revealvar-name "reveal_powermenu"
|
||||||
:revealvar-name "reveal_powermenu"
|
|
||||||
(button :onclick 'sdu power shutdown'
|
(button :onclick 'sdu power shutdown'
|
||||||
:class "revealer-preview"
|
:class "revealer-preview"
|
||||||
:tooltip "Shutdown"
|
:tooltip "Shutdown"
|
||||||
"")
|
"")
|
||||||
(powermenu_children)))
|
(powermenu_children)))
|
||||||
|
|
||||||
(defwidget powermenu_children []
|
(defwidget powermenu_children []
|
||||||
(box :class "reveal-children"
|
(box :class "reveal-children"
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:halign "center"
|
:halign "center"
|
||||||
(button :onclick 'sdu power reboot'
|
(button :onclick 'sdu power reboot'
|
||||||
:tooltip "Reboot"
|
:tooltip "Reboot"
|
||||||
"")
|
"")
|
||||||
(button :onclick 'sdu power suspend'
|
(button :onclick 'sdu power suspend'
|
||||||
:tooltip "Suspend"
|
:tooltip "Suspend"
|
||||||
"")
|
"")
|
||||||
(button :onclick 'sdu power lock'
|
(button :onclick 'sdu power lock'
|
||||||
:tooltip "Lock"
|
:tooltip "Lock"
|
||||||
"")
|
"")
|
||||||
(button :onclick 'sdu power logout'
|
(button :onclick 'sdu power logout'
|
||||||
:tooltip "Logout"
|
:tooltip "Logout"
|
||||||
"")))
|
"")))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
(defwidget profile []
|
(defwidget profile []
|
||||||
(button :onclick "sdu profile switch next"
|
(button :onclick "sdu profile switch next"
|
||||||
:tooltip {jq(profile_info,'.name','r')}
|
:tooltip {jq(profile_info,'.name','r')}
|
||||||
:class "profile profile-${(jq(profile_info,'.name','r'))}"
|
:class "profile profile-${(jq(profile_info,'.name','r'))}"
|
||||||
{jq(profile_info,'.icon','r')}))
|
{jq(profile_info,'.icon','r')}))
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
(defwidget revealer-on-hover [revealvar revealvar-name ?class ?duration ?transition]
|
(defwidget revealer-on-hover [revealvar revealvar-name ?class ?duration ?transition]
|
||||||
(box
|
(box :class "${class} revealer-on-hover"
|
||||||
:class "${class} revealer-on-hover"
|
:orientation "h"
|
||||||
:orientation "h"
|
:space-evenly false
|
||||||
:space-evenly false
|
(eventbox :onscroll "if test '{}' = 'down';then ${EWW_CMD} update ${revealvar-name}=true;else ${EWW_CMD} update ${revealvar-name}=false;fi"
|
||||||
(eventbox
|
:onhoverlost "${EWW_CMD} update ${revealvar-name}=false"
|
||||||
:onscroll "if test '{}' = 'down';then ${EWW_CMD} update ${revealvar-name}=true;else ${EWW_CMD} update ${revealvar-name}=false;fi"
|
(box :space-evenly false
|
||||||
:onhoverlost "${EWW_CMD} update ${revealvar-name}=false"
|
(children :nth 0)
|
||||||
(box
|
(revealer :reveal revealvar
|
||||||
:space-evenly false
|
:transition {transition ?: "slideright"}
|
||||||
(children :nth 0)
|
:duration {duration ?: "500ms"}
|
||||||
(revealer
|
|
||||||
:reveal revealvar
|
|
||||||
:transition {transition ?: "slideright"}
|
|
||||||
:duration {duration ?: "500ms"}
|
|
||||||
(children :nth 1))))))
|
(children :nth 1))))))
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,29 @@
|
||||||
(defvar reveal_scratchpad false)
|
(defvar reveal_scratchpad false)
|
||||||
(defwidget scratchpad []
|
(defwidget scratchpad []
|
||||||
; (revealer-on-hover
|
|
||||||
; :class "${reveal_scratchpad} scratchpad"
|
(box :class "${reveal_scratchpad} scratchpad revealer-on-hover"
|
||||||
; :revealvar reveal_scratchpad
|
:orientation "h"
|
||||||
; :revealvar-name "reveal_scratchpad"
|
|
||||||
; (label
|
|
||||||
; :class "revealer-preview"
|
|
||||||
; :tooltip "${jq(sway_info,'.scratchpad_info[] | "\\(.title) (\\(.name)) \\n"','r')}"
|
|
||||||
; :text " ${jq(sway_info,'.scratchpad_info | length')} ${reveal_scratchpad ? '' : ''}")
|
|
||||||
; (scratchpad_children :array {jq(sway_info,'.scratchpad_info','r')})))
|
|
||||||
;
|
|
||||||
(box
|
|
||||||
:class "${reveal_scratchpad} scratchpad revealer-on-hover"
|
|
||||||
:orientation "h"
|
|
||||||
:space-evenly false
|
|
||||||
(eventbox
|
|
||||||
:onhover "${EWW_CMD} update reveal_scratchpad=true"
|
|
||||||
:onhoverlost "${EWW_CMD} update reveal_scratchpad=false"
|
|
||||||
(box
|
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
; (children :nth 0)
|
(eventbox :onhover "${EWW_CMD} update reveal_scratchpad=true"
|
||||||
(label
|
:onhoverlost "${EWW_CMD} update reveal_scratchpad=false"
|
||||||
:class "revealer-preview"
|
(box :space-evenly false
|
||||||
:tooltip "${jq(sway_info,'.scratchpad_info[] | "\\(.title) (\\(.name)) \\n"','r')}"
|
(label :class "revealer-preview"
|
||||||
:text " ${jq(sway_info,'.scratchpad_info | length')} ${reveal_scratchpad ? '' : ''}")
|
:tooltip "${jq(sway_info,'.scratchpad_info[] | "\\(.title) (\\(.name)) \\n"','r')}"
|
||||||
(revealer
|
:text " ${jq(sway_info,'.scratchpad_info | length')} ${reveal_scratchpad ? '' : ''}")
|
||||||
:reveal reveal_scratchpad
|
(revealer :reveal reveal_scratchpad
|
||||||
:transition "slideright"
|
:transition "slideright"
|
||||||
:duration "500ms"
|
:duration "500ms"
|
||||||
(scratchpad_children :array {jq(sway_info,'.scratchpad_info','r')}))))))
|
(scratchpad_children :array {jq(sway_info,'.scratchpad_info','r')}))))))
|
||||||
|
|
||||||
(defwidget scratchpad_children [array]
|
(defwidget scratchpad_children [array]
|
||||||
(box :orientation "h"
|
(box :orientation "h"
|
||||||
:class "reveal-children"
|
:class "reveal-children"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(for entry in array
|
(for entry in array
|
||||||
(button :onclick 'swaymsg [con_id=${entry.window_id}] scratchpad show'
|
(button :onclick 'swaymsg [con_id=${entry.window_id}] scratchpad show'
|
||||||
:class "scratchpad-item ${(entry.visible == 'true') ? 'active' : 'inactive'}"
|
:class "scratchpad-item ${(entry.visible == 'true') ? 'active' : 'inactive'}"
|
||||||
:tooltip "${entry.title}
|
:tooltip "${entry.title}
|
||||||
${entry.name}"
|
${entry.name}"
|
||||||
(image :path {entry.icon}
|
(image :path {entry.icon}
|
||||||
:image-width 20
|
:image-width 20
|
||||||
:image-height 20)
|
:image-height 20)))))
|
||||||
))))
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue