From eca51d6be46eef8b031efad1c6617d051c8c56f1 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Tue, 23 Jun 2026 15:05:33 -0700 Subject: [PATCH 1/2] some updates for editor handling --- .dotter/global.toml | 1 + default/bashrc.d/default | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.dotter/global.toml b/.dotter/global.toml index 596611b..faff295 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -13,6 +13,7 @@ depends = [] "default/scripts" = "~/Scripts" "default/config/starship.toml" = "~/.config/starship.toml" "default/config/helix" = "~/.config/helix" +"default/config/nvim" = "~/.config/nvim" "default/XCompose" = "~/.XCompose" "default/bash_completion" = "~/.bash_completion" "default/bash_completion.d" = "~/.bash_completion.d" diff --git a/default/bashrc.d/default b/default/bashrc.d/default index 0bddbde..3300eca 100755 --- a/default/bashrc.d/default +++ b/default/bashrc.d/default @@ -253,8 +253,14 @@ if type nvim >/dev/null 2>&1; then GIT_EDITOR="$(which nvim)" else MISSING_CMDS+=("nvim") - EDITOR=$(which nano) - GIT_EDITOR="$(which nano)" + if type hx >/dev/null 2>&1; then + EDITOR=$(which hx) + GIT_EDITOR="$(which hx)" + else + MISSING_CMDS+=("hx") + EDITOR=$(which nano) + GIT_EDITOR="$(which nano)" + fi fi export EDITOR From ce4d3cc74f3437a24c36c86679e9b7b306e784e9 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Wed, 24 Jun 2026 09:17:45 -0700 Subject: [PATCH 2/2] begin revert dms migration --- .dotter/global.toml | 2 +- default/gitconfig | 2 +- .../config/sway/config.d/display.d/328p1aa | 4 +- wayland/config/eww/eww.scss | 270 ++++++++++++++++++ wayland/config/eww/eww.yuck | 29 ++ .../home/shortcuts/development/cloud.svg | 37 +++ .../shortcuts/development/folder-network.svg | 37 +++ .../shortcuts/development/network-pos.svg | 36 +++ .../shortcuts/development/nintendo-wii.svg | 37 +++ .../shortcuts/development/play-network.svg | 37 +++ .../development/router-network-wireless.svg | 37 +++ .../shortcuts/development/router-network.svg | 37 +++ .../shortcuts/development/server-network.svg | 37 +++ .../personal/ceiling-light-multiple.svg | 36 +++ .../shortcuts/personal/home-assistant.svg | 36 +++ .../home/shortcuts/personal/jellyfin.svg | 43 +++ .../home/shortcuts/personal/mastodon.svg | 53 ++++ .../home/shortcuts/personal/nextcloud.svg | 41 +++ .../icons/home/shortcuts/work/briefcase.svg | 36 +++ .../home/shortcuts/work/monitor-multiple.svg | 37 +++ wayland/config/eww/icons/red_square.png | Bin 0 -> 241 bytes .../config/eww/icons/transparent_square.png | Bin 0 -> 200 bytes wayland/config/eww/modules/bar.yuck | 75 +++++ wayland/config/eww/modules/bar/battery.yuck | 21 ++ wayland/config/eww/modules/bar/bluetooth.yuck | 21 ++ wayland/config/eww/modules/bar/clock.yuck | 3 + .../config/eww/modules/bar/idle_inhibit.yuck | 7 + wayland/config/eww/modules/bar/metric.yuck | 12 + wayland/config/eww/modules/bar/music.yuck | 7 + wayland/config/eww/modules/bar/network.yuck | 23 ++ .../eww/modules/bar/notification-center.yuck | 9 + wayland/config/eww/modules/bar/powermenu.yuck | 29 ++ wayland/config/eww/modules/bar/profile.yuck | 5 + .../eww/modules/bar/revealer-on-hover.yuck | 12 + .../config/eww/modules/bar/scratchpad.yuck | 29 ++ wayland/config/eww/modules/bar/sysdisk.yuck | 23 ++ wayland/config/eww/modules/bar/sysmem.yuck | 21 ++ wayland/config/eww/modules/bar/tray.yuck | 20 ++ wayland/config/eww/modules/bar/volume.yuck | 25 ++ wayland/config/eww/modules/bar/vpn.yuck | 28 ++ .../config/eww/modules/bar/window_name.yuck | 5 + .../config/eww/modules/bar/window_name1.yuck | 7 + .../config/eww/modules/bar/workspaces.yuck | 39 +++ wayland/config/eww/modules/home.yuck | 41 +++ wayland/config/eww/modules/home/mcstatus.yuck | 79 +++++ wayland/config/eww/modules/home/notes.yuck | 38 +++ .../eww/modules/home/nowplayingart.yuck | 142 +++++++++ wayland/config/eww/modules/home/rat.yuck | 9 + .../config/eww/modules/home/reminders.yuck | 38 +++ .../eww/modules/home/revealer-on-press.yuck | 17 ++ .../config/eww/modules/home/shortcuts.yuck | 63 ++++ .../eww/modules/home/softwareupdates.yuck | 55 ++++ wayland/config/eww/modules/home/weather.yuck | 31 ++ .../config/eww/scripts/bar/active-workspace | 14 + wayland/config/eww/scripts/bar/activewindow | 29 ++ wayland/config/eww/scripts/bar/bluetooth | 42 +++ .../config/eww/scripts/bar/eww-idle-inhibit | 3 + .../config/eww/scripts/bar/network-manager | 18 ++ wayland/config/eww/scripts/bar/network-updown | 11 + wayland/config/eww/scripts/bar/networking | 62 ++++ wayland/config/eww/scripts/bar/nmcli-vpn | 9 + wayland/config/eww/scripts/bar/nowplaying | 12 + wayland/config/eww/scripts/bar/powermenu | 11 + wayland/config/eww/scripts/bar/profile | 3 + .../config/eww/scripts/bar/profile-info.sh | 2 + wayland/config/eww/scripts/bar/profile-name | 3 + wayland/config/eww/scripts/bar/scratchpad | 199 +++++++++++++ wayland/config/eww/scripts/bar/volume | 15 + wayland/config/eww/scripts/bar/workspaces | 14 + wayland/config/eww/scripts/home/hass_weather | 64 +++++ wayland/config/eww/scripts/home/mcstatus | 13 + wayland/config/eww/scripts/home/notes | 3 + .../eww/scripts/home/nowplaying-artist.sh | 15 + .../eww/scripts/home/nowplaying-title.sh | 15 + wayland/config/eww/scripts/home/nowplaying.sh | 3 + .../config/eww/scripts/home/nowplayingart.sh | 22 ++ wayland/config/eww/scripts/home/randomrat | 10 + wayland/config/eww/scripts/home/reminders | 4 + .../scripts/home/shortcuts/development/SMB | 4 + .../development/bridge-netgear-r6250 | 3 + .../development/router-netgear-r8000 | 3 + .../development/server-asus-n705fd-debian | 6 + .../development/server-dell-7050sff-debian | 6 + .../shortcuts/development/server-hp-y2z63av | 6 + .../development/server-nintendo-rvl101 | 6 + .../scripts/home/shortcuts/work/2nd_monitor | 19 ++ .../scripts/home/shortcuts/work/lanecc_links | 11 + wayland/config/eww/scripts/home/weather | 45 +++ wayland/config/eww/scripts/home/weather-icon | 49 ++++ wayland/config/eww/style/bar.scss | 115 ++++++++ wayland/config/eww/style/bar/battery.scss | 6 + wayland/config/eww/style/bar/bluetooth.scss | 5 + wayland/config/eww/style/bar/charts.scss | 17 ++ wayland/config/eww/style/bar/clock.scss | 7 + wayland/config/eww/style/bar/disk.scss | 3 + .../config/eww/style/bar/idle-inhibitor.scss | 10 + wayland/config/eww/style/bar/memory.scss | 5 + wayland/config/eww/style/bar/networking.scss | 11 + .../eww/style/bar/notification-center.scss | 10 + wayland/config/eww/style/bar/power.scss | 5 + wayland/config/eww/style/bar/scratchpad.scss | 5 + .../config/eww/style/bar/styles/button.scss | 11 + .../config/eww/style/bar/styles/revealer.scss | 53 ++++ wayland/config/eww/style/bar/sys.scss | 15 + wayland/config/eww/style/bar/tray.scss | 5 + wayland/config/eww/style/bar/volume.scss | 6 + .../config/eww/style/bar/window_title.scss | 6 + wayland/config/eww/style/bar/workspaces.scss | 154 ++++++++++ wayland/config/eww/style/colors.scss | 1 + .../config/eww/variables/bar/bluetooth.yuck | 2 + wayland/config/eww/variables/bar/music.yuck | 2 + .../eww/variables/bar/network-manager.yuck | 3 + wayland/config/eww/variables/bar/network.yuck | 2 + .../eww/variables/bar/profile-info.yuck | 2 + .../config/eww/variables/bar/sway-info.yuck | 2 + wayland/config/eww/volume.ogg | Bin 0 -> 5778 bytes wayland/config/sway/config.d/autostart | 29 +- wayland/config/sway/config.d/display | 5 +- wayland/config/sway/config.d/keys.d/launch | 32 +-- wayland/config/sway/config.d/keys.d/special | 2 +- wayland/config/sway/config.d/layout | 18 -- wayland/config/sway/scripts/brightness.sh | 26 +- wayland/config/sway/scripts/volume.sh | 34 ++- wayland/config/wofi/config | 3 +- 124 files changed, 3104 insertions(+), 80 deletions(-) create mode 100644 wayland/config/eww/eww.scss create mode 100644 wayland/config/eww/eww.yuck create mode 100644 wayland/config/eww/icons/home/shortcuts/development/cloud.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/folder-network.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/network-pos.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/nintendo-wii.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/play-network.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/router-network-wireless.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/router-network.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/development/server-network.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/personal/ceiling-light-multiple.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/personal/home-assistant.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/personal/jellyfin.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/personal/mastodon.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/personal/nextcloud.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/work/briefcase.svg create mode 100644 wayland/config/eww/icons/home/shortcuts/work/monitor-multiple.svg create mode 100644 wayland/config/eww/icons/red_square.png create mode 100644 wayland/config/eww/icons/transparent_square.png create mode 100644 wayland/config/eww/modules/bar.yuck create mode 100644 wayland/config/eww/modules/bar/battery.yuck create mode 100644 wayland/config/eww/modules/bar/bluetooth.yuck create mode 100644 wayland/config/eww/modules/bar/clock.yuck create mode 100644 wayland/config/eww/modules/bar/idle_inhibit.yuck create mode 100644 wayland/config/eww/modules/bar/metric.yuck create mode 100644 wayland/config/eww/modules/bar/music.yuck create mode 100644 wayland/config/eww/modules/bar/network.yuck create mode 100644 wayland/config/eww/modules/bar/notification-center.yuck create mode 100644 wayland/config/eww/modules/bar/powermenu.yuck create mode 100644 wayland/config/eww/modules/bar/profile.yuck create mode 100644 wayland/config/eww/modules/bar/revealer-on-hover.yuck create mode 100644 wayland/config/eww/modules/bar/scratchpad.yuck create mode 100644 wayland/config/eww/modules/bar/sysdisk.yuck create mode 100644 wayland/config/eww/modules/bar/sysmem.yuck create mode 100644 wayland/config/eww/modules/bar/tray.yuck create mode 100644 wayland/config/eww/modules/bar/volume.yuck create mode 100644 wayland/config/eww/modules/bar/vpn.yuck create mode 100644 wayland/config/eww/modules/bar/window_name.yuck create mode 100644 wayland/config/eww/modules/bar/window_name1.yuck create mode 100644 wayland/config/eww/modules/bar/workspaces.yuck create mode 100644 wayland/config/eww/modules/home.yuck create mode 100644 wayland/config/eww/modules/home/mcstatus.yuck create mode 100644 wayland/config/eww/modules/home/notes.yuck create mode 100644 wayland/config/eww/modules/home/nowplayingart.yuck create mode 100644 wayland/config/eww/modules/home/rat.yuck create mode 100644 wayland/config/eww/modules/home/reminders.yuck create mode 100644 wayland/config/eww/modules/home/revealer-on-press.yuck create mode 100644 wayland/config/eww/modules/home/shortcuts.yuck create mode 100644 wayland/config/eww/modules/home/softwareupdates.yuck create mode 100644 wayland/config/eww/modules/home/weather.yuck create mode 100755 wayland/config/eww/scripts/bar/active-workspace create mode 100755 wayland/config/eww/scripts/bar/activewindow create mode 100755 wayland/config/eww/scripts/bar/bluetooth create mode 100755 wayland/config/eww/scripts/bar/eww-idle-inhibit create mode 100755 wayland/config/eww/scripts/bar/network-manager create mode 100755 wayland/config/eww/scripts/bar/network-updown create mode 100755 wayland/config/eww/scripts/bar/networking create mode 100755 wayland/config/eww/scripts/bar/nmcli-vpn create mode 100755 wayland/config/eww/scripts/bar/nowplaying create mode 100755 wayland/config/eww/scripts/bar/powermenu create mode 100755 wayland/config/eww/scripts/bar/profile create mode 100755 wayland/config/eww/scripts/bar/profile-info.sh create mode 100755 wayland/config/eww/scripts/bar/profile-name create mode 100755 wayland/config/eww/scripts/bar/scratchpad create mode 100755 wayland/config/eww/scripts/bar/volume create mode 100755 wayland/config/eww/scripts/bar/workspaces create mode 100755 wayland/config/eww/scripts/home/hass_weather create mode 100755 wayland/config/eww/scripts/home/mcstatus create mode 100755 wayland/config/eww/scripts/home/notes create mode 100755 wayland/config/eww/scripts/home/nowplaying-artist.sh create mode 100755 wayland/config/eww/scripts/home/nowplaying-title.sh create mode 100755 wayland/config/eww/scripts/home/nowplaying.sh create mode 100755 wayland/config/eww/scripts/home/nowplayingart.sh create mode 100755 wayland/config/eww/scripts/home/randomrat create mode 100755 wayland/config/eww/scripts/home/reminders create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/SMB create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/bridge-netgear-r6250 create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/router-netgear-r8000 create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/server-asus-n705fd-debian create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/server-dell-7050sff-debian create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/server-hp-y2z63av create mode 100755 wayland/config/eww/scripts/home/shortcuts/development/server-nintendo-rvl101 create mode 100755 wayland/config/eww/scripts/home/shortcuts/work/2nd_monitor create mode 100755 wayland/config/eww/scripts/home/shortcuts/work/lanecc_links create mode 100755 wayland/config/eww/scripts/home/weather create mode 100755 wayland/config/eww/scripts/home/weather-icon create mode 100644 wayland/config/eww/style/bar.scss create mode 100644 wayland/config/eww/style/bar/battery.scss create mode 100644 wayland/config/eww/style/bar/bluetooth.scss create mode 100644 wayland/config/eww/style/bar/charts.scss create mode 100644 wayland/config/eww/style/bar/clock.scss create mode 100644 wayland/config/eww/style/bar/disk.scss create mode 100644 wayland/config/eww/style/bar/idle-inhibitor.scss create mode 100644 wayland/config/eww/style/bar/memory.scss create mode 100644 wayland/config/eww/style/bar/networking.scss create mode 100644 wayland/config/eww/style/bar/notification-center.scss create mode 100644 wayland/config/eww/style/bar/power.scss create mode 100644 wayland/config/eww/style/bar/scratchpad.scss create mode 100644 wayland/config/eww/style/bar/styles/button.scss create mode 100644 wayland/config/eww/style/bar/styles/revealer.scss create mode 100644 wayland/config/eww/style/bar/sys.scss create mode 100644 wayland/config/eww/style/bar/tray.scss create mode 100644 wayland/config/eww/style/bar/volume.scss create mode 100644 wayland/config/eww/style/bar/window_title.scss create mode 100644 wayland/config/eww/style/bar/workspaces.scss create mode 120000 wayland/config/eww/style/colors.scss create mode 100644 wayland/config/eww/variables/bar/bluetooth.yuck create mode 100644 wayland/config/eww/variables/bar/music.yuck create mode 100644 wayland/config/eww/variables/bar/network-manager.yuck create mode 100644 wayland/config/eww/variables/bar/network.yuck create mode 100644 wayland/config/eww/variables/bar/profile-info.yuck create mode 100644 wayland/config/eww/variables/bar/sway-info.yuck create mode 100644 wayland/config/eww/volume.ogg diff --git a/.dotter/global.toml b/.dotter/global.toml index 596611b..2e132ed 100644 --- a/.dotter/global.toml +++ b/.dotter/global.toml @@ -37,7 +37,7 @@ depends = ["default"] depends = ["graphical"] [wayland.files] -"wayland/config" = "~/.config" +"wayland/config" = { target = "~/.config", type = "symbolic" } "wayland/bashrc.d" = "~/.bashrc.d" "wayland/bin" = "~/.local/bin" diff --git a/default/gitconfig b/default/gitconfig index 537aa58..018e555 100644 --- a/default/gitconfig +++ b/default/gitconfig @@ -5,6 +5,6 @@ email = support@pogmom.me [core] - editor = hx + editor = nvim [init] defaultBranch = main diff --git a/desktop/config/sway/config.d/display.d/328p1aa b/desktop/config/sway/config.d/display.d/328p1aa index 477f93b..edb98d0 100644 --- a/desktop/config/sway/config.d/display.d/328p1aa +++ b/desktop/config/sway/config.d/display.d/328p1aa @@ -25,8 +25,8 @@ output 'OOO CR270CU 0x00000001' { #exec_always 'sleep 1;eww open --screen "CR270CU" home' set { - $primary_display DP-1 - $overview_display DP-1 + $primary_display DP-2 + $overview_display DP-2 } workspace { diff --git a/wayland/config/eww/eww.scss b/wayland/config/eww/eww.scss new file mode 100644 index 0000000..6e584a0 --- /dev/null +++ b/wayland/config/eww/eww.scss @@ -0,0 +1,270 @@ +* { + all: unset; // Unsets everything so you can style everything from scratch + +/* font-family: FontAwesome, Overpass; */ + font-family: PogmomIcons, Overpass Nerd Font Propo; +} + +@import "./style/colors.scss"; + +$bar-module-width: 25px; +$bar-module-bg-color: rgba($color5,0.0); +$bar-bg-color: rgba($color5,1); +$bar-fg-color: rgba($color15,1); +$bar-module-fg-color: rgba($color0,0.8); +$bar-module-inactive-fg-color: rgba($color0,0.4); +$bar-module-active-fg-color: rgba($color13,0.9); +// $bar-active-bg-color: rgba($color1,0.5); +// $bar-active-fg-color: $color1; +// $bar-module-active-shadow: 1px 1px 4px rgba($color5,0.5),-1px 1px 4px rgba($color5,0.5),1px -1px 4px rgba($color5,0.5),-1px -1px 4px rgba($color5,0.5); +$bar-module-active-shadow: 1px 1px 4px rgba($color8,0.6),-1px 1px 4px rgba($color8,0.6),1px -1px 4px rgba($color8,0.6),-1px -1px 4px rgba($color8,0.6); +$bar-module-hover-shadow: 1px 1px 4px rgba($color8,0.45),-1px 1px 4px rgba($color8,0.45),1px -1px 4px rgba($color8,0.45),-1px -1px 4px rgba($color8,0.45); +$bar-hover-bg-color: rgba($color1,0.5); +$bar-hover-fg-color: rgba($color13,0.6); +//$bar-module-border-radius: 8px; +$bar-module-border-radius: 12px; +$bar-module-bg-border-radius: $bar-module-border-radius - 3; +//$bar-module-inner-radius: $bar-module-border-radius - 2; +$bar-module-inner-radius: $bar-module-border-radius - 6; + +@import "./style/bar.scss"; + +.bar { +menu { + color: $color5; + font-weight: bold; + background-color: rgba($color0,0.75); + border: 2px solid rgba($color5,0.65); + border-radius: $bar-module-border-radius; + menuitem { + padding:10px; + margin:5px 10px; + transition: all .2s ease; + &:backdrop { + background-color:green; + } + &:not(:disabled) { + background-color: rgba($color8,0.6); + border: 2px solid rgba($color0,0.5); + border-radius:6px; + } + &:hover { + background-color:rgba($color12,0.5); + color: $color1; + } + } +} +} +tooltip{ + color: $color5; + font-weight: bold; + background-color: rgba($color0,0.85); + border: 2px solid rgba($color5,0.65); + border-radius: 8px; +} + +$home-widget-bg-color: rgba($color0,0.85); +$home-widget-border-radius: 8px; +$home-widget-title-radius: $home-widget-border-radius $home-widget-border-radius 0px 0px; +$home-button-border-radius: 6px; +$home-button-circle-border-radius: 30px; +$home-button-bg-color: rgba($color5, 0.15); +$home-button-fg-opacity: 1; +$home-button-fg-color: rgba($color5,$home-button-fg-opacity); +$home-widget-subtitle-color: rgba($color7,0.6); +$home-button-hover-bg-color: rgba($color1, 0.5); +$home-widget-border-color: rgba($color5,1); +$home-widget-border-hover-color: rgba($color5,0.3); + +revealer.home { + font-size: 0.95em; + padding-bottom: 25px; + &>box { +// & scrolledwindow, viewport.frame, box.home { //box.home { +// & scrolledwindow>*, viewport.frame, box.home { //box.home { +// border: 3px solid blue; +// + border-radius: 0px 20px 0px 20px; +// } + margin: 3px 10px; + &:first-child { + padding-top: 10px; + } + &:last-child { + padding-bottom: 10px; + } + } + + + .nowplayingbar { + padding: 0px; + border: 2px solid $home-widget-border-color; + border-radius: $home-widget-border-radius; + background-color: $home-widget-bg-color; + .mediadetails { + margin: 10px 15px; + label { + margin: 0px; + } + &.fullwidth { + margin: 5px 35px; + } + } + .art-button-overlay { + &.small { + font-size: 2em; + margin: 20px 0px 20px 20px; + } + &.big { + font-size: 3em; + margin: 20px; + } + background-color: rgba($color0,0.5); + color: $color5; + border-radius: $home-widget-border-radius; + } + .nowplayingart { + &.small { + margin: 20px 0px 20px 20px; + } + &.big { + margin: 25px; + min-height: 250px; + } + border: 1px solid $home-widget-border-color; + border-radius: $home-widget-border-radius; + background-position: center; + background-size: cover; + background-repeat: no-repeat; + } + .mediabutton { + background-color: $home-button-bg-color; + border-radius: $home-button-circle-border-radius; + color: $home-button-fg-color; + transition: all 0.3s; + &:hover{ + background-color: $home-button-hover-bg-color; + } + } + } + .rat { + background-position: center; + background-size: cover; + background-repeat: no-repeat; + border-radius: $home-widget-border-radius; + box-shadow: inset 0 0 0px 2px $home-widget-border-color, 0px 0px 9px 0px $home-widget-bg-color; + } + .minecraft { + .icon { + background-repeat: no-repeat; + background-position: center; + background-size: cover; + margin: 10px; + border-radius: $home-widget-border-radius; + } + .details { +// * { border: 2px solid red; } + color: $home-button-fg-color; + .title { + font-size: 1.1em; + font-weight: bold; + } + .motd { + color: $home-widget-subtitle-color; + font-size: 0.8em; + } + margin: 10px; + } + .button { + color: $home-button-fg-color; + background-color: $home-button-bg-color; + border-radius: $home-button-border-radius; + padding: 5px 0px; + margin: 0px 10px 10px; + transition: all 0.3s; + &:hover { + opacity: 0.5; + } + } + } + .weather { + color: $home-button-fg-color; + padding: 8px; + .weather-subtitle{ + font-size: 0.8em; + color: $home-widget-subtitle-color; + } + } + .revealer-on-press { + border: 2px solid $home-widget-border-color; + border-radius: $home-widget-border-radius; + background-color: $home-widget-bg-color; +// box-shadow: 0px 0px 9px 0px $home-widget-bg-color; + } + .revealer-title { + background-color: $home-widget-border-color; + color: $home-widget-bg-color; + padding-bottom: 2px; + font-weight: bold; + transition: all 0.3s; + &:hover { + background-color: $home-widget-border-hover-color; + } + } + .weather, + .notes, + .shortcuts, + .reminders { + border-top: 2px solid $home-widget-border-color; + } + .notes, + .reminders { + color: $home-button-fg-color; + padding: 10px; + button { + background-color: $home-button-bg-color; + border-radius: $home-button-border-radius; + padding: 4px 8px; + margin: 4px; + transition: all 0.3s; + box { + .timestamp { + font-size: 0.8em; + margin-top: 2px; + color: $home-widget-subtitle-color; + } + .details { + font-size: 0.8em; + color: $home-widget-subtitle-color; + margin: 1px 10px; + } + .status { + margin: 0px 10px; + } + } + image { + opacity: $home-button-fg-opacity; + } + } + button:hover { + background-color: $home-button-hover-bg-color; + } + } + .shortcuts { + color: $home-button-fg-color; + padding: 15px; + button { + background-color: $home-button-bg-color; + border-radius: $home-button-circle-border-radius; + margin: 5px; + font-size: 1.2em; + transition: all 0.3s; + label { + font-size: 1.2em; + } + } + button:hover { + background-color: $home-button-hover-bg-color; + } + } +} diff --git a/wayland/config/eww/eww.yuck b/wayland/config/eww/eww.yuck new file mode 100644 index 0000000..de84c9f --- /dev/null +++ b/wayland/config/eww/eww.yuck @@ -0,0 +1,29 @@ +(include "modules/bar.yuck") + +(defwindow bar + :windowtype "dock" + :exclusive true + :namespace "eww-bar" + :geometry (geometry :x "0%" +; :y "0%" + :y "5px" + :width "100%" + :height "30px" +; :anchor "top") + :anchor "top center") +; :reserve (struts :side "top" :distance "4%") + :reserve (struts :side "top" :distance "30px") + (bar)) + +(include "modules/home.yuck") + +(defwindow home + :windowtype "normal" + :exclusive false + :geometry (geometry +; :y "27px" +; :width "300px" + :height "100%" + :anchor "center left") + :stacking "foreground" + (home)) diff --git a/wayland/config/eww/icons/home/shortcuts/development/cloud.svg b/wayland/config/eww/icons/home/shortcuts/development/cloud.svg new file mode 100644 index 0000000..8ff8f2f --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/cloud.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/folder-network.svg b/wayland/config/eww/icons/home/shortcuts/development/folder-network.svg new file mode 100644 index 0000000..9d15bff --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/folder-network.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/network-pos.svg b/wayland/config/eww/icons/home/shortcuts/development/network-pos.svg new file mode 100644 index 0000000..ce1db12 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/network-pos.svg @@ -0,0 +1,36 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/nintendo-wii.svg b/wayland/config/eww/icons/home/shortcuts/development/nintendo-wii.svg new file mode 100644 index 0000000..991029a --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/nintendo-wii.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/play-network.svg b/wayland/config/eww/icons/home/shortcuts/development/play-network.svg new file mode 100644 index 0000000..d46530b --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/play-network.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/router-network-wireless.svg b/wayland/config/eww/icons/home/shortcuts/development/router-network-wireless.svg new file mode 100644 index 0000000..e9850bd --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/router-network-wireless.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/router-network.svg b/wayland/config/eww/icons/home/shortcuts/development/router-network.svg new file mode 100644 index 0000000..d574a16 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/router-network.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/development/server-network.svg b/wayland/config/eww/icons/home/shortcuts/development/server-network.svg new file mode 100644 index 0000000..3eb281a --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/development/server-network.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/personal/ceiling-light-multiple.svg b/wayland/config/eww/icons/home/shortcuts/personal/ceiling-light-multiple.svg new file mode 100644 index 0000000..9281889 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/personal/ceiling-light-multiple.svg @@ -0,0 +1,36 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/personal/home-assistant.svg b/wayland/config/eww/icons/home/shortcuts/personal/home-assistant.svg new file mode 100644 index 0000000..8efb113 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/personal/home-assistant.svg @@ -0,0 +1,36 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/personal/jellyfin.svg b/wayland/config/eww/icons/home/shortcuts/personal/jellyfin.svg new file mode 100644 index 0000000..89fe9a5 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/personal/jellyfin.svg @@ -0,0 +1,43 @@ + + + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/personal/mastodon.svg b/wayland/config/eww/icons/home/shortcuts/personal/mastodon.svg new file mode 100644 index 0000000..7cce1e1 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/personal/mastodon.svg @@ -0,0 +1,53 @@ + + + + + Mastodon + + + + + Mastodon + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/personal/nextcloud.svg b/wayland/config/eww/icons/home/shortcuts/personal/nextcloud.svg new file mode 100644 index 0000000..f996af4 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/personal/nextcloud.svg @@ -0,0 +1,41 @@ + + + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/work/briefcase.svg b/wayland/config/eww/icons/home/shortcuts/work/briefcase.svg new file mode 100644 index 0000000..4b896b7 --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/work/briefcase.svg @@ -0,0 +1,36 @@ + + + + + + diff --git a/wayland/config/eww/icons/home/shortcuts/work/monitor-multiple.svg b/wayland/config/eww/icons/home/shortcuts/work/monitor-multiple.svg new file mode 100644 index 0000000..024aedd --- /dev/null +++ b/wayland/config/eww/icons/home/shortcuts/work/monitor-multiple.svg @@ -0,0 +1,37 @@ + + + + + + diff --git a/wayland/config/eww/icons/red_square.png b/wayland/config/eww/icons/red_square.png new file mode 100644 index 0000000000000000000000000000000000000000..a917c4c9cb0e3bd8b82d4a93e119b142e8a22cb5 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=#^NA%C&rs6b?Si}mUKs7M+SzC z{oH>NK`IrJJ%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10f-TA0 z-G$*l2rk&Wd@@jkv%n*=n1Ml08H5=tmfDvA1=&kHeO=jKvP+8TN%bUfR|ADiJzX3_ zIIhQ@-pG5vfQR|u;)J*M8yAbTb+NK`IrJJ%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10f-TA0 z-G$*l2rk&Wd@@jkv%n*=n1Ml08H5=tmfDvA1=&kHeO=jKvP+8TSbwswTn-fC@pN$v f;kcfhus|5d%Vc0YAp7YDkj3EX>gTe~DWM4fVs$Xe literal 0 HcmV?d00001 diff --git a/wayland/config/eww/modules/bar.yuck b/wayland/config/eww/modules/bar.yuck new file mode 100644 index 0000000..1edd0d3 --- /dev/null +++ b/wayland/config/eww/modules/bar.yuck @@ -0,0 +1,75 @@ +(defwidget bar [] + (centerbox :orientation "h" + (leftgroup) + (centergroup) + (rightgroup))) + +;widget templates +(include "modules/bar/revealer-on-hover.yuck") +(include "modules/bar/metric.yuck") + +;centerbar groups + +(defwidget leftgroup [] + (box :class "leftgroup ${((jq(sway_info,'workspace_info[] | select(.is_focused) | .profile_name','r') == 'Work') ? 'profile-work' : ((jq(sway_info,'workspace_info[] | select(.is_focused) | .profile_name','r') == 'School') ? 'profile-school' : ((jq(sway_info,'workspace_info[] | select(.is_focused) | .profile_name','r') == 'Development') ? 'profile-development' : ((jq(sway_info,'workspace_info[] | select(.is_focused) | .profile_name','r') == 'Penelope') ? 'profile-personal' : ''))))}" + :orientation "h" + :space-evenly false + :halign "start" + (powermenu) + (profile) + (workspaces :array {jq(sway_info,'.workspace_info','r')}) + (scratchpad) + (windowtitle))) + +(defwidget centergroup [] + (box :visible false + :class "centergroup" + :orientation "h" + :space-evenly false + :halign "start")) + +(defwidget rightgroup [] + (box :class "rightgroup" + :orientation "h" + :space-evenly false + :halign "end" + (idleinhibit) + (volume) + (network) + (vpn) + (bluetooth) + (battery) + (sysdisk) + (sysmem) + (clock) + (tray) + (notification_center))) + +(include "variables/bar/profile-info.yuck") +(include "variables/bar/sway-info.yuck") + +;leftgroup imports +(include "modules/bar/powermenu.yuck") +(include "modules/bar/profile.yuck") +(include "modules/bar/workspaces.yuck") +(include "modules/bar/window_name.yuck") +(include "modules/bar/scratchpad.yuck") + +;centergroup +(include "variables/bar/music.yuck") +(include "modules/bar/music.yuck") + +;rightgroup +(include "modules/bar/idle_inhibit.yuck") +(include "modules/bar/volume.yuck") +(include "variables/bar/network-manager.yuck") +(include "modules/bar/network.yuck") +(include "modules/bar/vpn.yuck") +(include "variables/bar/bluetooth.yuck") +(include "modules/bar/bluetooth.yuck") +(include "modules/bar/battery.yuck") +(include "modules/bar/sysdisk.yuck") +(include "modules/bar/sysmem.yuck") +(include "modules/bar/clock.yuck") +(include "modules/bar/tray.yuck") +(include "modules/bar/notification-center.yuck") diff --git a/wayland/config/eww/modules/bar/battery.yuck b/wayland/config/eww/modules/bar/battery.yuck new file mode 100644 index 0000000..c26839f --- /dev/null +++ b/wayland/config/eww/modules/bar/battery.yuck @@ -0,0 +1,21 @@ +(defvar reveal_battery false) + +(defwidget battery [] + (revealer-on-hover :class "${reveal_battery} battery" + :revealvar reveal_battery + :revealvar-name "reveal_battery" + (label :class "revealer-preview ${(EWW_BATTERY == '' || jq(EWW_BATTERY,'.[].status?','r') == 'Charging') ? 'active' : '' }" + :tooltip `${(EWW_BATTERY == "" || jq(EWW_BATTERY,'.[].status?') == '"Charging"') ? "Charging" : "Discharging"}, ${(EWW_BATTERY == "") ? "" : "${round(jq(EWW_BATTERY,'.total_avg?'),1)}% of total average"}` + :text `${(EWW_BATTERY == "" || jq(EWW_BATTERY,'.[].status?') == '"Charging"') ? " " : "󰁹 "}${(EWW_BATTERY == "") ? "" : "${round(jq(EWW_BATTERY,'first(.[].capacity?)'),0)}%"}`) + (battery_children))) + +(defwidget battery_children [] + (box :class "reveal-children" + :orientation "h" + :space-evenly false + :halign "center" + (box + (progress :height 10 + :valign "center" + :value {(EWW_BATTERY == "") ? 100 : jq(EWW_BATTERY,'first(.[].capacity?)')} + :orientation "h")))) diff --git a/wayland/config/eww/modules/bar/bluetooth.yuck b/wayland/config/eww/modules/bar/bluetooth.yuck new file mode 100644 index 0000000..39cd13f --- /dev/null +++ b/wayland/config/eww/modules/bar/bluetooth.yuck @@ -0,0 +1,21 @@ +(defvar reveal_bluetooth false) + +(defwidget bluetooth [] + (revealer-on-hover :class "${reveal_bluetooth} bluetooth" + :revealvar reveal_bluetooth + :revealvar-name "reveal_bluetooth" + (button :onclick 'blueman-manager' + :class "revealer-preview ${matches(jq(bluetooth_status,'.[].connected'),'yes') ? 'active' : 'inactive'}" + "") + (bluetooth_children :array bluetooth_status))) + +(defwidget bluetooth_children [array] +(box :class "reveal-children" + :orientation "h" + :space-evenly true + :halign "start" + (for device in array + (button :onclick {(device.connected == "yes") ? 'bluetoothctl disconnect "${device.address}"' : 'bluetoothctl connect "${device.address}"'} + :class {(device.connected == "yes") ? "active" : "inactive"} + :tooltip "${device.name}" + "${device.icon}")))) diff --git a/wayland/config/eww/modules/bar/clock.yuck b/wayland/config/eww/modules/bar/clock.yuck new file mode 100644 index 0000000..940e975 --- /dev/null +++ b/wayland/config/eww/modules/bar/clock.yuck @@ -0,0 +1,3 @@ +(defwidget clock [] + (label :class "datetime" + :text {formattime(EWW_TIME,"%b %d, %Y | %H:%M")})) diff --git a/wayland/config/eww/modules/bar/idle_inhibit.yuck b/wayland/config/eww/modules/bar/idle_inhibit.yuck new file mode 100644 index 0000000..f4627c2 --- /dev/null +++ b/wayland/config/eww/modules/bar/idle_inhibit.yuck @@ -0,0 +1,7 @@ +(defvar inhibit_active false) + +(defwidget idleinhibit [] + (box :class "idle-inhibitor ${inhibit_active ? 'active' : 'inactive'}" + (button :onclick {inhibit_active ? 'killall eww-idle-inhibit;eww update inhibit_active=false' : 'systemd-inhibit --what="idle" --mode="block" scripts/bar/eww-idle-inhibit & eww update inhibit_active=true'} + :tooltip "Idling is ${inhibit_active ? '' : 'not '}inhibited" + {inhibit_active ? "" : ""}))) diff --git a/wayland/config/eww/modules/bar/metric.yuck b/wayland/config/eww/modules/bar/metric.yuck new file mode 100644 index 0000000..bb26fbd --- /dev/null +++ b/wayland/config/eww/modules/bar/metric.yuck @@ -0,0 +1,12 @@ +(defwidget metric [label value] + (box :orientation "h" + :class "metric" + :space-evenly false + (box :class "label" label) + (transform :rotate 50 + :transform-origin-x '50%' + :transform-origin-y '50%' + (circular-progress :value value + :start-at 0 + :thickness 10 + :clockwise true)))) diff --git a/wayland/config/eww/modules/bar/music.yuck b/wayland/config/eww/modules/bar/music.yuck new file mode 100644 index 0000000..d206c55 --- /dev/null +++ b/wayland/config/eww/modules/bar/music.yuck @@ -0,0 +1,7 @@ +(defwidget music [] + (box :visible {nowplaying != ""} + :class {nowplaying != "" ? "music" : "hidden"} + :orientation "h" + :space-evenly false + :halign "center" + {nowplaying != "" ? "󰎇 ${nowplaying}" : ""})) diff --git a/wayland/config/eww/modules/bar/network.yuck b/wayland/config/eww/modules/bar/network.yuck new file mode 100644 index 0000000..67e54cf --- /dev/null +++ b/wayland/config/eww/modules/bar/network.yuck @@ -0,0 +1,23 @@ +(defvar reveal_network false) + +(defwidget network [] + (revealer-on-hover + :class "${reveal_network} networks" + :revealvar reveal_network + :revealvar-name "reveal_network" + (button :onclick 'nm-connection-editor' + :tooltip "${jq(network_manager.interfaces, '.[] | "\\(.connection) (\\(.device)) \\n"', 'r')}" + :class "revealer-preview ${(jq(network_manager.interfaces, '[ .[] | select(.state=="connected") ] | length') > 0 ? 'active' : 'inactive')}" ;${network_status.wifi || network_status.wired ? 'active' : 'inactive'}" + "󰇧") + (network_children :array "${network_manager.interfaces}"))) + +(defwidget network_children [array] + (box :class "reveal-children" + :orientation "h" + :space-evenly false + :halign "center" + (for interface in array + (button :onclick "nmcli device ${( interface.state == 'connected' ? 'down' : 'up' )} ${interface.device}" + :class {( interface.state == "connected" ? 'active' : 'inactive' )} + :tooltip "${interface.connection} (${interface.device})" + {( interface.type == "wifi" ? "" : ( interface.type == "ethernet" ? "󰈀" : "" ))})))) diff --git a/wayland/config/eww/modules/bar/notification-center.yuck b/wayland/config/eww/modules/bar/notification-center.yuck new file mode 100644 index 0000000..3337308 --- /dev/null +++ b/wayland/config/eww/modules/bar/notification-center.yuck @@ -0,0 +1,9 @@ +(deflisten notification_center_info :initial '{ "count": 0, "dnd": false, "visible": false, "inhibited": false }' + "swaync-client -s") + +(defwidget notification_center [] + (box :class "notification-center ${(jq(notification_center_info,'.count','r') > 0 ) ? 'active' : 'inactive'}" + (button :onclick 'swaync-client -t' + :onrightclick 'swaync-client -d' + :tooltip "${jq(notification_center_info,'.count','r')} unread notifications" + "${!jq(notification_center_info,'.dnd','r') ? '' : ''}"))) diff --git a/wayland/config/eww/modules/bar/powermenu.yuck b/wayland/config/eww/modules/bar/powermenu.yuck new file mode 100644 index 0000000..e4ad2f0 --- /dev/null +++ b/wayland/config/eww/modules/bar/powermenu.yuck @@ -0,0 +1,29 @@ +(defvar reveal_powermenu false) + +(defwidget powermenu [] + (revealer-on-hover :revealvar reveal_powermenu + :class "powermenu ${reveal_powermenu}" + :revealvar-name "reveal_powermenu" + (button :onclick 'sdu power shutdown' + :class "revealer-preview" + :tooltip "Shutdown" + "") + (powermenu_children))) + +(defwidget powermenu_children [] + (box :class "reveal-children" + :orientation "h" + :space-evenly false + :halign "center" + (button :onclick 'sdu power reboot' + :tooltip "Reboot" + "") + (button :onclick 'sdu power suspend' + :tooltip "Suspend" + "󰤄") + (button :onclick 'sdu power lock' + :tooltip "Lock" + "") + (button :onclick 'sdu power logout' + :tooltip "Logout" + ""))) diff --git a/wayland/config/eww/modules/bar/profile.yuck b/wayland/config/eww/modules/bar/profile.yuck new file mode 100644 index 0000000..3d6cd26 --- /dev/null +++ b/wayland/config/eww/modules/bar/profile.yuck @@ -0,0 +1,5 @@ +(defwidget profile [] + (button :onclick "sdu profile switch next" + :tooltip {jq(profile_info,'.name','r')} + :class "profile profile-${(jq(profile_info,'.name','r'))}" + {jq(profile_info,'.icon','r')})) diff --git a/wayland/config/eww/modules/bar/revealer-on-hover.yuck b/wayland/config/eww/modules/bar/revealer-on-hover.yuck new file mode 100644 index 0000000..162e125 --- /dev/null +++ b/wayland/config/eww/modules/bar/revealer-on-hover.yuck @@ -0,0 +1,12 @@ +(defwidget revealer-on-hover [revealvar revealvar-name ?class ?duration ?transition] + (box :class "${class} revealer-on-hover" + :orientation "h" + :space-evenly false + (eventbox :onscroll "if test '{}' = 'down';then ${EWW_CMD} update ${revealvar-name}=true;else ${EWW_CMD} update ${revealvar-name}=false;fi" + :onhoverlost "${EWW_CMD} update ${revealvar-name}=false" + (box :space-evenly false + (children :nth 0) + (revealer :reveal revealvar + :transition {transition ?: "slideright"} + :duration {duration ?: "500ms"} + (children :nth 1)))))) diff --git a/wayland/config/eww/modules/bar/scratchpad.yuck b/wayland/config/eww/modules/bar/scratchpad.yuck new file mode 100644 index 0000000..8bdc2da --- /dev/null +++ b/wayland/config/eww/modules/bar/scratchpad.yuck @@ -0,0 +1,29 @@ +(defvar reveal_scratchpad false) +(defwidget scratchpad [] + +(box :class "${reveal_scratchpad} scratchpad revealer-on-hover" + :orientation "h" + :space-evenly false + (eventbox :onhover "${EWW_CMD} update reveal_scratchpad=true" + :onhoverlost "${EWW_CMD} update reveal_scratchpad=false" + (box :space-evenly false + (label :class "revealer-preview" + :tooltip "${jq(sway_info,'.scratchpad_info[] | "\\(.title) (\\(.name)) \\n"','r')}" + :text " ${jq(sway_info,'.scratchpad_info | length')} ${reveal_scratchpad ? '' : ''}") + (revealer :reveal reveal_scratchpad + :transition "slideright" + :duration "500ms" + (scratchpad_children :array {jq(sway_info,'.scratchpad_info','r')})))))) + +(defwidget scratchpad_children [array] + (box :orientation "h" + :class "reveal-children" + :space-evenly false + (for entry in array + (button :onclick 'swaymsg [con_id=${entry.window_id}] scratchpad show' + :class "scratchpad-item ${(entry.visible == 'true') ? 'active' : 'inactive'}" + :tooltip "${entry.title} +${entry.name}" + (image :path {entry.icon} + :image-width 20 + :image-height 20))))) diff --git a/wayland/config/eww/modules/bar/sysdisk.yuck b/wayland/config/eww/modules/bar/sysdisk.yuck new file mode 100644 index 0000000..9510eda --- /dev/null +++ b/wayland/config/eww/modules/bar/sysdisk.yuck @@ -0,0 +1,23 @@ +(defvar reveal_sysdisk false) + +(defwidget sysdisk [] + (revealer-on-hover :class "${reveal_sysdisk} sysdisk" + :revealvar reveal_sysdisk + :revealvar-name "reveal_sysdisk" + (box :class "revealer-preview" + :tooltip "${jq(EWW_DISK,'to_entries[]|"\\(.key) - \\(.value.used_perc*10|round/10)% Used\\n\\(.value.free/1073741824*100|round/100)GiB Available\\n"','r')}" + (metric :label "󰟒 " + :value {EWW_DISK["/home"].used_perc})) + (sysdisk_children))) + +(defwidget sysdisk_children [] + (box :class "reveal-children" + :orientation "h" + :space-evenly false + :halign "center" + (metric :label "󰿠 " + :tooltip "root" + :value {EWW_DISK["/"].used_perc}) + (metric :label "󰬉 " + :tooltip "boot" + :value {EWW_DISK["/boot"].used_perc}))) diff --git a/wayland/config/eww/modules/bar/sysmem.yuck b/wayland/config/eww/modules/bar/sysmem.yuck new file mode 100644 index 0000000..ef850c7 --- /dev/null +++ b/wayland/config/eww/modules/bar/sysmem.yuck @@ -0,0 +1,21 @@ +(defvar reveal_sysmem false) + +(defwidget sysmem [] + (revealer-on-hover :class "${(reveal_sysmem) || (EWW_RAM.used_mem / EWW_RAM.total_mem) > 0.95} sysmem" + :revealvar {(reveal_sysmem) || (EWW_RAM.used_mem / EWW_RAM.total_mem) > 0.95} + :revealvar-name "reveal_sysmem" + (box :class "revealer-preview" + :tooltip "${jq(EWW_RAM,'.|"RAM: \\(.used_mem_perc*10|round/10)% Used\\n\\(.used_mem/1073741824*100|round/100)/\\(.total_mem/1073741824*100|round/100)GiB Usage\\nSwap: \\((.total_swap-.free_swap)/.total_swap*1000|round/10)% Usage\\n\\((.total_swap-.free_swap)/1073741824*100|round/100)/\\(.total_swap/1073741824*100|round/100)"','r')}" + (metric :label " " + :value {EWW_RAM.used_mem_perc})) + (sysmem_children))) + +(defwidget sysmem_children [] + (box :class "reveal-children" + :orientation "h" + :space-evenly false + :halign "center" + (metric :label " " + :value {round((EWW_RAM.total_mem - EWW_RAM.free_mem) / EWW_RAM.total_mem,2) * 100}) + (metric :label " " + :value {(EWW_RAM.total_swap != 0) ? round((EWW_RAM.total_swap - EWW_RAM.free_swap) / EWW_RAM.total_swap,2) * 100 : 100}))) diff --git a/wayland/config/eww/modules/bar/tray.yuck b/wayland/config/eww/modules/bar/tray.yuck new file mode 100644 index 0000000..dadfbd5 --- /dev/null +++ b/wayland/config/eww/modules/bar/tray.yuck @@ -0,0 +1,20 @@ +(defvar reveal_tray false) +(defwidget tray [] + (revealer-on-hover :class "tray ${reveal_tray}" + :revealvar reveal_tray + :revealvar-name "reveal_tray" + (label :class "revealer-preview" + :text {reveal_tray ? "" : ""}) + (tray_children))) + +(defwidget tray_children [] + (box :orientation "h" + :space-evenly false + :halign "center" + (systray + :orientation "h" + :class "reveal-children" + :space-evenly true + :spacing 0 + :icon-size 20 + :prepend-new true))) diff --git a/wayland/config/eww/modules/bar/volume.yuck b/wayland/config/eww/modules/bar/volume.yuck new file mode 100644 index 0000000..6822de9 --- /dev/null +++ b/wayland/config/eww/modules/bar/volume.yuck @@ -0,0 +1,25 @@ +(defvar reveal_volume false) +(defwidget volume [] + (revealer-on-hover :class "volume ${reveal_volume}" + :revealvar reveal_volume + :revealvar-name "reveal_volume" + (button :onclick 'pavucontrol-qt --tab 3' + :tooltip "Pulseaudio Volume Control" + :class "${(volume == 0) ? 'inactive' : 'active'} revealer-preview" + {(volume == 0) ? "" : ((volume > 50) ? "" : "")}) + (volume_children))) + +(deflisten volume :initial "50" + "scripts/bar/volume") +(defwidget volume_children [] + (box :class "reveal-children" :orientation "h" + :space-evenly false + :halign "center" + (scale + :tooltip "volume: ${round(volume,0)}%" + :min 0 + :max 100 + :value {volume} + :orientation "h" + :onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ {}%;paplay 'volume.ogg'"))) + diff --git a/wayland/config/eww/modules/bar/vpn.yuck b/wayland/config/eww/modules/bar/vpn.yuck new file mode 100644 index 0000000..e9aaebb --- /dev/null +++ b/wayland/config/eww/modules/bar/vpn.yuck @@ -0,0 +1,28 @@ +(defvar reveal_vpn false) +(defwidget vpn [] + (revealer-on-hover + :class "${reveal_vpn} vpn" + :revealvar reveal_vpn + :revealvar-name "reveal_vpn" + (button :onclick 'notify-send "TODO"' + :class "revealer-preview ${(jq(network_manager.vpns, '[ .[] | select(.active=="yes") ] | length') > 0 ? 'active' : 'inactive')}" + "${(jq(network_manager.vpns, '[ .[] | select(.active=="yes") ] | length') > 0 ? '' : '')}") + (vpn_children :array "${jq(network_manager.vpns,'.|sort_by(.name)')}"))) + +(defwidget vpn_children [array] + (box :class "reveal-children" + :orientation "h" + :space-evenly false + :halign "center" + (for vpn in array + (button :onclick "nmcli connection ${( vpn.active == 'yes' ? 'down' : 'up' )} ${vpn.name}" + :class {( vpn.active == "yes" ? 'active' : 'inactive' )} + :tooltip "${vpn.name}" + "${( vpn.name =~ '^[Hh]ome.*' ? + ( vpn.name =~ '.*[Ff]ull.*' ? '' : '') : + ( vpn.name =~ '^pia-.*' ? + ( vpn.name =~ '.*local.*' ? '' : '' ) : + ( vpn.name == 'SCA' ? + '' : + '') ) + )} ${( vpn.active == 'yes' ? '' : '' )}")))) diff --git a/wayland/config/eww/modules/bar/window_name.yuck b/wayland/config/eww/modules/bar/window_name.yuck new file mode 100644 index 0000000..d4062b8 --- /dev/null +++ b/wayland/config/eww/modules/bar/window_name.yuck @@ -0,0 +1,5 @@ +(defwidget windowtitle [] + (label :class {jq(sway_info,'.window_info.title','r') != "" ? "active_window" : ""} + :limit-width 40 + :show-truncated true + :text {jq(sway_info,'.window_info.title','r')})) diff --git a/wayland/config/eww/modules/bar/window_name1.yuck b/wayland/config/eww/modules/bar/window_name1.yuck new file mode 100644 index 0000000..6cdcbd3 --- /dev/null +++ b/wayland/config/eww/modules/bar/window_name1.yuck @@ -0,0 +1,7 @@ +(deflisten active_window_name :initial "" + :interval "60s" + "scripts/bar/activewindow") + +(defwidget windowtitle [] + (label :class {active_window_name != "" ? "active_window" : ""} + :text {active_window_name})) diff --git a/wayland/config/eww/modules/bar/workspaces.yuck b/wayland/config/eww/modules/bar/workspaces.yuck new file mode 100644 index 0000000..9bcc6d3 --- /dev/null +++ b/wayland/config/eww/modules/bar/workspaces.yuck @@ -0,0 +1,39 @@ +(defvar wsreveal false) + +(defwidget workspaces [array] + (eventbox :onhover "${EWW_CMD} update wsreveal=true" + :onhoverlost "${EWW_CMD} update wsreveal=false" + (box :class "workspaces profile-${jq(array,'.[]|select(.is_focused)|.profile_name','r')}" + :orientation "h" + :space-evenly false + :halign "start" + (revealer + :class "ws-left" + :reveal wsreveal + :transition "slideleft" + :duration "500ms" + (box + (for entry in array + (literal :visible {((entry.position == 'l') && !entry.is_focused) ? true : false} + :content {((entry.position == 'l') && !entry.is_focused) ? "(workspace :ws entry :side 'left')" : "(box :visible false)"})))) + (box :class "ws-center ${wsreveal}" + (for entry in array + (literal :visible {entry.is_focused ? true : false} + :content {entry.is_focused ? "(workspace :ws entry :side 'center' :lastws ${jq(array,'.[-1].num')})" : "(box :visible false)"}))) + (revealer :class "ws-right" + :reveal wsreveal + :transition "slideright" + :duration "500ms" + (box + (for entry in array + (literal :visible {((entry.position == 'r') && !entry.is_focused) ? true : false} + :content {((entry.position == 'r') && !entry.is_focused) ? "(workspace :ws entry :side 'right')" : "(box :visible false)"}))))))) + +(defwidget workspace [ws side ?lastws ?firstws] + (button :onclick `swaymsg workspace "${ws.name}"` + :tooltip "${ws.profile_name} ( ${jq(captures(ws.num, '[0-9]$'),'.[].[]','r')} )" + :class '${side} ${ws.num == lastws ? "last-workspace" : (ws.num == firstws ? "first-workspace" : "middle-workspace")} profile-${jq(ws,'.profile_name','r')}' + (box + '${replace(ws.name,".*:","")}' + (label :class "workspace-number" + :text {jq(captures(ws.num, '[0-9]$'),'.[].[]','r')})))) diff --git a/wayland/config/eww/modules/home.yuck b/wayland/config/eww/modules/home.yuck new file mode 100644 index 0000000..c0e2670 --- /dev/null +++ b/wayland/config/eww/modules/home.yuck @@ -0,0 +1,41 @@ +(defvar homewidgets_reveal false) + +(defwidget home [] + (revealer :transition "slideright" + :reveal homewidgets_reveal + :duration "250ms" + + (box :orientation 'v' + :space-evenly false + (box :height 27) + (scroll :vscroll true + :hscroll false + :vexpand true + :height 400 + (box :class "home" + :orientation "v" + :spacing 10 + :width 300 + :space-evenly false + (nowplayingbar) + (rat) + (shortcuts_revealer) + (weather_revealer) + (mcstatus_revealer) + (box + (notes_revealer)) + (box + (reminders_revealer)) + ))))) + +;widget templates +(include "modules/home/revealer-on-press.yuck") + +;module imports +(include "modules/home/nowplayingart.yuck") +(include "modules/home/rat.yuck") +(include "modules/home/weather.yuck") +(include "modules/home/shortcuts.yuck") +(include "modules/home/notes.yuck") +(include "modules/home/reminders.yuck") +(include "modules/home/mcstatus.yuck") diff --git a/wayland/config/eww/modules/home/mcstatus.yuck b/wayland/config/eww/modules/home/mcstatus.yuck new file mode 100644 index 0000000..c199450 --- /dev/null +++ b/wayland/config/eww/modules/home/mcstatus.yuck @@ -0,0 +1,79 @@ +(defpoll servers_status :initial '[{"online": true,"kind":"Java","players":{"online":0,"max":0,"list":null},"version":{"name":"version","protocol":0},"motd":"Message of the day","ping":0,"address":"ip.addre.ss"}]' + :interval "21600s" + 'scripts/home/mcstatus') + +(defvar reveal_mcstatus true) +(defwidget mcstatus_revealer [] + (revealer-on-press + :revealvar reveal_mcstatus + :revealvar-name "reveal_mcstatus" + (button + :width 300 + :class "revealer-title" + "Minecraft Servers ${reveal_mcstatus ? '' : ''}") + (mcstatus :json servers_status))) + +(defwidget mcstatus [json] + (box + :class 'minecraft' + :orientation 'v' + :space-evenly false + (box + :orientation 'v' + :space-evenly false + (for server in json + (box + :class 'server' + :orientation 'h' + :space-evenly false + (box + (box + :class 'icon' + :valign 'center' + :width 75 + :height {((server.ping!=0.0) ? 75 : 25 )} + :style 'background-image: url("${server.icon_path}");' + ) + ) + (box + :class 'details' + :space-evenly false + :orientation 'v' + (label + :class 'title' + :style "${( (server.ping==0.0)? 'color: red' : '' )}" + :text "${( (server.ping==0.0)? ' ' : '' )}${server.address}" + ) + (label + :visible {(server.ping!=0.0)} + :xalign 0 + :text "${server.players.online}/${server.players.max} players online" + ) + (label + :visible {(server.ping!=0.0)} + :class 'motd' + :text "${server.motd}" + :wrap true + :wrap-mode 'word' +; :truncate true + ) + (label + :visible {(server.ping!=0.0)} + :xalign 0 + :text " ${round(server.ping,0)}ms" + ) + ) + ) + ) + ) + (button + :class 'button' + :onclick 'eww poll servers_status' + :onrightclick 'rm ~/.cache/mc-server-info/cache.json;eww poll servers_status' + :tooltip 'right-click to bypass cache' + (label + :text "reload now" + ) + ) + ) +) diff --git a/wayland/config/eww/modules/home/notes.yuck b/wayland/config/eww/modules/home/notes.yuck new file mode 100644 index 0000000..2e3842f --- /dev/null +++ b/wayland/config/eww/modules/home/notes.yuck @@ -0,0 +1,38 @@ +(defpoll notes_list :initial '{"notes":[{"date":"1752630492","filepath":""}]}' + :interval "3600s" + 'scripts/home/notes') + +(defvar reveal_notes false) +(defwidget notes_revealer [] + (revealer-on-press + :revealvar reveal_notes + :revealvar-name "reveal_notes" + :width 300 + (button + :width 300 + :class "revealer-title" + "Notes ${reveal_notes ? '' : ''}") + (notes :json {jq(notes_list,'.notes')}))) + +(defwidget notes [json] + (box + :class "notes" + :orientation "v" + :halign "baseline" +; :width 300 + :height 150 + :space-evenly true + (for note in json + (button :onclick "kate -n '${note.filepath}'" + (box + :orientation "v" + (label + :xalign 0 + :wrap false + :truncate true + :text "󰎞 ${replace(note.filepath,"${get_env("HOME")}/Documents/Notes/",'')}") + (label + :xalign 0.5 + :class "timestamp" + :text " ${formattime("${note.date}","%F %R")}")))) + )) diff --git a/wayland/config/eww/modules/home/nowplayingart.yuck b/wayland/config/eww/modules/home/nowplayingart.yuck new file mode 100644 index 0000000..48e90db --- /dev/null +++ b/wayland/config/eww/modules/home/nowplayingart.yuck @@ -0,0 +1,142 @@ +(deflisten nowplaying_imgpath :initial "" + 'scripts/home/nowplayingart.sh') +;(deflisten nowplaying_title :initial "" +; 'scripts/home/nowplaying-title.sh') +;(deflisten nowplaying_artist :initial "" +; 'scripts/home/nowplaying-artist.sh') +(deflisten nowplaying_info :initial '{"status":"","artist":"","title":""}' + 'scripts/home/nowplaying.sh') + + +(defvar large_album_art false) +(defvar small_art_overlay false) +(defvar large_art_overlay false) +(defwidget nowplayingbar [] +; (centerbox + (box +; :visible true + :visible {jq(nowplaying_info,'.title','r') != ""} + :orientation 'v' + :class "nowplayingbar" + :space-evenly false + (box + :orientation "h" + :space-evenly false + :halign "center" + :width 300 + :height 100 +; (nowplaying_revealer :visible {!large_album_art} +; :width 100 +; :height 100) + (revealer + :transition "slideright" +; :transition "slideleft" + :duration "300ms" + :reveal {!large_album_art} + (eventbox + :onclick '${EWW_CMD} update large_album_art=true' + :onhover '${EWW_CMD} update small_art_overlay=true' + :onhoverlost '${EWW_CMD} update small_art_overlay=false' + (button + :height 100 + :width 100 + :valign "fill" + :halign "fill" + :hexpand false + :vexpand false + :onclick '${EWW_CMD} update large_album_art=true' + (overlay + (nowplayingart :size 'small') + (revealer + :transition "crossfade" + :duration "300ms" + :reveal {small_art_overlay} + (label :class "art-button-overlay small" + :justify "center" + :xalign 0.5 + :yalign 0.5 + :height 80 + :width 80 + :text "")))))) + (box + :class "mediadetails ${large_album_art ? 'fullwidth' : ''}" + :orientation "v" + :space-evenly true + :halign "fill" + :hexpand true + (label + :justify "center" + :text "󰎇 ${jq(nowplaying_info,'.title','r')} +󰠃 ${jq(nowplaying_info,'.artist','r')}") + (box + :orientation "h" + :space-evenly true + :halign "fill" + :hexpand true +; :width 130 +; :spacing 15 + :height 50 + (button + :class "mediabutton" + :valign "center" + :halign "center" + :height 25 + :width 25 + :onclick "playerctl previous" + "") + (button + :class "mediabutton" + :valign "center" + :halign "center" + :height 25 + :width 25 + :onclick "playerctl play-pause" + {(jq(nowplaying_info,'.status','r') == 'playing') ? "" : ""}) + (button + :class "mediabutton" + :valign "center" + :halign "center" + :height 25 + :width 25 + :onclick "playerctl next" + "")))) +;; (nowplaying_revealer :visible false))) + (revealer +; :transition "slideup" + :transition "slidedown" + :duration "300ms" + :reveal {large_album_art} + (eventbox +; :visible {large_album_art} + :onclick '${EWW_CMD} update large_album_art=false' + :onhover '${EWW_CMD} update large_art_overlay=true' + :onhoverlost '${EWW_CMD} update large_art_overlay=false' + (button + :height 100 + :width 100 + :valign "fill" + :halign "fill" + :hexpand false + :vexpand false + :onclick '${EWW_CMD} update large_album_art=false' + (overlay + (nowplayingart :size 'big') +; :css 'margin: 20px;') + (revealer + :transition "crossfade" + :duration "300ms" + :reveal {large_art_overlay} + (label :class "art-button-overlay big" + :height 100 + :width 100 + :visible {large_art_overlay} + :text "")))))))) + +(defwidget nowplayingart [size] + (box + :class "nowplayingart ${size}" + :hexpand false +; :width 100 +; :height 100 +; :path '${nowplaying_imgpath}')) + :style "background-image: url('${nowplaying_imgpath}');")) diff --git a/wayland/config/eww/modules/home/rat.yuck b/wayland/config/eww/modules/home/rat.yuck new file mode 100644 index 0000000..8e83af9 --- /dev/null +++ b/wayland/config/eww/modules/home/rat.yuck @@ -0,0 +1,9 @@ +(defpoll rat_image :interval "60s" + 'random-image -d ~/Pictures/Phone/Albums/Rattos/ -s 300 -r') +(defwidget rat [] + (box + :class "rat" + :orientation "h" + :width 300 + :height 300 + :style "background-image: url('${rat_image}');")) diff --git a/wayland/config/eww/modules/home/reminders.yuck b/wayland/config/eww/modules/home/reminders.yuck new file mode 100644 index 0000000..d233d50 --- /dev/null +++ b/wayland/config/eww/modules/home/reminders.yuck @@ -0,0 +1,38 @@ +;(defpoll reminders_list :initial '[]' +; :interval "3600s" +; 'scripts/home/reminders') +(deflisten reminders_list :initial '[]' + 'scripts/home/reminders') + +(defvar reveal_reminders true) +;(defvar reveal_reminders {jq(reminders_list,'length')>0}) +(defwidget reminders_revealer [] + (revealer-on-press + :visible {jq(reminders_list,'length')>0} + :revealvar reveal_reminders + :revealvar-name "reveal_reminders" +; {reveal_reminders ? "" : ""} + (button + :width 300 + :class "revealer-title" + "Reminders ${reveal_reminders ? '' : ''}") + (reminders :json {jq(reminders_list,'.')}))) + +(defwidget reminders [json] + (box + :class "reminders" + :orientation "v" + :halign "baseline" +; :width 300 +; :height 150 + :space-evenly true + (for reminder in json + (button :onclick "open '${reminder.url}'" + (box +; :visible + :orientation "v" + (label + :xalign 0 + :wrap false + :text "${reminder.name}")))) + )) diff --git a/wayland/config/eww/modules/home/revealer-on-press.yuck b/wayland/config/eww/modules/home/revealer-on-press.yuck new file mode 100644 index 0000000..7cf67da --- /dev/null +++ b/wayland/config/eww/modules/home/revealer-on-press.yuck @@ -0,0 +1,17 @@ +(defwidget revealer-on-press [revealvar revealvar-name ?class ?duration ?transition ?visible] + (box + :class "${class} revealer-on-press ${revealvar ? 'revealer_opened' : 'revealer_closed'}" + :visible {visible ?: true} +; :width {revealvar ? 300 : 100} + :space-evenly false + (box + :orientation "vertical" + :space-evenly false + (eventbox + :onclick '${EWW_CMD} update ${revealvar-name}=${revealvar ? "false" : "true"}' + (children :nth 0)) + (revealer + :reveal revealvar + :transition {transition ?: "slidedown"} + :duration {duration ?: "500ms"} + (children :nth 1))))) diff --git a/wayland/config/eww/modules/home/shortcuts.yuck b/wayland/config/eww/modules/home/shortcuts.yuck new file mode 100644 index 0000000..c2acd63 --- /dev/null +++ b/wayland/config/eww/modules/home/shortcuts.yuck @@ -0,0 +1,63 @@ +(defvar reveal_shortcuts true) +(defwidget shortcuts_revealer [] + (revealer-on-press + :revealvar reveal_shortcuts + :revealvar-name "reveal_shortcuts" + (button + :width 300 + :class "revealer-title" + "Shortcuts ${reveal_shortcuts ? '' : ''}") + (shortcuts))) + +(defwidget shortcuts [] + (box + :class "shortcuts" + :orientation "v" + :space-evenly false + :halign "center" + :width 300 + :height 75 + (box +; :visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 10} + :visible (arraylength(sway_info.workspace_profile.scripts) > 0) + :orientation "h" + :space-evenly true + :halign "center" + (for script in {jq(sway_info,'[.workspace_profile.scripts[0,1,2]]','r')} + (button + :visible "${script?.name!='null'}" + :onclick "${script?.command}" + :tooltip "${script?.name}" + (label + :width 60 + :height 60 + :justify "center" + :text "${script?.icon}")) + ) +; (button +; :width 60 +; :height 60 +; :onclick "hass-cli -a services -I area_id -i left_bedroom -d light -s toggle" +; (label +; :justify "center" +; :text "󱣝" +; :tooltip "Turn on bedroom lights")) + ) + (box + :visible (arraylength(sway_info.workspace_profile.scripts) > 3) + :orientation "h" + :space-evenly true + :halign "center" + (for script in {jq(sway_info, '[.workspace_profile.scripts[3,4,5]]','r')} + (button + :visible "${script?.name!='null'}" + :onclick "${script?.command}" + :tooltip "${script?.name}" + (label + :width 60 + :height 60 + :justify "center" + :text {script?.icon})) + )) + + )) diff --git a/wayland/config/eww/modules/home/softwareupdates.yuck b/wayland/config/eww/modules/home/softwareupdates.yuck new file mode 100644 index 0000000..0042c2a --- /dev/null +++ b/wayland/config/eww/modules/home/softwareupdates.yuck @@ -0,0 +1,55 @@ +(defpoll software_list :initial '[{"package_name":"package","package_version":"1","upstream_version":"1","up_to_date":"true"}]' + :interval "43200s" + 'software-release-monitor') + +(defvar reveal_software true) +(defwidget software_revealer [] + (revealer-on-press + :revealvar reveal_software + :revealvar-name "reveal_software" + :width 300 + (button + :width 300 + :class "revealer-title" + "Software Monitor ${reveal_software ? '' : ''}") + (softwareupdates :json {software_list}))) + +(defwidget softwareupdates [json] + (box + :class "notes" + :orientation "v" + :halign "baseline" + :width 300 + :height 150 + :space-evenly true + (for software in json + (button :onclick "notify-send '${software.package_name} is ${(software.up_to_date == 'true' ) ? 'up to date!' : 'outdated!'}' 'upstream: ${software.upstream_version}\\npackage: ${software.package_version}'" + (box + :orientation "h" + :space-evenly false + (label +;; :xalign 0 + :halign "start" + :hexpand true + :wrap false + :truncate true + :text "${software.package_name}") + (box + :orientation "v" + :halign "end" + (label + :valign "end" + :halign "end" + :class "details" + :text "${software.upstream_version} ") + (label + :valign "start" + :halign "end" + :class "details" + :text "${software.package_version} 󰏖")) + (label + :halign "end" + :class "status" + :style {(software.up_to_date == "true" ) ? "color: green;" : "color: red;"} + :text {(software.up_to_date == "true" ) ? "" : ""})))) + )) diff --git a/wayland/config/eww/modules/home/weather.yuck b/wayland/config/eww/modules/home/weather.yuck new file mode 100644 index 0000000..5292e98 --- /dev/null +++ b/wayland/config/eww/modules/home/weather.yuck @@ -0,0 +1,31 @@ +(defpoll weather_status :initial '{"condition":"loading...","current_temp":"--","feels_temp":"--","min_temp":"--","max_temp":"--","humidity":"--","icon":" ","updated":"loading..."}' + :interval "3600s" + 'scripts/home/hass_weather') + +(defvar reveal_weather true) +(defwidget weather_revealer [] + (revealer-on-press + :revealvar reveal_weather + :revealvar-name "reveal_weather" + :width 300 + (button + :width 300 + :class "revealer-title" + "Weather ${reveal_weather ? '' : ''}") + (weather :json weather_status))) + + + +(defwidget weather [json] + (box + :class "weather" + :orientation "v" + :width 300 + :space-evenly true + "${json.condition} ${json.icon}" + "${json.current_temp}󰔅  / ${json.humidity}% " + "󰄿 ${json.max_temp}󰔅 | 󰄼 ${json.min_temp}󰔅" + (label + :class "weather-subtitle" + :text " ${json.updated}" + ))) diff --git a/wayland/config/eww/scripts/bar/active-workspace b/wayland/config/eww/scripts/bar/active-workspace new file mode 100755 index 0000000..1e3fa25 --- /dev/null +++ b/wayland/config/eww/scripts/bar/active-workspace @@ -0,0 +1,14 @@ +#!/bin/bash + +function get_workspaces_info() { + output=$(swaymsg -t get_workspaces | jq -r '.. | select(.type?=="workspace") | select(.focused==true).num') + echo $output +} + +get_workspaces_info + +swaymsg -t subscribe '["workspace"]' --monitor | { + while read -r event; do + get_workspaces_info + done +} diff --git a/wayland/config/eww/scripts/bar/activewindow b/wayland/config/eww/scripts/bar/activewindow new file mode 100755 index 0000000..d3e44a1 --- /dev/null +++ b/wayland/config/eww/scripts/bar/activewindow @@ -0,0 +1,29 @@ +#!/bin/bash + +#declare -A titles +#declare -A icons +titles=(" — Alacritty" " — LibreWolf" " — LibreOffice Calc" " — LibreOffice Writer" " — LibreOffice Draw" " — LibreOffice Math" " - KeePassXC" " — Dolphin" " — Tokodon") +icons=(" " " " " " " " " " " " " " " " "") + +function get_window_name() { + output=$(swaymsg -t get_tree | jq -r '.. | select(.type?) | select(.focused==true).name') + for s in "${!titles[@]}";do + if [[ "${output}" == *"${titles[${s}]}"* ]]; then + output="${output/${titles[s]}/}" + output="${icons[${s}]} ${output}" + fi + done + if [ ${#output} -ge 50 ];then + echo "${output:0:45}…" + else + echo "${output}" + fi +} + +get_window_name + +swaymsg -t subscribe '["window"]' --monitor | { + while read -r event; do + get_window_name + done +} diff --git a/wayland/config/eww/scripts/bar/bluetooth b/wayland/config/eww/scripts/bar/bluetooth new file mode 100755 index 0000000..9b047b2 --- /dev/null +++ b/wayland/config/eww/scripts/bar/bluetooth @@ -0,0 +1,42 @@ +#!/bin/bash + + +function btstatus(){ +# device_mac_list= + device_json_array=() + + for m in $(bluetoothctl devices Paired | awk '{print $2}');do + IFS=';' read -r dev_name dev_icon dev_connected <<<$(bluetoothctl info "${m}" | grep -e 'Connected\: \|Name\:\|Icon\:' | sed 's/.*: //g' | tr '\n' ';') +# IFS='' read -rd "\n" dev_name dev_icon dev_connected <<<$(bluetoothctl info "${m}" | grep -e 'Connected\: \|Name\:\|Icon\:' | sed -n 's/.*: //p') +# IFS="\n" read -r dev_name dev_icon dev_connected <<<$(bluetoothctl info "${m}" | grep -e 'Connected\: \|Name\:\|Icon\:' | sed -n 's/.*: //p') + case "${dev_icon}" in + "input-mouse") + dev_icon="󰍽";; + "phone") + dev_icon="";; + "input-keyboard") + dev_icon="";; + "input-gaming") + dev_icon="";; + "audio-headphones") + dev_icon="";; + "audio-headset") + dev_icon="";; + "computer") + dev_icon="";; + esac +# device_json=$( jq -n --arg name "${dev_name}" --arg connected "${dev_connected}" --arg icon "${dev_icon}" --arg address "${m}" '{name: $name, connected: $connected, icon: $icon, address: $address}') +# device_json_array+=("${device_json}") +# printf 'Address: %s\nName: %s\nIcon: %s\nConnected: %s\n\n' "${m}" "${dev_name}" "${dev_icon}" "${dev_connected}" + printf '%s;%s;%s;%s\n' "${m}" "${dev_name}" "${dev_icon}" "${dev_connected}" + done | column -t -n 'bt_devices' -N address,name,icon,connected -s ';' -J | jq -c '.bt_devices' +# devices_json=$(printf '%s\n' "${device_json_array[@]}" | jq -s .) +# echo ${devices_json} +} + +btstatus + +#dbus-monitor --profile "interface='org.blueman.Applet',member='MenuChanged'" | while read -r event; do +dbus-monitor --profile "interface='org.blueman.Applet',member='ToolTipTitleChanged'" | while read -r event; do + btstatus +done diff --git a/wayland/config/eww/scripts/bar/eww-idle-inhibit b/wayland/config/eww/scripts/bar/eww-idle-inhibit new file mode 100755 index 0000000..ee9e034 --- /dev/null +++ b/wayland/config/eww/scripts/bar/eww-idle-inhibit @@ -0,0 +1,3 @@ +#!/bin/bash + +sleep infinity diff --git a/wayland/config/eww/scripts/bar/network-manager b/wayland/config/eww/scripts/bar/network-manager new file mode 100755 index 0000000..3b6fd88 --- /dev/null +++ b/wayland/config/eww/scripts/bar/network-manager @@ -0,0 +1,18 @@ +#!/bin/bash + + +function ifstatus(){ + jq -cs '{"interfaces": [(.[0].devs[] | select((.type=="wifi") or (.type=="ethernet")))]} * {"vpns": [(.[1].cons[] | select((.type=="vpn") or (.type=="wireguard")))]}' <<<$( \ +# nmcli --terse -f DEVICE,TYPE,STATE,CONNECTION d s | column -t -n 'devs' --table-columns device,type,state,connection -s ':' -J; \ + nmcli --terse -f DEVICE,TYPE,STATE,CONNECTION d s | sed 's/\\:/###/g;s/:/\;/g;s/###/:/g' | column -t -n 'devs' --table-columns device,type,state,connection -s ';' -J; \ + nmcli --terse -f NAME,TYPE,ACTIVE,DEVICE c s | column -t -n 'cons' --table-columns name,type,active,device -s ':' -J) + # [ .devices[] | select((.type=="wifi") or (.type=="ethernet")) ] +} + +ifstatus + +ip monitor address | { + while read -r event; do + ifstatus + done; +} diff --git a/wayland/config/eww/scripts/bar/network-updown b/wayland/config/eww/scripts/bar/network-updown new file mode 100755 index 0000000..654eb15 --- /dev/null +++ b/wayland/config/eww/scripts/bar/network-updown @@ -0,0 +1,11 @@ +#!/bin/bash + +type="${1}" +action="${2}" +devices=$(nmcli -g DEVICE device) + +for d in ${devices};do + if [ "$(nmcli -g GENERAL.TYPE device show ${d})" = "${type}" ];then + nmcli device "${action}" "${d}" + fi +done diff --git a/wayland/config/eww/scripts/bar/networking b/wayland/config/eww/scripts/bar/networking new file mode 100755 index 0000000..1b42766 --- /dev/null +++ b/wayland/config/eww/scripts/bar/networking @@ -0,0 +1,62 @@ +#!/bin/bash + + +function ifstatus(){ + is_online=false + is_wireless=false + is_ethernet=false + is_vpn=false + is_proton=false + is_proton_sc=false + is_homevpn=false + is_homevpn_full=false + + if nmcli -g TYPE connection show --active | grep -q "wireless";then + is_wireless='true' + fi + if nmcli -g TYPE connection show --active | grep -q "ethernet";then + is_ethernet='true' + fi + vpn_cons=$(nmcli -g TYPE,NAME connection show --active | grep -e "vpn" -e "wireguard") + +# echo "${vpn_cons//$'\n'/;}" + case "${vpn_cons//$'\n'/;}" in + *ProtonVPN|*ProtonVPN\;*) + is_proton='true' + ;;& + *ProtonVPN-SC|*ProtonVPN-SC\;*) + is_proton_sc='true' + ;;& + *HomeVPN|*HomeVPN\;*) + is_homevpn='true' + ;;& + *HomeVPN-Full|*HomeVPN-Full\;*) + is_homevpn_full='true' + ;;& + *ProtonVPN*|*ProtonVPN-SC*|*HomeVPN*|*HomeVPN-Full*) + is_vpn='true' + ;; + esac +# if grep -qe "ProtonVPN$" <<<${vpn_cons};then +# is_proton='true' +# fi +# if grep -qe "ProtonVPN-SC$" <<<${vpn_cons};then +# is_proton_sc='true' +# fi +# if grep -qe "HomeVPN$" <<<${vpn_cons};then +# is_homevpn='true' +# fi +# if grep -qe "HomeVPN-Full$" <<<${vpn_cons};then +# is_homevpn_full='true' +# fi + echo $(jq -n --arg online "${is_online}" --arg wifi "${is_wireless}" --arg wired "${is_ethernet}" --arg vpn "${is_vpn}" --arg proton "${is_proton}" --arg proton_sc "${is_proton_sc}" --arg homevpn "${is_homevpn}" --arg homevpn_full "${is_homevpn_full}" '{online: $online, wifi: $wifi, wired: $wired, vpn: $vpn, proton: $proton, proton_sc: $proton_sc, homevpn: $homevpn, homevpn_full: $homevpn_full}') +} + +ifstatus + +ip monitor address | { + while read -r event; do +# echo hi ${event}; + ifstatus + done; +} diff --git a/wayland/config/eww/scripts/bar/nmcli-vpn b/wayland/config/eww/scripts/bar/nmcli-vpn new file mode 100755 index 0000000..199d8fc --- /dev/null +++ b/wayland/config/eww/scripts/bar/nmcli-vpn @@ -0,0 +1,9 @@ +#!/bin/bash + +if $(nmcli -g GENERAL.STATE c s "${1}"|grep -q '\bactiv'); then + echo "going down" + nmcli connection down "${1}" +else + echo "going up" + nmcli connection up "${1}" +fi diff --git a/wayland/config/eww/scripts/bar/nowplaying b/wayland/config/eww/scripts/bar/nowplaying new file mode 100755 index 0000000..f65fac9 --- /dev/null +++ b/wayland/config/eww/scripts/bar/nowplaying @@ -0,0 +1,12 @@ +#!/bin/bash + +playerctl --follow metadata --format '{{ title }}' | { + while read -r nowplaying_title; do + if [ ${#nowplaying_title} -ge 45 ];then + echo "${nowplaying_title:0:40}…" + else + echo "${nowplaying_title}" + fi +# echo "${nowplaying_title}" | head -c 50; + done +} diff --git a/wayland/config/eww/scripts/bar/powermenu b/wayland/config/eww/scripts/bar/powermenu new file mode 100755 index 0000000..c7e4e58 --- /dev/null +++ b/wayland/config/eww/scripts/bar/powermenu @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +action="${1}" +action_icon="${2}" +command="${3}" + +#yad --image "${action_icon}" --title "Really ${action}?" --button=gtk-yes:0 --button=gtk-no:1 --text "Really ${action}?\n $ ${command} " +if zenity --question --icon="${action_icon}" --title "Really ${action}?" --text "$ ${command} ";then + bash -c "${command}" +fi +#printf 'test\ntest' | wofi --columns=2 --show dmenu diff --git a/wayland/config/eww/scripts/bar/profile b/wayland/config/eww/scripts/bar/profile new file mode 100755 index 0000000..43a0e80 --- /dev/null +++ b/wayland/config/eww/scripts/bar/profile @@ -0,0 +1,3 @@ +#!/bin/bash + +echo ~/.cache/sway-profiles/active_profile | entr -n sp-profile-icon diff --git a/wayland/config/eww/scripts/bar/profile-info.sh b/wayland/config/eww/scripts/bar/profile-info.sh new file mode 100755 index 0000000..d104627 --- /dev/null +++ b/wayland/config/eww/scripts/bar/profile-info.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +sdu profile get -m diff --git a/wayland/config/eww/scripts/bar/profile-name b/wayland/config/eww/scripts/bar/profile-name new file mode 100755 index 0000000..a60569a --- /dev/null +++ b/wayland/config/eww/scripts/bar/profile-name @@ -0,0 +1,3 @@ +#!/bin/bash + +echo ~/.cache/sway-profiles/active_profile | entr -n sp-profile diff --git a/wayland/config/eww/scripts/bar/scratchpad b/wayland/config/eww/scripts/bar/scratchpad new file mode 100755 index 0000000..5b93cbb --- /dev/null +++ b/wayland/config/eww/scripts/bar/scratchpad @@ -0,0 +1,199 @@ +#!/bin/bash +#appropriated from https://gitlab.com/wef/dotfiles/-/blob/master/bin/sway-select-window for use with eww + +declare -A icons=( +) + +jq_get_windows=' + # descend to workspace or scratchpad + .nodes[].nodes[] + # save workspace name as .w + | {"w": .name} + ( + if (.nodes|length) > 0 then # workspace + [recurse(.nodes[])] + else # scratchpad + [] + end + + .floating_nodes + | .[] + # select nodes with no children (windows) +# | select(.nodes==[]) +# | select(.scratchpad!="none") + | select(.scratchpad_state=="fresh") + )' + +jq_windows_to_tsv=' + [ + (.id | tostring), + # remove markup and index from workspace name, replace scratch with "[S]" + (.w | gsub("<[^>]*>|:$"; "") | sub("__i3_scratch"; "[S]")), + # get app name (or window class if xwayland) + (.app_id // .window_properties.class), + (.name), + (.pid), + (.visible) + ] + | @tsv' + +get_hardcoded_icon() { + icon="${icons[$1]}" + echo "$icon" +} + +get_desktop() { + app="$1" + p="/usr/share/applications" + flist=("/var/lib/flatpak/exports/share/applications" "${HOME}/.local/share/flatpak/exports/share/applications") + [[ "$verbose" ]] && echo "searching for '$app'" >&2 + + # fast and easy cases first: + for prefix in "" org.kde. org.gnome. org.freedesktop.; do + d="$p/$prefix$app.desktop" + [[ -r "$d" ]] && { + echo "$d" + [[ "$verbose" ]] && echo "found '$d'" >&2 + return + } + done + + # maybe lowercase + for prefix in "" org.kde. org.gnome. org.freedesktop.; do + d="$p/$prefix${app,,}.desktop" + [[ -r "$d" ]] && { + echo "$d" + [[ "$verbose" ]] && echo "found '$d'" >&2 + return + } + done + # this is fairly reliable but slow: + # look for a .desktop file with Exec=$app eg + # gnome-disks (but exclude gnome-disk-image-writer.desktop) + # gnome-font-viewer + GREP='egrep -r' + type rg &>/dev/null && GREP=rg + d=$( $GREP -il "^exec=$app( %u)*[[:space:]]*$" $p | head -n 1) + [[ -r "$d" ]] && { + echo "$d" + [[ "$verbose" ]] && echo "found '$d'" >&2 + return + } + + for f in ${flist[@]};do + [[ "$verbose" ]] && echo "using '$GREP' to search in '${f}'" >&2 + d=$( $GREP -il "^startupwmclass=$app.*$" ${f}/* | head -n 1) + [[ "$verbose" ]] && echo "found '$d'" >&2 + [[ -r "$d" ]] && { + echo "$d" + [[ "$verbose" ]] && echo "found '$d'" >&2 + return + } + done + + # desperation - weird apps like com.github.wwmm.pulseeffects.desktop!! + # shellcheck disable=SC2012 + d=$( ls "$p/"*".$app.desktop" 2>/dev/null | head -n 1 ) + [[ -r "$d" ]] && { + echo "$d" + [[ "$verbose" ]] && echo "found '$d'" >&2 + return + } +} + +get_icon() { + app="$1" + + icon=$( get_hardcoded_icon "$app_name" ) + [[ "$icon" && -r "$icon" ]] && { + echo "$icon" + [[ "$verbose" ]] && echo "using hardcoded icon '$icon'" >&2 + return + } + # let's go poke in the .desktop files: + icon_name="" + dt=$( get_desktop "$app" ) + # sometimes we get the 'class' rather than the exe - so try this: + [[ "$dt" ]] || { + app=$( tr '\0' '\n' < "/proc/$pid/cmdline" | head -n 1 ) + dt=$( get_desktop "$( basename "$app" )" ) + } + [[ "$dt" ]] && { + icon_name=$( awk -v IGNORECASE="set" -F"=" '/^icon/ {print $2}' "$dt" ) + [[ -r "$icon_name" ]] && { + icon="$icon_name" + echo "$icon" + [[ "$verbose" ]] && echo "using .desktop icon '$icon'" >&2 + return + } + [[ "$icon_name" ]] && { + icon_locations=( + /usr/share/icons/hicolor/scalable/apps + /usr/share/icons/hicolor/48x48/apps + /usr/share/icons/gnome/48x48/apps + /usr/share/icons/gnome/48x48/devices + /usr/share/pixmaps + /var/lib/flatpak/exports/share/icons/hicolor/scalable/apps + /var/lib/flatpak/exports/share/icons/hicolor/48x48/apps + "${HOME}/.local/share/flatpak/exports/share/icons/hicolor/scalable/apps" + "${HOME}/.local/share/flatpak/exports/share/icons/hicolor/48x48/apps" +# icons/hicolor/scalable/apps +# icons/hicolor/48x48/apps +# icons/gnome/48x48/apps +# icons/gnome/48x48/devices +# pixmaps + ) + for d in "${icon_locations[@]}"; do + for s in .svg .png .xpm ""; do + icon=$d/$icon_name$s + [[ -r $icon ]] && { + echo "$icon" + [[ "$verbose" ]] && echo "using .desktop icon '$icon'" >&2 + return + } + done + done + icon=$(find /usr/share/icons | grep "/${icon_name}-symbolic.svg" | head -n 1) + [[ -r $icon ]] && { + echo "$icon" + [[ "$verbose" ]] && echo "using .desktop icon '$icon'" >&2 + return + } + } + } + [[ "$verbose" ]] && echo "searching for '$app' icon" >&2 + icon=$( find /usr/share/icons /usr/share/pixmaps | grep -E -i "/$app.(png|svg)" | head -n 1 ) + [[ "$icon" && -r "$icon" ]] && { + echo "$icon" + [[ "$verbose" ]] && echo "using found icon '$icon'" >&2 + return + } + # failed: + icon="/usr/share/icons/breeze-dark/mimetypes/32/unknown.svg" + [[ "$verbose" ]] && echo "using missing icon '$icon'" >&2 + echo "$icon" +} + +function get_scratchpad() { + applist_array=() + applist="" + shopt -s lastpipe + swaymsg -t get_tree | + jq -r "$jq_get_windows | $jq_windows_to_tsv" | + column -s $'\t' -o $'\t' -t | while IFS=$'\t' read -r win_id ws_name app_name win_title pid visible; do + shopt -s extglob + app_name="${app_name%%*( )}" + icon=$( get_icon "$app_name" "$pid" ) + visible=${visible} + [[ "$verbose" ]] && printf "[%s]=%s\n" "$app_name" "$icon" >&2 + applist_array_item=$(jq -n --arg icon "${icon}" --arg name "${app_name##*.}" --arg title "${win_title}" --arg win_id "${win_id}" --arg visible "${visible}" '{icon: $icon,name: $name,title: $title,win_id: $win_id,visible: $visible}') + applist_array+=("${applist_array_item}") + done + applist=$(printf '%s\n' "${applist_array[@]}" | jq -s .) + echo ${applist} +} + +get_scratchpad +swaymsg -t subscribe '["window"]' --monitor | { + while read -r event; do + get_scratchpad + done +} diff --git a/wayland/config/eww/scripts/bar/volume b/wayland/config/eww/scripts/bar/volume new file mode 100755 index 0000000..cba3845 --- /dev/null +++ b/wayland/config/eww/scripts/bar/volume @@ -0,0 +1,15 @@ +#!/bin/bash + +function print_volume() { + if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then + echo 0 + else + echo "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g')" + fi +} + +print_volume + +pactl subscribe | awk '{ if($0 ~ "new") if($0 ~ "sink-input") {system("echo hi")} }' | while read -r event;do + print_volume +done diff --git a/wayland/config/eww/scripts/bar/workspaces b/wayland/config/eww/scripts/bar/workspaces new file mode 100755 index 0000000..6e4af20 --- /dev/null +++ b/wayland/config/eww/scripts/bar/workspaces @@ -0,0 +1,14 @@ +#!/bin/bash + +function get_workspaces_info() { + output=$(swaymsg -t get_workspaces | jq 'sort_by(.num)') + echo $output +} + +get_workspaces_info + +swaymsg -t subscribe '["workspace"]' --monitor | { + while read -r event; do + get_workspaces_info + done +} diff --git a/wayland/config/eww/scripts/home/hass_weather b/wayland/config/eww/scripts/home/hass_weather new file mode 100755 index 0000000..8d137b2 --- /dev/null +++ b/wayland/config/eww/scripts/home/hass_weather @@ -0,0 +1,64 @@ +#!/bin/bash + +hass_weather_cache="${HOME}/.cache/hass_weather.json" + +update_cache_json(){ + weather_summary="$( hass-cli -a states -i sensor.weather_summary | jq -r '.attributes' )" + if [[ -z "${weather_summary}" ]];then + return 1 + fi + condition="$( jq -r '.condition' <<< ""${weather_summary}"" )" + condition_code="$( jq -r '.condition_code' <<< ""${weather_summary}"" )" + current_temp="$( jq -r '.current_temp' <<< ""${weather_summary}"" )" + feels_temp="$( jq -r '.feels_temp' <<< ""${weather_summary}"" )" + min_temp="$( jq -r '.min_temp' <<< ""${weather_summary}"" )" + max_temp="$( jq -r '.max_temp' <<< ""${weather_summary}"" )" + humidity="$( jq -r '.humidity' <<< ""${weather_summary}"" )" + updated="$(date '+%Y-%m-%d, %H:%M')" + + case "${condition_code}" in + #https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2 + (2[0-9][0-9]) + condition_icon='' + ;; + (3[0-9][0-9]) + condition_icon='' + ;; + (5[0-9][0-9]) + condition_icon='' + ;; + (6[0-9][0-9]) + condition_icon='' + ;; + (7[0-9][0-9]) + condition_icon='' + ;; + 800) + condition_icon='' + ;; + (80[0-9]) + condition_icon='' + ;; + esac + + jq -n \ + --arg condition "${condition}" \ + --arg current_temp "${current_temp}" \ + --arg feels_temp "${feels_temp}" \ + --arg min_temp "${min_temp}" \ + --arg max_temp "${max_temp}" \ + --arg humidity "${humidity}" \ + --arg icon "${condition_icon}" \ + --arg updated "${updated}" \ + '{condition: $condition,current_temp: $current_temp,feels_temp: $feels_temp,min_temp: $min_temp,max_temp: $max_temp,humidity: $humidity,icon: $icon,updated: $updated}' | tee "${hass_weather_cache}" >/dev/null + +} + +if [[ ! $(find "${hass_weather_cache}" -cmin -60 -print 2>/dev/null) ]]; then +# if ! ping -w 15 -c 5 hass.pogmom.me;then +# exit 1 +# fi + update_cache_json +fi + +cat "${hass_weather_cache}" diff --git a/wayland/config/eww/scripts/home/mcstatus b/wayland/config/eww/scripts/home/mcstatus new file mode 100755 index 0000000..cce5f05 --- /dev/null +++ b/wayland/config/eww/scripts/home/mcstatus @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +cache_path="${HOME}/.cache/mc-server-info" +mcstatus_cache="${cache_path}/cache.json" +mkdir -p "${cache_path}" + +update_cache_json(){ + mc-server-info json | tee "${mcstatus_cache}" >/dev/null +} +if [[ ! $(find "${mcstatus_cache}" -cmin -15 -print 2>/dev/null) ]]; then + update_cache_json +fi +cat "${mcstatus_cache}" diff --git a/wayland/config/eww/scripts/home/notes b/wayland/config/eww/scripts/home/notes new file mode 100755 index 0000000..5b370dd --- /dev/null +++ b/wayland/config/eww/scripts/home/notes @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +find ~/Documents/Notes/ -type f -exec stat --printf '%Y\t%n\n' {} + | sort -rk 1 | head -n 3 | column -ts $'\t' -n 'Notes' -N date,filepath -J diff --git a/wayland/config/eww/scripts/home/nowplaying-artist.sh b/wayland/config/eww/scripts/home/nowplaying-artist.sh new file mode 100755 index 0000000..a9f8a8e --- /dev/null +++ b/wayland/config/eww/scripts/home/nowplaying-artist.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +#playerctl --follow metadata --format '{{ title }}' | { +playerctl --follow metadata --format '{{ trunc(artist,23) }}' + +#playerctl metadata --format '{{ title }}\n{{ artist }}' | { +# while read -r nowplaying_title; do +# if [ ${#nowplaying_title} -ge 45 ];then +# echo "${nowplaying_title:0:40}…" +# else +# echo "${nowplaying_title}" +# fi +# echo "${nowplaying_title}" | head -c 50; +# done +#} diff --git a/wayland/config/eww/scripts/home/nowplaying-title.sh b/wayland/config/eww/scripts/home/nowplaying-title.sh new file mode 100755 index 0000000..700905e --- /dev/null +++ b/wayland/config/eww/scripts/home/nowplaying-title.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +#playerctl --follow metadata --format '{{ title }}' | { +playerctl --follow metadata --format '{{ trunc(title,23) }}' + +#playerctl metadata --format '{{ title }}\n{{ artist }}' | { +# while read -r nowplaying_title; do +# if [ ${#nowplaying_title} -ge 45 ];then +# echo "${nowplaying_title:0:40}…" +# else +# echo "${nowplaying_title}" +# fi +# echo "${nowplaying_title}" | head -c 50; +# done +#} diff --git a/wayland/config/eww/scripts/home/nowplaying.sh b/wayland/config/eww/scripts/home/nowplaying.sh new file mode 100755 index 0000000..37c29ab --- /dev/null +++ b/wayland/config/eww/scripts/home/nowplaying.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +playerctl --follow metadata --format '{"status":"{{lc(status)}}","artist":"{{artist}}","title":"{{markup_escape(trunc(title,23))}}"}' diff --git a/wayland/config/eww/scripts/home/nowplayingart.sh b/wayland/config/eww/scripts/home/nowplayingart.sh new file mode 100755 index 0000000..a3c7819 --- /dev/null +++ b/wayland/config/eww/scripts/home/nowplayingart.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +playerctl metadata --format "{{mpris:artUrl}}" --follow | while IFS= read -r line; do + if [[ $line == *"http"* ]]; then + cache_dir="$XDG_RUNTIME_DIR/album_art_cache" + mkdir -p "$cache_dir" + file_name=$(basename "$line") + file_path="$cache_dir/$file_name" + + # Check if file exists + if [ -e "$file_path" ]; then + # File exists, return path immediately + echo "$file_path" + else + curl --output "$file_path" "$line" > /dev/null 2>&1 + echo "$file_path" + fi + else + # artUrl doesn't have a link, nothing to do + echo "$line" + fi +done diff --git a/wayland/config/eww/scripts/home/randomrat b/wayland/config/eww/scripts/home/randomrat new file mode 100755 index 0000000..b7bba98 --- /dev/null +++ b/wayland/config/eww/scripts/home/randomrat @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ "$(eww active-windows)" == *"home"* ]]; then + img_dir="${HOME}/Pictures/Phone/Albums/Rattos/" + img_list=$( find "${img_dir}" -iname '*.jpg' -or -iname '*.png' -or -iname '*.heic') + img=$( shuf -n 1 <<< "${img_list}" ) + mkdir -p "${HOME}/.cache/eww/" + convert "${img}" -resize x300\> "${HOME}/.cache/eww/rat.jpg" + echo "${HOME}/.cache/eww/rat.jpg" +fi diff --git a/wayland/config/eww/scripts/home/reminders b/wayland/config/eww/scripts/home/reminders new file mode 100755 index 0000000..49c3eed --- /dev/null +++ b/wayland/config/eww/scripts/home/reminders @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +#jq '[.reminders.[]|select(.enabled==true)]' ~/Documents/Reminders/urls.json +echo ~/Documents/Reminders/urls.json | entr -n jq -c '[.reminders.[]|select(.enabled==true)]' ~/Documents/Reminders/urls.json diff --git a/wayland/config/eww/scripts/home/shortcuts/development/SMB b/wayland/config/eww/scripts/home/shortcuts/development/SMB new file mode 100755 index 0000000..2da1b72 --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/SMB @@ -0,0 +1,4 @@ +#!/bin/bash + +#dolphin "smb://server-hp-y2z63av/Media" +samba-wofi diff --git a/wayland/config/eww/scripts/home/shortcuts/development/bridge-netgear-r6250 b/wayland/config/eww/scripts/home/shortcuts/development/bridge-netgear-r6250 new file mode 100755 index 0000000..13a5e70 --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/bridge-netgear-r6250 @@ -0,0 +1,3 @@ +#!/bin/bash + +alacritty -T ' bridge-netgear-r6250' -e ssh root@bridge-netgear-r6250 diff --git a/wayland/config/eww/scripts/home/shortcuts/development/router-netgear-r8000 b/wayland/config/eww/scripts/home/shortcuts/development/router-netgear-r8000 new file mode 100755 index 0000000..3bf761b --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/router-netgear-r8000 @@ -0,0 +1,3 @@ +#!/bin/bash + +alacritty -T ' router-netgear-r8000' -e ssh root@router-netgear-r8000 diff --git a/wayland/config/eww/scripts/home/shortcuts/development/server-asus-n705fd-debian b/wayland/config/eww/scripts/home/shortcuts/development/server-asus-n705fd-debian new file mode 100755 index 0000000..9e1cf76 --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/server-asus-n705fd-debian @@ -0,0 +1,6 @@ +#!/bin/bash + +alacritty -T ' server-asus-n705fd-debian' -e bash -c '\ +eval $(ssh-agent) &> /dev/null; \ +ssh-add ~/.ssh/id_ed25519 &> /dev/null; \ +ssh -A pogmom@server-asus-n705fd-debian' diff --git a/wayland/config/eww/scripts/home/shortcuts/development/server-dell-7050sff-debian b/wayland/config/eww/scripts/home/shortcuts/development/server-dell-7050sff-debian new file mode 100755 index 0000000..b82f567 --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/server-dell-7050sff-debian @@ -0,0 +1,6 @@ +#!/bin/bash + +alacritty -T ' server-dell-7050sff-debian' -e bash -c '\ +eval $(ssh-agent) &> /dev/null; \ +ssh-add ~/.ssh/id_ed25519 &> /dev/null; \ +ssh -A pogmom@server-dell-7050sff-debian' diff --git a/wayland/config/eww/scripts/home/shortcuts/development/server-hp-y2z63av b/wayland/config/eww/scripts/home/shortcuts/development/server-hp-y2z63av new file mode 100755 index 0000000..993d05d --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/server-hp-y2z63av @@ -0,0 +1,6 @@ +#!/bin/bash + +alacritty -T ' server-hp-y2z63av' -e bash -c '\ +eval $(ssh-agent) &> /dev/null; \ +ssh-add ~/.ssh/id_ed25519 &> /dev/null; \ +ssh -At pogmom@server-hp-y2z63av' diff --git a/wayland/config/eww/scripts/home/shortcuts/development/server-nintendo-rvl101 b/wayland/config/eww/scripts/home/shortcuts/development/server-nintendo-rvl101 new file mode 100755 index 0000000..a8c8966 --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/development/server-nintendo-rvl101 @@ -0,0 +1,6 @@ +#!/bin/bash + +alacritty -T ' server-nintendo-rvl101' -e bash -c '\ +eval $(ssh-agent) &> /dev/null; \ +ssh-add ~/.ssh/id_ed25519 &> /dev/null; \ +ssh -A pogmommy@server-nintendo-rvl101' diff --git a/wayland/config/eww/scripts/home/shortcuts/work/2nd_monitor b/wayland/config/eww/scripts/home/shortcuts/work/2nd_monitor new file mode 100755 index 0000000..b5fb24c --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/work/2nd_monitor @@ -0,0 +1,19 @@ +#!/bin/bash + +swaymsg workspace number '39:' +connected_displays=`swaymsg -rt get_outputs | jq .[].name` +if echo "${connected_displays}" | grep -q 'DP-7';then + swaymsg move workspace to output DP-7 +elif echo "${connected_displays}" | grep -q 'DP-6';then + swaymsg move workspace to output DP-6 +elif echo "${connected_displays}" | grep -q 'HDMI-A-1';then + swaymsg move workspace to output HDMI-A-1 +fi + +librewolf-profile Work 'https://library.lanecc.edu/' \ +'https://inside.lanecc.edu/sites/default/files/pg/map_2024_ltr.pdf' \ +'https://lanecc.libcal.com/allspaces' \ +'https://library.lanecc.edu/study-rooms#maps' \ +'https://my.livechatinc.com/engage/traffic' + +swaymsg move window to workspace number '39:' diff --git a/wayland/config/eww/scripts/home/shortcuts/work/lanecc_links b/wayland/config/eww/scripts/home/shortcuts/work/lanecc_links new file mode 100755 index 0000000..c02fad1 --- /dev/null +++ b/wayland/config/eww/scripts/home/shortcuts/work/lanecc_links @@ -0,0 +1,11 @@ +#!/bin/bash + +#sp-profiles Work + +librewolf-profile Work 'https://app.slack.com/client/' \ +'https://mail.google.com/mail/u/0/#inbox' \ +'https://na01.alma.exlibrisgroup.com/ng/?institute=01ALLIANCE_LANECC&auth=local' \ +'https://calendar.google.com/calendar/u/0/r' \ +'https://25live.collegenet.com/pro/lanecc#!/home/calendar' \ +'https://10.16.0.209:9192/admin' \ +'https://drive.google.com' diff --git a/wayland/config/eww/scripts/home/weather b/wayland/config/eww/scripts/home/weather new file mode 100755 index 0000000..e13fac2 --- /dev/null +++ b/wayland/config/eww/scripts/home/weather @@ -0,0 +1,45 @@ +#!/bin/bash + +wttr_cache="${HOME}/.cache/wttr.json" + +if [[ ! $(find "${wttr_cache}" -cmin -60 -print 2>/dev/null) ]]; then + if ! ping -w 15 -c 1 wttr.in;then + exit + fi + wttr_json=$(curl --silent wttr.in/Eugene?format=j1) + if [ "" != "${wttr_json}" ]; then + echo "${wttr_json}" | tee "${wttr_cache}" + fi +fi + +condition="$(jq -r '.current_condition[0].weatherDesc[0].value' ${wttr_cache})" +condition_code="$(jq -r '.current_condition[0].weatherCode' ${wttr_cache})" +current_temp="$(jq -r '.current_condition[0].temp_F' ${wttr_cache})" +feels_temp="$(jq -r '.current_condition[0].FeelsLikeF' ${wttr_cache})" +min_temp="$(jq -r '.weather[0].mintempF' ${wttr_cache})" +max_temp="$(jq -r '.weather[0].maxtempF' ${wttr_cache})" +humidity="$(jq -r '.current_condition[0].humidity' ${wttr_cache})" +updated="$(date -r ${wttr_cache} '+%Y-%m-%d, %H:%M')" + +case "${condition_code}" in + 113) + "" + ;; + 116|119|122|143) + condition_icon="" + ;; + 179|227|230) + condition_icon="" + ;; + 248|260) + condition_icon="▒" + ;; + 176|182|185|200|263|266|281|284|293|296|299|302|305|308|311) + condition_icon="" + ;; + 386) + condition_icon="" + ;; +esac + +jq -n --arg condition "${condition}" --arg current_temp "${current_temp}" --arg feels_temp "${feels_temp}" --arg min_temp "${min_temp}" --arg max_temp "${max_temp}" --arg humidity "${humidity}" --arg icon "${condition_icon}" --arg updated "${updated}" '{condition: $condition,current_temp: $current_temp,feels_temp: $feels_temp,min_temp: $min_temp,max_temp: $max_temp,humidity: $humidity,icon: $icon,updated: $updated}' diff --git a/wayland/config/eww/scripts/home/weather-icon b/wayland/config/eww/scripts/home/weather-icon new file mode 100755 index 0000000..9320a34 --- /dev/null +++ b/wayland/config/eww/scripts/home/weather-icon @@ -0,0 +1,49 @@ +#!/bin/bash + +wttr_cache="${HOME}/.cache/wttr.json" +#jq -r '.current_condition[0].weatherCode' ${wttr_cache} +jq -r '.current_condition[0].weatherCode' ${wttr_cache} +condition_code="$(jq -r '.current_condition[0].weatherCode' ${wttr_cache})" + +case "${condition_code}" in + 113) + #Sunny + echo "" + ;; + 116|119|122|143) + #Partly cloudy + #Cloudy + #Overcast + #Mist + echo "" + ;; + 179|227|230) + #Patchy snow possible + #Blowing snow + #Blizzard + echo "" + ;; + 248|260) + #Fog + #Freezing fog + echo "▒" + ;; + 176|182|185|200|263|266|281|284|293|296|299|302|305|308|311) + #Patchy rain possible + #Patchy sleet possible + #Patchy freezing drizzle possible + #Thundery outbreaks possible + #Patchy light drizzle + #Light drizzle + #Freezing drizzle + #Heavy freezing drizzle + #Patchy light rain + #Light rain + #Moderate rain at times + #Moderate rain + #Heavy rain at times + #Heavy rain + #Light freezing rain + echo "" + ;; +esac diff --git a/wayland/config/eww/style/bar.scss b/wayland/config/eww/style/bar.scss new file mode 100644 index 0000000..aba7a1b --- /dev/null +++ b/wayland/config/eww/style/bar.scss @@ -0,0 +1,115 @@ +$bar-reveal-children-bg-color: rgba($color0, 0.2); +$transition-time: 0.3s; + +.bar.horizontal { + font-size: 1.05em; + padding: 6px; + margin: 4px 10px; + background-color: rgba(mix($bar-bg-color, $color0, 65%), 0.4); +// background-color: rgba($bar-bg-color, 0.2); + border-radius: $bar-module-border-radius; + + .leftgroup, + .centergroup, + .rightgroup { +// .revealer-on-hover { +// border: 2px solid $bar-bg-color; +// border-radius: $bar-module-border-radius; +// } + +// .revealer-on-hover>widget>box>box>*, +// .revealer-on-hover>widget>box>box>button { +// color: $color0; +// background-color: $bar-bg-color; +// border-radius: $bar-module-border-radius - 4; +// &:hover { +// } +// } +// .reveal_children { +// &>*, +// widget>image { +// &:not(:last-child) { +// border-right: 2px solid $bar-bg-color; +// } +// color: $bar-bg-color; +// } +// } + +// .revealer-on-hover.true { +// border-radius: $bar-module-border-radius; +// &>widget>box>box>* { +// background-color: $bar-bg-color; +// } +// } +// .reveal_children { +// border-radius: 0px $bar-module-border-radius $bar-module-border-radius 0px; +// } + } + + + @import "./bar/power.scss"; + @import "./bar/workspaces.scss"; + + @import "./bar/scratchpad.scss"; + + @import "./bar/charts.scss"; + +// &>box>button, +// &>box>label, +// .bar-module>button, +// .bar-module>label, +// .revealer-on-hover>widget>box>box>*, +/* .reveal_children>widget>image, + .reveal_children:not(.tray)>* { + padding: 0px 5px; + min-width: $bar-module-width; + transition: all 0.3s; + &:hover { + color: $bar-hover-fg-color; + text-shadow: $bar-module-hover-shadow; + } + } + .tray>widget>image { + padding: 3px 10px; + min-width: $bar-module-width; + } + .tray>widget, + .scratchpad>button { + image{ +// opacity: 0.5; + transition: all 0.3s; + border-radius: $bar-module-border-radius; + } + &:hover,&:hover image { + opacity: 1; + } + }*/ + + @import "./bar/window_title.scss"; + @import "./bar/idle-inhibitor.scss"; + @import "./bar/volume.scss"; + @import "./bar/networking.scss"; + @import "./bar/bluetooth.scss"; +// @import "./bar/battery.scss"; +// @import "./bar/disk.scss"; +// @import "./bar/memory.scss"; + @import "./bar/sys.scss"; + @import "./bar/clock.scss"; + @import "./bar/tray.scss"; + @import "./bar/notification-center.scss"; + +/* .chevron box { + border: 2px solid transparent; + }*/ +/* .inactive { + opacity: 0.5; + }*/ + + // HOTFIXES + +/* .scratchpad .reveal_children>*:last-child, + .tray_tab>widget>box>box, + .tray_tab .reveal_children>widget:last-child>image { + margin-right: -5px; + }*/ +} diff --git a/wayland/config/eww/style/bar/battery.scss b/wayland/config/eww/style/bar/battery.scss new file mode 100644 index 0000000..07bbdff --- /dev/null +++ b/wayland/config/eww/style/bar/battery.scss @@ -0,0 +1,6 @@ +.battery { + margin: 0px 5px; + $module-color: $color3; +// $module-color: mix($color9, $color0, 75%); + @import "./styles/revealer.scss"; +} diff --git a/wayland/config/eww/style/bar/bluetooth.scss b/wayland/config/eww/style/bar/bluetooth.scss new file mode 100644 index 0000000..6305a1c --- /dev/null +++ b/wayland/config/eww/style/bar/bluetooth.scss @@ -0,0 +1,5 @@ +.bluetooth { + margin: 0px 5px; + $module-color: mix($color4,$color0,75%); + @import "./styles/revealer.scss"; +} diff --git a/wayland/config/eww/style/bar/charts.scss b/wayland/config/eww/style/bar/charts.scss new file mode 100644 index 0000000..52b7f97 --- /dev/null +++ b/wayland/config/eww/style/bar/charts.scss @@ -0,0 +1,17 @@ +scale trough, +progressbar>trough { + background-color: $color9; + min-width: 50px; + min-height: 10px; + border-radius: 4px; +} +scale trough highlight, +progressbar>trough>progress { + background-color: $color2; + border-radius: 4px; + min-height: 10px; +} +circular-progress { + color: $color9; + background-color: $color2; +} diff --git a/wayland/config/eww/style/bar/clock.scss b/wayland/config/eww/style/bar/clock.scss new file mode 100644 index 0000000..3970f38 --- /dev/null +++ b/wayland/config/eww/style/bar/clock.scss @@ -0,0 +1,7 @@ +.datetime { + font-weight: bold; + color: $bar-bg-color; + padding: 0px 10px; + border-radius: $bar-module-border-radius; +// margin-left: 10px; +} diff --git a/wayland/config/eww/style/bar/disk.scss b/wayland/config/eww/style/bar/disk.scss new file mode 100644 index 0000000..ea4dabd --- /dev/null +++ b/wayland/config/eww/style/bar/disk.scss @@ -0,0 +1,3 @@ +.sysdisk { + margin: 0px 10px; +} diff --git a/wayland/config/eww/style/bar/idle-inhibitor.scss b/wayland/config/eww/style/bar/idle-inhibitor.scss new file mode 100644 index 0000000..f9e8f27 --- /dev/null +++ b/wayland/config/eww/style/bar/idle-inhibitor.scss @@ -0,0 +1,10 @@ +.idle-inhibitor { + $module-bg-color: $color7; + $module-fg-color: $bar-module-fg-color; + + margin: 0px 5px; + @import "./styles/button.scss"; + &.inactive { + opacity: 0.5; + } +} diff --git a/wayland/config/eww/style/bar/memory.scss b/wayland/config/eww/style/bar/memory.scss new file mode 100644 index 0000000..45f1587 --- /dev/null +++ b/wayland/config/eww/style/bar/memory.scss @@ -0,0 +1,5 @@ +.sysmem { + margin: 0px 5px; + $module-color: mix($color0,$color2,25%); + @import "./styles/revealer.scss" +} diff --git a/wayland/config/eww/style/bar/networking.scss b/wayland/config/eww/style/bar/networking.scss new file mode 100644 index 0000000..71f1cb6 --- /dev/null +++ b/wayland/config/eww/style/bar/networking.scss @@ -0,0 +1,11 @@ +.networks { + margin: 0px 5px; + $module-color: mix($color14,$color0,75%); + @import "./styles/revealer.scss"; +} + +.vpn { + margin: 0px 5px; + $module-color: mix($color6,$color0,75%); + @import "./styles/revealer.scss"; +} diff --git a/wayland/config/eww/style/bar/notification-center.scss b/wayland/config/eww/style/bar/notification-center.scss new file mode 100644 index 0000000..841e646 --- /dev/null +++ b/wayland/config/eww/style/bar/notification-center.scss @@ -0,0 +1,10 @@ +.notification-center { + $module-bg-color: rgba($bar-bg-color,0.5); + $module-fg-color: $bar-fg-color; + + margin: 0px 5px; + @import "./styles/button.scss"; + &.inactive { + opacity: 0.5; + } +} diff --git a/wayland/config/eww/style/bar/power.scss b/wayland/config/eww/style/bar/power.scss new file mode 100644 index 0000000..33e9c2b --- /dev/null +++ b/wayland/config/eww/style/bar/power.scss @@ -0,0 +1,5 @@ +.powermenu { + margin: 0px 5px; + $module-color: mix($color0, $color5, 50%); + @import "./styles/revealer.scss" +} diff --git a/wayland/config/eww/style/bar/scratchpad.scss b/wayland/config/eww/style/bar/scratchpad.scss new file mode 100644 index 0000000..2d285e0 --- /dev/null +++ b/wayland/config/eww/style/bar/scratchpad.scss @@ -0,0 +1,5 @@ +.scratchpad { + margin: 0px 5px; + $module-color: $color15; + @import "./styles/revealer.scss"; +} diff --git a/wayland/config/eww/style/bar/styles/button.scss b/wayland/config/eww/style/bar/styles/button.scss new file mode 100644 index 0000000..170b1c4 --- /dev/null +++ b/wayland/config/eww/style/bar/styles/button.scss @@ -0,0 +1,11 @@ +button { + border-radius: $bar-module-border-radius; + padding: 0px 10px; + + color: $module-fg-color; + background-color: $module-bg-color; + &:hover { + background-color: rgba($module-bg-color,0.7); + } + transition: all $transition-time; +} diff --git a/wayland/config/eww/style/bar/styles/revealer.scss b/wayland/config/eww/style/bar/styles/revealer.scss new file mode 100644 index 0000000..ece376c --- /dev/null +++ b/wayland/config/eww/style/bar/styles/revealer.scss @@ -0,0 +1,53 @@ +&.revealer-on-hover { + border-radius: $bar-module-border-radius; +} + +.reveal-children>widget>image { + padding: 0px 7px; +} +.revealer-preview, +.reveal-children>* { + padding: 0px 7px; + min-width: $bar-module-width; + transition: all 0.3s; + background-color: rgba($bar-bg-color,0.5); + &.scratchpad-item.inactive>image { + opacity: 0.5; + } + &:hover { + background: linear-gradient(rgba($bar-bg-color,0.5) 15%, rgba($module-color,0.5)); + } + &.active { + background: mix(rgba($bar-bg-color,0.5), rgba($module-color,0.5),25%); + &:hover { + background: linear-gradient(mix(rgba($bar-bg-color,0.5), rgba($module-color,0.5)) 15%, rgba($bar-bg-color,0.5)); + } + & image { + opacity: 1; + } + } + &.inactive { + background-color: rgba($bar-bg-color,0.3); + color: rgba($bar-fg-color,0.5); + &:hover { + background: linear-gradient(rgba($bar-bg-color,0.3) 15%, rgba($module-color,0.3)); + } +// & image { +// opacity: 0.3; +// } + } +} +.revealer-preview { + border-radius: $bar-module-border-radius; +} +&.true .revealer-preview { + border-radius: $bar-module-border-radius 0 0 $bar-module-border-radius; +} +.reveal-children { + >* { + border-left: 2px solid $module-color; + &:last-child { + border-radius: 0 $bar-module-border-radius $bar-module-border-radius 0; + } + } +} diff --git a/wayland/config/eww/style/bar/sys.scss b/wayland/config/eww/style/bar/sys.scss new file mode 100644 index 0000000..8b2b4e6 --- /dev/null +++ b/wayland/config/eww/style/bar/sys.scss @@ -0,0 +1,15 @@ +.sysmem { + margin: 0px 5px; + $module-color: mix($color0,$color2,25%); + @import "./styles/revealer.scss" +} +.sysdisk { + margin: 0px 5px; + $module-color: mix($color0,$color7,45%); + @import "./styles/revealer.scss" +} +.battery { + margin: 0px 5px; + $module-color: mix($color0,$color3,20%); + @import "./styles/revealer.scss" +} diff --git a/wayland/config/eww/style/bar/tray.scss b/wayland/config/eww/style/bar/tray.scss new file mode 100644 index 0000000..1d760eb --- /dev/null +++ b/wayland/config/eww/style/bar/tray.scss @@ -0,0 +1,5 @@ +.tray { + margin: 0px 5px; + $module-color: $color15; + @import "./styles/revealer.scss" +} diff --git a/wayland/config/eww/style/bar/volume.scss b/wayland/config/eww/style/bar/volume.scss new file mode 100644 index 0000000..6f4e7f7 --- /dev/null +++ b/wayland/config/eww/style/bar/volume.scss @@ -0,0 +1,6 @@ +.volume { + margin: 0px 5px; + $module-color: $bar-bg-color; +// $module-color: mix($color9, $color0, 75%); + @import "./styles/revealer.scss"; +} diff --git a/wayland/config/eww/style/bar/window_title.scss b/wayland/config/eww/style/bar/window_title.scss new file mode 100644 index 0000000..859f6a6 --- /dev/null +++ b/wayland/config/eww/style/bar/window_title.scss @@ -0,0 +1,6 @@ +.active_window { + font-weight: bold; + color: $bar-bg-color; + padding: 0px 15px; + border-radius: $bar-module-border-radius; +} diff --git a/wayland/config/eww/style/bar/workspaces.scss b/wayland/config/eww/style/bar/workspaces.scss new file mode 100644 index 0000000..d01626b --- /dev/null +++ b/wayland/config/eww/style/bar/workspaces.scss @@ -0,0 +1,154 @@ +$personal-color: $bar-bg-color; +$development-color: mix($color9, $color12); +$Housing-color: mix($color5, $color3); +$work-color: mix($color5, $color4, 30%); + +.profile, +.workspaces { + border-width: 2px; + border-style: solid; + font-weight: bold; + &.profile-Penelope { + border-color: $personal-color; + } + &.profile-Development { + border-color: $development-color; + } + &.profile-Housing { + border-color: $Housing-color; + } + &.profile-Work { + border-color: $work-color; + } +} +.profile { + margin-left: 5px; + border-right: 0px solid transparent; + border-radius: $bar-module-border-radius 0px 0px $bar-module-border-radius; + color: $bar-bg-color; + padding: 0px 10px; + transition: 0.3s all; + &.profile-Development, + &.profile-Housing, + &.profile-Work { + color: $bar-module-fg-color; + } + &.profile-Penelope { + background-color: transparent; + } + &.profile-Development { + background-color: $development-color; + } + &.profile-Housing { + background-color: $Housing-color; + } + &.profile-Work { + background-color: $work-color; + } +} + +.workspaces { + margin-right: 5px; + box.ws-center { + >box>button { + background-color: $bar-bg-color; + color: $bar-module-fg-color; + border-radius: 0px $bar-module-bg-border-radius $bar-module-bg-border-radius 0px; + &.profile-Penelope { + background-color: $personal-color; + border-color: $personal-color; + } + &.profile-Development { + background-color: $development-color; + border-color: $development-color; + } + &.profile-Housing { + background-color: $Housing-color; + border-color: $Housing-color; + } + &.profile-Work { + background-color: $work-color; + border-color: $work-color; + } + } + &.true>box>button { + border-radius: 0px; + &.last-workspace { + border-radius: 0px $bar-module-bg-border-radius $bar-module-bg-border-radius 0px; + } + } + } + border-left: 0px solid transparent; + border-radius: 0px $bar-module-border-radius $bar-module-border-radius 0px; + revealer { + + &.ws-left { + >box>box>button { + border-left: 2px solid $bar-bg-color; + } + } + &.ws-right { + >box>box { + >button { + border-right: 2px solid $bar-bg-color; + } + &:last-child { + &>button { + border-right: 0px solid transparent; + border-radius: 0px $bar-module-border-radius $bar-module-border-radius 0px; + } + } + } + } + &>box>box>button { + color: $bar-bg-color; + &.profile-Penelope { + color: $personal-color; + border-color: $personal-color; + } + &.profile-Development { + color: $development-color; + border-color: $development-color; + } + &.profile-Housing { + color: $Housing-color; + border-color: $Housing-color; + } + &.profile-Work { + color: $work-color; + border-color: $work-color; + } + &:hover { + background-color: rgba($bar-bg-color,0.5); + &.profile-Penelope { + background-color: rgba($personal-color,0.5); + } + &.profile-Development { + background-color: rgba($development-color,0.5); + } + &.profile-Housing { + background-color: rgba($Housing-color,0.5); + } + &.profile-Work { + background-color: rgba($work-color,0.5); + } + } + } + } + button { + min-width: 35px; + padding: 1px 2px; + transition: all 0.3s; + label { + padding: 2px 6px; + margin-right: -10px; + } + .workspace-number { + margin: 0px; + margin-left: -2px; + margin-top: -6px; + padding: 0px; + font-size: 0.6em; + } + } +} diff --git a/wayland/config/eww/style/colors.scss b/wayland/config/eww/style/colors.scss new file mode 120000 index 0000000..23ef38b --- /dev/null +++ b/wayland/config/eww/style/colors.scss @@ -0,0 +1 @@ +/home/pogmommy/.dotfiles/graphical/config/de-vars/colors/active/colors.scss \ No newline at end of file diff --git a/wayland/config/eww/variables/bar/bluetooth.yuck b/wayland/config/eww/variables/bar/bluetooth.yuck new file mode 100644 index 0000000..d62fd85 --- /dev/null +++ b/wayland/config/eww/variables/bar/bluetooth.yuck @@ -0,0 +1,2 @@ +(deflisten bluetooth_status :initial '[{}]' + "scripts/bar/bluetooth") diff --git a/wayland/config/eww/variables/bar/music.yuck b/wayland/config/eww/variables/bar/music.yuck new file mode 100644 index 0000000..b0c1966 --- /dev/null +++ b/wayland/config/eww/variables/bar/music.yuck @@ -0,0 +1,2 @@ +(deflisten nowplaying :initial '' + "scripts/bar/nowplaying") diff --git a/wayland/config/eww/variables/bar/network-manager.yuck b/wayland/config/eww/variables/bar/network-manager.yuck new file mode 100644 index 0000000..1e23026 --- /dev/null +++ b/wayland/config/eww/variables/bar/network-manager.yuck @@ -0,0 +1,3 @@ +(deflisten network_manager + :initial '{ "devices": [], "vpns": [] }' + "scripts/bar/network-manager") diff --git a/wayland/config/eww/variables/bar/network.yuck b/wayland/config/eww/variables/bar/network.yuck new file mode 100644 index 0000000..dcfa90a --- /dev/null +++ b/wayland/config/eww/variables/bar/network.yuck @@ -0,0 +1,2 @@ +(deflisten network_status :initial '{ "online": false, "wifi": "false", "wired": "false", "vpn": "false", "proton": "false", "proton_sc": "false", "homevpn": "false", "homevpn_full": "false" }' + "scripts/bar/networking") diff --git a/wayland/config/eww/variables/bar/profile-info.yuck b/wayland/config/eww/variables/bar/profile-info.yuck new file mode 100644 index 0000000..4378e55 --- /dev/null +++ b/wayland/config/eww/variables/bar/profile-info.yuck @@ -0,0 +1,2 @@ +(deflisten profile_info :initial '{"icon":"","name":"","program_args":{},"scripts":[]}' + "sdu profile get -m") diff --git a/wayland/config/eww/variables/bar/sway-info.yuck b/wayland/config/eww/variables/bar/sway-info.yuck new file mode 100644 index 0000000..a17d016 --- /dev/null +++ b/wayland/config/eww/variables/bar/sway-info.yuck @@ -0,0 +1,2 @@ +(deflisten sway_info :initial '{"scratchpad_info": [{"icon":"/usr/share/icons/breeze-dark/mimetypes/32/unknown.svg","name":"","title":"","visible":false,"window_id":0}],"window_info":{"title":"","window_count":0},"workspace_info":[],"workspace_profile":{"icon":"","name":"","scripts":[]}}' + "sdu sway get -m") diff --git a/wayland/config/eww/volume.ogg b/wayland/config/eww/volume.ogg new file mode 100644 index 0000000000000000000000000000000000000000..8b3b796d5b29f4607c8e72af97c3bbf01c0312c0 GIT binary patch literal 5778 zcmeG=d05lOwiDI_5F-Q#h}?uV!C(mlByKl^MTj602qY*~0#OjP62yv1UqrxwKp_T- zY?m!a!cwt>3bqwgc4S{%dKEX&TK8J3ZS9+1g4XNpcl*At-}~<#hGFI`bAEG{nKJ}! z+ZF;ez&vEMFnp1rQS&#KP*$kD9|`$!i3mc&y8-zFAwkW28Wn^{z6C@Q1!tuPQ(qZ* z|Mni_YpR!`K@M)*?$~8P!fk{dar`iq0)jum#o5K#dAT!N~ZJu>z=*VbM)r>qH(*9HP&a&UYBqJ_ztzm^$V$SSA`-UQDhn62hg_ z+adrF+$LC?kMnQF4K!O`9JLL4N(nZ08+G*w2@T{xNQw;KE12G!G`%;4SCqc-bPDfu z`o>G?kuTDt@EP;%rJ>Yg>7Rf{?>=e3#UBC|zHtKLb^sVu%dP~=K4=ZL)40$r zJaP4OV&F711!9r^42M+l0yjb|+gi9?gm%q~Qkg{rm&I42y$sZvAcMH_HlcW=_}N9e zVey>`Ij&^9Gc&Zrp-o;?qVnL5A@f_%m*oEAT@}YiiW7(Y4T@#zQL<5qZlin*;>_nt z4ZF>wAYa^Av9A0w7s~QRif8NEaB!3hV5o?LZtoD3rc&vijORllX$@OK)4{ur5^)jHsD5kisWS>Xl@OEXsbj86l8ho@KludAigz9N*mii)lF@hC@Ds~mBRkke zU7SK(S93x+;d^)TK1;g#WqRbLr0dfu*Qawfn`OKoSZ^~2z@$l2<)oCKP38(EQ+TcO38PM%>(fc^WDb%d*7V$4eiE(UGpB--d($J=#$RH~lh`L0Zp$o|A1}Wr zuhM%jb7Hej6lI+dXU&OoNtuOlnZ=5>svZ4J_uK!pz0I7pLR;8i=J*J0-^rW~s-+jq zrc;!_XX-t!9)$+o<74)&0|4mAGgzlOM}pZ-lWez1wi73G^?%M7NS&kwj?9 z>0j%iB3iH(Z1c-NMWdmpQQEvNsHMZzhe3lk$zO**&=u^43VKHugBHjL4gBkx{=33| zE%2unfFX`DgukZDO5#!tkp~JKxy6tW{2$Xq(Y(j2_E`iN&u~pwEiBd@f0G^Xf_+Nc zXSHf!Ehdk)uv~ZeaNOGp5fG9gp&T;%A%wZkH*pO=Vw77G$D8(Ot zoCp9BN*9QLaX;hjH&y!?0pKBt;lcXCPa;48k$_jO3xGtBZ1u;>{NJ(fDMX1#034~} zn(nq7(8!JEF(efIEj$pYxzB=uLm|u>$k#2V*_rB+XfbvGs|{v$;|9iP!M8mMWpP!# z36yo?-uVJp1Z7&&;BZm-TyiaD_!-$EI_aY9XC7* z?<7}|vS9tB=ue;wJo6651%_}UKfA>(oXe~t71t`-mqA6tsw)Z>cd^B9(X>DuJcZ$D z9BEcOn~AKTP&Da7&T(2GMVg5boC4l18VD07a=Jhuii2|P zO%%;g_1wHdq4=)7Y3Trf1=QsN0Z(TJnVq5lFw=nogbwtIzPeNB#et_E1DwSvYaoWP zkR8RM$_%27n0l2_0Zcz)44dspmgzAa?F!hQezF?23(HAX$krwnNLX@04Vz8Y2BIY% z@Ry5D&uGvBPhqteE#(i==WLlQ>TGGE5mAPR<&7K{jnp_&2^H4K>sft85a%F^fqbRM z*ef8;5EdMJAWMyu&AeNh2`DtCb9_LtNqmpj0^ zb-ScSjVWF=Ja7Hv@_8EzBcV4CL)i@=K9VaGdT=%l4V8}6y9&kqbFGN|r<0>xs~#Y0@QD@zG+a4Yc?RvW}Mcj4o6d`Kl55o&y+8~IM+y5`A<=mw>Ib+!b- zH7KX7rEHgOTnHQ$r#W}Oz(+Sw=OT_7o%_iu#0fIT!&tD1$&q(Qz`(%>vU8j!rHMn@ zfU(*GFzoQ24(1%wsA`Ovl}P27Hu#2wq1TN>7!p_P8hj!QGeR2j601S02%fOKgg!Hm zenY5Cld$`t1VVu7>|_&a2@+BXv*d3HGO3iUl0~aZWcUCu;7yw$Hb@!QVHaf%@d#^xc)o=DuTJ%!Swd^V+E|=0FO76>Lz3W z6dJ95a3XUwTJ;|fEjMSCJV5^Afn1AgO77h^ai_U1_w-vA{M(|Qx-2J@8h)@m6SL#P zi%aO?e_P$N%)BH#aqZCLT4Ah%XZ9iuaA4)pGQE`TWKLr?x~emba(3nG>u0S7b$`J7 zOEN>geG(h>h$^u)K5_ci=(%!B_xxk|QD{Ihz0hsC_l{YmQ={3pPF_EIIGJO0y->g4 z65O90U5;w|_+`k2%NIVlrgi(8K#1Sc(Sg?7B1ZjaJr(<#`<>dqulm$=a@X+jsY6dR zp~zFWsUj`mV%^uj5AA!jZWkFuYXuzm{z2gQgwex|-(S1AaA|wInNjMNB0{52w)qkMF{M2C0gEL(DME*stOVf}NDtz*4&=dvc_l~z3g7B4q( z6KswaqwR~Z6V_X(VU2bC`iOY%6N|h@x0p<3**|w%%-JwXTG627>=H*}-APj#cSnf3 zztfU#-T9&}YQfp;(ypgX>%M3`FmWdt25-(!0+MSNIaip-uL)Kw# z+zZ?zVVYBQOqoI1iamN;SfBmRaujFXVr<7bd+l9l%`4jq4xjz}>-y-dHTto_e{c+6 zfAeEgF8LLuqHmZN*3aTeeU$9Ri7;3oov}IMPnn(R2%vNX;PG5M1*?@f)dE9U7Z1SED?A?`?F0-a3bp3b0pr3M%(Je2Q;l4Uthy+R+H{%vC(6Q+AJ^q; zZ0+)x!=QwX$fZYd#kp$@I8aO_)oUE zf4S?Q?UTokEQmPy3IjfR_=P^mf7U2l;C>~xYivU>3Owc1cL)IZu(0&|s}a|W0%7AdvK5d7MkYXb>?^Kw) zJQuv;_#|tY)8>(V#m+kAv-H;|!=Bz>Fy!#GFhNg*(!uWUz`*bPrSj"$WOBSOCK" + ;; esac diff --git a/wayland/config/sway/scripts/volume.sh b/wayland/config/sway/scripts/volume.sh index ca2b826..158f736 100755 --- a/wayland/config/sway/scripts/volume.sh +++ b/wayland/config/sway/scripts/volume.sh @@ -1,19 +1,27 @@ #!/bin/bash operation="${1}" +WOBSOCK="$XDG_RUNTIME_DIR/wob.sock" +source "${HOME}/.config/de-vars/colors/active/colors.sh" +opacity="DD" case "$operation" in - up) - wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ - ;;& - down) - wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- - ;;& - mute) - pactl set-sink-mute @DEFAULT_SINK@ toggle - ;;& -# up|down|mute) -# paplay "$HOME/.config/sway/assets/sounds/volume.ogg" -# ;; +up) + wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ + ;;& +down) + wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- + ;;& +mute) + pactl set-sink-mute @DEFAULT_SINK@ toggle + ;;& +up | down | mute) + if [ "$(pactl get-sink-mute @DEFAULT_SINK@)" = "Mute: yes" ]; then + vol_lvl="0" + else + vol_lvl="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g')" + fi + echo "${vol_lvl}" "${de_color_0}${opacity}" "${de_color_13}${opacity}" "${de_color_10}${opacity}" >"$WOBSOCK" + paplay "$HOME/.config/sway/assets/sounds/volume.ogg" + ;; esac - diff --git a/wayland/config/wofi/config b/wayland/config/wofi/config index 566fe5a..ceaf51d 100644 --- a/wayland/config/wofi/config +++ b/wayland/config/wofi/config @@ -3,7 +3,8 @@ height=400 #lines=5 hide_scroll=true #colors=./wofi-colors -colors=/home/pogmommy/.config/wofi/wofi-colors +#colors=/home/pogmommy/.config/wofi/wofi-colors +colors=/home/pogmommy/.config/de-vars/colors/active/colors #key_expand=Right dynamic_lines=true #line_wrap=char