Compare commits

..

4 Commits

Author SHA1 Message Date
5314c171f9 flake.lock: Update
Flake lock file updates:

• Updated input 'auto-cpufreq':
    'github:AdnanHodzic/auto-cpufreq/e6bbd2c8335a33f25a3fcb3bd2376e790f460ba2?narHash=sha256-08FW%2BtVGWQKdiPZqXk6FO1JNB/Zybi7IYSWSGpp8V0Y%3D' (2025-02-09)
  → 'github:AdnanHodzic/auto-cpufreq/6be154724337fa74236ee811150872304db21d8b?narHash=sha256-GvkG6zoBsWgI7pbt92NZjGcOZMYC1C6pW8Lc4W1xMBU%3D' (2025-03-01)
• Updated input 'firefox-addons':
    'gitlab:rycee/nur-expressions/9a8a0914000e4453c99a4c12e9862a0a40075851?dir=pkgs/firefox-addons&narHash=sha256-Gpvn9Z%2BZgKPyb6qaAbahLbo6ZVj7VuLzSCmHZRvsACA%3D' (2025-02-22)
  → 'gitlab:rycee/nur-expressions/b8236b71159b0090b722eb686ec38612de854ddb?dir=pkgs/firefox-addons&narHash=sha256-sXP9Iz%2BDSfnS45XzlVIxnsGw3SOwlGWGogJB0MxALEw%3D' (2025-03-05)
• Updated input 'home-manager':
    'github:nix-community/home-manager/b71edac7a3167026aabea82a54d08b1794088c21?narHash=sha256-r9hkKzX99CGiP1ZqH0e%2BSWKK4CMsRNRLyotuwrUjhTI%3D' (2025-02-27)
  → 'github:nix-community/home-manager/def0dbbcea715d4514ca343ab4d6d7f3a1742da0?narHash=sha256-dYRebJk58/d5Ej1G6xTOadTfG6tU5zFgXYrLsRJlrgw%3D' (2025-03-05)
• Updated input 'hyprland':
    'github:hyprwm/Hyprland/445337d03dce7c9aef10ff4d57fc516ac8c1b24d?narHash=sha256-khQu5pduq%2BKTid2lHYQpVkFPR3WigOdtE5/95PijxU4%3D' (2025-02-28)
  → 'github:hyprwm/Hyprland/b51ab182ae3e8d88426af856b59dd28c6a9722ef?narHash=sha256-q8RZy0nUhx3cocQBs7Tvg/%2BxNA6H8oXIV%2BM7iwuzH04%3D' (2025-03-05)
• Updated input 'nix-ld':
    'github:Mic92/nix-ld/4c86e9f94553bceba004c48be6f2691971d2a6f7?narHash=sha256-UnMANgi2Zf4gf4p49cXM4fDRrPEpN6oJJMXT4Z2BW/U%3D' (2025-02-24)
  → 'github:Mic92/nix-ld/090c2003e3faa739e5a94e0a3cd782a1ccc40964?narHash=sha256-SELnZZg9LOhw%2Bkz60yEAr3l1plu70rBLInMRszLHtuc%3D' (2025-03-03)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/5135c59491985879812717f4c9fea69604e7f26f?narHash=sha256-Vr3Qi346M%2B8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic%3D' (2025-02-26)
  → 'github:nixos/nixpkgs/ba487dbc9d04e0634c64e3b1f0d25839a0a68246?narHash=sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM%3D' (2025-03-03)
• Updated input 'nixpkgs-stable':
    'github:nixos/nixpkgs/f44bd8ca21e026135061a0a57dcf3d0775b67a49?narHash=sha256-t%2BVaahjQAWyA%2BCtn2idyo1yxRIYpaDxMgHkgCNiMJa4%3D' (2025-02-26)
  → 'github:nixos/nixpkgs/6af28b834daca767a7ef99f8a7defa957d0ade6f?narHash=sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4%2Bfai1Sk%3D' (2025-03-04)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/07af005bb7d60c7f118d9d9f5530485da5d1e975?narHash=sha256-7JAGezJ0Dn5qIyA2%2BT4Dt/xQgAbhCglh6lzCekTVMeU%3D' (2025-02-11)
  → 'github:Mic92/sops-nix/3f2412536eeece783f0d0ad3861417f347219f4d?narHash=sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc%3D' (2025-03-03)
• Updated input 'spicetify-nix':
    'github:Gerg-L/spicetify-nix/fd31f20e2bd2bf3894d729590bf578c02c252239?narHash=sha256-Ne%2B3kEyOFD2sNfw3cnKk%2BZi/tTk%2BWkmnsfE7PDLNEXU%3D' (2025-02-23)
  → 'github:Gerg-L/spicetify-nix/f8d3757d4ae3af2175a631fb9598a42d30ee75fc?narHash=sha256-A1iyKVvZrLdLwqWPC9OvPjC85ADQn2R1EGfCzJBl%2BwI%3D' (2025-03-02)
• Updated input 'stylix':
    'github:danth/stylix/de4ee5899042801b62f988687acd454d4d411075?narHash=sha256-iyxUwII/NQNClT77VqQiDpaXJz1r0Z8tNVxgY64mLak%3D' (2025-02-28)
  → 'github:danth/stylix/11780517948f214b9f93d1bf5a2d29bc181d3a33?narHash=sha256-dBGwN4aHmX2QUXolZDhV%2Bp06%2BWM5ZykL4wd9BD6bT7k%3D' (2025-03-04)
2025-03-05 20:52:11 +01:00
f62cb382a8 cleanup 2025-03-05 17:43:05 +01:00
35e64c371b eww update of bluetooth widget 2025-03-05 17:42:54 +01:00
507d84c16d bluetooth support for audio mpris gestures 2025-03-05 17:42:33 +01:00
8 changed files with 142 additions and 34 deletions

View File

@ -40,11 +40,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739098586, "lastModified": 1740813555,
"narHash": "sha256-08FW+tVGWQKdiPZqXk6FO1JNB/Zybi7IYSWSGpp8V0Y=", "narHash": "sha256-GvkG6zoBsWgI7pbt92NZjGcOZMYC1C6pW8Lc4W1xMBU=",
"owner": "AdnanHodzic", "owner": "AdnanHodzic",
"repo": "auto-cpufreq", "repo": "auto-cpufreq",
"rev": "e6bbd2c8335a33f25a3fcb3bd2376e790f460ba2", "rev": "6be154724337fa74236ee811150872304db21d8b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -129,11 +129,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1740212040, "lastModified": 1741147406,
"narHash": "sha256-Gpvn9Z+ZgKPyb6qaAbahLbo6ZVj7VuLzSCmHZRvsACA=", "narHash": "sha256-sXP9Iz+DSfnS45XzlVIxnsGw3SOwlGWGogJB0MxALEw=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "9a8a0914000e4453c99a4c12e9862a0a40075851", "rev": "b8236b71159b0090b722eb686ec38612de854ddb",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -408,11 +408,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1740699498, "lastModified": 1741174782,
"narHash": "sha256-r9hkKzX99CGiP1ZqH0e+SWKK4CMsRNRLyotuwrUjhTI=", "narHash": "sha256-dYRebJk58/d5Ej1G6xTOadTfG6tU5zFgXYrLsRJlrgw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b71edac7a3167026aabea82a54d08b1794088c21", "rev": "def0dbbcea715d4514ca343ab4d6d7f3a1742da0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -539,11 +539,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1740707551, "lastModified": 1741203213,
"narHash": "sha256-khQu5pduq+KTid2lHYQpVkFPR3WigOdtE5/95PijxU4=", "narHash": "sha256-q8RZy0nUhx3cocQBs7Tvg/+xNA6H8oXIV+M7iwuzH04=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "445337d03dce7c9aef10ff4d57fc516ac8c1b24d", "rev": "b51ab182ae3e8d88426af856b59dd28c6a9722ef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -817,11 +817,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1740390822, "lastModified": 1740995332,
"narHash": "sha256-UnMANgi2Zf4gf4p49cXM4fDRrPEpN6oJJMXT4Z2BW/U=", "narHash": "sha256-SELnZZg9LOhw+kz60yEAr3l1plu70rBLInMRszLHtuc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-ld", "repo": "nix-ld",
"rev": "4c86e9f94553bceba004c48be6f2691971d2a6f7", "rev": "090c2003e3faa739e5a94e0a3cd782a1ccc40964",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -959,11 +959,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1740603184, "lastModified": 1741048562,
"narHash": "sha256-t+VaahjQAWyA+Ctn2idyo1yxRIYpaDxMgHkgCNiMJa4=", "narHash": "sha256-W4YZ3fvWZiFYYyd900kh8P8wU6DHSiwaH0j4+fai1Sk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", "rev": "6af28b834daca767a7ef99f8a7defa957d0ade6f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -975,11 +975,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1740560979, "lastModified": 1741010256,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", "narHash": "sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5135c59491985879812717f4c9fea69604e7f26f", "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1257,11 +1257,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739262228, "lastModified": 1741043164,
"narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=", "narHash": "sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975", "rev": "3f2412536eeece783f0d0ad3861417f347219f4d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1278,11 +1278,11 @@
"systems": "systems_5" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1740284169, "lastModified": 1740889006,
"narHash": "sha256-Ne+3kEyOFD2sNfw3cnKk+Zi/tTk+WkmnsfE7PDLNEXU=", "narHash": "sha256-A1iyKVvZrLdLwqWPC9OvPjC85ADQn2R1EGfCzJBl+wI=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "fd31f20e2bd2bf3894d729590bf578c02c252239", "rev": "f8d3757d4ae3af2175a631fb9598a42d30ee75fc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1315,11 +1315,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1740769934, "lastModified": 1741112087,
"narHash": "sha256-iyxUwII/NQNClT77VqQiDpaXJz1r0Z8tNVxgY64mLak=", "narHash": "sha256-dBGwN4aHmX2QUXolZDhV+p06+WM5ZykL4wd9BD6bT7k=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "de4ee5899042801b62f988687acd454d4d411075", "rev": "11780517948f214b9f93d1bf5a2d29bc181d3a33",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -41,6 +41,7 @@
bluetooth = { bluetooth = {
enable = true; enable = true;
blueman.enable = false; blueman.enable = false;
media-player-control.enable = false;
}; };
autoUpdate.enable = false; autoUpdate.enable = false;
autoCleanup.enable = true; autoCleanup.enable = true;

View File

@ -42,6 +42,7 @@
bluetooth = { bluetooth = {
enable = true; enable = true;
blueman.enable = true; blueman.enable = true;
media-player-control.enable = true;
}; };
autoUpdate.enable = true; autoUpdate.enable = true;

View File

@ -15,7 +15,7 @@
vitetris vitetris
steam steam
superTuxKart superTuxKart
wine wineWowPackages.stable
(writeShellScriptBin "gs" '' (writeShellScriptBin "gs" ''
set -xeuo pipefail set -xeuo pipefail

View File

@ -246,6 +246,18 @@ in {
margin: 10px 0px 0px 0px; margin: 10px 0px 0px 0px;
} }
.bt_bluetooth {
color: #${config.lib.stylix.colors.base02};
font-size: 22px;
font-weight: normal;
}
.bt_toggle {
font-size: 52px;
font-weight: normal;
color: #${config.lib.stylix.colors.base16};
}
/** Weather ***************************************/ /** Weather ***************************************/
.iconweather { .iconweather {
font-family: Iosevka Nerd Font; font-family: Iosevka Nerd Font;
@ -472,6 +484,61 @@ in {
home.packages = with pkgs; [ home.packages = with pkgs; [
brightnessctl brightnessctl
(writeShellScriptBin "bluetooth-toggle" ''
# Check if MAC address is provided
if [ -z "$1" ]; then
echo "Usage: $0 <MAC_ADDRESS>"
exit 1
fi
MAC_ADDRESS="$1"
# Get connection status
CONNECTED=$(bluetoothctl info "$MAC_ADDRESS" | grep "Connected" | awk '{print $2}')
if [ "$CONNECTED" = "yes" ]; then
echo "Device $MAC_ADDRESS is connected. Disconnecting..."
bluetoothctl disconnect "$MAC_ADDRESS"
else
echo "Device $MAC_ADDRESS is not connected. Connecting..."
bluetoothctl connect "$MAC_ADDRESS"
fi
'')
(writeShellScriptBin "bluetooth-status" ''
# Check if MAC address is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <MAC_ADDRESS>"
exit 1
fi
# Run bluetoothctl command and check if the device is connected
status=$(bluetoothctl info "$1" | grep "Connected" | awk '{print $2}')
if [ "$status" == "yes" ]; then
echo "Connected"
else
echo "Offline"
fi
'')
(writeShellScriptBin "bluetooth-battery" ''
# Check if MAC address is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <MAC_ADDRESS>"
exit 1
fi
# Run bluetoothctl command and check if the device is connected
status=$(bluetoothctl info "$1" | grep "Connected" | awk '{print $2}')
if [ "$status" == "yes" ]; then
battery=$(bluetoothctl info "$1" | grep "Battery Percentage" | awk '{print $4}')
echo " ''${battery:1:-1}%"
else
echo ""
fi'')
(writeShellScriptBin "eww-dashboard-toggle" '' (writeShellScriptBin "eww-dashboard-toggle" ''
FILE="$HOME/${EWW_CACHE}" FILE="$HOME/${EWW_CACHE}"
CFG="$HOME/${EWW_PATH}" CFG="$HOME/${EWW_PATH}"
@ -490,7 +557,8 @@ in {
system \ system \
clock \ clock \
uptime \ uptime \
music music \
bluetooth
} }
## Launch or close widgets accordingly ## Launch or close widgets accordingly
@ -499,7 +567,7 @@ in {
run_eww run_eww
else else
${EWW} --config "$CFG" close \ ${EWW} --config "$CFG" close \
background profile system clock uptime music apps logout sleep reboot poweroff folders background profile system clock uptime music apps logout sleep reboot poweroff folders bluetooth
rm "$FILE" rm "$FILE"
fi fi
'') '')

View File

@ -38,6 +38,13 @@
;; Files vars ;; Files vars
(defpoll FREE :interval "5s" `df -h / | awk '{print $4}' | tail -n 1 | sed 's/G/GB/'`) (defpoll FREE :interval "5s" `df -h / | awk '{print $4}' | tail -n 1 | sed 's/G/GB/'`)
;; Bluetooth vars
;; Headphones
(defpoll BLUETOOTH_HEADPHONES_STATUS :interval "5s" `bluetooth-status EF:DD:5D:31:76:F0`)
(defpoll BLUETOOTH_HEADPHONES_BATTERY :interval "5s" `bluetooth-battery EF:DD:5D:31:76:F0`)
(defpoll BLUETOOTH_MOUSE_STATUS :interval "5s" `bluetooth-status D9:2E:B4:70:BF:D6`)
(defpoll BLUETOOTH_MOUSE_BATTERY :interval "5s" `bluetooth-battery D9:2E:B4:70:BF:D6`)
;; ** Widgets ************************************************************************* ;; ** Widgets *************************************************************************
@ -82,7 +89,7 @@
;; uptime ;; uptime
(defwidget uptime [] (defwidget uptime []
(box :class "genwin" (box :class "genwin"
(box :orientation "h" :halign "center" :spacing 40 :space-evenly "false" :vexpand "false" :hexpand "false" (box :orientation "h" :halign "center" :spacing 5 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "icontimer" :valign "center" :text "󱎫 ") (label :class "icontimer" :valign "center" :text "󱎫 ")
(box :orientation "v" :valign "center" :spacing 0 :space-evenly "false" :vexpand "false" :hexpand "false" (box :orientation "v" :valign "center" :spacing 0 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :class "uphour" :halign "start" :wrap "true" :limit-width 25 :text UPHOUR) (label :class "uphour" :halign "start" :wrap "true" :limit-width 25 :text UPHOUR)
@ -102,6 +109,19 @@
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" (box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false"
(scale :onscroll "playerctl position 1+" :min 0 :active "true" :max 100 :value CURRENT))))) (scale :onscroll "playerctl position 1+" :min 0 :active "true" :max 100 :value CURRENT)))))
;; Bluetooth
(defwidget bluetooth []
(box :class "genwin" :orientation "v" :spacing 10
(box :orientation "h" :spacing 5 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true"
(button :class "bt_toggle" :onclick "bluetooth-toggle EF:DD:5D:31:76:F0" "󰋋"))
(box :orientation "v" :spacing 10 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true"
(label :class "bt_bluetooth" :text BLUETOOTH_HEADPHONES_STATUS)
(label :class "bt_bluetooth" :text BLUETOOTH_HEADPHONES_BATTERY))
(box :orientation "h" :spacing 5 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true"
(button :class "bt_toggle" :onclick "bluetooth-toggle D9:2E:B4:70:BF:D6" "󰍽"))
(box :orientation "v" :spacing 10 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "true"
(label :class "bt_bluetooth" :text BLUETOOTH_MOUSE_STATUS)
(label :class "bt_bluetooth" :text BLUETOOTH_MOUSE_BATTERY))))
;; folders ;; folders
(defwidget folders [] (defwidget folders []
(box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false" (box :class "genwin" :orientation "v" :space-evenly "false" :vexpand "false" :hexpand "false"
@ -164,6 +184,11 @@
:geometry (geometry :x 515 :y 490 :width 610 :height 280) :geometry (geometry :x 515 :y 490 :width 610 :height 280)
(music)) (music))
;; bluetooth
(defwindow bluetooth :stacking "fg" :focusable "false" :monitor 0
:geometry (geometry :x 880 :y 150 :width 220 :height 325)
(bluetooth))
;; folders ;; folders
(defwindow folders :stacking "fg" :focusable "false" :monitor 0 (defwindow folders :stacking "fg" :focusable "false" :monitor 0
:geometry (geometry :x 1445 :y 490 :width 325 :height 440) :geometry (geometry :x 1445 :y 490 :width 325 :height 440)

View File

@ -2,12 +2,14 @@
lib, lib,
config, config,
userSettings, userSettings,
pkgs,
... ...
}: { }: {
options = { options = {
sys.network.enable = lib.mkEnableOption "Enable networking"; sys.network.enable = lib.mkEnableOption "Enable networking";
sys.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth support"; sys.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth support";
sys.bluetooth.blueman.enable = lib.mkEnableOption "Enable Blueman App"; sys.bluetooth.blueman.enable = lib.mkEnableOption "Enable Blueman App";
sys.bluetooth.media-player-control.enable = lib.mkEnableOption "Enable Media Player Control";
}; };
config = lib.mkMerge [ config = lib.mkMerge [
@ -35,5 +37,15 @@
services.blueman.enable = true; services.blueman.enable = true;
} }
) )
(
lib.mkIf config.sys.bluetooth.media-player-control.enable {
systemd.user.services.mpris-proxy = {
description = "Mpris proxy";
after = ["network.target" "sound.target"];
wantedBy = ["default.target"];
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
};
}
)
]; ];
} }

View File

@ -46,6 +46,7 @@
bluetooth = { bluetooth = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
blueman.enable = lib.mkDefault true; blueman.enable = lib.mkDefault true;
media-player-control.enable = lib.mkDefault false;
}; };
autoUpdate.enable = lib.mkDefault true; autoUpdate.enable = lib.mkDefault true;