From f903d1b45e9974a2f48d8562621865d92b4020a3 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 26 Sep 2024 19:15:58 +0200 Subject: [PATCH] do things --- common.nix | 2 +- modules/desktop-environment/home/default.nix | 9 +++++++++ .../panels/eww/configDir/bottomBar/bottomBar.yuck | 8 +++++++- .../eww/configDir/bottomBar/traveldings.yuck | 15 +-------------- .../home/panels/eww/configDir/eww.css | 8 ++++++-- .../home/panels/eww/configDir/scripts/iceTacho.nu | 15 +++++++++++++++ modules/desktop-environment/home/sway/default.nix | 5 ++--- modules/desktop/default.nix | 1 + modules/desktop/firefox.nix | 5 +++-- other/env.nu | 2 +- other/scripts/desktop/shell-startup.nu | 3 +-- 11 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 modules/desktop-environment/home/panels/eww/configDir/scripts/iceTacho.nu diff --git a/common.nix b/common.nix index bc82484..d011905 100644 --- a/common.nix +++ b/common.nix @@ -74,7 +74,7 @@ with builtins; { mprocs dig aria2 - usbutils + cyme numbat devd diff --git a/modules/desktop-environment/home/default.nix b/modules/desktop-environment/home/default.nix index b9f6429..e348ec6 100644 --- a/modules/desktop-environment/home/default.nix +++ b/modules/desktop-environment/home/default.nix @@ -14,5 +14,14 @@ enableNushellIntegration = true; enableSshSupport = true; }; + fonts.fontconfig = { + enable = true; + defaultFonts = { + emoji = []; + monospace = []; + sansSerif = ["Atkinson Hyperlegible"]; + serif = []; + }; + }; }; } diff --git a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck index 2034740..635de40 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/bottomBar.yuck @@ -26,7 +26,7 @@ ) (box :halign "end" - (label :text "right") + (label :text "${iceData.speed}km/h") ) ) (box @@ -42,3 +42,9 @@ ) ) ) + +(defpoll iceData + :interval "2s" + :initial "" + `(iw dev wlp4s0 link | grep "WIFIonICE" > /dev/null) && curl https://iceportal.de/api1/rs/status` +) diff --git a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/traveldings.yuck b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/traveldings.yuck index 0e13b28..4aac614 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/bottomBar/traveldings.yuck +++ b/modules/desktop-environment/home/panels/eww/configDir/bottomBar/traveldings.yuck @@ -22,6 +22,7 @@ ) (box (progress + :class { traveldings_data.live ? "traveldings_live" : "traveldings_disconnected" } :value {traveldings_data.progress * 100} :orientation "horizontal" ) @@ -29,20 +30,6 @@ ) ) -(defwindow traveldingsWindow - :monitor 0 - :stacking "overlay" - :exclusive "false" - :geometry (geometry - :x "0%" - :y "6.6%" - :width "30%" - :height "20%" - :anchor "bottom center") - (box - :class "traveldingsWindow" - (label :text "TODO")) -) (deflisten traveldings_data :initial "null" diff --git a/modules/desktop-environment/home/panels/eww/configDir/eww.css b/modules/desktop-environment/home/panels/eww/configDir/eww.css index f512917..7186cab 100644 --- a/modules/desktop-environment/home/panels/eww/configDir/eww.css +++ b/modules/desktop-environment/home/panels/eww/configDir/eww.css @@ -22,12 +22,16 @@ label { border-bottom-left-radius: 0; } -.traveldings progressbar progress { +.traveldings progressbar.traveldings_live progress { background-color: #79740e; border-bottom-left-radius: 0; } +.traveldings progressbar.traveldings_disconnected progress { + background-color: #cc241d; +} + .traveldingsWindow { border-radius: 15px; -} \ No newline at end of file +} diff --git a/modules/desktop-environment/home/panels/eww/configDir/scripts/iceTacho.nu b/modules/desktop-environment/home/panels/eww/configDir/scripts/iceTacho.nu new file mode 100644 index 0000000..0be47c8 --- /dev/null +++ b/modules/desktop-environment/home/panels/eww/configDir/scripts/iceTacho.nu @@ -0,0 +1,15 @@ +#!/usr/bin/env nu + +const TABLE = [ + [ br vmax ]; + [ 401 280 ] + [ 402 280 ] + [ 403 330 ] + [ 406 330 ] + [ 407 320 ] + [ 408 320 ] + [ 411 230 ] + [ 415 230 ] + [ 412 265 ] + [ 605 200 ] +]; diff --git a/modules/desktop-environment/home/sway/default.nix b/modules/desktop-environment/home/sway/default.nix index 44b4c5f..951afa5 100644 --- a/modules/desktop-environment/home/sway/default.nix +++ b/modules/desktop-environment/home/sway/default.nix @@ -112,8 +112,8 @@ # "${mod}+Shift+c" = "focus child"; # screenshot # "${mod}+w" = "exec window-screenshot.sh"; - "${mod}+s" = "exec flameshot gui -c -p $HOME/Pictures/screenshots"; - "${mod}+a" = "exec flameshot screen -c -p $HOME/Pictures/screenshots"; + "${mod}+s" = "exec gscreenshot -csf $HOME/Pictures/screenshots"; + "${mod}+a" = "exec gscreenshot -cf $HOME/Pictures/screenshots"; # "${mod}+t" = "exec ocr-screenshot.sh"; # rofi fuckery @@ -138,7 +138,6 @@ "XF86KbdBrightnessUp" = "exec brillo -kA 10.0"; "XF86KbdBrightnessDown" = "exec brillo -kU 10.0"; }; - workspaceAutoBackAndForth = true; focus = { wrapping = "yes"; }; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 993e172..711b538 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -100,6 +100,7 @@ in xclip xmacro xorg.xev + gscreenshot syncplay diff --git a/modules/desktop/firefox.nix b/modules/desktop/firefox.nix index 3c603c0..336b3d6 100644 --- a/modules/desktop/firefox.nix +++ b/modules/desktop/firefox.nix @@ -254,6 +254,8 @@ "app.normandy.enabled" = false; "app.normandy.api_url" = ""; "dom.private-attribution.submission.enabled" = false; + "browser.newtabpage.activity-stream.feeds.showWeather" = false; + "browser.newtabpage.activity-stream.feeds.weatherfeed" = false; "browser.safebrowsing.malware.enabled" = false; "browser.safebrowsing.phishing.enabled" = false; @@ -319,8 +321,7 @@ "privacy.window.maxInnerWidth" = 1600; "privacy.window.maxInnerHeight" = 900; "privacy.resistFingerprinting.block_mozAddonManager" = true; - "privacy.resistFingerprinting.letterboxing" = true; - "privacy.resistFingerprinting.letterboxing.dimensions" = ""; + "privacy.resistFingerprinting.letterboxing" = false; "widget.non-native-theme.enabled" = true; "browser.link.open_newwindow" = 3; "browser.link.open_newwindow.restriction" = 0; diff --git a/other/env.nu b/other/env.nu index d5ca780..908d237 100644 --- a/other/env.nu +++ b/other/env.nu @@ -33,7 +33,7 @@ $env.PROMPT_COMMAND = {|| let len = (term size | get columns) - ($item | ansi strip | str length --grapheme-clusters) - (create_right_prompt | ansi strip | str length --grapheme-clusters); # $item | append (flag $TRANS "-" $len) | str join let deco = if ($env.CMD_COUNT == 0) { - flag $LESBIAN "=" $len + flag $TRANS "=" $len } else if ($env.CMD_COUNT | is even) { flag $LESBIAN "-" $len } else { diff --git a/other/scripts/desktop/shell-startup.nu b/other/scripts/desktop/shell-startup.nu index 66eb610..debcf05 100644 --- a/other/scripts/desktop/shell-startup.nu +++ b/other/scripts/desktop/shell-startup.nu @@ -47,7 +47,7 @@ def flag [ } def main [] { - print (flag $TRANS); + print (flag $LESBIAN); let next_events = open ~/Docs/dates.csv | update datetime {|ev| $ev.datetime | into datetime } | sort-by datetime @@ -55,7 +55,6 @@ def main [] { | first | each {|ev| $"(ansi attr_bold)($ev.event)(ansi reset) in (ansi attr_bold)(tfmt ($ev.datetime - (date now)))s(ansi reset)" }; print $"Hi jade, you're on HRT for (ansi reset)(ansi attr_bold)((date now) - ('2024-02-18T20:53' | into datetime) | format duration month)s(ansi reset) now! | Next Event: ($next_events)"; - # print (flag $LESBIAN); } def tfmt [dur: duration] {