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)
|
||||
|
||||
(defwidget network []
|
||||
(revealer-on-hover
|
||||
:class "${reveal_network} networks"
|
||||
|
|
@ -19,8 +20,4 @@
|
|||
(button :onclick "nmcli device ${( interface.state == 'connected' ? 'down' : 'up' )} ${interface.device}"
|
||||
:class {( interface.state == "connected" ? 'active' : 'inactive' )}
|
||||
:tooltip "${interface.connection} (${interface.device})"
|
||||
{( interface.type == "wifi" ? "" : ( interface.type == "ethernet" ? "" : "" ))}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
{( interface.type == "wifi" ? "" : ( interface.type == "ethernet" ? "" : "" ))}))))
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
"swaync-client -s")
|
||||
|
||||
(defwidget notification_center []
|
||||
(box
|
||||
:class "notification-center ${(jq(notification_center_info,'.count','r') > 0 ) ? 'active' : 'inactive'}"
|
||||
(box :class "notification-center ${(jq(notification_center_info,'.count','r') > 0 ) ? 'active' : 'inactive'}"
|
||||
(button :onclick 'swaync-client -t'
|
||||
:onrightclick 'swaync-client -d'
|
||||
:tooltip "${jq(notification_center_info,'.count','r')} unread notifications"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
(defvar reveal_powermenu false)
|
||||
|
||||
(defwidget powermenu []
|
||||
(revealer-on-hover
|
||||
:revealvar reveal_powermenu
|
||||
(revealer-on-hover :revealvar reveal_powermenu
|
||||
:class "powermenu ${reveal_powermenu}"
|
||||
:revealvar-name "reveal_powermenu"
|
||||
(button :onclick 'sdu power shutdown'
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
(defwidget revealer-on-hover [revealvar revealvar-name ?class ?duration ?transition]
|
||||
(box
|
||||
:class "${class} revealer-on-hover"
|
||||
(box :class "${class} revealer-on-hover"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(eventbox
|
||||
:onscroll "if test '{}' = 'down';then ${EWW_CMD} update ${revealvar-name}=true;else ${EWW_CMD} update ${revealvar-name}=false;fi"
|
||||
(eventbox :onscroll "if test '{}' = 'down';then ${EWW_CMD} update ${revealvar-name}=true;else ${EWW_CMD} update ${revealvar-name}=false;fi"
|
||||
:onhoverlost "${EWW_CMD} update ${revealvar-name}=false"
|
||||
(box
|
||||
:space-evenly false
|
||||
(box :space-evenly false
|
||||
(children :nth 0)
|
||||
(revealer
|
||||
:reveal revealvar
|
||||
(revealer :reveal revealvar
|
||||
:transition {transition ?: "slideright"}
|
||||
:duration {duration ?: "500ms"}
|
||||
(children :nth 1))))))
|
||||
|
|
|
|||
|
|
@ -1,31 +1,16 @@
|
|||
(defvar reveal_scratchpad false)
|
||||
(defwidget scratchpad []
|
||||
; (revealer-on-hover
|
||||
; :class "${reveal_scratchpad} scratchpad"
|
||||
; :revealvar reveal_scratchpad
|
||||
; :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"
|
||||
|
||||
(box :class "${reveal_scratchpad} scratchpad revealer-on-hover"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(eventbox
|
||||
:onhover "${EWW_CMD} update reveal_scratchpad=true"
|
||||
(eventbox :onhover "${EWW_CMD} update reveal_scratchpad=true"
|
||||
:onhoverlost "${EWW_CMD} update reveal_scratchpad=false"
|
||||
(box
|
||||
:space-evenly false
|
||||
; (children :nth 0)
|
||||
(label
|
||||
:class "revealer-preview"
|
||||
(box :space-evenly false
|
||||
(label :class "revealer-preview"
|
||||
:tooltip "${jq(sway_info,'.scratchpad_info[] | "\\(.title) (\\(.name)) \\n"','r')}"
|
||||
:text " ${jq(sway_info,'.scratchpad_info | length')} ${reveal_scratchpad ? '' : ''}")
|
||||
(revealer
|
||||
:reveal reveal_scratchpad
|
||||
(revealer :reveal reveal_scratchpad
|
||||
:transition "slideright"
|
||||
:duration "500ms"
|
||||
(scratchpad_children :array {jq(sway_info,'.scratchpad_info','r')}))))))
|
||||
|
|
@ -41,5 +26,4 @@
|
|||
${entry.name}"
|
||||
(image :path {entry.icon}
|
||||
:image-width 20
|
||||
:image-height 20)
|
||||
))))
|
||||
:image-height 20)))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue