diff --git a/config/eww/date/date.scss b/config/eww/date/date.scss index 3897af68..d77637ee 100644 --- a/config/eww/date/date.scss +++ b/config/eww/date/date.scss @@ -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; diff --git a/config/eww/scripts/close-opened.sh b/config/eww/scripts/close-opened.sh index 42032f5a..c208fb8c 100755 --- a/config/eww/scripts/close-opened.sh +++ b/config/eww/scripts/close-opened.sh @@ -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 diff --git a/config/eww/traybuttons/traybuttons.scss b/config/eww/traybuttons/traybuttons.scss index 26d18e6f..bfb7b449 100644 --- a/config/eww/traybuttons/traybuttons.scss +++ b/config/eww/traybuttons/traybuttons.scss @@ -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 { diff --git a/config/eww/traybuttons/traybuttons.yuck b/config/eww/traybuttons/traybuttons.yuck index 487ad627..ab7ca67e 100644 --- a/config/eww/traybuttons/traybuttons.yuck +++ b/config/eww/traybuttons/traybuttons.yuck @@ -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) ) diff --git a/config/hypr/main.conf b/config/hypr/main.conf index 40b733f8..92b94fe2 100644 --- a/config/hypr/main.conf +++ b/config/hypr/main.conf @@ -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 diff --git a/config/hypr/scripts/laptop-mode.sh b/config/hypr/scripts/laptop-mode.sh index 689390e6..42e89062 100755 --- a/config/hypr/scripts/laptop-mode.sh +++ b/config/hypr/scripts/laptop-mode.sh @@ -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 diff --git a/config/hypr/scripts/osk-toggle.sh b/config/hypr/scripts/osk-toggle.sh index 3bd0eaf8..7a5b7326 100755 --- a/config/hypr/scripts/osk-toggle.sh +++ b/config/hypr/scripts/osk-toggle.sh @@ -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 } diff --git a/config/hypr/scripts/tablet-mode.sh b/config/hypr/scripts/tablet-mode.sh index a59a9e95..bd5ab918 100755 --- a/config/hypr/scripts/tablet-mode.sh +++ b/config/hypr/scripts/tablet-mode.sh @@ -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