summaryrefslogtreecommitdiff
path: root/home/xyz/.profile
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2023-10-25 06:45:08 +0000
committerXiao Pan <gky44px1999@gmail.com>2023-10-25 06:45:08 +0000
commite4db0b25bf6540386e737594a47cb92a83c0cbea (patch)
tree70f85967663aa539fabe40e40803fa638acfae00 /home/xyz/.profile
parent12bda1ac3390f2d16a401d895faf0ef2418f874c (diff)
update
Diffstat (limited to 'home/xyz/.profile')
-rw-r--r--home/xyz/.profile60
1 files changed, 13 insertions, 47 deletions
diff --git a/home/xyz/.profile b/home/xyz/.profile
index f2cc4d20..b4dd4240 100644
--- a/home/xyz/.profile
+++ b/home/xyz/.profile
@@ -3,6 +3,7 @@
export XDG_CONFIG_HOME="$HOME/.config/"
export XDG_CACHE_HOME="$HOME/.cache/"
export XDG_DATA_HOME="$HOME/.local/share/"
+export XDG_STATE_HOME="$HOME/.local/state/"
. "$XDG_CONFIG_HOME/user-dirs.dirs"
export XDG_DESKTOP_DIR
@@ -18,72 +19,43 @@ PATH="$(find "$HOME/.local/bin" -type d -exec printf '%s:' '{}' \+)$PATH"
export PATH
export HISTSIZE=15000
export HISTFILESIZE=15000
+export HISTCONTROL=ignorespace
+# sqlite uses VISUAL for the edit() SQL function default text editor
+# https://sqlite.org/cli.html
+export VISUAL=nvim
export EDITOR=nvim
-export BROWSER=firefox
+export PAGER=less
# -X seems can keep the output if exit less?
# -F is useful when sdcv need user to manually select similar word, after selection if no -F less will not quit if one screen
# but other situation seems less use -F as default?
# steal from sdcv arch wiki
-export PAGER=less
+# CALCURSE_PAGER less can't use -F, else ? and > hotkey will only blink the text
export LESS=-FRXi
-export SDCV_PAGER="$PAGER"
-export SDCV_HISTSIZE=10000
-# CALCURSE_PAGER less can't use -F, else ? and > hotkey will only blink the text
-#export CALCURSE_PAGER=less
-# not posix
export MANPAGER='nvim +Man!'
-export MANSECT='1p:1:n:l:8:3p:3:0p:0:2:5:4:9:6:7'
+# This MANSECT prioritize POSIX manpages. After use it for a long time, I think it is not suitable for me any more.
+#export MANSECT='1p:1:n:l:8:3p:3:0p:0:2:5:4:9:6:7'
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export INPUTRC="$XDG_CONFIG_HOME/.inputrc"
-#export QT_QPA_PLATFORMTHEME=qt5ct
-#export QT_QPA_PLATFORMTHEME=gtk2
-export QT_QPA_PLATFORMTHEME=qt6ct
-#export QT_STYLE_OVERRIDE=kvantum
-#export SXHKD_SHELL=sh
+# Thanks to https://github.com/trialuser02/qt6gtk2/pull/5
# enable color for `tree` command, not forced
export CLICOLOR=1
# for pacdiff, without using aur neovim-drop-in or neovim-symlinks
export DIFFPROG='nvim -d'
export MAKEFLAGS="-j$(nproc --all)"
-export DOTREMINDERS="$HOME/programs/reminders/.reminders"
-export GTK_IM_MODULE=fcitx
-export QT_IM_MODULE=fcitx
-export XMODIFIERS=@im=fcitx
# use sudo find for some files or dirs that has no permission ex: ~/.cache/paru/clone/
#export FZF_DEFAULT_COMMAND="fd --no-ignore --hidden --exclude .git"
#export FZF_CTRL_T_COMMAND="fd --absolute-path --no-ignore --hidden --exclude .git"
#export FZF_ALT_C_COMMAND="fd --no-ignore --hidden --type d --exclude .git"
-export FZF_DEFAULT_COMMAND="sudo find . -mindepth 1 -path '*/\.git' -prune -o -print"
+export FZF_DEFAULT_COMMAND="find . -mindepth 1 -path '*/\.git' -prune -o -print"
# https://askubuntu.com/questions/444551/get-absolute-path-of-files-using-find-command
# following two lines if use "" on the outermost, will not perfom expected, not sure why
-export FZF_CTRL_T_COMMAND='sudo find "$PWD" -mindepth 1 -path "*/\.git" -prune -o -print'
+export FZF_CTRL_T_COMMAND='find "$PWD" -mindepth 1 -path "*/\.git" -prune -o -print'
#export FZF_CTRL_T_COMMAND='sudo find "$(pwd)" -path "*/\.git" -prune -o -print'
# ~+ is bashism
#export FZF_CTRL_T_COMMAND="sudo find ~+ -path '*/\.git' -prune -o -print"
-export FZF_ALT_C_COMMAND="sudo find . -mindepth 1 -path '*/\.git' -prune -o -type d -print"
-
-export SCR_WIDTH=1600
-export SCR_HEIGHT=900
-
-# for clipmenu
-# set clipmenud to store clipboard only, don't store selection (primary)
-#export CM_SELECTIONS="clipboard"
-# X11, copy / close program / paste to another program, if 0 will paste nothing
-#export CM_OWN_CLIPBOARD=1
-#export CM_MAX_CLIPS=8
-
-# GDK_SCALE and GDK_DPI_SCALE should be use at the same time
-# more see bookmarks about dpi
-# not sure if correct
-#export GDK_SCALE=1.36
-#export GDK_DPI_SCALE=0.73
-# correct but not sure if fits me
-#export GDK_SCALE=2
-#export GDK_DPI_SCALE=0.5
-
-playerctld daemon
+export FZF_ALT_C_COMMAND="find . -mindepth 1 -path '*/\.git' -prune -o -type d -print"
# must source .bashrc after export _ZO_ECHO=1 and INPUTRC=..., else these two env will has no effect, don't know why
# here `. ~/.bashrc` same as `source ~/.bashrc`, see `source filename` in `man bash`, and `. file` in `man dash`
@@ -91,9 +63,3 @@ playerctld daemon
# https://github.com/koalaman/shellcheck/wiki/SC3046
#[[ -f ~/.bashrc ]] && . ~/.bashrc
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
-
-# startx when login, should be put after environmental variables for .xinitrc to use
-# use `[ "$XDG_VTNR" ]` to avoid "-bash: [: : integer expression expected" warning/error message, when `sudo su - xyz` or ssh into a remote server, not sure if best practice or not
-#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
-# exec startx
-#fi