From b00f6dbdda1a437cb32036e579b398e51b5d3fef Mon Sep 17 00:00:00 2001 From: sioodmy Date: Sun, 26 May 2024 19:29:06 +0200 Subject: [PATCH] fix: I forgor --- home/misc/bt.nix | 18 ------------------ home/misc/default.nix | 1 - home/rice/niri/config.nix | 2 +- home/scripts/bcn | 2 +- 4 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 home/misc/bt.nix diff --git a/home/misc/bt.nix b/home/misc/bt.nix deleted file mode 100644 index 0ddf20bf..00000000 --- a/home/misc/bt.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, ...}: let - bt = pkgs.writeShellScriptBin "bt" '' - #!/bin/sh - - MAC="AC:80:0A:E8:CF:28" - connect=$(bluetoothctl info $MAC | grep Connected: | awk '{print $2}') - - if [[ $connect = no ]]; then - notify-send "Bluetooth" "Attempting to connect" - bluetoothctl connect $MAC || notify-send "Failed to Connect" - elif [[ $connect = yes ]]; then - notify-send "Bluetooth" "Attempting to disconnect" - bluetoothctl disconnect $MAC - fi - ''; -in { - home.packages = [bt]; -} diff --git a/home/misc/default.nix b/home/misc/default.nix index 61f62a91..462ba6a9 100644 --- a/home/misc/default.nix +++ b/home/misc/default.nix @@ -3,7 +3,6 @@ ./media.nix ./schizofox.nix ./rnnoise.nix - ./bt.nix ./lock.nix ]; } diff --git a/home/rice/niri/config.nix b/home/rice/niri/config.nix index c7a4f71b..b4b3484d 100644 --- a/home/rice/niri/config.nix +++ b/home/rice/niri/config.nix @@ -120,7 +120,7 @@ with theme.colors; { "XF86AudioMute".action = spawn "pamixer" "-t"; "XF86AudioMicMute".action = spawn "micmute"; - "XF86Bluetooth".action = spawn "bt"; + "XF86Bluetooth".action = spawn "bcn"; "XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%"; "XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-"; diff --git a/home/scripts/bcn b/home/scripts/bcn index 2fe81a5a..fb7a0100 100755 --- a/home/scripts/bcn +++ b/home/scripts/bcn @@ -8,7 +8,7 @@ if [[ $device_amount = 1 ]]; then MAC=$(bluetoothctl devices | awk {'print $2'}) [ -z $MAC ] && MAC=NoDeviceFound # Prevents accidental disconnect error else - select=$(bluetoothctl devices | awk {'print $3'} | tofi --prompt-text "Select device 󰂯 ") + select=$(bluetoothctl devices | awk {'print $3'} | fuzzel -p "Select device 󰂯 ") MAC=$(bluetoothctl devices | grep $select | awk {'print $2'}) [ -z $MAC ] && MAC=NoDeviceFound # Prevents accidental disconnect error fi