diff --git a/eww/eww.yuck b/eww/eww.yuck index 32ea1b0..8c02dd2 100644 --- a/eww/eww.yuck +++ b/eww/eww.yuck @@ -29,7 +29,7 @@ (deflisten audio :initial "--" "~/.config/eww/scripts/get-audio") (defwidget volume [] - (eventbox :onscroll "~/.config/eww/scripts/adjust-volume {}" :cursor "row-resize" + (eventbox :cursor "row-resize" :onscroll "~/.config/eww/scripts/adjust-volume {}" :onclick "pactl set-sink-mute @DEFAULT_SINK@ toggle" (label_value :text "" :value {audio.muted ? "muted" : "${audio.volume}%"} :value_class {audio.muted ? "muted" : ""}))) (defwidget audio_source [] (eventbox :onclick "~/.config/eww/scripts/swap-audio-source" :cursor "pointer" @@ -94,6 +94,16 @@ (label :text "")) +;(deflisten brightness :initial "--" "~/.config/eww/scripts/get-brightness") +(defwidget brightness [] + (eventbox :onscroll "~/.config/eww/scripts/adjust-brightness {}" :cursor "row-resize" + (label_value :text "󰌵" :value "50%"))) + + +(defwidget battery [] + (label :text "")) + + (defwidget left_bar [] (centerbox :class "bar" :orientation "h" (box :class "left" :orientation "h" :space-evenly false :halign "begin" @@ -122,7 +132,7 @@ (defwidget above_bar [] (centerbox :class "bar" :orientation "h" (box :class "left" :orientation "h" :space-evenly false :halign "begin" - (workspaces :monitor "HDMI-A-1")) + (workspaces :monitor "DP-1")) (systray :pack_direction "ltr" :icon-size 20) (box :class "right" :orientation "h" :space-evenly false :halign "end" (notifications) @@ -138,6 +148,28 @@ (sep) (datetime)))) +(defwidget laptop_bar [] + (centerbox :class "bar" :orientation "h" + (box :class "left" :orientation "h" :space-evenly false :halign "begin" + (workspaces :monitor "eDP-1") + (sep) + (window)) + (systray :pack_direction "ltr" :icon-size 20) + (box :class "right" :orientation "h" :space-evenly false :halign "end" + (color_selector) + (sep) + (ram) + (cpu) + (wlan) + (battery) + (sep) + (brightness) + (volume) + (sep) + (datetime) + (sep) + (power)))) + (defwindow left :monitor 1 @@ -173,3 +205,15 @@ :focusable false (above_bar)) +(defwindow laptop + :monitor 0 + :geometry (geometry :x "0px" + :y "4px" + :width "1912px" + :height "24px" + :anchor "top center") + :stacking "fg" + :exclusive true + :focusable false + (laptop_bar)) + diff --git a/eww/startup.sh b/eww/startup.sh index d7d6a3f..c90d68d 100755 --- a/eww/startup.sh +++ b/eww/startup.sh @@ -1,5 +1,10 @@ #!/bin/env sh eww daemon -eww open-many left right above + +if [ "$(uname -n)" == "chonk" ]; then + eww open-many left right above +else + eww open laptop +fi diff --git a/hypr/hpomen.conf b/hypr/hpomen.conf index 669a9fa..1a0081a 100644 --- a/hypr/hpomen.conf +++ b/hypr/hpomen.conf @@ -6,6 +6,10 @@ env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = WLR_NO_HARDWARE_CURSORS,1 workspace = 1, monitor:eDP-1, default:true +workspace = 2, monitor:eDP-1, +workspace = 3, monitor:eDP-1, +workspace = 4, monitor:eDP-1, +workspace = 5, monitor:eDP-1, source = ~/.config/hypr/common.conf diff --git a/hypr/startup.sh b/hypr/startup.sh index 7cb9069..0acab29 100755 --- a/hypr/startup.sh +++ b/hypr/startup.sh @@ -1,10 +1,12 @@ #!/bin/env sh -hyprctl dispatch workspace 3 -hyprctl dispatch exec kitty -hyprctl dispatch -- exec kitty -o allow_remote_control="yes" --listen-on "unix:/tmp/kitty-command-2" -hyprctl dispatch -- exec kitty -o allow_remote_control="yes" --listen-on "unix:/tmp/kitty-command-3" -sleep 1 -kitty @ --to 'unix:/tmp/kitty-command-2' send-text "c\n" -kitty @ --to 'unix:/tmp/kitty-command-3' send-text "btop\n" +if [ "$(uname -n)" == "chonk" ]; then + hyprctl dispatch workspace 3 + hyprctl dispatch exec kitty + hyprctl dispatch -- exec kitty -o allow_remote_control="yes" --listen-on "unix:/tmp/kitty-command-2" + hyprctl dispatch -- exec kitty -o allow_remote_control="yes" --listen-on "unix:/tmp/kitty-command-3" + sleep 1 + kitty @ --to 'unix:/tmp/kitty-command-2' send-text "c\n" + kitty @ --to 'unix:/tmp/kitty-command-3' send-text "btop\n" +fi diff --git a/scripts/lib/swww.py b/scripts/lib/swww.py index 6b375c2..22e294e 100644 --- a/scripts/lib/swww.py +++ b/scripts/lib/swww.py @@ -2,10 +2,11 @@ from pathlib import Path from random import sample +from socket import gethostname from subprocess import run -MONITORS = ("DP-1", "DP-2", "HDMI-A-1") +MONITORS = ("DP-1", "DP-2", "HDMI-A-1") if gethostname() == "chonk" else ("eDP-1",) ANGLE_TRANSITION_ARGS = [ "--transition-type", "wipe",