-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
treewide: minor fixes, add hyprland variables patch
update flake remove polkit pantheon service as it can't be started this way. better to start it using exec once
- Loading branch information
1 parent
2a660ba
commit ab2fb63
Showing
12 changed files
with
325 additions
and
237 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,49 @@ | ||
# This file is specifically for overriding desktop item of VSCode | ||
# to make it work with my encrypted SSH keys by passing environment variables | ||
{ pkgs, makeDesktopItem, ... }: | ||
let | ||
{ | ||
pkgs, | ||
makeDesktopItem, | ||
... | ||
}: let | ||
executableName = "code"; | ||
longName = "Visual Studio Code"; | ||
shortName = "Code"; | ||
envVars = "env SSH_AUTH_SOCK=/run/user/1001/gnupg/S.gpg-agent.ssh"; | ||
in ((pkgs.vscode.override { | ||
# if keyring does not work, try either "libsecret" or "gnome" | ||
commandLineArgs = ''--password-store=gnome-libsecret''; | ||
}).overrideAttrs { | ||
desktopItem = makeDesktopItem { | ||
name = executableName; | ||
desktopName = longName; | ||
comment = "Code Editing. Redefined."; | ||
genericName = "Text Editor"; | ||
exec = "${envVars} ${executableName} %F"; | ||
icon = "vs${executableName}"; | ||
startupNotify = true; | ||
startupWMClass = shortName; | ||
categories = [ "Utility" "TextEditor" "Development" "IDE" ]; | ||
mimeTypes = [ "text/plain" "inode/directory" ]; | ||
keywords = [ "vscode" ]; | ||
actions.new-empty-window = { | ||
name = "New Empty Window"; | ||
exec = "${executableName} --new-window %F"; | ||
# if keyring does not work, try either "libsecret" or "gnome" | ||
commandLineArgs = ''--password-store=gnome-libsecret''; | ||
}) | ||
.overrideAttrs { | ||
desktopItem = makeDesktopItem { | ||
name = executableName; | ||
desktopName = longName; | ||
comment = "Code Editing. Redefined."; | ||
genericName = "Text Editor"; | ||
exec = "${envVars} ${executableName} %F"; | ||
icon = "vs${executableName}"; | ||
startupNotify = true; | ||
startupWMClass = shortName; | ||
categories = ["Utility" "TextEditor" "Development" "IDE"]; | ||
mimeTypes = ["text/plain" "inode/directory"]; | ||
keywords = ["vscode"]; | ||
actions.new-empty-window = { | ||
name = "New Empty Window"; | ||
exec = "${executableName} --new-window %F"; | ||
icon = "vs${executableName}"; | ||
}; | ||
}; | ||
}; | ||
|
||
urlHandlerDesktopItem = makeDesktopItem { | ||
name = executableName + "-url-handler"; | ||
desktopName = longName + " - URL Handler"; | ||
comment = "Code Editing. Redefined."; | ||
genericName = "Text Editor"; | ||
exec = envVars + executableName + " --open-url %U"; | ||
icon = "vs${executableName}"; | ||
startupNotify = true; | ||
categories = [ "Utility" "TextEditor" "Development" "IDE" ]; | ||
mimeTypes = [ "x-scheme-handler/vs${executableName}" ]; | ||
keywords = [ "vscode" ]; | ||
noDisplay = true; | ||
}; | ||
}) | ||
urlHandlerDesktopItem = makeDesktopItem { | ||
name = executableName + "-url-handler"; | ||
desktopName = longName + " - URL Handler"; | ||
comment = "Code Editing. Redefined."; | ||
genericName = "Text Editor"; | ||
exec = envVars + executableName + " --open-url %U"; | ||
icon = "vs${executableName}"; | ||
startupNotify = true; | ||
categories = ["Utility" "TextEditor" "Development" "IDE"]; | ||
mimeTypes = ["x-scheme-handler/vs${executableName}"]; | ||
keywords = ["vscode"]; | ||
noDisplay = true; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
diff --git a/src/Compositor.cpp b/src/Compositor.cpp | ||
index d1c51075..811a5c16 100644 | ||
--- a/src/Compositor.cpp | ||
+++ b/src/Compositor.cpp | ||
@@ -311,10 +311,10 @@ void CCompositor::cleanEnvironment() { | ||
if (m_sWLRSession) { | ||
const auto CMD = | ||
#ifdef USES_SYSTEMD | ||
- "systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS && hash " | ||
+ "systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS XDG_CONFIG_DIRS XDG_DATA_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR SSH_AUTH_SOCK LIBEXEC_PATH INFOPATH QT_PLUGIN_PATH && hash " | ||
"dbus-update-activation-environment 2>/dev/null && " | ||
#endif | ||
- "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS"; | ||
+ "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS XDG_CONFIG_DIRS XDG_DATA_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR SSH_AUTH_SOCK LIBEXEC_PATH INFOPATH QT_PLUGIN_PATH"; | ||
g_pKeybindManager->spawn(CMD); | ||
} | ||
} | ||
@@ -569,10 +569,10 @@ void CCompositor::startCompositor() { | ||
if (m_sWLRSession /* Session-less Hyprland usually means a nest, don't update the env in that case */) { | ||
const auto CMD = | ||
#ifdef USES_SYSTEMD | ||
- "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS && hash " | ||
+ "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS XDG_CONFIG_DIRS XDG_DATA_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR SSH_AUTH_SOCK LIBEXEC_PATH INFOPATH QT_PLUGIN_PATH && hash " | ||
"dbus-update-activation-environment 2>/dev/null && " | ||
#endif | ||
- "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS"; | ||
+ "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS XDG_CONFIG_DIRS XDG_DATA_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR SSH_AUTH_SOCK LIBEXEC_PATH INFOPATH QT_PLUGIN_PATH"; | ||
g_pKeybindManager->spawn(CMD); | ||
} | ||
|
||
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp | ||
index 944aa0b2..8e3bc1b5 100644 | ||
--- a/src/config/ConfigManager.cpp | ||
+++ b/src/config/ConfigManager.cpp | ||
@@ -1287,10 +1287,10 @@ void CConfigManager::dispatchExecOnce() { | ||
if (g_pCompositor->m_sWLRSession) | ||
handleRawExec("", | ||
#ifdef USES_SYSTEMD | ||
- "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS && hash " | ||
+ "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS XDG_CONFIG_DIRS XDG_DATA_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR SSH_AUTH_SOCK LIBEXEC_PATH INFOPATH QT_PLUGIN_PATH && hash " | ||
"dbus-update-activation-environment 2>/dev/null && " | ||
#endif | ||
- "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS"); | ||
+ "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS XDG_CONFIG_DIRS XDG_DATA_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR SSH_AUTH_SOCK LIBEXEC_PATH INFOPATH QT_PLUGIN_PATH"); | ||
|
||
firstExecDispatched = true; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters