Skip to content

Commit

Permalink
Move .nvidia-settings-rc to XDG_CONFIG_HOME
Browse files Browse the repository at this point in the history
This commits adds an alias for `nvidia-settings` witch custom config
file location under XDG_CONFIG_HOME to conform to the XDG specs
(see issue #17).

Migration:
 1. Reload current shell to set the alias
 2. Move the config file from HOME to `$XDG_CONFIG_HOME/nvidia-settings`

Known issues:
 - This patch does not fix the behavior when running `nvidia-settings`
from the Gnome menu. The config file is in this case still created in
HOME.
  • Loading branch information
matyama committed Sep 4, 2022
1 parent 848040f commit c7edcf0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .config/zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,17 @@ export FD_CONFIG_HOME=${XDG_CONFIG_HOME}/fd
export RIPGREP_CONFIG_HOME="${XDG_CONFIG_HOME}/rg"
export RIPGREP_CONFIG_PATH=${RIPGREP_CONFIG_HOME}/ripgreprc

# nvidia-settings
# - `nvidia-settings --config ...` is a workaround to make nvidia-settings XDG
# compliant, see: https://github.com/NVIDIA/nvidia-settings/issues/30
# - Despite the fact it's not recommended to override command behavior in
# `.envrc` (since it's always loaded, even for non-interactive shells), here
# we actually want to prevent all executions from creating
# `~/.nvidia-settings-rc`
# - Note: Make sure that the directory with custom config exists.
# - FIXME: still creates rc file in HOME when running from Gnome menu
alias nvidia-settings="nvidia-settings --config ${XDG_CONFIG_HOME}/nvidia-settings/nvidia-settings-rc"

# wget
# - Despite the fact it's not recommended to override command behavior in
# `.envrc` (since it's always loaded, even for non-interactive shells), here
Expand Down

0 comments on commit c7edcf0

Please sign in to comment.