From 154486074f72006df2c9b52bcde5b8057905e183 Mon Sep 17 00:00:00 2001 From: Jory Severijnse Date: Fri, 1 May 2026 20:13:27 +0200 Subject: [PATCH] fixed notification volume/brightness removed some gnome applications and updated system + .gitignore --- .gitignore | 1 - flake.lock | 24 ++++++++++++------------ home/packages/media/bitwig.nix | 18 ------------------ home/packages/packages.nix | 5 ----- home/packages/wayland/niri/_binds.nix | 10 +++++----- scripts/brightness-notify.sh | 8 ++++++++ scripts/volume-notify.sh | 16 ++++++++++++++++ 7 files changed, 41 insertions(+), 41 deletions(-) delete mode 100644 home/packages/media/bitwig.nix create mode 100755 scripts/brightness-notify.sh create mode 100755 scripts/volume-notify.sh diff --git a/.gitignore b/.gitignore index 31d609b..f9a759c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ .direnv .pre-commit-config.yaml -home/packages/media/bitwig.jar diff --git a/flake.lock b/flake.lock index 0fb3f38..4501106 100644 --- a/flake.lock +++ b/flake.lock @@ -110,11 +110,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1776184213, - "narHash": "sha256-0F+Snir+cD8HRGlf0vpvkhyjUT9HI6Qr+Z3JmUlEtSU=", + "lastModified": 1777607620, + "narHash": "sha256-GGMDVvqo1PwAB6/7yZg651VzexqECdliZCKXlM0UDwI=", "owner": "schembriaiden", "repo": "helium-browser-nix-flake", - "rev": "6ae2aaea1a019b8f52886041e6779919d1c1cc60", + "rev": "10105224eea589de8f0b3292f4e4bca3d52f1ee2", "type": "github" }, "original": { @@ -166,11 +166,11 @@ ] }, "locked": { - "lastModified": 1775970782, - "narHash": "sha256-7jt9Vpm48Yy5yAWigYpde+HxtYEpEuyzIQJF4VYehhk=", + "lastModified": 1777181277, + "narHash": "sha256-yVJbd07ortDRAttDFmDV5p220aOLTHgVAx//0nW/xW8=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "bedba5989b04614fc598af9633033b95a937933f", + "rev": "b8eb7acee0f7604fe1bf6a5b3dcf5254369180fa", "type": "github" }, "original": { @@ -181,11 +181,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1775710090, - "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", + "lastModified": 1777268161, + "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4c1018dae018162ec878d42fec712642d214fdfa", + "rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", "type": "github" }, "original": { @@ -264,11 +264,11 @@ ] }, "locked": { - "lastModified": 1775710180, - "narHash": "sha256-sCokvdNvl8zIzsnjgG0TN5h3RUI7GJyWW9ErfmEj0rM=", + "lastModified": 1777612697, + "narHash": "sha256-h+tXBNMDrsKbD1UnYw0IeSIT4RalHtIJ1GLOviib7/8=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "2c138beb648d1cbbfae76695a8230ee04e4db25a", + "rev": "f9f70d14f9a57c7962c5cfe589461c1391044448", "type": "github" }, "original": { diff --git a/home/packages/media/bitwig.nix b/home/packages/media/bitwig.nix deleted file mode 100644 index c7f4bb1..0000000 --- a/home/packages/media/bitwig.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, ...}: let - customJar = /etc/nixos/home/packages/media/bitwig.jar; -in { - users.users.someone.packages = with pkgs; [ - (bitwig-studio6.overrideAttrs (old: { - version = "6.0"; - src = pkgs.fetchurl { - name = "bitwig-studio-6.0.deb"; - url = "https://www.bitwig.com/dl/Bitwig%20Studio/6.0/installer_linux"; - hash = "sha256-jrCTgaxfeWhfKwLeKLmqTQWS7RVbVnHqJ0InCipmm8k="; - }; - - postInstall = '' - cp ${customJar} $out/libexec/bin/bitwig.jar - ''; - })) - ]; -} diff --git a/home/packages/packages.nix b/home/packages/packages.nix index 943bc7f..a4e787e 100644 --- a/home/packages/packages.nix +++ b/home/packages/packages.nix @@ -36,12 +36,7 @@ weathr # gnome dconf-editor - file-roller - gnome-control-center - gnome-text-editor - nautilus (papers.override {supportNautilus = true;}) - inkscape scrcpy android-tools awww diff --git a/home/packages/wayland/niri/_binds.nix b/home/packages/wayland/niri/_binds.nix index 77946a3..d1f2c53 100644 --- a/home/packages/wayland/niri/_binds.nix +++ b/home/packages/wayland/niri/_binds.nix @@ -17,7 +17,7 @@ }; "XF86AudioMute" = { _props.allow-when-locked = true; - spawn._args = ["sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""]; + spawn._args = ["sh" "-c" "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && /etc/nixos/scripts/volume-notify.sh"]; }; "XF86AudioMicMute" = { _props.allow-when-locked = true; @@ -25,19 +25,19 @@ }; "XF86AudioRaiseVolume" = { _props.allow-when-locked = true; - spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""]; + spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ && /etc/nixos/scripts/volume-notify.sh"]; }; "XF86AudioLowerVolume" = { _props.allow-when-locked = true; - spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -e -h string:x-canonical-private-synchronous:volume -h \"int:value:$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}')\" -c osd \"Volume\""]; + spawn._args = ["sh" "-c" "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && /etc/nixos/scripts/volume-notify.sh"]; }; "XF86MonBrightnessUp" = { _props.allow-when-locked = true; - spawn._args = ["sh" "-c" "brightnessctl set 10%+ && notify-send -e -h string:x-canonical-private-synchronous:brightness -h \"int:value:$(brightnessctl -m | cut -d, -f4 | tr -d '%')\" -c osd \"Brightness\""]; + spawn._args = ["sh" "-c" "brightnessctl set 10%+ && /etc/nixos/scripts/brightness-notify.sh"]; }; "XF86MonBrightnessDown" = { _props.allow-when-locked = true; - spawn._args = ["sh" "-c" "brightnessctl set 10%- && notify-send -e -h string:x-canonical-private-synchronous:brightness -h \"int:value:$(brightnessctl -m | cut -d, -f4 | tr -d '%')\" -c osd \"Brightness\""]; + spawn._args = ["sh" "-c" "brightnessctl set 10%- && /etc/nixos/scripts/brightness-notify.sh"]; }; "Print".spawn._args = ["sh" "-c" "grim -g \"$(slurp)\" - | satty --filename - --output-filename ~/Pictures/Screenshots/satty-$(date +%Y%m%d-%H%M%S).png"]; "Mod+B".spawn._args = ["zen"]; diff --git a/scripts/brightness-notify.sh b/scripts/brightness-notify.sh new file mode 100755 index 0000000..01cd2d1 --- /dev/null +++ b/scripts/brightness-notify.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +BRIGHTNESS=$(brightnessctl -m | cut -d, -f4 | tr -d '%') + +notify-send -h string:x-canonical-private-synchronous:brightness \ + -h "int:value:$BRIGHTNESS" \ + -c "osd" \ + "Brightness: ${BRIGHTNESS}%" -i display-brightness diff --git a/scripts/volume-notify.sh b/scripts/volume-notify.sh new file mode 100755 index 0000000..480931d --- /dev/null +++ b/scripts/volume-notify.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +VOLUME=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2 * 100}') +MUTE=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -c "MUTED") + +if [ "$MUTE" -ne 0 ]; then + notify-send -h string:x-canonical-private-synchronous:volume \ + -h "int:value:0" \ + -c "osd" \ + "Muted" -i audio-volume-muted +else + notify-send -h string:x-canonical-private-synchronous:volume \ + -h "int:value:$VOLUME" \ + -c "osd" \ + "Volume: ${VOLUME}%" -i audio-volume-high +fi