updated sway binary, gonna merge soon
This commit is contained in:
1 parent
1eca57b40e
commit
0d5900b551
4 files changed
+18
-9
No files matched your search
+2
-2
@@ -18,7 +18,7 @@
|
|||||||
:class "metric mod"
|
:class "metric mod"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(box :class {class ?: ""} {icon})
|
(box :class {class ?: ""} {icon})
|
||||||
(revealer :transition "slideleft"
|
(revealer :transition "slideright"
|
||||||
:reveal reveal
|
:reveal reveal
|
||||||
:duration "300ms"
|
:duration "300ms"
|
||||||
(scale :min 0
|
(scale :min 0
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
:class "metric mod"
|
:class "metric mod"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(box :class {class ?: ""} {icon})
|
(box :class {class ?: ""} {icon})
|
||||||
(revealer :transition "slideleft"
|
(revealer :transition "slideright"
|
||||||
:reveal net_reveal
|
:reveal net_reveal
|
||||||
:duration "300ms"
|
:duration "300ms"
|
||||||
(label :text {value}
|
(label :text {value}
|
||||||
|
|||||||
@@ -18,8 +18,15 @@
|
|||||||
:icon ""
|
:icon ""
|
||||||
:class "red"))
|
:class "red"))
|
||||||
|
|
||||||
|
(defpoll bat_stat :interval "30s" "cat /")
|
||||||
(defwidget bat []
|
(defwidget bat []
|
||||||
|
(box
|
||||||
(circle :value {EWW_BATTERY.BAT0.capacity}
|
(circle :value {EWW_BATTERY.BAT0.capacity}
|
||||||
:icon "⏻"
|
;; :icon "⏻"
|
||||||
:class "green"))
|
:icon {
|
||||||
|
EWW_BATTERY.BAT0.status == "Charging" ? ""
|
||||||
|
: EWW_BATTERY.BAT0.status == "Not charging" ? ""
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
:class "green")))
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
;; (deflisten wslist0
|
;; (deflisten wslist0
|
||||||
;; "scripts/getwss eDP-1")
|
;; "scripts/getwsss eDP-1")
|
||||||
;; (deflisten wslist1
|
;; (deflisten wslist1
|
||||||
;; "scripts/getwss DP-")
|
;; "scripts/getwsss DP-")
|
||||||
(deflisten wslist0
|
(deflisten wslist0
|
||||||
"scripts/getwss 0")
|
"scripts/getwss 0")
|
||||||
(deflisten wslist1
|
(deflisten wslist1
|
||||||
|
|||||||
+5
-3
@@ -38,7 +38,8 @@ def handle(state: State, event: str, data: str = None):
|
|||||||
wid = int(data)
|
wid = int(data)
|
||||||
if state.prev_active in wss.keys():
|
if state.prev_active in wss.keys():
|
||||||
wss[state.prev_active]['focused'] = False
|
wss[state.prev_active]['focused'] = False
|
||||||
wss[wid]['focused'] = True
|
if wid in wss.keys():
|
||||||
|
wss[wid]['focused'] = True
|
||||||
state.prev_active = wid
|
state.prev_active = wid
|
||||||
return output(state)
|
return output(state)
|
||||||
if event == "createworkspace":
|
if event == "createworkspace":
|
||||||
@@ -46,7 +47,8 @@ def handle(state: State, event: str, data: str = None):
|
|||||||
state.wss = dict(sorted(wss.items()))
|
state.wss = dict(sorted(wss.items()))
|
||||||
return output(state)
|
return output(state)
|
||||||
if event == "destroyworkspace":
|
if event == "destroyworkspace":
|
||||||
del wss[int(data)]
|
if int(data) in wss:
|
||||||
|
del wss[int(data)]
|
||||||
return output(state)
|
return output(state)
|
||||||
|
|
||||||
def output(state: State):
|
def output(state: State):
|
||||||
@@ -91,7 +93,7 @@ def get_state(mid: str):
|
|||||||
focused = m['focused']
|
focused = m['focused']
|
||||||
break
|
break
|
||||||
if mname is None:
|
if mname is None:
|
||||||
print("Error: monitor not found")
|
print("Error: monitor not found", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
wss = dict()
|
wss = dict()
|
||||||
|
|||||||
Reference in new issue
Block a user