lots of updates
attempt fix for submodule fix submodule? lots of updates
This commit is contained in:
parent
ee039f5fe0
commit
91d9e30775
|
@ -13,7 +13,6 @@ from kitty.tab_bar import (
|
|||
|
||||
opts = get_options()
|
||||
text_fg = as_rgb(color_as_int(opts.foreground))
|
||||
icon_fg = as_rgb(color_as_int(opts.color3))
|
||||
bg = as_rgb(color_as_int(opts.color8))
|
||||
|
||||
|
||||
|
@ -51,8 +50,7 @@ def draw_tab(
|
|||
|
||||
draw(screen, bg, 0, "")
|
||||
draw(screen, 0, bg, " ")
|
||||
draw(screen, icon_fg, bg, "")
|
||||
draw(screen, text_fg, bg, " " + env)
|
||||
draw(screen, text_fg, bg, "pyenv: " + env)
|
||||
draw(screen, 0, bg, " ")
|
||||
|
||||
return screen.cursor.x
|
||||
|
|
168
.config/lf/lfrc
168
.config/lf/lfrc
|
@ -12,88 +12,92 @@ set cleaner ~/.config/lf/clean
|
|||
set promptfmt "\033[34;1m%u\033[36m@\033[34m%h \033[35m[\033[0;1m%d\033[33m%f\033[35m]\033[0m"
|
||||
|
||||
cmd open ${{
|
||||
case "$(xdg-mime query filetype "$f")" in
|
||||
*/x-bzip-compressed-tar|*/x-compressed-tar|*/x-7z-compressed|*/vnd.rar|*/x-tar|*/zip|*/x-java-archive|*/x-xz|*/x-xz-compressed-tar|*/x-cd-image)
|
||||
mntdir="$f-archivemount"
|
||||
[ ! -d "$mntdir" ] && {
|
||||
mkdir "$mntdir"
|
||||
archivemount "$f" "$mntdir"
|
||||
echo "$mntdir" >> "/tmp/__lf_archivemount_$id"
|
||||
}
|
||||
lf -remote "send $id cd \"$mntdir\""
|
||||
lf -remote "send $id reload"
|
||||
;;
|
||||
audio/*) mpv --audio-display=no $f ;;
|
||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
|
||||
setsid -f sxiv -aio 2>/dev/null | while read -r file; do
|
||||
[ -z "$file" ] && continue
|
||||
lf -remote "send select \"$file\""
|
||||
lf -remote "send toggle"
|
||||
done &
|
||||
;;
|
||||
*/vnd.djvu|*/pdf|*/postscript|*/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text) setsid -f lowriter $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text) setsid -f lowriter $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template) setsid -f localc $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint) setsid -f loimpress $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template) setsid -f lodraw $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.oasis.opendocument.formula) setsid -f lomath $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.oasis.opendocument.database) setsid -f lobase $fx >/dev/null 2>&1 ;;
|
||||
esac
|
||||
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||
# text/csv) sc-im $fx ;;
|
||||
text/*|application/json|inode/x-empty) $EDITOR $fx;;
|
||||
application/pgp-encrypted) $EDITOR $fx ;;
|
||||
# *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
|
||||
esac
|
||||
case "$(xdg-mime query filetype "$f")" in
|
||||
*/x-bzip-compressed-tar|*/x-compressed-tar|*/x-7z-compressed|*/vnd.rar|*/x-tar|*/zip|*/x-java-archive|*/x-xz|*/x-xz-compressed-tar|*/x-cd-image)
|
||||
mntdir="$f-archivemount"
|
||||
[ ! -d "$mntdir" ] && {
|
||||
mkdir "$mntdir"
|
||||
archivemount "$f" "$mntdir"
|
||||
echo "$mntdir" >> "/tmp/__lf_archivemount_$id"
|
||||
}
|
||||
lf -remote "send $id cd \"$mntdir\""
|
||||
lf -remote "send $id reload"
|
||||
;;
|
||||
audio/*) mpv --audio-display=no $f ;;
|
||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
|
||||
setsid -f sxiv -aio 2>/dev/null | while read -r file; do
|
||||
[ -z "$file" ] && continue
|
||||
lf -remote "send select \"$file\""
|
||||
lf -remote "send toggle"
|
||||
done &
|
||||
;;
|
||||
*/vnd.djvu|*/pdf|*/postscript|*/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text) setsid -f lowriter $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document|application/vnd.oasis.opendocument.text) setsid -f lowriter $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/octet-stream|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template) setsid -f localc $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint) setsid -f loimpress $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template) setsid -f lodraw $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.oasis.opendocument.formula) setsid -f lomath $fx >/dev/null 2>&1 ;;
|
||||
application/vnd.oasis.opendocument.database) setsid -f lobase $fx >/dev/null 2>&1 ;;
|
||||
esac
|
||||
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||
# text/csv) sc-im $fx ;;
|
||||
text/*|application/json|inode/x-empty) $EDITOR $fx;;
|
||||
application/pgp-encrypted) $EDITOR $fx ;;
|
||||
# *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
|
||||
esac
|
||||
}}
|
||||
|
||||
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"
|
||||
|
||||
cmd extract ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "extract?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && aunpack $fx
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "extract?[y/N]"
|
||||
read ans
|
||||
clear
|
||||
[ $ans = "y" ] && aunpack $fx
|
||||
}}
|
||||
|
||||
cmd delete ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "delete?[y/N]"
|
||||
read ans
|
||||
[ $ans = "y" ] && rm -rf -- $fx
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "delete?[y/N]"
|
||||
read ans
|
||||
clear
|
||||
[ $ans = "y" ] && rm -rf -- $fx
|
||||
}}
|
||||
|
||||
cmd trash ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "trash?[y/N]"
|
||||
read ans
|
||||
if [ $ans = "y" ]; then
|
||||
for f in $fx; do
|
||||
echo $f
|
||||
trash-put $f
|
||||
done
|
||||
fi
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
printf "%s\n\t" "$fx"
|
||||
printf "trash?[y/N]"
|
||||
read ans
|
||||
clear
|
||||
if [ $ans = "y" ]; then
|
||||
for f in $fx; do
|
||||
echo $f
|
||||
trash-put $f
|
||||
done
|
||||
fi
|
||||
}}
|
||||
|
||||
cmd rsyncto ${{
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "rsync to where?"
|
||||
read dest
|
||||
for x in $fx; do
|
||||
eval rsync -aAXHv \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) rsynced." "File(s) copies to $dest."
|
||||
clear; tput cup $(($(tput lines)/3)); tput bold
|
||||
set -f
|
||||
clear; echo "rsync to where?"
|
||||
read dest
|
||||
clear
|
||||
for x in $fx; do
|
||||
eval rsync -aAXHv \"$x\" \"$dest\"
|
||||
done &&
|
||||
notify-send "File(s) rsynced." "File(s) copies to $dest."
|
||||
}}
|
||||
|
||||
# y (select for copy) and P to paste soft-link
|
||||
|
@ -149,16 +153,26 @@ cmd paste &{{
|
|||
}}
|
||||
|
||||
cmd dupe %{{
|
||||
for file in $fx; do
|
||||
find "$PWD" "$file" -maxdepth 0 | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | (
|
||||
ext=$(($(cat /dev/stdin)+1))
|
||||
filedest="$(echo "$file" | sed 's/.~[[:digit:]]*~$//').~$ext~"
|
||||
cp -r "$file" "$filedest"
|
||||
)
|
||||
done
|
||||
for file in $fx; do
|
||||
find "$PWD" "$file" -maxdepth 0 | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | (
|
||||
ext=$(($(cat /dev/stdin)+1))
|
||||
filedest="$(echo "$file" | sed 's/.~[[:digit:]]*~$//').~$ext~"
|
||||
cp -r "$file" "$filedest"
|
||||
)
|
||||
done
|
||||
}}
|
||||
|
||||
cmd share $curl -F"file=@$fx" https://0x0.snaile.de | xclip -r -selection c
|
||||
cmd edit !{{
|
||||
clear
|
||||
if [ -w $f ]; then
|
||||
$EDITOR $f
|
||||
else
|
||||
sudo -e $f
|
||||
fi
|
||||
clear
|
||||
}}
|
||||
|
||||
# cmd share $curl -F"file=@$fx" https://0x0.snaile.de | xclip -r -selection c
|
||||
|
||||
cmd fzfsearch ${{
|
||||
file="$(fzf)"
|
||||
|
@ -223,6 +237,8 @@ map <esc> quit
|
|||
map N
|
||||
map g/ cd "/"
|
||||
map W &setsid $TERMINAL -e $SHELL -c "lf; $SHELL"
|
||||
map e edit
|
||||
|
||||
|
||||
# Kitty Specific
|
||||
map W &setsid $TERMINAL $SHELL -c "lf; exec $SHELL"
|
||||
|
|
|
@ -7,7 +7,7 @@ image() {
|
|||
y=$5
|
||||
kitty +kitten icat --clear --stdin no --silent --transfer-mode memory --place "${w}x${h}@${x}x${y}" "$f" >/dev/tty && exit 1
|
||||
chafa "$f" -f symbols -s "$((w-2))x$h" && exit 1
|
||||
printf "%b" "\e[31mImage previewer failed\e[0m"
|
||||
printf "%b" "\033[31mImage previewer failed\033[0m"
|
||||
return 1
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ video() {
|
|||
h=$3
|
||||
x=$4
|
||||
y=$5
|
||||
thumb="$(vidthumb "$f")" || ( printf "%b" "\e[31mvidthumb script not in path\e[0m"; return 1 )
|
||||
thumb="$(vidthumb "$f")" || ( printf "%b" "\033[31mvidthumb script not in path\033[0m"; return 1 )
|
||||
image "$thumb" "$w" "$h" "$x" "$y"
|
||||
return 1
|
||||
}
|
||||
|
@ -33,25 +33,25 @@ batorcat() {
|
|||
CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
|
||||
|
||||
case "$(xdg-mime query filetype "$1")" in
|
||||
*/x-bzip-compressed-tar|*/x-compressed-tar|*/x-xz-compressed-tar) als -- "$1" && exit 0 || printf "%b" "\e[31matools failed\e[0m" && exit 1;;
|
||||
*/x-7z-compressed|*/vnd.rar|*/x-tar|*/zip|*/x-java-archive|*/x-xz) 7z l "$1" | sed 1,11d && exit 0 || printf "%b" "\e[31m7zip failed\e[0m" && exit 1;;
|
||||
*/x-cd-image) iso-info --no-header -l "$1" && exit 0 || printf "%b" "\e[31mlibcdio failed\e[0m" && exit 1;;
|
||||
*/x-bittorrent) transmission-show "$1" && exit 0 || printf "%b" "\e[31mtransmission-cli failed\e[0m" && exit 1;;
|
||||
*/vnd.sun.xml.writer) odt2txt "$1" && exit 0 || printf "%b" "\e[31modt2txt failed\e[0m" && exit 1;;
|
||||
*/msword) catdoc "$1" && exit 0 || printf "%b" "\e[31mcatdoc failed\e[0m" && exit 1;;
|
||||
*/vnd.openxmlformats-officedocument.wordprocessingml.document) docx2txt < "$1" && exit 0 || printf "%b" "\e[31mdocx2txt failed\e[0m" && exit 1;;
|
||||
*/vnd.ms-excel) ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv && exit 0 || printf "%b" "\e[31mgnumeric failed\e[0m" && exit 1;;
|
||||
*/vnd.openxmlformats-officedocument.spreadsheetml.sheet) ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv && exit 0 || printf "%b" "\e[31mgnumeric failed\e[0m" && exit 1;;
|
||||
*/epub+zip) [ ! -f "$CACHE" ] && epub-thumbnailer "$1" "$CACHE" 1024; image "$CACHE" "$2" "$3" "$4" "$5" && exit 0 || printf "%b" "\e[31mepubthumbnailer failed (https://github.com/marianosimone/epub-thumbnailer)\e[0m" && exit 1;;
|
||||
*/pgp-encrypted) gpg -d -- "$1" && exit 0 || printf "%b" "\e[31mgpg failed\e[0m" && exit 1;;
|
||||
*/pkix-cert) openssl x509 -text -noout -in "$1" && exit 0 || printf "%b" "\e[31mopenssl failed\e[0m" && exit 1;;
|
||||
*/x-bzip-compressed-tar|*/x-compressed-tar|*/x-xz-compressed-tar) als -- "$1" && exit 0 || printf "%b" "\033[31matool failed\033[0m" && exit 1;;
|
||||
*/x-7z-compressed|*/vnd.rar|*/x-tar|*/zip|*/x-java-archive|*/x-xz) 7z l "$1" | sed 1,11d && exit 0 || printf "%b" "\033[31m7zip failed\033[0m" && exit 1;;
|
||||
*/x-cd-image) iso-info --no-header -l "$1" && exit 0 || printf "%b" "\033[31mlibcdio failed\033[0m" && exit 1;;
|
||||
*/x-bittorrent) transmission-show "$1" && exit 0 || printf "%b" "\033[31mtransmission-cli failed\033[0m" && exit 1;;
|
||||
*/vnd.sun.xml.writer) odt2txt "$1" && exit 0 || printf "%b" "\033[31modt2txt failed\033[0m" && exit 1;;
|
||||
*/msword) catdoc "$1" && exit 0 || printf "%b" "\033[31mcatdoc failed\033[0m" && exit 1;;
|
||||
*/vnd.openxmlformats-officedocument.wordprocessingml.document) docx2txt < "$1" && exit 0 || printf "%b" "\033[31mdocx2txt failed\033[0m" && exit 1;;
|
||||
*/vnd.ms-excel) ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv && exit 0 || printf "%b" "\033[31mgnumeric failed\033[0m" && exit 1;;
|
||||
*/vnd.openxmlformats-officedocument.spreadsheetml.sheet) ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv && exit 0 || printf "%b" "\033[31mgnumeric failed\033[0m" && exit 1;;
|
||||
*/epub+zip) [ ! -f "$CACHE" ] && epub-thumbnailer "$1" "$CACHE" 1024; image "$CACHE" "$2" "$3" "$4" "$5" && exit 0 || printf "%b" "\033[31mepubthumbnailer failed (https://github.com/marianosimone/epub-thumbnailer)\033[0m" && exit 1;;
|
||||
*/pgp-encrypted) gpg -d -- "$1" && exit 0 || printf "%b" "\033[31mgpg failed\033[0m" && exit 1;;
|
||||
*/pkix-cert) openssl x509 -text -noout -in "$1" && exit 0 || printf "%b" "\033[31mopenssl failed\033[0m" && exit 1;;
|
||||
image/*) image "$1" "$2" "$3" "$4" "$5" ;;
|
||||
video/*) video "$1" "$2" "$3" "$4" "$5" ;;
|
||||
*opendocument*) odt2txt "$1" && exit 0 || printf "%b" "\e[31modt2txt failed\e[0m" && exit 1;;
|
||||
*/markdown) lowdown -Tterm "$1" && exit 0 || printf "%b" "\e[31mlowdown failed \e[0m" && exit 1;;
|
||||
*/html) lynx -dump "$1" && exit 0 || w3m -dump "$1" && exit 0 || printf "%b" "\e[31neither lynx nor w3m installed\e[0m" && exit 1;;
|
||||
*opendocument*) odt2txt "$1" && exit 0 || printf "%b" "\033[31modt2txt failed\033[0m" && exit 1;;
|
||||
*/markdown) lowdown -Tterm "$1" && exit 0 || printf "%b" "\033[31mlowdown failed \033[0m" && exit 1;;
|
||||
*/html) lynx -dump "$1" && exit 0 || w3m -dump "$1" && exit 0 || printf "%b" "\033[31neither lynx nor w3m installed\033[0m" && exit 1;;
|
||||
text/*|*/json|*/xml) batorcat "$1" "$2" ;;
|
||||
*/pdf) [ ! -f "${CACHE}.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"; image "${CACHE}.jpg" "$2" "$3" "$4" "$5" && exit 0 || printf "%b" "\e[31mpoppler-utils/poppler failed\e[0m" && exit 1;;
|
||||
*/pdf) [ ! -f "${CACHE}.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"; image "${CACHE}.jpg" "$2" "$3" "$4" "$5" && exit 0 || printf "%b" "\033[31mpoppler-utils/poppler failed\033[0m" && exit 1;;
|
||||
esac
|
||||
case "$(file -bL --mime-type "$1")" in
|
||||
text/*) batorcat "$1" "$2" ;;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# vim:set ft=zsh
|
||||
# sudo not required for some system commands
|
||||
for command in mount umount sv pacman apt aptitude updatedb su shutdown poweroff reboot; do
|
||||
for command in mount umount sv pacman xbps-install xbps-remove apt aptitude updatedb su shutdown poweroff reboot; do
|
||||
command -v $command 1>/dev/null 2>&1 && alias $command="sudo $command"
|
||||
done
|
||||
unset command
|
||||
|
@ -31,14 +31,30 @@ alias \
|
|||
ka="killall" \
|
||||
e="$EDITOR" \
|
||||
z="zathura" \
|
||||
p="pacman" \
|
||||
ar="apt remove" \
|
||||
are="apt reinstall" \
|
||||
ai="apt install" \
|
||||
aur="apt autoremove" \
|
||||
au="apt upgrade" \
|
||||
kssh="kitty +kitten ssh"
|
||||
|
||||
if command -v pacman 1>/dev/null 2>&1; then
|
||||
alias p="pacman"
|
||||
fi
|
||||
|
||||
if command -v apt 1>/dev/null 2>&1; then
|
||||
alias \
|
||||
ain="apt install" \
|
||||
are="apt remove" \
|
||||
arein="apt reinstall" \
|
||||
aur="apt autoremove" \
|
||||
aup="apt upgrade" \
|
||||
ase="apt search" \
|
||||
ash="apt show"
|
||||
fi
|
||||
|
||||
if command -v xbps-install 1>/dev/null 2>&1; then
|
||||
alias \
|
||||
xin="xbps-install" \
|
||||
xre="xbps-remove"
|
||||
fi
|
||||
|
||||
|
||||
# Misc.
|
||||
alias \
|
||||
ll="ls -alhN --color=auto --group-directories-first" \
|
||||
|
|
|
@ -20,28 +20,28 @@ export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
|||
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
|
||||
|
||||
# Color palette for console dialogs in tools such as nmtui and whiptail
|
||||
export NEWT_COLORS=='
|
||||
export NEWT_COLORS='
|
||||
root=white,black
|
||||
border=black,lightgray
|
||||
window=lightgray,lightgray
|
||||
shadow=black,gray
|
||||
title=black,lightgray
|
||||
button=black,cyan
|
||||
actbutton=white,cyan
|
||||
button=black,blue
|
||||
actbutton=white,blue
|
||||
compactbutton=black,lightgray
|
||||
checkbox=black,lightgray
|
||||
actcheckbox=lightgray,cyan
|
||||
actcheckbox=lightgray,blue
|
||||
entry=black,lightgray
|
||||
disentry=gray,lightgray
|
||||
label=black,lightgray
|
||||
listbox=black,lightgray
|
||||
actlistbox=black,cyan
|
||||
actlistbox=black,blue
|
||||
sellistbox=lightgray,black
|
||||
actsellistbox=lightgray,black
|
||||
textbox=black,lightgray
|
||||
acttextbox=black,cyan
|
||||
acttextbox=black,blue
|
||||
emptyscale=,gray
|
||||
fullscale=,cyan
|
||||
fullscale=,blue
|
||||
helpline=white,black
|
||||
roottext=lightgrey,black
|
||||
'
|
||||
|
@ -59,6 +59,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
|
|||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
export ZSH_COMPDUMP="$XDG_CACHE_HOME/zcompdump"
|
||||
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config"
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
.config/gtk-3.0/bookmarks
|
||||
.config/gtk-2.0/gtkfilechooser.ini
|
||||
.local/share/firefox/user.js
|
||||
.local/share/firefox/userjs_backups
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
GREEN='\e[1;32m'
|
||||
BLUE='\e[1;34m'
|
||||
RED='\e[1;30m'
|
||||
NC='\e[0m'
|
||||
dotfiles="${1:-$HOME/.dotfiles}"
|
||||
BOLD='\033[1m'
|
||||
GREEN='\033[32m'
|
||||
BLUE='\033[34m'
|
||||
RED='\033[31m'
|
||||
NC='\033[0m'
|
||||
dotfiles="${1:-$DOTFILES}"
|
||||
dotfiles="${dotfiles:-$HOME/.dotfiles}"
|
||||
|
||||
printf "%bChanging directory to %s %b\n" "$BLUE" "$dotfiles" "$NC"
|
||||
printf "%b" "$BOLD${BLUE}Changing directory to $dotfiles$NC\n"
|
||||
if ! cd "$dotfiles"; then
|
||||
printf "%bCould not CD into %s%b\n" "$RED" "$dotfiles" "$NC"
|
||||
printf "%b" "${RED}Could not CD into $dotfiles$NC\n"
|
||||
exit
|
||||
fi
|
||||
printf "\n"
|
||||
|
||||
printf "%bStashing existing changes...%b\n" "$BLUE" "$NC"
|
||||
printf "%b" "$BOLD${BLUE}Stashing existing changes...$NC\n"
|
||||
stash_result=$(git stash push -m "sync-dotfiles: Before syncing dotfiles")
|
||||
needs_pop=1
|
||||
if [ "$stash_result" = "No local changes to save" ]; then
|
||||
|
@ -21,39 +23,38 @@ if [ "$stash_result" = "No local changes to save" ]; then
|
|||
fi
|
||||
printf "\n"
|
||||
|
||||
printf "%bPulling updates from dotfiles repo...%b\n" "$BLUE" "$NC"
|
||||
printf "%b" "$BOLD${BLUE}Pulling updates from dotfiles repo...$NC\n"
|
||||
git pull origin main
|
||||
git submodule update --remote --recursive
|
||||
printf "\n"
|
||||
|
||||
if [ $needs_pop -eq 1 ]; then
|
||||
printf "%bPopping stashed changes...%b\n" "$BLUE" "$NC"
|
||||
printf "%b" "$BOLD${BLUE}Popping stashed changes...$NC\n"
|
||||
git stash pop
|
||||
fi
|
||||
printf "\n"
|
||||
|
||||
unmerged_files=$(git diff --name-only --diff-filter=U)
|
||||
if [ -n "$unmerged_files" ]; then
|
||||
printf "%bThe following files have merge conflicts after popping the stash:%b\n" "$RED" "$NC"
|
||||
printf "%b" "${RED}The following files have merge conflicts after popping the stash:$NC\n"
|
||||
printf "\n"
|
||||
printf %"s\n" "$unmerged_files\n"
|
||||
printf "$unmerged_files\n"
|
||||
else
|
||||
stow -t "$HOME" . || printf "%bStow uninstalled or not in path!%b\n" "$RED" "$NC"
|
||||
stow --dotfiles -t "$HOME" . || printf "%b" "${RED}Failed to run stow!$NC\n"
|
||||
fi
|
||||
|
||||
printf "%bGenerating firefox profiles...%b\n" "$BLUE" "$NC"
|
||||
"$dotfiles"/.mozilla/firefox/generate.sh
|
||||
printf "%b" "$BOLD${BLUE}Generating firefox profiles...$NC\n\n"
|
||||
"$dotfiles/.mozilla/firefox/generate.sh"
|
||||
printf "\n"
|
||||
|
||||
printf "Recompile/Install src files? [y/N] \n"
|
||||
read -r ans
|
||||
printf "${BOLD}Recompile/Install src files? ${GREEN}Y/N?$NC\n"
|
||||
read ans
|
||||
[ "$ans" = "y" ] && for f in "$dotfiles"/.local/src/*; do
|
||||
if ! cd "$f"; then
|
||||
printf "%bCould not CD into %s%b\n" "$RED" "$f" "$NC"
|
||||
printf "%b" "${RED}Could not CD into $f$NC\n"
|
||||
exit
|
||||
fi
|
||||
sudo make install
|
||||
make clean
|
||||
done
|
||||
|
||||
printf "%bDotfiles Synced Successfully!%b\n" "$GREEN" "$NC"
|
||||
printf "%b" "$BOLD${BLUE}Dotfiles Synced Successfully!$NC\n"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
BOLD='\033[1m'
|
||||
BLUE='\033[34m'
|
||||
NC='\033[0m'
|
||||
# This pkill is already handled by apt/pacman hooks:
|
||||
# pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
||||
|
||||
|
@ -15,7 +18,7 @@
|
|||
# When = PostTransaction
|
||||
# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks
|
||||
|
||||
printf "Beginning upgrade.\\n"
|
||||
printf "%b" "$BOLD${BLUE}Beginning upgrade.$NC\n"
|
||||
if command -v paru 1>/dev/null 2>&1; then
|
||||
paru -Syu
|
||||
elif command -v yay 1>/dev/null 2>&1; then
|
||||
|
@ -39,6 +42,9 @@ command -v apt 1>/dev/null 2>&1 && sudo apt upgrade
|
|||
|
||||
command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
||||
|
||||
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
|
||||
printf "%b" "$BOLD${BLUE}Updating arkenfox...$NC\n"
|
||||
"$DOTFILES/.local/share/firefox/updater.sh" -s
|
||||
|
||||
printf "%b" "$BOLD${BLUE}Upgrade complete.\nPress <Enter> to exit window.\n"
|
||||
read -r _
|
||||
exit
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 445bfaa764e0852d29d820794e02257f7deac05b
|
||||
Subproject commit c4c8faaaa1b03b087ece7d4f226c349693b47f58
|
Loading…
Reference in New Issue