From cd6201245d716e37e4c16426bab1c26942688a66 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 13 Sep 2023 15:51:13 -0400 Subject: [PATCH] refactor: remove unused eww stuff --- config/eww/closer/README.md | 1 - config/eww/closer/closer.yuck | 60 --- config/eww/colors.scss | 32 -- config/eww/eww.scss | 8 - config/eww/eww.yuck | 5 - config/eww/quick-settings/quick-settings.scss | 190 --------- config/eww/quick-settings/quick-settings.yuck | 360 ------------------ config/eww/scripts/bluetooth.sh | 35 -- config/eww/scripts/brightness.sh | 46 --- config/eww/scripts/close-opened.sh | 20 - config/eww/scripts/mic.sh | 30 -- config/eww/scripts/network.sh | 53 --- config/eww/scripts/on-release.sh | 22 -- config/eww/scripts/open.sh | 7 - config/eww/scripts/run.sh | 22 -- config/eww/scripts/volume.sh | 90 ----- config/eww/variables.yuck | 31 -- nixos/home/dotfiles.nix | 6 - nixos/home/hyprland.nix | 1 - 19 files changed, 1019 deletions(-) delete mode 100644 config/eww/closer/README.md delete mode 100644 config/eww/closer/closer.yuck delete mode 100644 config/eww/colors.scss delete mode 100644 config/eww/eww.scss delete mode 100644 config/eww/eww.yuck delete mode 100644 config/eww/quick-settings/quick-settings.scss delete mode 100644 config/eww/quick-settings/quick-settings.yuck delete mode 100755 config/eww/scripts/bluetooth.sh delete mode 100755 config/eww/scripts/brightness.sh delete mode 100755 config/eww/scripts/close-opened.sh delete mode 100755 config/eww/scripts/mic.sh delete mode 100755 config/eww/scripts/network.sh delete mode 100755 config/eww/scripts/on-release.sh delete mode 100755 config/eww/scripts/open.sh delete mode 100755 config/eww/scripts/run.sh delete mode 100755 config/eww/scripts/volume.sh delete mode 100644 config/eww/variables.yuck diff --git a/config/eww/closer/README.md b/config/eww/closer/README.md deleted file mode 100644 index 50be92f..0000000 --- a/config/eww/closer/README.md +++ /dev/null @@ -1 +0,0 @@ -always open this widget last diff --git a/config/eww/closer/closer.yuck b/config/eww/closer/closer.yuck deleted file mode 100644 index e9cd242..0000000 --- a/config/eww/closer/closer.yuck +++ /dev/null @@ -1,60 +0,0 @@ -(defwidget closer [] - (eventbox :onclick "$EWW_PATH/close-opened.sh && eww close closer; eww update showqs=false") -) -(defwindow closer :monitor 0 - :geometry (geometry :width "100%" - :height "100%") - :stacking "overlay" - :focusable false - (closer :window "") -) - -(defwidget closer-notif [] - (eventbox :onclick "$EWW_PATH/notif-toggle.sh off") -) -(defwindow closer-notif1 :monitor 0 - :geometry (geometry :width "1360px" - :height "1200px") - :stacking "overlay" - :focusable false - :exclusive "ignore" - (closer-notif) -) -(defwindow closer-notif2 :monitor 0 - :geometry (geometry :width "100%" - :height "200px" - :y "1060px") - :stacking "overlay" - :focusable false - :exclusive "ignore" - (closer-notif) -) -(defwindow closer-notif3 :monitor 0 - :geometry (geometry :width "100%" - :height "60px") - :stacking "overlay" - :focusable false - :exclusive "ignore" - (closer-notif) -) -(defwindow closer-notif4 :monitor 0 - :geometry (geometry :width "60px" - :height "100%" - :x "1860px") - :stacking "overlay" - :focusable false - :exclusive "ignore" - (closer-notif) -) - -(defwidget on-release-fix [] - (eventbox :onclick "eww close on-release-fix") -) -(defwindow on-release-fix :monitor 0 - :geometry (geometry :width "100%" - :height "100%" - ) - :stacking "overlay" - :exclusive "ignore" - (on-release-fix) -) diff --git a/config/eww/colors.scss b/config/eww/colors.scss deleted file mode 100644 index d566685..0000000 --- a/config/eww/colors.scss +++ /dev/null @@ -1,32 +0,0 @@ -$darkbg: #0b0d16; -$bg: rgba(40, 42, 54, 0.8); //rgba(69, 71, 90, 0.3); #0d0f18; -$bgfull: rgb(40, 42, 54); -$contrastbg: rgba(189, 147, 249, 0.8); -$bgSecondary: #11131c; -$bgSecondaryAlt: #a5b6cf; -$fg: #a5b6cf; -$fgDim: #a5b6cf; -$watermelon: #dd6777; - -// Aliases -$background: $bg; -$backgroundSecondary: $bgSecondary; -$backgroundSecondaryAlt: $bgSecondaryAlt; -$foreground: $fg; -$foregroundDim: $fgDim; - -$black: #151720; -$dimblack: #1a1c25; -$lightblack: #262831; -$red: #dd6777; -$blue: #86aaec; -$cyan: #93cee9; -$blue-desaturated: #93cee9; -$magenta: #c296eb; -$purple: #c296eb; -$green: #90ceaa; -$aquamarine: #90ceaa; -$yellow: #ecd3a0; -$accent: $blue; -$javacafeMagenta: #c296eb; -$javacafeBlue: #86aaec; diff --git a/config/eww/eww.scss b/config/eww/eww.scss deleted file mode 100644 index 153f70f..0000000 --- a/config/eww/eww.scss +++ /dev/null @@ -1,8 +0,0 @@ -* { - all: unset; -} - -@import "colors.scss"; -@import "date/date.scss"; -@import "playerinfo/playerinfo.scss"; -@import "quick-settings/quick-settings.scss"; diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck deleted file mode 100644 index 6887ba7..0000000 --- a/config/eww/eww.yuck +++ /dev/null @@ -1,5 +0,0 @@ -(include "variables.yuck") -(include "date/date.yuck") -(include "playerinfo/playerinfo.yuck") -(include "closer/closer.yuck") -(include "quick-settings/quick-settings.yuck") diff --git a/config/eww/quick-settings/quick-settings.scss b/config/eww/quick-settings/quick-settings.scss deleted file mode 100644 index 8553908..0000000 --- a/config/eww/quick-settings/quick-settings.scss +++ /dev/null @@ -1,190 +0,0 @@ -.quick-settings-smol { - font-size: 2px; - min-height: 52px; - min-width: 36px; - padding: 0px 0px 0px 0px; - background-color: $bg; - color: rgba(0,0,0,0); - border: 2px solid $contrastbg; - border-bottom: none; - border-top-right-radius: 80px; - border-top-left-radius: 80px; - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; -} - -.quick-settings-logo { - font-size: 24px; - min-height: 36px; - min-width: 36px; - padding: 0px 0px 0px 0px; - background-color: rgba(0,0,0,0); - color: #CBA6F7; - border-radius: 80px; - border: 2px solid rgba(0,0,0,0); - transition: background-color 0.5s ease-in-out; -} - -.quick-settings-logo:hover, .quick-settings-logo:active { - background-color: rgba(127, 132, 156, 0.4); - transition: background-color 0.5s ease-in-out; -} - -.quick-settings { - font-size: 30px; - min-width: 500px; - padding: 0px 0px 0px 0px; - background-color: $bg; - border-top-right-radius: 0px; - border-top-left-radius: 30px; - border-bottom-left-radius: 30px; - border-bottom-right-radius: 30px; - border: 2px solid $contrastbg; -} - -.title { - font-size: 22px; - margin-top: 30px; -} - -.grid-label { - font-size: 30px; - margin-left: 15px; - margin-right: 10px; - min-width: 50px; -} - -.sub-label { - font-size: 14px; - margin-top: -10px; - margin-left: 0px; - margin-bottom: 10px; - padding: 3px; - border: 2px solid $contrastbg; - border-top-right-radius: 20px; - border-top-left-radius: 10px; - border-bottom-left-radius: 10px; - border-bottom-right-radius: 20px; - min-width: 106px; - background: #1b1b1b; -} - -.grid-chev { - margin-left: 0px; - - font-size: 40px; - margin-right: 5px; -} - -.button-grid { - font-size: 10px; - min-height: 160px; - min-width: 470px; - background-color: $bgfull; - border-top: 2px solid $contrastbg; - border-bottom: 2px solid $contrastbg; - border-radius: 15px; - margin-top: 30px; -} - -.button-row { - min-height: 70px; - min-width: 450px; - margin-left: 20px; -} - -.grid-button { - min-height: 65px; - min-width: 70px; - margin: 5px; -} - -.left-part { - background: #1b1b1b; - border-top-left-radius: 15px; - border-bottom-left-radius: 15px; - border-left: 2px solid $contrastbg; - border-top: 2px solid $contrastbg; - border-bottom: 2px solid $contrastbg; - transition: all 0.5s ease-in-out; -} - -.right-part { - background: #1b1b1b; - border-top-right-radius: 30px; - border-bottom-right-radius: 30px; - border-right: 2px solid $contrastbg; - border-top: 2px solid $contrastbg; - border-bottom: 2px solid $contrastbg; - transition: all 0.5s ease-in-out; -} - -.right-part:hover, .right-part:active { - color: $contrastbg; - border: 2px solid $contrastbg; - border-top-left-radius: 7px; - border-bottom-left-radius: 7px; - transition: all 0.5s ease-in-out; -} - -.left-part:hover, .left-part:active { - color: $contrastbg; - border: 2px solid $contrastbg; - border-top-right-radius: 7px; - border-bottom-right-radius: 7px; - transition: all 0.5s ease-in-out; -} - -.player { - margin-top: 6px; - min-height: 220px; - opacity: 0; -} - -.slider-box { - min-height: 100px; - min-width: 470px; - background-color: $bgfull; - border-top: 2px solid $contrastbg; - border-bottom: 2px solid $contrastbg; - border-radius: 15px; - margin-top: 30px; - margin-bottom: 20px; - - .slider-label { - font-size: 30px; - min-width: 30px; - } - - scale { - min-height: 55px; - min-width: 400px; - margin-left: 18px; - margin-right: 20px; - - highlight { - margin: 0px; - background-color: #79659f; - border-radius: 2em; - } - - trough { - background-color: #363847; - border-radius: 2em; - } - - slider { - margin: -4px; - min-width: 20px; - min-height: 20px; - background: #3e4153; - border-radius: 100%; - box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px; - transition: background-color 0.5s ease-in-out; - } - slider:hover { - background-color: #303240; - transition: background-color 0.5s ease-in-out; - } - } -} diff --git a/config/eww/quick-settings/quick-settings.yuck b/config/eww/quick-settings/quick-settings.yuck deleted file mode 100644 index efeaa6b..0000000 --- a/config/eww/quick-settings/quick-settings.yuck +++ /dev/null @@ -1,360 +0,0 @@ -(defvar showqs false) -(defvar showplayer false) - -(defwidget quick-settings-smol [] - (box :class "quick-settings-smol" - :orientation "h" - (label :text "  ") - ) -) -(defwindow quick-settings-smol-reveal - :monitor 0 - :stacking "overlay" - :exclusive "ignore" - :geometry (geometry :x "5px" - :y "10px" - :width "0px" - :height "0px" - :anchor "top right" - ) - (revealer - :transition "crossfade" - :reveal showqs - :duration anim_duration - (quick-settings-smol) - ) -) - -(defvar qs-run-off "false") -(defwidget quick-settings-logo [] - (eventbox :class "quick-settings-logo" - :onclick "$EWW_PATH/run.sh '$EWW_PATH/qs-toggle.sh off' qs-run-off &" - :cursor "pointer" - :onhover "eww update qs-run-off=true" - :onhoverlost "eww update qs-run-off=false" - - (box :class "quick-settings-logo" - :orientation "h" - (label :text "  ") - ) - ) -) -(defwindow quick-settings-logo-reveal - :monitor 0 - :stacking "overlay" - :exclusive "ignore" - :geometry (geometry :x "5px" - :y "10px" - :width "0px" - :height "0px" - :anchor "top right" - ) - (revealer - :transition "crossfade" - :reveal showqs - :duration anim_duration - (quick-settings-logo) - ) -) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defvar expand_player "false") -(defwidget quick-settings [] - (box :orientation "v" - :space-evenly false - (box :class "quick-settings" - :orientation "v" - :space-evenly false - (label :text "Control Center" - :class "title" - :xalign 0.04 - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; Button Grid - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "button-grid" - :orientation "v" - :valign "start" - :width 0 - :height 0 - :halign "center" - :space-evenly false - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; Row ONE - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "button-row" - :orientation "h" - :space-evenly true - :width 0 - :height 0 - :halign "center" - :style "margin-top: 15px; - margin-bottom: 7px" - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "grid-button" - :orientation "h" - :space-evenly false - :width 0 - :height 0 - - (eventbox :class "left-part" - :cursor "pointer" - :onclick "$EWW_PATH/network.sh toggle" - (label :text " ${network_icon} " - :class "grid-label" - ) - ) - (eventbox :class "right-part" - :cursor "pointer" - :onclick "nm-connection-editor &" - - (label :text " " :class "grid-chev") - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "grid-button" - :orientation "h" - :space-evenly false - :width 0 - :height 0 - - (eventbox :class "left-part" - :cursor "pointer" - :onclick "$EWW_PATH/bluetooth.sh toggle" - - (label :text " ${bluetooth_icon} " - :class "grid-label" - ) - ) - (eventbox :class "right-part" - :cursor "pointer" - :onclick "blueberry &" - - (label :text " " :class "grid-chev") - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "grid-button" - :orientation "h" - :space-evenly false - :width 0 - :height 0 - - (eventbox :class "left-part" - :cursor "pointer" - :onclick "$EWW_PATH/network.sh toggle-radio" - - (label :text "${network_radio == 'on' ? '󰀝 ' : '󱡻 '}" - :class "grid-label" - ) - ) - (eventbox :class "right-part" - :cursor "pointer" - :onclick "notify-send 'set this up moron'" - - (label :text " " - :class "grid-chev" - ) - ) - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; SUB ROW - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :orientation "h" - :space-evenly true - :spacing 34 - :width 0 - :height 0 - :halign "center" - - - (label :text "${network_ssid}" - :class "sub-label" - :width 0 - :height 0 - :xalign 0.4 - :limit-width 12 - ) - - (label :text "${bluetooth_dev}" - :class "sub-label" - :width 0 - :height 0 - :xalign 0.4 - :limit-width 12 - ) - - (label :text "" - :class "" - :width 0 - :height 0 - :xalign 0.4 - :limit-width 12 - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; Row TWO - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "button-row" - :orientation "h" - :space-evenly true - :width 0 - :height 0 - :halign "center" - :style "margin-top: 7px; - margin-bottom: 15px;" - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "grid-button" - :orientation "h" - :space-evenly false - :width 0 - :height 0 - - (eventbox :class "left-part" - :cursor "pointer" - :onclick "swayosd --output-volume mute-toggle" - - (label :text " ${volume_icon} " - :class "grid-label" - ) - ) - (eventbox :class "right-part" - :cursor "pointer" - :onclick "pavucontrol &" - - (label :text " " :class "grid-chev") - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "grid-button" - :orientation "h" - :space-evenly false - :width 0 - :height 0 - - (eventbox :class "left-part" - :cursor "pointer" - :onclick "$EWW_PATH/mic.sh toggle-muted" - - (label :text " ${mic_icon} " - :class "grid-label" - ) - ) - (eventbox :class "right-part" - :cursor "pointer" - :onclick "pavucontrol &" - - (label :text " " :class "grid-chev") - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (box :class "grid-button" - :orientation "h" - :space-evenly false - :width 0 - :height 0 - - (eventbox :class "left-part" - :cursor "pointer" - :onclick "$LOCK_PATH/lock.sh &" - - (label :text " 󰌾 " - :class "grid-label" - ) - ) - (eventbox :class "right-part" - :cursor "pointer" - :onclick "$EWW_PATH/open.sh powermenu" - - (label :text " " :class "grid-chev") - ) - ) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ) - ) - (box :class "slider-box" - :orientation "v" - :space-evenly true - :spacing 0 - :width 0 - :height 0 - :halign "center" - - (box :class "slider" - :orientation "h" - :valign "start" - :halign "center" - :width 0 - :height 0 - :space-evenly false - - (label :text "${volume_icon}" :class "slider-label") - - (scale :value volume_value - :onchange "$EWW_PATH/volume.sh set {}" - :min 0 - :max 101 - :height 0 - :width 0 - ) - ) - (box :class "slider" - :orientation "h" - :valign "start" - :halign "center" - :width 0 - :height 0 - :space-evenly false - - (label :text " ${br_icon} " :class "slider-label" :style "margin-left: 6px; - margin-right: -6px") - - (scale :value br - :onchange "$EWW_PATH/brightness.sh set {}" - :min 0 - :max 256 - :height 0 - :width 0 - ) - ) - ) - (centerbox :orientation "h" - :style "margin-bottom: 10px;" - (label) - - (revealer :reveal showplayer - (eventbox :cursor "pointer" - :onclick "${expand_player == 'true' ? 'eww update expand_player=false' : 'eww update expand_player=true'}" - "${expand_player == 'true' ? ' ' : ' ' }" - ) - ) - - (label) - ) - ) - (revealer :reveal expand_player - :transition "slidedown" - (box :class "player" - :style "${expand_player == 'true' ? 'opacity: 1; transition: opacity ${anim_duration}' : - 'opacity: 0; transition: opacity ${anim_duration}'}" - (playerinfo) - ) - ) - ) -) -(defwindow quick-settings-reveal - :monitor 0 - :stacking "overlay" - :geometry (geometry :x "5px" - :y "7px" - :width "0px" - :height "0px" - :anchor "top right" - ) - (revealer - :transition "crossfade" - :reveal showqs - :duration anim_duration - (quick-settings) - ) -) diff --git a/config/eww/scripts/bluetooth.sh b/config/eww/scripts/bluetooth.sh deleted file mode 100755 index a55a6fe..0000000 --- a/config/eww/scripts/bluetooth.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -FILE="$HOME/.config/.bluetooth" - -get_device() { - if [[ $(bluetoothctl devices Connected) != "" ]]; then - bluetoothctl devices Connected | awk '{ for (i = 3; i <= NF; i++) { printf("%s ", $i) } printf("\n") }' - else - echo "Disconnected" - fi -} - -get_state() { - if [[ "$(rfkill list | grep -A 1 hci0 | grep -o no)" == "no" ]]; then - eww update bluetooth_icon=" 󰂯 " - echo " 󰂯 " > "$FILE" - else - eww update bluetooth_icon=" 󰂲 " - echo " 󰂲 " > "$FILE" - fi -} - -[[ "$1" == "device" ]] && get_device -if [[ "$1" == "toggle" ]]; then - rfkill toggle bluetooth - get_state -fi - -if [[ $1 == "icon" ]]; then - while true; do - get_state - tail "$FILE" - sleep 1 - done -fi diff --git a/config/eww/scripts/brightness.sh b/config/eww/scripts/brightness.sh deleted file mode 100755 index ad3c752..0000000 --- a/config/eww/scripts/brightness.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -get_icon () { - val=$(brightnessctl get) - - if [ "$val" -le 3 ]; then - eww update br_icon=" " - - elif [ "$val" -le 38 ]; then - eww update br_icon=" " - - elif [ "$val" -le 77 ]; then - eww update br_icon=" " - - elif [ "$val" -le 115 ]; then - eww update br_icon=" " - - elif [ "$val" -le 153 ]; then - eww update br_icon=" " - - elif [ "$val" -le 191 ]; then - eww update br_icon=" " - - elif [ "$val" -le 230 ]; then - eww update br_icon=" " - - else - eww update br_icon=" " - fi -} - -if [[ $1 == "br" ]]; then - brightnessctl get -fi - -if [[ $1 == "icon" ]]; then - while true; do - get_icon - sleep 1 - done -fi - -if [[ $1 == "set" ]]; then - brightnessctl set "$2" - get_icon -fi diff --git a/config/eww/scripts/close-opened.sh b/config/eww/scripts/close-opened.sh deleted file mode 100755 index 36f7008..0000000 --- a/config/eww/scripts/close-opened.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Store the output of the command in an array, keeping only lines with '*' -readarray -t array <<< "$(eww windows | grep '^\*')" - -# Remove the '*' from each element -for ((i=0; i<${#array[@]}; i++)) -do - array[i]=${array[i]#'*'} -done - -# Close every window except permanent ones -for element in "${array[@]}" -do - [[ "$element" != "left-bar" ]] && - [[ "$element" != "notif-panel" ]] && - [[ "$element" != "quick-settings-toggle" ]] && - [[ "$element" != "playerinfo" ]] && - eww close "$element" -done diff --git a/config/eww/scripts/mic.sh b/config/eww/scripts/mic.sh deleted file mode 100755 index d235e41..0000000 --- a/config/eww/scripts/mic.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -SOURCE="@DEFAULT_SOURCE@" - -is_muted () { - pactl get-source-mute $SOURCE | awk '{print $2}' -} - -get_icon () { - if [[ $(is_muted) == "yes" ]]; then - echo " 󰍭" - else - echo " 󰍬" - fi -} - -if [[ $1 == "icon" ]]; then - while true; do - sleep 0.01 - get_icon - done -fi - -if [[ $1 == "muted" ]]; then - is_muted -fi - -if [[ $1 == "toggle-muted" ]]; then - swayosd --input-volume mute-toggle -fi diff --git a/config/eww/scripts/network.sh b/config/eww/scripts/network.sh deleted file mode 100755 index 5904b7a..0000000 --- a/config/eww/scripts/network.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -get_ssid() { - if nmcli -t -f NAME c show --active | grep -v lo; then - true - else - echo "Disconnected" - fi -} - -get_state() { - if [[ "$(rfkill list | grep -A 1 LAN | grep -o no)" == "no" ]]; then - eww update network_icon=" 󰖩 " - else - eww update network_icon=" 󰖪 " - fi -} - -[[ "$1" == "ssid" ]] && get_ssid - -if [[ "$1" == "toggle" ]]; then - rfkill toggle wlan - get_state -fi - -if [[ $1 == "icon" ]]; then - while true; do - get_state - sleep 1 - done -fi - -radio_status () { - radio_status=$(nmcli radio wifi) - if [[ $radio_status == "enabled" ]]; then - echo "on" - else - echo "off" - fi -} - -if [[ $1 == "radio-status" ]]; then - radio_status -fi - -if [[ $1 == "toggle-radio" ]]; then - stat=$(radio_status) - if [[ $stat == "on" ]]; then - nmcli radio wifi off - else - nmcli radio wifi on - fi -fi diff --git a/config/eww/scripts/on-release.sh b/config/eww/scripts/on-release.sh deleted file mode 100755 index 30cbd0f..0000000 --- a/config/eww/scripts/on-release.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -FILE="$HOME/.config/.on-release" - -function run() { - echo "can_run" > "$FILE" -} - -while IFS='$\n' read -r line; do - if [[ $(echo "$line" | grep TOUCH_UP) != "" ]]; then - run - if [[ $(echo "$line" | grep '1 (1)') != "" ]]; then - eww update cancel_touch=false - fi - elif [[ $(echo "$line" | grep release) != "" ]]; then - run - elif [[ $(echo "$line" | grep 'TOUCH_DOWN.*1 (1)') != "" ]]; then - eww update cancel_touch=true - else - echo "other" > "$FILE" - fi -done < <(stdbuf -oL libinput debug-events) diff --git a/config/eww/scripts/open.sh b/config/eww/scripts/open.sh deleted file mode 100755 index 41c0f1e..0000000 --- a/config/eww/scripts/open.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -eww open closer && - -WINDOW="$1" - -eww open "$WINDOW"-reveal -eww update "$WINDOW"-visible=true diff --git a/config/eww/scripts/run.sh b/config/eww/scripts/run.sh deleted file mode 100755 index 38b006d..0000000 --- a/config/eww/scripts/run.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -FILE="$HOME/.config/.on-release" -SCRIPT="$1" -VAR="$2" - -function run() { - if [[ $(eww get "$VAR") == "true" ]]; then - if [[ $(eww get cancel_touch) == "false" ]]; then - bash -c "$SCRIPT" - fi - else - eww open on-release-fix - sleep 0.1 - input-emulator mouse button left - fi - exit 0 -} - -while IFS='$\n' read -r line; do - [[ $(grep "can_run" "$FILE") != "" ]] && run -done < <(stdbuf -oL tail -f "$FILE") diff --git a/config/eww/scripts/volume.sh b/config/eww/scripts/volume.sh deleted file mode 100755 index 4a30dc3..0000000 --- a/config/eww/scripts/volume.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -SINK="@DEFAULT_SINK@" - -percentage () { - local val=$(echo $1 | tr '%' ' ' | awk '{print $1}') - local icon1=$2 - local icon2=$3 - local icon3=$4 - local icon4=$5 - if [ "$val" -le 15 ]; then - echo $icon1 - elif [ "$val" -le 30 ]; then - echo $icon2 - elif [ "$val" -le 60 ]; then - echo $icon3 - else - echo $icon4 - fi -} - -is_muted () { - pactl get-sink-mute $SINK | awk '{print $2}' -} - -get_percentage () { - if [[ $(is_muted) == 'yes' ]]; then - echo 0% - else - vol=$(pactl get-sink-volume @DEFAULT_SINK@ | grep Volume | awk '{print $5}' | tr % " ") - echo "${vol}%" - fi -} - -get_icon () { - local vol=$(get_percentage) - if [[ $vol == "0%" ]]; then - echo " 婢" - else - echo $(percentage "$vol" "" "" "墳" "") - fi -} - -get_class () { - local vol=$(get_percentage) - if [[ $vol == "0%" ]]; then - echo "red" - else - echo $(percentage "$vol" "red" "magenta" "yellow" "blue") - fi -} - -get_vol () { - echo $(pactl get-sink-volume @DEFAULT_SINK@ | grep Volume | awk '{print $5}' | tr % " ") -} - -if [[ $1 == "icon" ]]; then - while true; do - sleep 0.01 - get_icon - done -fi - -if [[ $1 == "class" ]]; then - get_class -fi - -if [[ $1 == "percentage" ]]; then - get_percentage -fi - -if [[ $1 == "vol" ]]; then - get_vol -fi - -if [[ $1 == "muted" ]]; then - is_muted -fi - -if [[ $1 == "toggle-muted" ]]; then - pactl set-sink-mute $SINK toggle -fi - -if [[ $1 == "set" ]]; then - val=$(echo $2 | tr '.' ' ' | awk '{print $1}') - if test $val -gt 100; then - val=100 - fi - pactl set-sink-volume $SINK $val% -fi diff --git a/config/eww/variables.yuck b/config/eww/variables.yuck deleted file mode 100644 index 9bf4639..0000000 --- a/config/eww/variables.yuck +++ /dev/null @@ -1,31 +0,0 @@ -; this var starts all scripts needed when eww boots -(defvar cancel_touch "false") - -(deflisten mic_icon "$EWW_PATH/mic.sh icon") - -(deflisten network_ssid "zscroll -d 0.7 -l 12 -p '. ' -u true \"$EWW_PATH/network.sh ssid\"") -(deflisten network_icon "$EWW_PATH/network.sh icon") -(defpoll network_radio :interval "1s" "$EWW_PATH/network.sh radio-status") - -(deflisten bluetooth_dev "zscroll -d 0.7 -l 12 -p '. ' -u true \"$EWW_PATH/bluetooth.sh device\"") -(deflisten bluetooth_icon "$EWW_PATH/bluetooth.sh icon") - -(deflisten volume_icon "$EWW_PATH/volume.sh icon") -(defpoll volume :interval "1s" "$EWW_PATH/volume.sh percentage") -(defpoll volume_value :interval "1s" "$EWW_PATH/volume.sh vol") -(defpoll is_muted :interval "1s" "$EWW_PATH/volume.sh muted") - -(deflisten br_icon "$EWW_PATH/brightness.sh icon") -(defpoll br :interval "1s" "$EWW_PATH/brightness.sh br") - -(defvar anim_duration "200ms") - -(defpoll completeday :interval "1h" "date '+%A, %d %B'") -(defpoll lithour :interval "30m" "date +%H") -(defpoll litmin :interval "30s" "date +%M") -(defpoll calendar_day :interval "10h" "date '+%d'") -(defpoll calendar_month :interval "10h" "date '+%m") -(defpoll calendar_year :interval "10h" "date '+%Y'") -(defpoll date :interval "30s" "date '+%d %b, %I:%M %p'") -(defpoll shortday :interval "1h" "date '+%d %b %y'") -(defpoll weekday :interval "24h" "date +%A") diff --git a/nixos/home/dotfiles.nix b/nixos/home/dotfiles.nix index 0c77556..4679639 100644 --- a/nixos/home/dotfiles.nix +++ b/nixos/home/dotfiles.nix @@ -31,12 +31,6 @@ in enableBashIntegration = true; }; - eww = { - enable = true; - configDir = config.lib.file.mkOutOfStoreSymlink "${configDir}/eww"; # see hyprland.nix for scripts path - package = (builtins.getFlake "github:matt1432/eww-exclusiver").packages.x86_64-linux.default; - }; - wofi = { enable = true; settings = { diff --git a/nixos/home/hyprland.nix b/nixos/home/hyprland.nix index 360248a..28cdb90 100644 --- a/nixos/home/hyprland.nix +++ b/nixos/home/hyprland.nix @@ -34,7 +34,6 @@ in $kora = "$HOME/.config/share" env = AGS_PATH, ${configDir}/ags/bin - env = EWW_PATH, ${configDir}/eww/scripts env = HYPR_PATH, ${configDir}/hypr/scripts env = LOCK_PATH, ${configDir}/gtklock/scripts