From 4434a782ac10d4ccf6870f2f3899f025053bd6f5 Mon Sep 17 00:00:00 2001 From: surdeus Date: Sat, 17 Aug 2024 04:40:54 +0500 Subject: [PATCH] . --- dot/file/profile | 16 ++++++++++++---- script/use-nvidia.sh | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 script/use-nvidia.sh diff --git a/dot/file/profile b/dot/file/profile index ca09065..82d1ee1 100755 --- a/dot/file/profile +++ b/dot/file/profile @@ -2,10 +2,22 @@ # # Profile of Surdeus. # + + +# The main configuraton for each PC via the env directory. +export ETC="$HOME/etc" +export ENVDIR="$HOME/env" +export SETENV="$ETC/setenv/sh" +test -r "$SETENV" && . "$SETENV" && setenv profile + reload-profile(){ . $PROFILE } +use-nvidia(){ + . $ETC/script/use-nvidia.sh +} + no-output() { $@ &> /dev/null } @@ -77,7 +89,6 @@ fi export APP="$HOME/app" export BIN="$HOME/bin" export LOAD="$HOME/load" - export ETC="$HOME/etc" export PATH="$PATH:$BIN" export GIT="https://surdeus.su" export DEV="$HOME/dev" @@ -95,8 +106,6 @@ fi export CMDHIST="$ETC/cmds" export CMDHISTMAX="100" export PROFILE="$HOME/.profile" - export ENVDIR="$HOME/env" - export SETENV="$ETCsetenv/sh" export LOGIN="$ETC/login/sh" export INDENT=" " @@ -171,7 +180,6 @@ export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/pla #export PATH="$PATH:$ANDROID_SDK_HOME/cmdline-tools/*/bin" source-if-exist "$ETC/script/lf.sh" -test -r $SETENV && . "$SETENV" && setenv profile # Visual editor. ve(){ diff --git a/script/use-nvidia.sh b/script/use-nvidia.sh new file mode 100644 index 0000000..c9f9dcb --- /dev/null +++ b/script/use-nvidia.sh @@ -0,0 +1,3 @@ +export __NV_PRIME_RENDER_OFFLOAD=1 +export __GLX_VENDOR_LIBRARY_NAME=nvidia +export __VK_LAYER_NV_optimus=NVIDIA_only