Cleanup + some chezmoi houskeeping cmds
This commit is contained in:
parent
179f23b633
commit
786370ba94
|
@ -1,4 +1,4 @@
|
||||||
if [[ -n "$(type -fP setxkbmap)" ]]; then
|
if [[ -n "$(type -fP setxkbmap)" && -n "$DISPLAY" ]]; then
|
||||||
setxkbmap -option
|
setxkbmap -option
|
||||||
setxkbmap -option caps:escape
|
setxkbmap -option caps:escape
|
||||||
setxkbmap -option caps:ctrl_modifier
|
setxkbmap -option caps:ctrl_modifier
|
||||||
|
|
|
@ -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-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 "
|
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() {
|
function cz-add-changes() {
|
||||||
pushd ~ > /dev/null
|
pushd ~ > /dev/null
|
||||||
changes=$(chezmoi status | sed -n 's/^MM[ \t]\+//p')
|
changes=$(chezmoi status | sed -n 's/^MM[ \t]\+//p')
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
if [[ -n "$(type -fP setxkbmap)" ]]; then
|
|
||||||
setxkbmap -option
|
|
||||||
setxkbmap -option caps:escape
|
|
||||||
setxkbmap -option caps:ctrl_modifier
|
|
||||||
fi
|
|
Loading…
Reference in New Issue