From aa6cb23594c91fbc818e70e31cf0f930434a0e34 Mon Sep 17 00:00:00 2001 From: CelticBoozer Date: Tue, 29 Oct 2024 13:23:20 +0300 Subject: [PATCH] fix: fix problem with environment variables declared in .zshenv and ingrore by sway Fix #255 --- .config/environment.d/envvars.conf | 5 +++++ .config/sway/config.d/daemons.conf | 1 + .config/sway/config.d/keybinds.conf | 1 - .editorconfig | 2 +- .gitignore | 2 ++ .zprofile | 1 + .zshenv | 11 +++-------- .zshrc | 9 +-------- LICENSE | 2 +- 9 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 .config/environment.d/envvars.conf create mode 100644 .zprofile diff --git a/.config/environment.d/envvars.conf b/.config/environment.d/envvars.conf new file mode 100644 index 0000000..f907979 --- /dev/null +++ b/.config/environment.d/envvars.conf @@ -0,0 +1,5 @@ +EDITOR=nvim +_JAVA_AWT_WM_NONREPARENTING=1 +QT_QPA_PLATFORMTHEME=gtk3 +WEBKIT_DISABLE_COMPOSITING_MODE=1 +BROWSER=firefox-developer-edition diff --git a/.config/sway/config.d/daemons.conf b/.config/sway/config.d/daemons.conf index a87bca8..8857695 100644 --- a/.config/sway/config.d/daemons.conf +++ b/.config/sway/config.d/daemons.conf @@ -1,3 +1,4 @@ +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK exec swaync exec swayosd-server exec sworkstyle diff --git a/.config/sway/config.d/keybinds.conf b/.config/sway/config.d/keybinds.conf index 8215c79..4d14cdf 100644 --- a/.config/sway/config.d/keybinds.conf +++ b/.config/sway/config.d/keybinds.conf @@ -125,7 +125,6 @@ bindsym XF86MonBrightnessDown exec swayosd-client --brightness lower # bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK # bindsym XF86monBrightnessUp exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p' > $WOBSOCK -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK # Notify about change layout via the SwayOSD bindcode 108 exec swayosd-client --custom-icon "preferences-desktop-locale" --custom-message "$(swaymsg -t get_inputs | jq 'map(select(has("xkb_active_layout_name")))[0].xkb_active_layout_name')" diff --git a/.editorconfig b/.editorconfig index d0dd25c..7b294ba 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,4 +7,4 @@ indent_style=space end_of_line=lf charset=utf-8 trim_trailing_whitespace=true -insert_final_newline=false \ No newline at end of file +insert_final_newline=false diff --git a/.gitignore b/.gitignore index 92ee7f5..559231d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .config/btop/btop.log !.config/easyeffects/ !.config/electron-flags.conf +!.config/environment.d/ !.config/fontconfig/ !.config/gtk-3.0/ !.config/imv/ @@ -51,6 +52,7 @@ !.stylelintrc.json !.yamlfmt.yaml !.yamllint.yaml +!.zprofile !.zshenv !.zshrc !LICENSE diff --git a/.zprofile b/.zprofile new file mode 100644 index 0000000..59737ea --- /dev/null +++ b/.zprofile @@ -0,0 +1 @@ +export $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator) \ No newline at end of file diff --git a/.zshenv b/.zshenv index 91a10ce..488675a 100644 --- a/.zshenv +++ b/.zshenv @@ -12,15 +12,10 @@ export XDG_CACHE_HOME="$HOME/.cache" export XDG_STATE_HOME="$HOME/.local/state" export XDG_DATA_HOME="$HOME/.local/share" -# Wayland settings -export MOZ_ENABLE_WAYLAND=1 firefox -export _JAVA_AWT_WM_NONREPARENTING=1 -export QT_QPA_PLATFORMTHEME=gtk3 -export WEBKIT_DISABLE_COMPOSITING_MODE=1 - # Other settings export ARCHFLAGS="-arch x86_64" -export BROWSER="firefox-developer-edition" -export DIFFPROG="nvim -d" export RIPGREP_CONFIG_PATH="${HOME}/.ripgreprc" export FZF_DEFAULT_OPTS_FILE="${HOME}/.fzfrc" +export DIFFPROG="nvim -d" + +[[ -f ~/.zprofile ]] && . ~/.zprofile diff --git a/.zshrc b/.zshrc index cc5e33b..c6db4b3 100644 --- a/.zshrc +++ b/.zshrc @@ -26,13 +26,6 @@ plugins=(fast-syntax-highlighting source $ZSH/oh-my-zsh.sh -# Preferred editor for local and remote sessions -if [[ -n $SSH_CONNECTION ]]; then - export EDITOR='nvim' -else - export EDITOR='nvim' -fi - # Set aliases alias maint="sh $HOME/.bin/maintenance.sh" alias sysupg="sh $HOME/.bin/upgrade-system.sh" @@ -41,4 +34,4 @@ alias l="eza --long --header --git --icons=always --all" alias cp="cpg -g" alias mv="mvg -g" alias cat="bat" -alias find="fd" \ No newline at end of file +alias find="fd" diff --git a/LICENSE b/LICENSE index 28df91a..bf0f567 100644 --- a/LICENSE +++ b/LICENSE @@ -7,7 +7,7 @@ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.