diff --git a/options/custom/desktops/hyprland/binds.nix b/options/custom/desktops/hyprland/binds.nix index cb946cc..fec0299 100644 --- a/options/custom/desktops/hyprland/binds.nix +++ b/options/custom/desktops/hyprland/binds.nix @@ -16,9 +16,9 @@ with lib; let jq = "${pkgs.jq}/bin/jq"; kill = "${pkgs.procps}/bin/kill"; kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty"; - left = "~/.local/bin/left"; + left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source; loginctl = "${pkgs.systemd}/bin/loginctl"; - menu = "~/.local/bin/menu"; + menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source; nautilus = "${pkgs.nautilus}/bin/nautilus"; networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu"; notify-send = "${pkgs.libnotify}/bin/notify-send"; diff --git a/options/custom/desktops/hyprland/settings.nix b/options/custom/desktops/hyprland/settings.nix index 1190d28..e3f5606 100644 --- a/options/custom/desktops/hyprland/settings.nix +++ b/options/custom/desktops/hyprland/settings.nix @@ -9,7 +9,7 @@ with lib; let firefox-esr = "${ config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage }/bin/firefox-esr"; - left = "~/.local/bin/left"; + left = config.home-manager.users.${config.custom.username}.home.file.".local/bin/left".source; pkill = "${pkgs.procps}/bin/pkill"; rm = "${pkgs.coreutils}/bin/rm"; sleep = "${pkgs.coreutils}/bin/sleep"; diff --git a/options/custom/programs/networkmanager-dmenu.nix b/options/custom/programs/networkmanager-dmenu.nix index 3b7f125..e711f75 100644 --- a/options/custom/programs/networkmanager-dmenu.nix +++ b/options/custom/programs/networkmanager-dmenu.nix @@ -4,6 +4,8 @@ ... }: with lib; let + menu = config.home-manager.users.${config.custom.username}.home.file.".local/bin/menu".source; + cfg = config.custom.programs.networkmanager-dmenu; in { options.custom.programs.networkmanager-dmenu.enable = mkOption {default = false;}; @@ -13,11 +15,9 @@ in { # https://github.com/firecat53/networkmanager-dmenu/blob/main/config.ini.example #!! Option not available, files written directly # FIXME: active_chars does not take effect - home.file.".config/networkmanager-dmenu/config.ini".text = let - wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi"; - in '' + home.file.".config/networkmanager-dmenu/config.ini".text = '' [dmenu] - dmenu_command = ${wofi} --dmenu --lines 11 + dmenu_command = ${menu} --input active_chars = > wifi_icons = 󰤯󰤟󰤢󰤥󰤨 format = {icon} {name} diff --git a/options/custom/programs/waybar/default.nix b/options/custom/programs/waybar/default.nix index 60fab19..17fbeb8 100644 --- a/options/custom/programs/waybar/default.nix +++ b/options/custom/programs/waybar/default.nix @@ -13,13 +13,16 @@ with lib; let hyprctl = "${ config.home-manager.users.${config.custom.username}.wayland.windowManager.hyprland.finalPackage }/bin/hyprctl"; + inhibit = config.home-manager.users.${config.custom.username}.home.file.".local/bin/inhibit".source; jq = "${pkgs.jq}/bin/jq"; loginctl = "${pkgs.systemd}/bin/loginctl"; + network = config.home-manager.users.${config.custom.username}.home.file.".local/bin/network".source; nm-connection-editor = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor"; pgrep = "${pkgs.procps}/bin/pgrep"; ping = "${pkgs.iputils}/bin/ping"; pkill = "${pkgs.procps}/bin/pkill"; playerctl = "${pkgs.playerctl}/bin/playerctl"; + power = config.home-manager.users.${config.custom.username}.home.file.".local/bin/power".source; rfkill = "${pkgs.util-linux}/bin/rfkill"; sleep = "${pkgs.coreutils}/bin/sleep"; swaync-client = "${ @@ -29,6 +32,8 @@ with lib; let systemctl = "${pkgs.systemd}/bin/systemctl"; systemd-inhibit = "${pkgs.systemd}/bin/systemd-inhibit"; tailscale = "${pkgs.tailscale}/bin/tailscale"; + vm = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vm".source; + vpn = config.home-manager.users.${config.custom.username}.home.file.".local/bin/vpn".source; wttrbar = "${pkgs.wttrbar}/bin/wttrbar"; cfg = config.custom.programs.waybar; @@ -126,13 +131,13 @@ in { "custom/inhibitor" = { interval = 5; exec = "~/.config/waybar/scripts/inhibitor.sh"; - on-click = "~/.local/bin/inhibit"; + on-click = inhibit; }; "custom/vm" = { interval = 5; exec = "~/.config/waybar/scripts/vm.sh"; - on-click = "~/.local/bin/vm -x ${ + on-click = "${vm} -x ${ if config.custom.hidpi then "/scale:140" else "" @@ -142,7 +147,7 @@ in { "custom/vpn" = { interval = 5; exec = "~/.config/waybar/scripts/vpn.sh"; - on-click = "~/.local/bin/vpn mypi3"; + on-click = "${vpn} mypi3"; }; # https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor @@ -281,7 +286,7 @@ in { }; on-click = nm-connection-editor; - on-click-right = "~/.local/bin/network"; # Toggle networking on/off + on-click-right = network; # Toggle networking on/off }; # https://github.com/Alexays/Waybar/wiki/Module:-Battery @@ -306,7 +311,7 @@ in { warning = 30; }; - on-click = "~/.local/bin/power"; # Toggle power-saver mode + on-click = power; # Toggle power-saver mode }; }; };