feat: add eww widgets and remove stuff from waybar
This commit is contained in:
parent
9b7b24ace1
commit
fc18072aa5
8 changed files with 74 additions and 58 deletions
|
@ -28,7 +28,7 @@
|
|||
.cal-box {
|
||||
font-family: Product Sans;
|
||||
background-color: rgba(40, 42, 54, 0.8);
|
||||
border-radius: 15px;
|
||||
border-radius: 30px;
|
||||
padding: 0 1rem .2rem;
|
||||
color: $fg;
|
||||
background-color: $bg;
|
||||
|
@ -40,6 +40,7 @@
|
|||
background-color: inherit;
|
||||
padding: .5rem .10rem 0rem;
|
||||
margin-left: 10px;
|
||||
border-radius: 30px;
|
||||
|
||||
& > * {
|
||||
border: solid 0px transparent;
|
||||
|
|
|
@ -13,7 +13,7 @@ done
|
|||
# Close every window except permanent ones
|
||||
for element in "${array[@]}"
|
||||
do
|
||||
if [[ "$element" != "tablet-toggle" ]]; then
|
||||
if [[ "$element" != "left-bar" && "$element" != "right-bar" ]]; then
|
||||
"$EWW_PATH"/close.sh "$element"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,20 +1,29 @@
|
|||
.osk-toggle {
|
||||
font-size: 30px;
|
||||
min-height: 26px;
|
||||
min-height: 38px;
|
||||
min-width: 50px;
|
||||
padding: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
.notif-panel {
|
||||
min-width: 50px;
|
||||
min-height: 26px;
|
||||
font-size: 20px;
|
||||
padding: 2px 25px 2px 35px;
|
||||
}
|
||||
|
||||
.tablet-toggle {
|
||||
font-size: 26px;
|
||||
padding: 2px 13px 2px 16px;
|
||||
min-height: 38px;
|
||||
min-width: 50px;
|
||||
padding: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
.heart-toggle {
|
||||
font-size: 24px;
|
||||
min-height: 38px;
|
||||
min-width: 50px;
|
||||
padding: 0px 0px 0px 4px;
|
||||
}
|
||||
|
||||
.notif-panel {
|
||||
font-size: 20px;
|
||||
min-height: 34px;
|
||||
min-width: 105px;
|
||||
padding: 0px 0px 0px 5px;
|
||||
}
|
||||
|
||||
.toggle-off {
|
||||
|
|
|
@ -1,78 +1,85 @@
|
|||
(defvar osk-toggle-state false)
|
||||
|
||||
(defvar osk-ts false)
|
||||
(defwidget osk-toggle []
|
||||
(eventbox :class {osk-toggle-state ? "toggle-on" : "toggle-off"}
|
||||
(eventbox :class {osk-ts ? "toggle-on" : "toggle-off"}
|
||||
:onclick "$HYPR_PATH/osk-toggle.sh toggle &"
|
||||
(box :class "osk-toggle"
|
||||
:space-evenly true
|
||||
:spacing 6
|
||||
:orientation "h"
|
||||
(label :text " ")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow osk-toggle
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:exclusive "ignore"
|
||||
:geometry (geometry :x "10px"
|
||||
:y "9px"
|
||||
:width "0px"
|
||||
:height "0px"
|
||||
:anchor "top left"
|
||||
)
|
||||
(osk-toggle)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(defvar toggle-state false)
|
||||
|
||||
(defvar tablet-ts false)
|
||||
(defwidget tablet-toggle []
|
||||
(eventbox :class {toggle-state ? "toggle-on" : "toggle-off"}
|
||||
:onclick {toggle-state ? "$HYPR_PATH/laptop-mode.sh &" :
|
||||
"$HYPR_PATH/tablet-mode.sh &"}
|
||||
(eventbox :class {tablet-ts ? "toggle-on" : "toggle-off"}
|
||||
:onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" :
|
||||
"$HYPR_PATH/tablet-mode.sh &"}
|
||||
(box :class "tablet-toggle"
|
||||
:space-evenly true
|
||||
:spacing 6
|
||||
:orientation "h"
|
||||
(label :text " ")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow tablet-toggle
|
||||
(defvar heart-ts true)
|
||||
(defvar heart-icon "")
|
||||
(defwidget heart-toggle []
|
||||
(eventbox :class {heart-ts ? "toggle-on" : "toggle-off"}
|
||||
:onclick {heart-ts ? "eww update heart-icon= ; eww update heart-ts=false" :
|
||||
"eww update heart-icon= ; eww update heart-ts=true"}
|
||||
(box :class "heart-toggle"
|
||||
:orientation "h"
|
||||
(label :text " ${heart-icon} ")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget left-bar []
|
||||
(box :class "transparent"
|
||||
:space-evenly true
|
||||
:spacing 14
|
||||
:orientation "h"
|
||||
(osk-toggle)
|
||||
(tablet-toggle)
|
||||
(heart-toggle)
|
||||
)
|
||||
)
|
||||
(defwindow left-bar
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:exclusive "ignore"
|
||||
:geometry (geometry :x "72px"
|
||||
:y "9px"
|
||||
:geometry (geometry :x "10px"
|
||||
:y "11px"
|
||||
:width "0px"
|
||||
:height "0px"
|
||||
:anchor "top left"
|
||||
)
|
||||
(tablet-toggle)
|
||||
(left-bar)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(defvar notif-panel-state false)
|
||||
|
||||
(defwidget notif-panel []
|
||||
(button :class {notif-panel-state ? "toggle-on" : "toggle-off"}
|
||||
:onclick {notif-panel-state ? "swaync-client -cp; eww update notif-panel-state=false" :
|
||||
"swaync-client -op; eww update notif-panel-state=true"}
|
||||
(box :class "notif-panel"
|
||||
:space-evenly true
|
||||
:spacing 6
|
||||
:orientation "h"
|
||||
(label :text " ${notif_icon} ")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow notif-panel
|
||||
(defwidget right-bar []
|
||||
(box :class "transparent"
|
||||
:space-evenly true
|
||||
:spacing 14
|
||||
:orientation "h"
|
||||
(notif-panel)
|
||||
)
|
||||
)
|
||||
(defwindow right-bar
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:exclusive "ignore"
|
||||
|
@ -82,5 +89,5 @@
|
|||
:height "0px"
|
||||
:anchor "top right"
|
||||
)
|
||||
(notif-panel)
|
||||
(right-bar)
|
||||
)
|
||||
|
|
|
@ -21,9 +21,8 @@ exec-once = bash -c "sleep 5; nextcloud --background"
|
|||
exec-once = bash -c "sleep 6; tutanota-desktop -a"
|
||||
|
||||
exec-once = eww daemon
|
||||
exec-once = eww open tablet-toggle
|
||||
exec-once = eww open notif-panel
|
||||
exec-once = eww open osk-toggle
|
||||
exec-once = eww open left-bar
|
||||
exec-once = eww open right-bar
|
||||
# TODO: put this in eww configs?
|
||||
exec-once = $HYPR_PATH/osk-toggle.sh getState
|
||||
|
||||
|
|
|
@ -7,4 +7,4 @@ brightnessctl -d tpacpi::kbd_backlight s 2
|
|||
killall -r autorotate.sh
|
||||
killall -r evtest
|
||||
|
||||
eww update toggle-state=false
|
||||
eww update tablet-ts=false
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
state () {
|
||||
if [[ $(busctl get-property --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible) == "b true" ]]; then
|
||||
echo "Running"
|
||||
eww update osk-toggle-state=true
|
||||
eww update osk-ts=true
|
||||
else
|
||||
echo "Stopped"
|
||||
eww update osk-toggle-state=false
|
||||
eww update osk-ts=false
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,11 @@ toggle () {
|
|||
if [[ $(busctl get-property --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 Visible) == "b true" ]]; then
|
||||
echo "Running"
|
||||
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false
|
||||
eww update osk-toggle-state=false
|
||||
eww update osk-ts=false
|
||||
else
|
||||
echo "Stopped"
|
||||
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
|
||||
eww update osk-toggle-state=true
|
||||
eww update osk-ts=true
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo $XDG_DATA_DIRS >> ~/log.log
|
||||
echo "$XDG_DATA_DIRS" >> ~/log.log
|
||||
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
|
||||
|
||||
brightnessctl -d tpacpi::kbd_backlight s 0
|
||||
|
||||
$HYPR_PATH/autorotate.sh &
|
||||
"$HYPR_PATH"/autorotate.sh &
|
||||
|
||||
evtest --grab "/dev/input/by-path/platform-i8042-serio-0-event-kbd" &
|
||||
evtest --grab "/dev/input/by-path/platform-i8042-serio-1-event-mouse" &
|
||||
|
@ -13,4 +13,4 @@ evtest --grab "/dev/input/by-path/platform-AMDI0010:02-event-mouse" &
|
|||
evtest --grab "/dev/input/by-path/platform-thinkpad_acpi-event" &
|
||||
evtest --grab "/dev/video-bus" &
|
||||
|
||||
eww update toggle-state=true
|
||||
eww update tablet-ts=true
|
||||
|
|
Loading…
Reference in a new issue