about summary refs log tree commit diff stats
path: root/modules/by-name/xd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/by-name/xd/xdg/module.nix13
-rwxr-xr-xmodules/by-name/xd/xdg/scripts/lf-wrapper.sh11
-rwxr-xr-xmodules/by-name/xd/xdg/scripts/url-handler.sh17
3 files changed, 36 insertions, 5 deletions
diff --git a/modules/by-name/xd/xdg/module.nix b/modules/by-name/xd/xdg/module.nix
index f1781d86..94c5a975 100644
--- a/modules/by-name/xd/xdg/module.nix
+++ b/modules/by-name/xd/xdg/module.nix
@@ -1,3 +1,12 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   pkgs,
   lib,
@@ -38,6 +47,8 @@ in {
   config = lib.mkIf cfg.enable {
     home-manager.users.soispha = {
       xdg = {
+        configFile."xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile;
+
         desktopEntries = {
           url-handler = {
             name = "url-handler";
@@ -107,8 +118,6 @@ in {
       };
     };
 
-    environment.etc."xdg/xdg-desktop-portal-termfilechooser/config".source = tfcConfigFile;
-
     systemd.user.services.xdg-desktop-portal-termfilechooser = {
       serviceConfig.ExecStart = [
         ""
diff --git a/modules/by-name/xd/xdg/scripts/lf-wrapper.sh b/modules/by-name/xd/xdg/scripts/lf-wrapper.sh
index f85f7bac..6a5c5295 100755
--- a/modules/by-name/xd/xdg/scripts/lf-wrapper.sh
+++ b/modules/by-name/xd/xdg/scripts/lf-wrapper.sh
@@ -1,4 +1,15 @@
 #!/usr/bin/env sh
+
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
 # This wrapper script is invoked by xdg-desktop-portal-termfilechooser.
 #
 # For more information about input/output arguments read `xdg-desktop-portal-termfilechooser(5)`
diff --git a/modules/by-name/xd/xdg/scripts/url-handler.sh b/modules/by-name/xd/xdg/scripts/url-handler.sh
index 5aa01a48..b3563349 100755
--- a/modules/by-name/xd/xdg/scripts/url-handler.sh
+++ b/modules/by-name/xd/xdg/scripts/url-handler.sh
@@ -1,8 +1,18 @@
 #!/usr/bin/env sh
 
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
 project="$({
     tskm projects list
-    echo nvim zathura
+    printf "%s\n" nvim zathura
 } | rofi -sep "$(printf "\n")" -dmenu)"
 
 if [ "$project" = "nvim" ]; then
@@ -10,9 +20,10 @@ if [ "$project" = "nvim" ]; then
 elif [ "$project" = "zathura" ]; then
     zathura "$1"
 elif [ "$project" ]; then
-    tskm open "$project" "$1"
+    tskm open project "$project" "$1"
 else
-    notify-send "(URL HANDLER) No project selected"; exit 1
+    notify-send "(URL HANDLER) No project selected"
+    exit 1
 fi
 
 # vim: ft=sh