Compare commits

..

No commits in common. "fc18072aa59f1a393a658d307d1bff542b75323b" and "a7e821f8d64f5f3b29961f6764d1aec58da6ce2d" have entirely different histories.

9 changed files with 59 additions and 75 deletions

View file

@ -28,7 +28,7 @@
.cal-box {
font-family: Product Sans;
background-color: rgba(40, 42, 54, 0.8);
border-radius: 30px;
border-radius: 15px;
padding: 0 1rem .2rem;
color: $fg;
background-color: $bg;
@ -40,7 +40,6 @@
background-color: inherit;
padding: .5rem .10rem 0rem;
margin-left: 10px;
border-radius: 30px;
& > * {
border: solid 0px transparent;

View file

@ -13,7 +13,7 @@ done
# Close every window except permanent ones
for element in "${array[@]}"
do
if [[ "$element" != "left-bar" && "$element" != "right-bar" ]]; then
if [[ "$element" != "tablet-toggle" ]]; then
"$EWW_PATH"/close.sh "$element"
fi
done

View file

@ -1,29 +1,20 @@
.osk-toggle {
font-size: 30px;
min-height: 38px;
min-height: 26px;
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;
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;
padding: 2px 13px 2px 16px;
}
.toggle-off {

View file

@ -1,85 +1,78 @@
(defvar osk-ts false)
(defvar osk-toggle-state false)
(defwidget osk-toggle []
(eventbox :class {osk-ts ? "toggle-on" : "toggle-off"}
(eventbox :class {osk-toggle-state ? "toggle-on" : "toggle-off"}
:onclick "$HYPR_PATH/osk-toggle.sh toggle &"
(box :class "osk-toggle"
:space-evenly true
:spacing 6
:orientation "h"
(label :text " 󰌌 ")
)
)
)
(defvar tablet-ts false)
(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)
(defwidget tablet-toggle []
(eventbox :class {tablet-ts ? "toggle-on" : "toggle-off"}
:onclick {tablet-ts ? "$HYPR_PATH/laptop-mode.sh &" :
"$HYPR_PATH/tablet-mode.sh &"}
(eventbox :class {toggle-state ? "toggle-on" : "toggle-off"}
:onclick {toggle-state ? "$HYPR_PATH/laptop-mode.sh &" :
"$HYPR_PATH/tablet-mode.sh &"}
(box :class "tablet-toggle"
:space-evenly true
:spacing 6
:orientation "h"
(label :text " 󰦧 ")
)
)
)
(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
(defwindow tablet-toggle
:monitor 0
:stacking "overlay"
:exclusive "ignore"
:geometry (geometry :x "10px"
:y "11px"
:geometry (geometry :x "72px"
:y "9px"
:width "0px"
:height "0px"
:anchor "top left"
)
(left-bar)
(tablet-toggle)
)
(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} ")
)
)
)
(defwidget right-bar []
(box :class "transparent"
:space-evenly true
:spacing 14
:orientation "h"
(notif-panel)
)
)
(defwindow right-bar
(defwindow notif-panel
:monitor 0
:stacking "overlay"
:exclusive "ignore"
@ -89,5 +82,5 @@
:height "0px"
:anchor "top right"
)
(right-bar)
(notif-panel)
)

View file

@ -21,8 +21,9 @@ 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 left-bar
exec-once = eww open right-bar
exec-once = eww open tablet-toggle
exec-once = eww open notif-panel
exec-once = eww open osk-toggle
# TODO: put this in eww configs?
exec-once = $HYPR_PATH/osk-toggle.sh getState

View file

@ -7,4 +7,4 @@ brightnessctl -d tpacpi::kbd_backlight s 2
killall -r autorotate.sh
killall -r evtest
eww update tablet-ts=false
eww update toggle-state=false

View file

@ -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-ts=true
eww update osk-toggle-state=true
else
echo "Stopped"
eww update osk-ts=false
eww update osk-toggle-state=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-ts=false
eww update osk-toggle-state=false
else
echo "Stopped"
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
eww update osk-ts=true
eww update osk-toggle-state=true
fi
}

View file

@ -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 tablet-ts=true
eww update toggle-state=true

View file

@ -14,7 +14,7 @@
"fit-to-screen": false,
"layer": "top",
"control-center-layer": "overlay",
"control-center-layer": "top",
"cssPriority": "user",
"notification-icon-size": 64,
"notification-body-image-height": 300,