From 79053fa8475aeb856b1ded8e93903009c82e54d5 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 29 Apr 2025 14:57:27 -0500 Subject: [PATCH] tweaks for eww --- .config/eww/eww.scss | 20 ++++++++++++++++---- .config/eww/eww.yuck | 2 +- .config/eww/scripts/gaw | 7 +++++++ .config/tridactyl/tridactylrc | 2 +- home/home.nix | 4 ++++ scripts/disk | 6 +++++- 6 files changed, 34 insertions(+), 7 deletions(-) create mode 100755 .config/eww/scripts/gaw diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index ee30e98..6ceee92 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -113,9 +113,9 @@ tooltip label { background-color: $base0D; } -.right_modules { +.sysmodules { // padding-bottom: 2px; - // padding-right: 5px; + padding-right: 5px; } .separ { @@ -215,6 +215,8 @@ tooltip label { .iconmem { color: $base0A; padding-top: 2px; + padding-left: 5px; + padding-right: 8px; } .mem_label { color: $base0A; @@ -233,6 +235,8 @@ tooltip label { color: $base0E; // margin: 2px 10px 0px 8px; padding-top: 3px; + padding-left: 5px; + padding-right: 8px; } .bat_label { @@ -247,6 +251,8 @@ tooltip label { color: $base0D; // margin: 2px 10px 0px 8px; padding-top: 3px; + padding-left: 10px; + padding-right: 8px; // padding-right: 12px; } @@ -260,6 +266,8 @@ tooltip label { color: $base08; // margin: 2px 10px 0px 8px; padding-top: 3px; + padding-left: 0px; + padding-right: 8px; // padding-right: 4px; } @@ -272,6 +280,8 @@ tooltip label { .iconbright { color: $base09; padding-top: 3px; + padding-left: 5px; + padding-right: 8px; // padding-right: 8px; } .bright_icon { @@ -292,6 +302,8 @@ tooltip label { color: $base09; // margin: 3px 5px 0px 3px; padding-top: 3px; + padding-left: 5px; + padding-right: 8px; } .separ { @@ -305,7 +317,7 @@ tooltip label { color: $base03; font-weight: bold; font-size: 14px; - margin-left: 8px; + margin-left: -15px; margin-right: 8px; } @@ -313,7 +325,7 @@ tooltip label { color: $base03; font-weight: bold; font-size: 14px; - margin-right: 0px; + margin-right: 9px; } .works { diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index b913041..c098272 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -18,7 +18,7 @@ (defpoll HOST :interval "1h" "hostname") (defpoll DISK :interval "1m" "disk") ;; (defpoll nextcloud :interval "2s" "scripts/nextcloud.sh") -(deflisten volume_percent :interval "0.5s" "tail -F /tmp/vol") +(deflisten volume_percent :interval "0.2s" "tail -F /tmp/vol") (deflisten appname "scripts/appname") (deflisten workspaces :initial "[]" "scripts/get-workspaces") diff --git a/.config/eww/scripts/gaw b/.config/eww/scripts/gaw new file mode 100755 index 0000000..e2fd022 --- /dev/null +++ b/.config/eww/scripts/gaw @@ -0,0 +1,7 @@ +#!/usr/bin/env nu + +def active [_change] { + hyprctl monitors -j | from json | where focused == true | get activeWorkspace.id | first +} + +socat -u UNIX-CONNECT:/run/user/1000/hypr/29e2e59fdbab8ed2cc23a20e3c6043d5decb5cdc_1745939475_617930074/.socket2.sock - | lines | take until { is-empty } | active $in diff --git a/.config/tridactyl/tridactylrc b/.config/tridactyl/tridactylrc index 6e6227b..cf1112e 100644 --- a/.config/tridactyl/tridactylrc +++ b/.config/tridactyl/tridactylrc @@ -74,7 +74,7 @@ command aud js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_ unbind t "" Adding my own bindings -bind v composite hint -pipe a href | js -p tri.excmds.shellescape(JS_ARG) | exclaim_quiet empv +bind v composite hint -pipe a href | js -p tri.excmds.shellescape(JS_ARG) | exclaim_quiet mpv bind gt hint -W torrent bind gv current_url mpv bind ga hint -W aud diff --git a/home/home.nix b/home/home.nix index e079267..bd742ac 100644 --- a/home/home.nix +++ b/home/home.nix @@ -634,6 +634,10 @@ in { recursive = true; }; + home.file.".librewolf/native-messaging-hosts/tridactyl.json" = { + source = pkgs.tridactyl-native + }; + programs.librewolf = { enable = true; package = pkgs.librewolf-wayland.override { diff --git a/scripts/disk b/scripts/disk index 4e2ab69..da437c8 100755 --- a/scripts/disk +++ b/scripts/disk @@ -1,5 +1,9 @@ #!/usr/bin/env nu def main [] { - btrfs file df / | lines | first | split column -r '\s' | get column4 | str replace 'used=' '' | first + if (hostname) == "kaladin" { + df -h / | lines | get 1 | split column -r '\s' | get column5 | first + } else { + btrfs file df / | lines | first | split column -r '\s' | get column4 | str replace 'used=' '' | first + } }