From 0ca156c81b498cf08946e959574c2540d78f921d Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Fri, 2 May 2025 15:45:49 -0400 Subject: [PATCH] shortcuts for cosmic --- modules/nixos/desktop/cosmic.nix | 157 +++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/modules/nixos/desktop/cosmic.nix b/modules/nixos/desktop/cosmic.nix index 8b727bd..1f2763f 100644 --- a/modules/nixos/desktop/cosmic.nix +++ b/modules/nixos/desktop/cosmic.nix @@ -16,5 +16,162 @@ in services.desktopManager.cosmic.enable = true; hardware.system76.enableAll = true; hardware.system76.power-daemon.enable = true; + home-manager.users.${config.skyg.user.name}.xdg.configFile = { + "cosmic/com.system76.CosmicSettings.Shortcuts/v1/system_actions" = { + enable = true; + force = true; + text = ''{ + Terminal: "ghostty", + }''; + }; + "cosmic/com.system76.CosmicSettings.Shortcuts/v1/custom" = { + enable = true; + force = true; + text = '' + { + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Up", + ): MoveToOutput(Up), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Up", + ): Disable, + ( + modifiers: [ + Super, + ], + key: "b", + ): Spawn("chromium --profile-directory=\'Profile 1\'"), + ( + modifiers: [ + Super, + Alt, + ], + key: "b", + ): Spawn("chromium --profile-directory=\'Default\'"), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Down", + ): Disable, + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "l", + ): Disable, + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Right", + ): Disable, + ( + modifiers: [ + Super, + ], + key: "t", + ): Spawn("ghostty"), + ( + modifiers: [ + Super, + ], + key: "s", + ): System(Screenshot), + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Right", + ): MoveToOutput(Right), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "Left", + ): Disable, + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Left", + ): MoveToOutput(Left), + ( + modifiers: [ + Super, + ], + ): System(Launcher), + ( + modifiers: [ + Super, + ], + key: "p", + ): Spawn("wofi-emoji"), + ( + modifiers: [ + Super, + Ctrl, + ], + key: "Down", + ): MoveToOutput(Down), + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "h", + ): Disable, + ( + modifiers: [ + Super, + Alt, + ], + key: "Left", + ): MoveToPreviousWorkspace, + ( + modifiers: [ + Super, + Alt, + Shift, + ], + key: "k", + ): Disable, + ( + modifiers: [ + Super, + Alt, + ], + key: "Right", + ): MoveToNextWorkspace, + ( + modifiers: [ + Super, + ], + key: "n", + ): Minimize, + } + ''; + }; + }; }; }