diff --git a/home/.config/eww/bar/active-window.yuck b/home/.config/eww/bar/active-window.yuck new file mode 100644 index 0000000..5c5fa8c --- /dev/null +++ b/home/.config/eww/bar/active-window.yuck @@ -0,0 +1,8 @@ +(deflisten window :initial "..." "./lib/get-active-window.sh") + +(defwidget active-window [] + (box + :halign "center" + (label :class "box" :text "${window?: 'none'}") + ) +) diff --git a/home/.config/eww/widgets/audio/audio.yuck b/home/.config/eww/bar/audio.yuck similarity index 85% rename from home/.config/eww/widgets/audio/audio.yuck rename to home/.config/eww/bar/audio.yuck index da9b3ff..022ac26 100644 --- a/home/.config/eww/widgets/audio/audio.yuck +++ b/home/.config/eww/bar/audio.yuck @@ -1,4 +1,4 @@ -(defpoll volume-level :interval "1s" "sh widgets/audio/get-volume-level.sh") +(defpoll volume-level :interval "1s" "./lib/get-volume-level.sh") (defwidget icon [] (label :text {volume-level > 66 ? "" : volume-level > 0 ? "" : ""}) @@ -13,7 +13,7 @@ :halign "end" (eventbox :cursor "pointer" (button :class "audio-source interactive" :onclick "pactl set-default-sink 57" "󰍹")) (eventbox :cursor "pointer" (button :class "audio-source-2 interactive" :onclick "pactl set-default-sink 64" "󰋋")) - (eventbox :cursor "pointer" :class "interactive" :onscroll "sh widgets/audio/change-volume.sh {}" + (eventbox :cursor "pointer" :class "interactive" :onscroll "./lib/change-volume.sh {}" (box :class "volume" (icon) (button :onclick "pavucontrol &" diff --git a/home/.config/eww/bar/bar.yuck b/home/.config/eww/bar/bar.yuck new file mode 100644 index 0000000..34b1ade --- /dev/null +++ b/home/.config/eww/bar/bar.yuck @@ -0,0 +1,49 @@ + + +(include "./bar/active-window.yuck") +(include "./bar/audio.yuck") +; (include "./bar/brightness.yuck") +(include "./bar/clock.yuck") +(include "./bar/kbd-layout.yuck") +(include "./bar/media.yuck") +(include "./bar/workspaces.yuck") + +(defwidget right [] + (box :class "box right" + :orientation "h" + :halign "end" + :space-evenly false + (systray :hexpand true :class "systray" :icon-size 18 :spacing 4) + (kbd-layout) + (audio) + (media) + ; (brightness) + (clock) + (eventbox :cursor "pointer" + (button :class "power-button interactive" :onclick "eww open --toggle power-menu" "󰐥") + ) + ) +) + +(defwidget bar [monitor-workspaces] + (box :class "bar" :orientation "h" + (workspaces :monitor-workspaces monitor-workspaces) + (active-window) + (right) + ) +) + +(defwindow bar [monitor monitor-workspaces] + :monitor monitor + :geometry (geometry :x "0%" + :y "4px" + :width "99.7%" + :height "32px" + :anchor "top center" + ) + :exclusive true + :windowtype "dock" + :wm-ignore false + :focusable false + (bar :monitor-workspaces monitor-workspaces) +) diff --git a/home/.config/eww/widgets/brightness/brightness.yuck b/home/.config/eww/bar/brightness.yuck similarity index 72% rename from home/.config/eww/widgets/brightness/brightness.yuck rename to home/.config/eww/bar/brightness.yuck index 38fd684..614251d 100644 --- a/home/.config/eww/widgets/brightness/brightness.yuck +++ b/home/.config/eww/bar/brightness.yuck @@ -3,7 +3,7 @@ (defpoll brightness-1 :interval "2s" "ddcutil -d 1 getvcp 10 | awk '{ split($9, a, \",\"); print a[1]}'") (defwidget brightness [] - (eventbox :onscroll "sh widgets/brightness/change-brightness.sh {} ${brightness-1 + 0}" + (eventbox :onscroll "./lib/change-brightness.sh {} ${brightness-1 + 0}" (label :text "󰃞 ${substring(brightness-1, 0, 2)}") ) ) diff --git a/home/.config/eww/bar/clock.yuck b/home/.config/eww/bar/clock.yuck new file mode 100644 index 0000000..869b834 --- /dev/null +++ b/home/.config/eww/bar/clock.yuck @@ -0,0 +1,30 @@ +(defpoll date-time :interval "5s" "./lib/date-time.sh") + +(defwidget date [] + (box :class "date" + "${date-time.date}" + ) +) + +(defwidget day [] + (box :class "day" + "${date-time.day}" + ) +) + +(defwidget time [] + (box :class "time" + "${date-time.time}" + ) +) + +(defwidget clock [] + (box :class "clock" + :orientation "h" + :space-evenly false + :valign "center" + (date) + (day) + (time) + ) +) diff --git a/home/.config/eww/widgets/kbd-layout/kbd-layout.yuck b/home/.config/eww/bar/kbd-layout.yuck similarity index 93% rename from home/.config/eww/widgets/kbd-layout/kbd-layout.yuck rename to home/.config/eww/bar/kbd-layout.yuck index 2ebfab5..f095bf5 100644 --- a/home/.config/eww/widgets/kbd-layout/kbd-layout.yuck +++ b/home/.config/eww/bar/kbd-layout.yuck @@ -3,6 +3,7 @@ :orientation "h" :space-evenly false :halign "center" + :class "interactive" (eventbox :cursor "pointer" :class "interactive" :onclick "hyprctl switchxkblayout usb-hid-keyboard next" (label :text {keyboard-layout} :class "kbd-layout") ) diff --git a/home/.config/eww/bar/media.yuck b/home/.config/eww/bar/media.yuck new file mode 100644 index 0000000..9ab2790 --- /dev/null +++ b/home/.config/eww/bar/media.yuck @@ -0,0 +1,65 @@ +(defpoll mediastatus :interval "1s" "./lib/media-status.sh") + +(defwidget media [] + (eventbox :cursor "pointer" :onmiddleclick "playerctl play-pause" + (button :class "media-status interactive" :onclick "eww open --toggle media-menu" + (label :text "${mediastatus.status == "Playing" ? "" : mediastatus.status == "Paused" ? "" : ""}") + ) + ) +) + +(defwidget media_full [] + (box :orientation "v" :space-evenly false :class "media-window" + (label :class "title" :text "${mediastatus.artist} - ${mediastatus.title}" :show-truncated false) + (label :class "album" :text "${mediastatus.album}" :show-truncated false) + (box :class "media-cover" :style "background: url('${mediastatus.artUrl}'); background-size: cover;" :height 300) + + (box :class "media-controls" :spacing 12 :space-evenly false :halign "center" + (eventbox :cursor "pointer" + (button :class "media-button" :class "media-button shuffle ${mediastatus.shuffle == "On" ? "active" : ""}" :onclick "playerctl shuffle toggle" "") + ) + + (eventbox :cursor "pointer" + (button :class "media-button" :onclick "playerctl previous" "") + ) + + (eventbox :cursor "pointer" + (button + :class "media-button ${mediastatus.status == "Playing" ? "pause" : "play"}" + :onclick "./lib/media-play-pause.sh" + "${mediastatus.status == "Playing" ? "" : ""}" + ) + ) + + (eventbox :cursor "pointer" + (button :class "media-button" :onclick "playerctl next" "") + ) + + (eventbox :cursor "pointer" + (button + :class "media-button loop ${mediastatus.loop != "None" ? "active" : ""}" + :onclick "playerctl loop ${mediastatus.loop == "Playlist" ? "track" : mediastatus.loop == "Track" ? "none" : "playlist"}" + "${mediastatus.loop == "Track" ? "󰑘" : "󰑖"}" + ) + + ) + + ) + ) +) + +(defwindow media-menu + :monitor 0 + :namespace "media-menu" + :stacking "overlay" + :geometry (geometry :x "8px" + :y "8px" + :width "400px" + :anchor "top right" + ) + :wm-ignore false + :focusable false + (box :class "control-centre" + (media_full) + ) +) diff --git a/home/.config/eww/bar/workspaces.yuck b/home/.config/eww/bar/workspaces.yuck new file mode 100644 index 0000000..1b2a192 --- /dev/null +++ b/home/.config/eww/bar/workspaces.yuck @@ -0,0 +1,15 @@ +(deflisten active-workspace :initial "." "./lib/get-active-workspace.sh") + +(defwidget workspaces [?monitor-workspaces] + (box :class "workspaces" + :orientation "h" + :space-evenly true + :halign "start" + :spacing 8 + (for workspace in monitor-workspaces + (eventbox :cursor "pointer" + (button :class "interactive workspace ${active-workspace == workspace ? "active" : ""}" :onclick "hyprctl dispatch workspace ${workspace}" "${workspace}") + ) + ) + ) +) diff --git a/home/.config/eww/eww.scss b/home/.config/eww/eww.scss index c3aedbd..36d909c 100644 --- a/home/.config/eww/eww.scss +++ b/home/.config/eww/eww.scss @@ -1,47 +1,46 @@ * { all: unset; + font-family: "SF Pro Light"; } -.bar { - font-family: "FiraCode Nerd Fonot"; - border-radius: 8px; -} +$bg: rgba(0, 0, 0, 0.5); +$fg: #dedede; +$menu-border: rgba(255, 255, 255, 0.1); +$bar-gap: 8px; - -.interactive, .workspace { +.interactive { border-radius: 4px; margin: 4px 0; transition: background-color 0.4s ease; + + &:not(.active):hover { + background-color: rgba(255, 255, 255, 0.2); + } } .workspace { padding: 0 8px; -} -.workspace.current { - background-color: #fff; - color: #000; - font-weight: bold; -} - -.interactive:not(.active):hover, -.workspace:not(.current):hover { - background-color: rgba(255, 255, 255, 0.3); + &.active { + background-color: $fg; + color: $bg; + font-weight: bold; + } } .box { - background-color: rgba(255, 255, 255, 0.2); + background-color: $bg; border-radius: 8px; - padding-left: 8px; - padding-right: 12px; + padding: 0 calc($bar-gap * 1.5); + color: $fg; } .right > :not(:first-child) { - margin-left: 8px; + margin-left: $bar-gap; } .audio-source { - margin-top: 6px; + padding-top: 2px; padding-left: 8px; padding-right: 12px; } @@ -57,40 +56,135 @@ .kbd-layout { padding: 0 8px; -} - -.control-centre { - background-color: rgba(0, 0, 0, 0.8); - padding: 16px 32px; - + border-radius: 4px; } .media-status { - padding-right: 8px; + padding-right: 10px; padding-left: 8px; } -.media-window { - .media-cover { - border-radius: 8px; - border: 2px solid #fff; - background-size: contain; +.control-centre { + background-color: $bg; + border: 3px solid $menu-border; - } + border-radius: 8px; + padding: 16px 48px; - .media-controls { - margin-top: 16px; - } + .media-window { + .title { + font-weight: bold; + font-size: 15px; + }; - .media-button { - border-radius: 8px; - padding: 32px 0; - background-color: rgba(255, 255, 255, 0.4); - transition: background-color 0.4s ease; + .album { + font-size: 13px; + color: #aaa + } - &:hover { - background-color: rgba(255, 255, 255, 0.2); + .media-cover { + margin-top: 12px; + border-radius: 16px; + border: 2px solid $menu-border; + } + + .media-controls { + margin-top: 16px; + } + + .media-button { + padding: 8px 13px; + border-radius: 100%; + border: 2px solid $menu-border; + transition: all 0.4s ease; + + &.shuffle { + padding-left: 10px; + padding-right: 16px; + + &.active { + background-color: $fg; + color: $bg; + } + } + + &.loop { + padding-left: 12px; + padding-right: 14px; + + &.active { + background-color: $fg; + color: $bg; + } + } + + &.pause { + background-color: $fg; + color: $bg; + } + + &:hover { + background-color: $fg; + border-color: $fg; + color: $bg; + } } } } + + +.power-menu { + background-color: $bg; + border: 3px solid $menu-border; + border-radius: 32px; + + .power-menu-item { + font-size: 44px; + background-color: $bg; + border-radius: 20px; + border: 1px solid $menu-border; + margin: 16px 0; + margin-right: 16px; + padding-right: 4px; /* this makes sure icons from nerd font are centered */ + transition: background-color 0.4s ease, color 0.4s ease; + color: $fg; + + &:hover { + background-color: $fg; + color: $bg; + } + + &.first { + margin-left: 16px; + } + } +} + +.power-button { + padding-right: 8px; + padding-left: 8px; + margin-left: 4px; + font-size: 18px; +} + +.clock { + margin-right: 8px; + + .date { + border: 1px solid rgba(255, 255, 255, 0.3); + border-top: 4px solid rgba(255, 255, 255, 0.6); + padding: 0 8px; + border-radius: 4px; + margin: 6px 0; + font-size: 12px; + } + + .day { + margin-left: 6px; + } + + .time { + margin-left: 8px; + } +} diff --git a/home/.config/eww/eww.yuck b/home/.config/eww/eww.yuck index 5570437..9646837 100644 --- a/home/.config/eww/eww.yuck +++ b/home/.config/eww/eww.yuck @@ -1,76 +1,28 @@ -(include "./widgets/active-window/active-window.yuck") -(include "./widgets/audio/audio.yuck") -; (include "./widgets/brightness/brightness.yuck") -(include "./widgets/clock/clock.yuck") -(include "./widgets/kbd-layout/kbd-layout.yuck") -(include "./widgets/media/media.yuck") -(include "./widgets/workspaces/workspaces.yuck") +(include "./power-menu/power-menu.yuck") +(include "./bar/bar.yuck") - -(defwidget right [] - (box :class "box right" - :orientation "h" - :space-evenly false - :halign "end" - (systray :hexpand true :class "systray" :icon-size 18 :spacing 4) - (kbd-layout) - (audio) - (media) - ; (brightness) - (clock) - )) - - -(defwindow bar - :monitor 0 - :geometry (geometry :x "0%" - :y "4px" - :width "99.7%" - :height "32px" - :anchor "top center" - ) - :exclusive true - :windowtype "dock" - :wm-ignore false - :focusable false - (box :class "bar" :orientation "h" - (workspaces :monitor-workspaces "[1, 2]") - (active-window) - (right) - ) -) - - -(defwindow bar2 +; a hacky solution for moving the windows on my second monitor a bit up so I can see them :D +(defwindow monitor-bump :monitor 1 - :geometry (geometry :x "0%" - :y "4px" - :width "99.7%" - :height "32px" - :anchor "top center" - ) + :geometry (geometry :x "0" :y "0" :width "100%" :height "120" :anchor "bottom center") :exclusive true :windowtype "dock" - :wm-ignore false + :wm-ignore true :focusable false - (box :class "bar" :orientation "h" - (workspaces :monitor-workspaces "[3, 4]") - (active-window) - (right) - ) + (box " ") ) -; (defvar r_bar_systray false) + ; (defvar r_bar_systray false) -; (defwidget w_bar_tray[] (revealer - ; :reveal r_bar_systray - ; :transition "slideleft" - ; (eventbox :class "tray" :spacing 20 :space-evenly false - ; (box :class "widget" :spacing 0 :space-evenly false - ; (systray :icon-size 18) - ; ) - ; ) - ; ) -; ) + ; (defwidget w_bar_tray[] (revealer + ; :reveal r_bar_systray + ; :transition "slideleft" + ; (eventbox :class "tray" :spacing 20 :space-evenly false + ; (box :class "widget" :spacing 0 :space-evenly false + ; (systray :icon-size 18) + ; ) + ; ) + ; ) + ; ) diff --git a/home/.config/eww/widgets/workspaces/change-active-workspace.sh b/home/.config/eww/lib/change-active-workspace.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/workspaces/change-active-workspace.sh rename to home/.config/eww/lib/change-active-workspace.sh diff --git a/home/.config/eww/widgets/brightness/change-brightness.sh b/home/.config/eww/lib/change-brightness.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/brightness/change-brightness.sh rename to home/.config/eww/lib/change-brightness.sh diff --git a/home/.config/eww/widgets/audio/change-volume.sh b/home/.config/eww/lib/change-volume.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/audio/change-volume.sh rename to home/.config/eww/lib/change-volume.sh diff --git a/home/.config/eww/widgets/clock/date-time.sh b/home/.config/eww/lib/date-time.sh similarity index 55% rename from home/.config/eww/widgets/clock/date-time.sh rename to home/.config/eww/lib/date-time.sh index cddf805..6c8a651 100755 --- a/home/.config/eww/widgets/clock/date-time.sh +++ b/home/.config/eww/lib/date-time.sh @@ -9,5 +9,8 @@ DaySuffix() { esac } -date=$(date "+%a, %b %-d`DaySuffix` · %H:%M") -printf "%s" "$date" +day=$(date "+%a") +date=$(date "+%-d") +time=$(date "+%H:%M") + +echo "{\"date\": \"$date\", \"day\": \"$day\", \"time\": \"$time\"}" diff --git a/home/.config/eww/widgets/active-window/get-active-window.sh b/home/.config/eww/lib/get-active-window.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/active-window/get-active-window.sh rename to home/.config/eww/lib/get-active-window.sh diff --git a/home/.config/eww/widgets/workspaces/get-active-workspace.sh b/home/.config/eww/lib/get-active-workspace.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/workspaces/get-active-workspace.sh rename to home/.config/eww/lib/get-active-workspace.sh diff --git a/home/.config/eww/widgets/audio/get-volume-level.sh b/home/.config/eww/lib/get-volume-level.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/audio/get-volume-level.sh rename to home/.config/eww/lib/get-volume-level.sh diff --git a/home/.config/eww/lib/media-play-pause.sh b/home/.config/eww/lib/media-play-pause.sh new file mode 100755 index 0000000..438edfc --- /dev/null +++ b/home/.config/eww/lib/media-play-pause.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +if [[ $(playerctl status) == "Playing" ]]; then + playerctl pause +else + playerctl play +fi diff --git a/home/.config/eww/lib/media-status.sh b/home/.config/eww/lib/media-status.sh new file mode 100755 index 0000000..ff5583c --- /dev/null +++ b/home/.config/eww/lib/media-status.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env sh + +status=$(playerctl status 2>/dev/null) +artist=$(playerctl metadata --format "{{artist}}" 2>/dev/null) +title=$(playerctl metadata --format "{{title}}" 2>/dev/null) +album=$(playerctl metadata --format "{{album}}" 2>/dev/null) +artUrl=$(playerctl metadata --format "{{mpris:artUrl}}" 2>/dev/null) +length=$(playerctl metadata --format "{{duration(mpris:length)}}" 2>/dev/null) +shuffle=$(playerctl shuffle 2>/dev/null) +loop=$(playerctl loop 2>/dev/null) + +echo "{ + \"status\": \"$status\", + \"artist\": \"$artist\", + \"title\": \"$title\", + \"album\": \"$album\", + \"artUrl\": \"$artUrl\", + \"length\": \"$length\", + \"shuffle\": \"$shuffle\", + \"loop\": \"$loop\" +}" diff --git a/home/.config/eww/widgets/workspaces/workspaces.sh b/home/.config/eww/lib/workspaces.sh old mode 100644 new mode 100755 similarity index 100% rename from home/.config/eww/widgets/workspaces/workspaces.sh rename to home/.config/eww/lib/workspaces.sh diff --git a/home/.config/eww/power-menu/lock.sh b/home/.config/eww/power-menu/lock.sh new file mode 100755 index 0000000..d96351e --- /dev/null +++ b/home/.config/eww/power-menu/lock.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +hyprlock diff --git a/home/.config/eww/power-menu/logout.sh b/home/.config/eww/power-menu/logout.sh new file mode 100755 index 0000000..3546df3 --- /dev/null +++ b/home/.config/eww/power-menu/logout.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +loginctl kill-user $USER diff --git a/home/.config/eww/power-menu/power-menu.yuck b/home/.config/eww/power-menu/power-menu.yuck new file mode 100644 index 0000000..478a68d --- /dev/null +++ b/home/.config/eww/power-menu/power-menu.yuck @@ -0,0 +1,26 @@ + +(defwindow power-menu + :namespace "power-menu" + :monitor 0 + :stacking "overlay" + :geometry (geometry :x "50%" + :y "50%" + :width "30%" + :height "200px" + :anchor "center" + ) + (box :class "power-menu" :orientation "h" + (eventbox :cursor "pointer" + (button :class "power-menu-item first" :onclick "./power-menu/lock.sh" "") + ) + (eventbox :cursor "pointer" + (button :class "power-menu-item" :onclick "./power-menu/logout.sh" "󰈆") + ) + (eventbox :cursor "pointer" + (button :class "power-menu-item" :onclick "./power-menu/reboot.sh" "") + ) + (eventbox :cursor "pointer" + (button :class "power-menu-item" :onclick "./power-menu/shutdown.sh" "") + ) + ) +) diff --git a/home/.config/eww/power-menu/reboot.sh b/home/.config/eww/power-menu/reboot.sh new file mode 100755 index 0000000..4142d0b --- /dev/null +++ b/home/.config/eww/power-menu/reboot.sh @@ -0,0 +1,4 @@ + +#!/usr/bin/env sh + +systemctl reboot diff --git a/home/.config/eww/power-menu/shutdown.sh b/home/.config/eww/power-menu/shutdown.sh new file mode 100755 index 0000000..05144a4 --- /dev/null +++ b/home/.config/eww/power-menu/shutdown.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +systemctl poweroff now diff --git a/home/.config/eww/widgets/active-window/active-window.yuck b/home/.config/eww/widgets/active-window/active-window.yuck deleted file mode 100644 index edf7f6a..0000000 --- a/home/.config/eww/widgets/active-window/active-window.yuck +++ /dev/null @@ -1,7 +0,0 @@ -(deflisten window :initial "..." "sh ./widgets/active-window/get-active-window.sh") - -(defwidget active-window [] - (box - (label :class "box" :text "${window}") - ) -) diff --git a/home/.config/eww/widgets/clock/clock.yuck b/home/.config/eww/widgets/clock/clock.yuck deleted file mode 100644 index f5d56b4..0000000 --- a/home/.config/eww/widgets/clock/clock.yuck +++ /dev/null @@ -1,10 +0,0 @@ -(defwidget clock [] - (box :class "clock" - :orientation "h" - :space-evenly false - :halign "center" - date-time) -) - -(defpoll date-time :interval "1s" -"sh widgets/clock/date-time.sh") diff --git a/home/.config/eww/widgets/media/media.yuck b/home/.config/eww/widgets/media/media.yuck deleted file mode 100644 index 5a4d1a3..0000000 --- a/home/.config/eww/widgets/media/media.yuck +++ /dev/null @@ -1,50 +0,0 @@ -(defpoll media-status :interval "1s" "playerctl status") - - -(defpoll media-artist :interval "1s" "playerctl metadata --format \"{{artist}}\"") -(defpoll media-title :interval "1s" "playerctl metadata --format \"{{title}}\"") -(defpoll media-album :interval "1s" "playerctl metadata --format \"{{album}}\"") -(defpoll media-artUrl :interval "1s" "playerctl metadata --format \"{{mpris:artUrl}}\"") -(defpoll media-length :interval "1s" "playerctl metadata --format \"{{duration(mpris:length)}}\"") - - -(defwidget media [] - (box - (eventbox :cursor "pointer" :onclick "eww open --toggle window_media" :class "interactive" :onmiddleclick "playerctl play-pause" - (box :class "media-status" - (label :text "${media-status == "Playing" ? "" : media-status == "Paused" ? "" : ""}") - ) - ) - - ) -) - -(defwidget media_full [] - (box :orientation "v" :space-evenly false :class "media-window" - (label :text media-artist :show-truncated false) - (label :text media-title :show-truncated false) - (label :text media-album :show-truncated false) - (box :class "media-cover" :style "background: url('${media-artUrl}')" :width 180 :height 140) - (box :class "media-controls" :spacing 16 - (eventbox :cursor "pointer" :onclick "playerctl previous" :class "media-button" "") - (eventbox :cursor "pointer" :class "media-button play" :onclick "playerctl play" "") - (eventbox :cursor "pointer" :class "media-button pause" :onclick "playerctl pause" "") - (eventbox :cursor "pointer" :class "media-button next" :onclick "playerctl next" "") - ) - ) -) - - -(defwindow window_media - :monitor 0 - :geometry (geometry :x "8px" - :y "8px" - :width "300px" - :anchor "top right" - ) - :wm-ignore false - :focusable false - (box :class "control-centre bar" - (media_full) - ) -) diff --git a/home/.config/eww/widgets/workspaces/workspaces.yuck b/home/.config/eww/widgets/workspaces/workspaces.yuck deleted file mode 100644 index ffedbf5..0000000 --- a/home/.config/eww/widgets/workspaces/workspaces.yuck +++ /dev/null @@ -1,13 +0,0 @@ -(deflisten active-workspace :initial "." "sh widgets/workspaces/get-active-workspace.sh") - -(defwidget workspaces [?monitor-workspaces] - (box :class "workspaces" - :orientation "h" - :space-evenly true - :halign "start" - :spacing 10 - (for workspace in monitor-workspaces - (button :class "workspace ${active-workspace == workspace ? "current" : ""}" :onclick "hyprctl dispatch workspace ${workspace}" "${workspace}") - ) - ) -) diff --git a/home/.config/hypr/binds.conf b/home/.config/hypr/binds.conf index 1f117cb..0178021 100644 --- a/home/.config/hypr/binds.conf +++ b/home/.config/hypr/binds.conf @@ -15,11 +15,17 @@ bind = $mainMod, M, exit, bind = $mainMod, E, exec, $fileManager bind = $mainMod, V, togglefloating, bind = $mainMod, L, exec, hyprlock +bind = $mainMod, N, exec, swaync-client --toggle-panel bind = alt, space, exec, $menu --class=floatingTerm bind = alt win shift, e, exec, $emojiMenu # bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle +# eww +bind = $mainMod, F2, exec, eww open --toggle monitor-bump +bind = ctrl alt, Q, exec, eww open --toggle power-menu +bind = ctrl shift win, M, exec, eww open --toggle media-menu + # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r @@ -90,7 +96,5 @@ bindm = $mainMod, mouse:273, resizewindow # game mode bind = $mainMod, F1, exec, ~/.config/hypr/game-mode.sh -# eww -bind = ctrl SHIFT win, M, exec, eww open --toggle window_media -bind = ctrl SHIFT win, W, exec, /home/georgi/Scripts/wallpaper +bind = ctrl shift win, W, exec, /home/georgi/Scripts/wallpaper diff --git a/home/.config/hypr/hyprland.conf b/home/.config/hypr/hyprland.conf index 7d17cec..d0e0cd6 100644 --- a/home/.config/hypr/hyprland.conf +++ b/home/.config/hypr/hyprland.conf @@ -22,8 +22,8 @@ $emojiMenu = rofi -modi emoji -show emoji # exec-once = $terminal # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox -exec-once = eww open bar & -exec-once = eww open bar2 & +exec-once = eww open bar --id bar1 --arg monitor=0 --arg monitor-workspaces="[1,2]" +exec-once = eww open bar --id bar2 --arg monitor=1 --arg monitor-workspaces="[3,4]" exec-once = swww-daemon --format xrgb & exec-once = swaync & @@ -53,3 +53,10 @@ windowrulev2 = float,class:(steam),title:(Steam Settings) source = ~/.config/hypr/input.conf source = ~/.config/hypr/binds.conf + +# blur eww power-menu +layerrule = blur, power-menu +layerrule = ignorezero, power-menu + +layerrule = blur, media-menu +layerrule = ignorezero, media-menu diff --git a/home/.config/hypr/style.conf b/home/.config/hypr/style.conf index 54a41e8..4f099d5 100644 --- a/home/.config/hypr/style.conf +++ b/home/.config/hypr/style.conf @@ -1,10 +1,10 @@ # https://wiki.hyprland.org/Configuring/Variables/#general general { - gaps_in = 3 - gaps_out = 6 + gaps_in = 4 + gaps_out = 4 - border_size = 3 + border_size = 2 col.active_border = rgba(ca9ee6ff) rgba(f2d5cfff) 45deg col.inactive_border = rgba(b4befecc) rgba(6c7086cc) 45deg @@ -18,16 +18,16 @@ general { # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { - rounding = 5 + rounding = 10 # Change transparency of focused and unfocused windows active_opacity = 1.0 inactive_opacity = 1.0 drop_shadow = false - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) + # shadow_range = 4 + # shadow_render_power = 3 + # col.shadow = rgba(1a1a1aee) # https://wiki.hyprland.org/Configuring/Variables/#blur blur {