aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar@gmail.com>2026-09-26 22:01:03 +0530
committerArpit Chakladar <arpitchakladar@gmail.com>2026-09-26 22:01:03 +0530
commitd1ec6eec44e2f7787ec670676933bbcc3d07d361 (patch)
tree7434bfc7fdd4f870dc9ea7940b767ac9400c9630
parent0afd73753d72b7ac2de83f80f457a85a5a33a29c (diff)
downloadhome-manager-config-d1ec6eec44e2f7787ec670676933bbcc3d07d361.tar.gz
home-manager-config-d1ec6eec44e2f7787ec670676933bbcc3d07d361.zip
feat: added actions for different modules
-rw-r--r--assets/icons/apps/bluetooth.svg7
-rw-r--r--assets/icons/apps/network-wireless.svg11
-rw-r--r--assets/icons/apps/obs.svg7
-rw-r--r--modules/desktop/niri/default.nix13
-rw-r--r--modules/desktop/rofi/default.nix50
-rw-r--r--modules/desktop/rofi/rofi-action.sh1
-rw-r--r--modules/networking/bluetui/default.nix6
-rw-r--r--modules/networking/impala/default.nix6
-rw-r--r--modules/networking/usque/default.nix14
-rw-r--r--modules/office/calcurse/default.nix6
-rw-r--r--modules/web/aria2/default.nix33
11 files changed, 77 insertions, 77 deletions
diff --git a/assets/icons/apps/bluetooth.svg b/assets/icons/apps/bluetooth.svg
deleted file mode 100644
index 525d40e..0000000
--- a/assets/icons/apps/bluetooth.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1">
- <rect fill="#324090" width="40" height="28" x="-44" y="-38" rx="14" ry="14" transform="matrix(0,-1,-1,0,0,0)"/>
- <path fill="none" stroke="#000" stroke-linecap="square" stroke-width="2" opacity=".2" d="m17 19 14 13-7 7v-27l7 7-14 13"/>
- <path fill="none" stroke="#fff" stroke-linecap="square" stroke-width="2" d="m17 18 14 13-7 7v-27l7 7-14 13"/>
- <path fill="#fff" opacity=".1" d="m24 4c-7.756 0-14 6.244-14 14v1c0-7.756 6.244-14 14-14s14 6.244 14 14v-1c0-7.756-6.244-14-14-14z"/>
- <path opacity=".2" d="m10 30v1c0 7.756 6.244 14 14 14s14-6.244 14-14v-1c0 7.756-6.244 14-14 14s-14-6.244-14-14z"/>
-</svg>
diff --git a/assets/icons/apps/network-wireless.svg b/assets/icons/apps/network-wireless.svg
deleted file mode 100644
index e8eaf16..0000000
--- a/assets/icons/apps/network-wireless.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1">
- <path fill="#5d5d5d" d="m24.082 9.0022c-7.9134 0-15.037 2.8117-20.945 7.1718l20.945 22.82 20.781-22.901c-5.885-4.312-12.929-7.0906-20.781-7.0906z"/>
- <path opacity=".2" transform="translate(-135.9 -238)" d="m159.9 252.99c-6.3037 0-12.154 2.0674-16.853 5.5589l16.941 18.441 16.765-18.441c-4.71-3.49-10.56-5.56-16.86-5.56z"/>
- <path fill="#848484" d="m24 14.994c-6.3037 0-12.154 2.0674-16.853 5.5589l16.941 18.441 16.765-18.442c-4.699-3.491-10.549-5.558-16.853-5.558z"/>
- <path opacity=".2" transform="translate(-135.9 -238)" d="m159.9 258.99c-4.7278 0-9.1156 1.5505-12.64 4.1692l12.706 13.831 12.574-13.831c-3.524-2.6186-7.9119-4.1692-12.64-4.1692z"/>
- <path fill="#e4e4e4" d="m24 20.994c-4.7278 0-9.1156 1.5505-12.64 4.1692l12.706 13.831 12.574-13.831c-3.524-2.619-7.912-4.169-12.64-4.169z"/>
- <path fill="#fff" opacity=".1" d="m24.082 9.0022c-7.9134 0-15.037 2.8118-20.945 7.1719l0.5625 0.61328c5.7976-4.131 12.714-6.7852 20.383-6.7852 7.6091 0 14.449 2.6224 20.221 6.707l0.56-0.617c-5.887-4.311-12.93-7.0896-20.783-7.0896z"/>
- <path fill="#fff" opacity=".1" d="m24.001 14.993c-6.3037 0-12.155 2.069-16.854 5.5606l0.56445 0.61328c4.6011-3.2483 10.231-5.1738 16.289-5.1738 6.0605 0 11.689 1.9275 16.291 5.1777l0.561-0.618c-4.698-3.492-10.547-5.561-16.851-5.561z"/>
- <path fill="#fff" opacity=".1" d="m24.001 20.993c-4.7278 0-9.1166 1.5513-12.641 4.1699l0.56445 0.61328c3.4249-2.3766 7.5935-3.7832 12.076-3.7832 4.4846 0 8.6524 1.4086 12.078 3.7871l0.561-0.617c-3.523-2.619-7.91-4.17-12.638-4.17z"/>
- <path opacity=".2" d="m44.307 16.717-20.225 22.287-20.385-22.209c-0.1843 0.131-0.378 0.25-0.5603 0.385l20.945 22.82 20.781-22.902c-0.1814-0.1329-0.37305-0.25091-0.55664-0.38086z"/>
-</svg>
diff --git a/assets/icons/apps/obs.svg b/assets/icons/apps/obs.svg
deleted file mode 100644
index 6b7ae20..0000000
--- a/assets/icons/apps/obs.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1">
- <path fill="#4f4f4f" d="m44 24a20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20 20 20 0 0 1 20 20z"/>
- <path fill="#fff" opacity=".1" d="m24 4a20 20 0 0 0 -20 20 20 20 0 0 0 0.0215 0.582 20 20 0 0 1 19.978 -19.582 20 20 0 0 1 19.978 19.418 20 20 0 0 0 0.022 -0.418 20 20 0 0 0 -20 -20z"/>
- <path opacity=".2" d="m43.979 24.418a20 20 0 0 1 -19.979 19.582 20 20 0 0 1 -19.978 -19.418 20 20 0 0 0 -0.022 0.418 20 20 0 0 0 20 20 20 20 0 0 0 20 -20 20 20 0 0 0 -0.021 -0.582z"/>
- <path opacity=".2" d="m24 11c-7.7231 0-14 6.2769-14 14s6.2769 14 14 14 14-6.2769 14-14-6.2769-14-14-14zm0 1.5039c6.911 0 12.496 5.585 12.496 12.496s-5.585 12.496-12.496 12.496-12.496-5.585-12.496-12.496 5.585-12.496 12.496-12.496zm-3.6348 1.1855c-0.03502 0.01124-0.09828 0.0449-0.18359 0.09375-0.57453 0.329-1.919 1.79-2.3008 2.5-0.44001 0.8184-0.79707 2.266-0.79492 3.2227 0.002 0.82301 0.21686 1.9164 0.5332 2.707 0.18439 0.46083 0.20762 0.47546 0.89062 0.55273 0.3858 0.0436 0.99607 0.17908 1.3555 0.30273 3.1778 1.0933 4.6772 4.759 3.1895 7.7969-1.0141 2.0707-3.3623 3.4049-5.5566 3.1562-0.89313-0.10119-0.79688 0.01891 0.19336 0.24414 0.87757 0.19961 2.4777 0.14672 3.3125-0.10938 1.3314-0.40846 2.9289-1.5284 3.6777-2.5801l0.24609-0.34766-0.30859-0.9375c-1.1301-3.4194 0.92124-6.8656 4.4395-7.459 2.5571-0.43131 5.241 1.1324 6.166 3.5938 0.22019 0.58594 0.22593 0.59244 0.1543 0.14258-0.2119-1.3306-0.87035-2.5586-1.9414-3.6172-1.1176-1.1046-2.4157-1.7301-4.0371-1.9473-0.49768-0.0667-0.54913-0.04739-0.73633 0.26953-0.28861 0.48857-1.1276 1.3048-1.748 1.7012-1.671 1.0677-4.2486 1.0691-5.9238 0.002-1.8924-1.2054-2.9626-3.5139-2.6152-5.6406 0.18963-1.161 0.70082-2.1917 1.5156-3.0547 0.44288-0.46905 0.5777-0.62553 0.47266-0.5918z"/>
- <path fill="#fff" d="m24 10c-7.7231 0-14 6.2769-14 14s6.2769 14 14 14 14-6.2769 14-14-6.2769-14-14-14zm0 1.5039c6.911 0 12.496 5.585 12.496 12.496s-5.585 12.496-12.496 12.496-12.496-5.585-12.496-12.496 5.585-12.496 12.496-12.496zm-3.6348 1.1855c-0.03502 0.01124-0.09828 0.0449-0.18359 0.09375-0.57453 0.329-1.919 1.79-2.3008 2.5-0.44001 0.8184-0.79707 2.266-0.79492 3.2227 0.002 0.82301 0.21686 1.9164 0.5332 2.707 0.18439 0.46083 0.20762 0.47546 0.89062 0.55273 0.3858 0.0436 0.99607 0.17908 1.3555 0.30273 3.1778 1.0933 4.6772 4.759 3.1895 7.7969-1.0141 2.0707-3.3623 3.4049-5.5566 3.1562-0.89313-0.10119-0.79688 0.01891 0.19336 0.24414 0.87757 0.19961 2.4777 0.14672 3.3125-0.10938 1.3314-0.40846 2.9289-1.5284 3.6777-2.5801l0.24609-0.34766-0.30859-0.9375c-1.1301-3.4194 0.92124-6.8656 4.4395-7.459 2.5571-0.43131 5.241 1.1324 6.166 3.5938 0.22019 0.58594 0.22593 0.59244 0.1543 0.14258-0.2119-1.3306-0.87035-2.5586-1.9414-3.6172-1.1176-1.1046-2.4157-1.7301-4.0371-1.9473-0.49768-0.0667-0.54913-0.04739-0.73633 0.26953-0.28861 0.48857-1.1276 1.3048-1.748 1.7012-1.671 1.0677-4.2486 1.0691-5.9238 0.002-1.8924-1.2054-2.9626-3.5139-2.6152-5.6406 0.18963-1.161 0.70082-2.1917 1.5156-3.0547 0.44288-0.46905 0.5777-0.62553 0.47266-0.5918z"/>
-</svg>
diff --git a/modules/desktop/niri/default.nix b/modules/desktop/niri/default.nix
index b17ea12..3368766 100644
--- a/modules/desktop/niri/default.nix
+++ b/modules/desktop/niri/default.nix
@@ -80,8 +80,9 @@ in
wayland.windowManager.niri = {
enable = true;
systemd.enable = true;
- # Let Niri register its recommended GNOME portal implementation.
- portalPackage = pkgs.xdg-desktop-portal-gnome;
+ # Don't let Niri register its own portal. We will use xdg.portal for the
+ # configuration of portal
+ portalPackage = null;
};
# For setting the desktop wallpaper
@@ -147,5 +148,13 @@ in
"fill"
];
};
+
+ desktop.rofi.action.actions = [
+ {
+ name = "Poweroff Monitors";
+ command = "${lib.getExe cfg.niri.package} msg action power-off-monitors";
+ icon = "network-vpn-symbolic";
+ }
+ ];
};
}
diff --git a/modules/desktop/rofi/default.nix b/modules/desktop/rofi/default.nix
index 0c0e6df..2eab3f2 100644
--- a/modules/desktop/rofi/default.nix
+++ b/modules/desktop/rofi/default.nix
@@ -8,30 +8,6 @@
let
cfg = config.desktop.rofi;
base16Colors = import ../../colors/base16 { inherit config lib pkgs; };
-
- actionOptionsString = lib.concatMapStringsSep "\\n" (
- action: action.name + lib.optionalString (action.icon != null) "\\0icon\\x1f${action.icon}"
- ) cfg.action.actions;
-
- actionCasesString = lib.concatStringsSep "\n" (
- map (action: " \"${action.name}\") ${action.command} ;;") cfg.action.actions
- );
-
- actionScript = pkgs.writeShellApplication {
- name = "rofi-action";
- runtimeInputs = [
- config.terminal.bash.package
- cfg.package
- ];
- text =
- builtins.replaceStrings
- [
- "@@OPTIONS@@"
- ''"@@CASES@@") : ;;''
- ]
- [ actionOptionsString actionCasesString ]
- (builtins.readFile ./rofi-action.sh);
- };
in
{
options.desktop.rofi = {
@@ -70,7 +46,6 @@ in
package = lib.mkOption {
type = lib.types.package;
readOnly = true;
- default = actionScript;
description = "The rofi-action script package.";
};
};
@@ -106,5 +81,30 @@ in
};
home.packages = lib.mkIf (cfg.action.actions != [ ]) [ cfg.action.package ];
+
+ desktop.rofi.action.package = pkgs.writeShellApplication {
+ name = "rofi-action";
+ runtimeInputs = [
+ config.terminal.bash.package
+ cfg.package
+ ];
+ text =
+ let
+ actions = cfg.action.actions;
+ optionsString = lib.concatMapStringsSep "\\n" (
+ action: action.name + lib.optionalString (action.icon != null) "\\0icon\\x1f${action.icon}"
+ ) actions;
+ casesString = lib.concatStringsSep "\n" (
+ map (action: " \"${action.name}\") ${action.command} ;;") actions
+ );
+ in
+ builtins.replaceStrings
+ [
+ "@@OPTIONS@@"
+ ''"@@CASES@@") : ;;''
+ ]
+ [ optionsString casesString ]
+ (builtins.readFile ./rofi-action.sh);
+ };
};
}
diff --git a/modules/desktop/rofi/rofi-action.sh b/modules/desktop/rofi/rofi-action.sh
index 1e09b75..844e0c9 100644
--- a/modules/desktop/rofi/rofi-action.sh
+++ b/modules/desktop/rofi/rofi-action.sh
@@ -8,6 +8,5 @@ options="@@OPTIONS@@"
chosen=$(echo -e "$options" | rofi -dmenu -i -p "Action:")
case "$chosen" in
-# replacing "@@CASES@@") : ;; instead of @@CASES@@ for linter/formatter
"@@CASES@@") : ;;
esac
diff --git a/modules/networking/bluetui/default.nix b/modules/networking/bluetui/default.nix
index b715247..1e33ac2 100644
--- a/modules/networking/bluetui/default.nix
+++ b/modules/networking/bluetui/default.nix
@@ -24,14 +24,10 @@ in
};
config = lib.mkIf cfg.enable {
- home.file.".local/share/icons/hicolor/scalable/apps/bluetooth.svg" = {
- source = ../../../assets/icons/apps/bluetooth.svg;
- };
-
xdg.desktopEntries."bluetui" = {
name = "bluetui";
exec = "${lib.getExe config.terminal.kitty.package} -e ${lib.getExe cfg.package}";
- icon = "bluetooth";
+ icon = "bluetooth-active-symbolic";
categories = [ "Network" ];
comment = "Bluetooth TUI client";
terminal = false;
diff --git a/modules/networking/impala/default.nix b/modules/networking/impala/default.nix
index f00ed58..3c52065 100644
--- a/modules/networking/impala/default.nix
+++ b/modules/networking/impala/default.nix
@@ -24,14 +24,10 @@ in
};
config = lib.mkIf cfg.enable {
- home.file.".local/share/icons/hicolor/scalable/apps/network-wireless.svg" = {
- source = ../../../assets/icons/apps/network-wireless.svg;
- };
-
xdg.desktopEntries."impala" = {
name = "impala";
exec = "${lib.getExe config.terminal.kitty.package} -e ${lib.getExe cfg.package}";
- icon = "network-wireless";
+ icon = "network-wireless-signal-excellent-symbolic";
categories = [ "Network" ];
comment = "TUI for managing wifi on Linux";
terminal = false;
diff --git a/modules/networking/usque/default.nix b/modules/networking/usque/default.nix
index aa3304c..36ec12e 100644
--- a/modules/networking/usque/default.nix
+++ b/modules/networking/usque/default.nix
@@ -71,5 +71,19 @@ in
(lib.mkIf cfg.warp.enable {
home.packages = [ cfg.warp.package ];
})
+ (lib.mkIf (cfg.warp.enable && config.desktop.enable) {
+ desktop.rofi.action.actions = [
+ {
+ name = "WARP Connect";
+ command = "${lib.getExe cfg.warp.package} connect";
+ icon = "network-vpn-symbolic";
+ }
+ {
+ name = "WARP Disconnect";
+ command = "${lib.getExe cfg.warp.package} disconnect";
+ icon = "network-vpn-disconnected-symbolic";
+ }
+ ];
+ })
];
}
diff --git a/modules/office/calcurse/default.nix b/modules/office/calcurse/default.nix
index c4053da..588cf02 100644
--- a/modules/office/calcurse/default.nix
+++ b/modules/office/calcurse/default.nix
@@ -90,10 +90,6 @@ in
config = lib.mkMerge [
(lib.mkIf cfg.enable {
- home.file.".local/share/icons/hicolor/scalable/apps/calcurse.svg" = {
- source = ../../../assets/icons/apps/calcurse.svg;
- };
-
home.packages = [ cfg.package ];
xdg.configFile."calcurse/conf" = {
text =
@@ -110,7 +106,7 @@ in
xdg.desktopEntries."calcurse" = {
name = "calcurse";
exec = "${lib.getExe config.terminal.kitty.package} --class calcurse -e ${lib.getExe cfg.package}";
- icon = "calcurse";
+ icon = "org.gnome.Calendar-symbolic";
categories = [
"Office"
"Calendar"
diff --git a/modules/web/aria2/default.nix b/modules/web/aria2/default.nix
index 60e92c6..b9b00f5 100644
--- a/modules/web/aria2/default.nix
+++ b/modules/web/aria2/default.nix
@@ -2,7 +2,6 @@
{
config,
lib,
- pkgs,
...
}:
let
@@ -19,13 +18,29 @@ in
};
};
- config = lib.mkIf cfg.enable {
- programs.aria2 = {
- enable = true;
- settings = {
- dir = "${config.home.homeDirectory}/Downloads";
+ config = lib.mkMerge [
+ (lib.mkIf cfg.enable {
+ programs.aria2 = {
+ enable = true;
+ settings = {
+ dir = "${config.home.homeDirectory}/Downloads";
+ };
+ systemd.enable = true;
};
- systemd.enable = true;
- };
- };
+ })
+ (lib.mkIf (cfg.enable && config.desktop.enable) {
+ desktop.rofi.action.actions = [
+ {
+ name = "aria2 Start";
+ command = "systemctl --user start aria2";
+ icon = "folder-download";
+ }
+ {
+ name = "aria2 Stop";
+ command = "systemctl --user stop aria2";
+ icon = "folder-download";
+ }
+ ];
+ })
+ ];
}