From e4b359c5caaa0d44d1f7b629d6b603bc6f238e44 Mon Sep 17 00:00:00 2001 From: GarandPLG Date: Thu, 14 May 2026 18:14:05 +0200 Subject: [PATCH] Add screenshot and ntfy plugins; update keybinds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Disable the notify-client module on all hosts. Install hyprshot, enable screenshot and ntfy‑notifications plugins, set screenshot mode to region, and add keybindings for these features. Introduce a restart‑noctalia script and include it in the home scripts. --- hosts/Garand-Laptop/system-modules.nix | 2 +- hosts/default/system-modules.nix | 2 +- modules/core/packages/essentials.nix | 1 + modules/home/hyprland/binds.nix | 6 ++++-- modules/home/noctalia/plugins.nix | 21 +++++++++++++++++++++ modules/home/scripts/default.nix | 1 + modules/home/scripts/restart-noctalia.nix | 6 ++++++ 7 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 modules/home/scripts/restart-noctalia.nix diff --git a/hosts/Garand-Laptop/system-modules.nix b/hosts/Garand-Laptop/system-modules.nix index 3c2a035..aca6793 100644 --- a/hosts/Garand-Laptop/system-modules.nix +++ b/hosts/Garand-Laptop/system-modules.nix @@ -75,7 +75,7 @@ _: { signal.enable = true; # Signal: secure messaging app teams.enable = true; # Teams-for-linux: Unofficial Microsoft Teams client for Linux ferdium.enable = false; # Ferdium: All your services in one place built by the community - notify.enable = true; # notify-client: Ntfy client application to receive everyday's notifications + notify.enable = false; # notify-client: Ntfy client application to receive everyday's notifications /* Productivity / Knowledge Management diff --git a/hosts/default/system-modules.nix b/hosts/default/system-modules.nix index c0504e3..406cca1 100644 --- a/hosts/default/system-modules.nix +++ b/hosts/default/system-modules.nix @@ -75,7 +75,7 @@ _: { signal.enable = true; # Signal: secure messaging app teams.enable = true; # Teams-for-linux: Unofficial Microsoft Teams client for Linux ferdium.enable = false; # Ferdium: All your services in one place built by the community - notify.enable = true; # notify-client: Ntfy client application to receive everyday's notifications + notify.enable = false; # notify-client: Ntfy client application to receive everyday's notifications /* Productivity / Knowledge Management diff --git a/modules/core/packages/essentials.nix b/modules/core/packages/essentials.nix index b2f87ba..4531a79 100644 --- a/modules/core/packages/essentials.nix +++ b/modules/core/packages/essentials.nix @@ -44,6 +44,7 @@ waypaper uwsm hyprpicker + hyprshot cliphist # Development utilities pkg-config diff --git a/modules/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix index 6efdc6d..903e397 100644 --- a/modules/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -42,9 +42,9 @@ "SUPER SHIFT, N, exec, nextcloud #\"Nextcloud desktop sync client\"" "SUPER SHIFT, O, exec, obs #\"Open Broadcaster Software\"" "SUPER SHIFT, P, exec, noctalia-shell ipc call volume togglePanel #\"Toggle volume control panel\"" - # "SUPER SHIFT, R, exec, restart.noctalia #\"Restart Noctalia shell\"" + "SUPER SHIFT, R, exec, restart-noctalia #\"Restart Noctalia shell\"" "SUPER SHIFT, Return, exec, noctalia-shell ipc call launcher toggle #\"Toggle application launcher\"" - "SUPER SHIFT, S, exec, screenshootin #\"Take screenshot\"" + "SUPER SHIFT, S, exec, noctalia-shell ipc call plugin:screenshot takeScreenshot region #\"Take screenshot\"" "SUPER SHIFT, T, exec, tutanota-desktop #\"Tutanota encrypted email client\"" "SUPER SHIFT, V, exec, noctalia-shell ipc call launcher clipboard #\"Open clipboard manager\"" ]; @@ -54,6 +54,7 @@ "SUPER ALT, F, exec, finamp #\"Jellyfin music client\"" "SUPER ALT, G, exec, dex ${desktopEntriesPath}/glance.desktop #\"Glance server panel\"" "SUPER ALT, M, exec, dex ${desktopEntriesPath}/mastodon.desktop #\"Mastodon social network client\"" + "SUPER ALT, N, exec, noctalia-shell ipc call plugin:ntfy-notifications toggle #\"Open ntfy panel\"" "SUPER ALT, P, exec, noctalia-shell ipc call settings toggle #\"Open settings panel\"" "SUPER ALT, R, exec, noctalia-shell ipc call plugin:screen-recorder toggleReplay #\"Toggle Replay\"" "SUPER ALT, S, exec, slack #\"Slack team communication tool\"" @@ -65,6 +66,7 @@ "SUPER CONTROL, C, exec, noctalia-shell ipc call powerProfile cycle #\"Cycle through power profiles\"" "SUPER CONTROL, G, exec, gimp #\"GNU Image Manipulation Program\"" "SUPER CONTROL, M, exec, mattermost-desktop #\"Mattermost team chat client\"" + "SUPER CONTROL, N, exec, noctalia-shell ipc call plugin:ntfy-notifications refresh #\"Refresh ntfy\"" "SUPER CONTROL, S, exec, signal-desktop #\"Signal encrypted messaging\"" "SUPER CONTROL, T, exec, tsukimi #\"A simple Emby/Jellyfin Client\"" "SUPER CONTROL, P, exec, hyprpicker -a #\"Pick color from screen\"" diff --git a/modules/home/noctalia/plugins.nix b/modules/home/noctalia/plugins.nix index c06d7b3..15b94ff 100644 --- a/modules/home/noctalia/plugins.nix +++ b/modules/home/noctalia/plugins.nix @@ -31,6 +31,14 @@ in { enabled = true; sourceUrl = sourceUrl; }; + screenshot = { + enabled = true; + sourceUrl = sourceUrl; + }; + ntfy-notifications = { + enabled = true; + sourceUrl = sourceUrl; + }; }; version = 2; }; @@ -71,6 +79,19 @@ in { restorePortalSession = true; customFrameRate = 6; }; + screenshot.mode = "region"; + # ntfy-notifications = { + # serverUrl = "https://ntfy.garandplg.com"; + # topics = "beszel,dockhand,jellyfin,nixos-unstable,radarr,rss-feeds,seerr,sonarr"; + # authMethod = "basic"; + # authToken = ""; + # authUsername = ''$(cat ${config.sops.secrets."credentials/ntfy/username".path})''; + # authPassword = ''$(cat ${config.sops.secrets."credentials/ntfy/password".path})''; + # pollInterval = 30; + # enableToasts = true; + # maxMessages = 100; + # readMessageIds = []; + # }; }; }; } diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index 7d18f58..c02768c 100644 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -1,5 +1,6 @@ {pkgs, ...}: { home.packages = [ (import ./nvidia-offload.nix {inherit pkgs;}) + (import ./restart-noctalia.nix {inherit pkgs;}) ]; } diff --git a/modules/home/scripts/restart-noctalia.nix b/modules/home/scripts/restart-noctalia.nix new file mode 100644 index 0000000..751766c --- /dev/null +++ b/modules/home/scripts/restart-noctalia.nix @@ -0,0 +1,6 @@ +{pkgs}: +pkgs.writeShellScriptBin "restart-noctalia" '' + noctalia-shell kill + sleep 1.5 + noctalia-shell -d +''