Cleanup + some chezmoi houskeeping cmds

This commit is contained in:
Gal Szkolnik 2022-06-06 10:28:09 -04:00
parent 179f23b633
commit 786370ba94
3 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,4 @@
if [[ -n "$(type -fP setxkbmap)" ]]; then
if [[ -n "$(type -fP setxkbmap)" && -n "$DISPLAY" ]]; then
setxkbmap -option
setxkbmap -option caps:escape
setxkbmap -option caps:ctrl_modifier

View File

@ -3,6 +3,15 @@ if [[ -n "$(type -fP chezmoi)" ]]; then
alias cz-refresh="chezmoi status | cut -d\ -f2 | grep '^\.sz\.shrc\.d' | xargs chezmoi forget --force; chezmoi add ~/.sz.shrc.d --recursive; chezmoi status; chezmoi git status"
alias cz-commit="chezmoi git -- commit -a "
function cz-remove-missing() {
pushd ~ > /dev/null
changes=$(chezmoi status | sed -n 's/^DA[ \t]\+//p')
for c in $changes; do
chezmoi rm $c
done
popd > /dev/null
}
function cz-add-changes() {
pushd ~ > /dev/null
changes=$(chezmoi status | sed -n 's/^MM[ \t]\+//p')

View File

@ -1,5 +0,0 @@
if [[ -n "$(type -fP setxkbmap)" ]]; then
setxkbmap -option
setxkbmap -option caps:escape
setxkbmap -option caps:ctrl_modifier
fi