minor
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
--password-store=gnome-libsecret
|
--password-store=gnome-libsecret
|
||||||
--enable-features=UseOzonePlatform
|
# --enable-features=UseOzonePlatform
|
||||||
--ozone-platform=wayland
|
--ozone-platform=wayland
|
||||||
--use-gl=desktop
|
# --use-gl=desktop
|
||||||
--enable-wayland-ime
|
# --enable-wayland-ime
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
--ozone-platform-hint=auto
|
--ozone-platform=wayland
|
||||||
--enable-wayland-ime
|
--enable-wayland-ime
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
--ozone-platform-hint=auto
|
--ozone-platform=wayland
|
||||||
--enable-wayland-ime
|
--enable-wayland-ime
|
||||||
|
|||||||
+46
-45
@@ -1,21 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# From archlinux's /etc/profile
|
# From archlinux's /etc/profile
|
||||||
append_path () {
|
append_path() {
|
||||||
case ":$PATH:" in
|
case ":$PATH:" in
|
||||||
*:"$1":*)
|
*:"$1":*) ;;
|
||||||
;;
|
*)
|
||||||
*)
|
PATH="${PATH:+$PATH:}$1"
|
||||||
PATH="${PATH:+$PATH:}$1"
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
prepend_path () {
|
prepend_path() {
|
||||||
case ":$PATH:" in
|
case ":$PATH:" in
|
||||||
*:"$1":*)
|
*:"$1":*) ;;
|
||||||
;;
|
*)
|
||||||
*)
|
PATH="$1${PATH:+:$PATH}"
|
||||||
PATH="$1${PATH:+:$PATH}"
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Better than nothing
|
# Better than nothing
|
||||||
@@ -26,8 +26,9 @@ export XDG_CACHE_HOME="$HOME/.cache"
|
|||||||
|
|
||||||
# Better than nothing
|
# Better than nothing
|
||||||
if [[ -z "$LANG" ]]; then
|
if [[ -z "$LANG" ]]; then
|
||||||
export LANG="en_US.UTF-8"
|
LANG="en_US.UTF-8"
|
||||||
export LC_ALL="en_US.UTF-8"
|
LC_ALL="en_US.UTF-8"
|
||||||
|
export LANG LC_ALL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
@@ -38,48 +39,48 @@ fi
|
|||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
# fnm
|
# fnm
|
||||||
if command -v fnm; then
|
if command -v fnm &>/dev/null; then
|
||||||
eval (fnm env --shell bash)
|
eval $(fnm env --shell bash)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SSH with cross-session ssh-agent
|
# SSH with cross-session ssh-agent
|
||||||
if [ -x "$HOME/.local/scripts/ssh-init" ]; then
|
if [ -x "$HOME/.local/scripts/ssh-init" ]; then
|
||||||
eval "$($HOME/.local/scripts/ssh-init 2>/dev/null)" >/dev/null 2>&1
|
eval "$($HOME/.local/scripts/ssh-init 2>/dev/null)" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# .profile is not included in the repo
|
# .profile is not included in the repo
|
||||||
[ -f "$HOME/.profile" ] && . "$HOME/.profile"
|
[ -f "$HOME/.profile" ] && . "$HOME/.profile"
|
||||||
|
|
||||||
# Triggered when SSH into the machine
|
# Triggered in SSH sessions
|
||||||
if [[ $- == *i* ]]; then
|
if [[ $- == *i* ]]; then
|
||||||
# Set EDITOR and VISUAL, mainly for sudoedit
|
# Set EDITOR and VISUAL, mainly for sudoedit
|
||||||
for app in nvim helix vim vi nano; do
|
for app in nvim helix vim vi nano; do
|
||||||
if command -v "$app" >/dev/null 2>&1; then
|
if command -v "$app" &>/dev/null; then
|
||||||
EDITOR="$app"
|
EDITOR="$app"
|
||||||
VISUAL="$app"
|
VISUAL="$app"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
export EDITOR VISUAL
|
export EDITOR VISUAL
|
||||||
|
|
||||||
# For gpg
|
# For gpg
|
||||||
GPG_TTY=$(tty)
|
GPG_TTY=$(tty)
|
||||||
export GPG_TTY
|
export GPG_TTY
|
||||||
|
|
||||||
# Shortcut alias for launching fish
|
# Shortcut alias for launching fish
|
||||||
command -v f >/dev/null 2>&1 || {
|
command -v f &>/dev/null || {
|
||||||
alias f="exec fish"
|
alias f="exec fish"
|
||||||
}
|
}
|
||||||
# Better do this manually since the automatic approach is kinda buggy.
|
# Better do this manually since the automatic approach is kinda buggy.
|
||||||
# Add this to .bashrc to enable it anyway:
|
# Add this to .bashrc to enable it anyway:
|
||||||
#
|
#
|
||||||
# if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} && ${SHLVL} == 1 ]]; then
|
# if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} && ${SHLVL} == 1 ]]; then
|
||||||
# shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
|
# shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
|
||||||
# exec fish $LOGIN_OPTION
|
# exec fish $LOGIN_OPTION
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
# .bashrc is not included in the repo
|
# .bashrc is not included in the repo
|
||||||
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset append_path
|
unset append_path
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ end
|
|||||||
|
|
||||||
# oh-my-posh
|
# oh-my-posh
|
||||||
if test -f $HOME/.config/posh_theme.omp.json; and type -q oh-my-posh
|
if test -f $HOME/.config/posh_theme.omp.json; and type -q oh-my-posh
|
||||||
oh-my-posh init fish --config $HOME/.config/posh_theme.omp.json | source
|
eval (oh-my-posh init fish --config $HOME/.config/posh_theme.omp.json)
|
||||||
end
|
end
|
||||||
|
|||||||
+5
-1
@@ -101,9 +101,13 @@ login=/usr/bin/su - kolkas -s /usr/bin/fish --login
|
|||||||
|
|
||||||
kmscon 中 `$TERM` 将会是 `xterm-256color`,不具区分度,需要另寻他路。
|
kmscon 中 `$TERM` 将会是 `xterm-256color`,不具区分度,需要另寻他路。
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
>
|
||||||
|
> 不建议在缺少对应 terminfo 的情况下直接在 `kmscon.conf` 中配置 `term=kmscon`,但确实也是一种可行的做法。
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
>
|
>
|
||||||
> 以下代码片段适用于 fish shell
|
> 以下代码片段适用于 fish shell。
|
||||||
|
|
||||||
检测所有祖先进程中是否有 kmscon:
|
检测所有祖先进程中是否有 kmscon:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user