feat: bin -> .local/bin, vcs_info untracked

This commit is contained in:
ange 2024-04-24 19:22:30 +02:00
parent af14629939
commit 7c98658d24
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
30 changed files with 31 additions and 46 deletions

@ -1 +1 @@
Subproject commit dc71d94fe223763d28ab49ee3de4fd7081a84891 Subproject commit b04ccbd0e041bb05f3eef271124da02497d9d10c

View File

@ -1,15 +1,12 @@
# vim: ft=zsh
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
[ "$XDG_VTNR" = 1 ] && { [ "$XDG_VTNR" = 1 ] && {
GUILOG="$HOME/.local/share/gui.log" GUILOG="$HOME/.local/share/xorg/gui.log"
mkdir -p "$(dirname "$GUILOG")" mv "$GUILOG" "$GUILOG.old"
mv "$GUILOG" "$GUILOG.old" 2> /dev/null
export XDG_CURRENT_DESKTOP=Unity export XDG_CURRENT_DESKTOP=Unity
exec startx > "$GUILOG" 2>&1 exec startx &> "$GUILOG"
} }
#[ "$XDG_VTNR" = 1 ] && exec Hyprland #[ "$XDG_VTNR" = 1 ] && exec Hyprland

View File

@ -1,5 +1,3 @@
# vim: ft=zsh
autoload -Uz bashcompinit compinit autoload -Uz bashcompinit compinit
zmodload zsh/complist zmodload zsh/complist

View File

@ -1,5 +1,3 @@
# vim: ft=zsh
alias dk='docker' alias dk='docker'
## container ## container

View File

@ -1,5 +1,3 @@
# vim: ft=zsh
function update() { function update() {
$TERM --hold -e "$SHELL" -ic "pac -Syu && echo -e '\e[32mDONE'" & $TERM --hold -e "$SHELL" -ic "pac -Syu && echo -e '\e[32mDONE'" &
$TERM --hold -e "$SHELL" -ic "flatpak update && echo -e '\e[32mDONE'" & $TERM --hold -e "$SHELL" -ic "flatpak update && echo -e '\e[32mDONE'" &

View File

@ -1,5 +1,3 @@
# vim: ft=zsh
function kxn() { function kxn() {
1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')" 1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')"
local ctx; ctx="$(awk '{print tolower($1)}' <<< "$1")" local ctx; ctx="$(awk '{print tolower($1)}' <<< "$1")"

View File

@ -1,8 +1,8 @@
function zle-line-init() { function zle-line-init() {
echoti smkx echoti smkx
} }
function zle-line-finish() { function zle-line-finish() {
echoti rmkx echoti rmkx
} }
zle -N zle-line-init zle -N zle-line-init
zle -N zle-line-finish zle -N zle-line-finish
@ -69,10 +69,8 @@ bindkey -M emacs '^[[1;5D' backward-word
bindkey -M viins '^[[1;5D' backward-word bindkey -M viins '^[[1;5D' backward-word
bindkey -M vicmd '^[[1;5D' backward-word bindkey -M vicmd '^[[1;5D' backward-word
bindkey ' ' magic-space # [Space] - don't do history expansion bindkey ' ' magic-space # [Space] - don't do history expansion
# file rename magick # file rename magick
bindkey "^[m" copy-prev-shell-word bindkey "^[m" copy-prev-shell-word

View File

@ -1,5 +1,6 @@
autoload -Uz vcs_info colors && colors autoload -Uz vcs_info colors && colors
export GROFF_NO_SGR=1
export LESS_TERMCAP_mb="${fg_bold[red]}" export LESS_TERMCAP_mb="${fg_bold[red]}"
export LESS_TERMCAP_md="${fg_bold[red]}" export LESS_TERMCAP_md="${fg_bold[red]}"
export LESS_TERMCAP_me="$reset_color" export LESS_TERMCAP_me="$reset_color"
@ -20,9 +21,15 @@ zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-dir
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr ' %{%F{178}%}+%{%f%b%}' zstyle ':vcs_info:*' stagedstr ' %{%F{178}%}+%{%f%b%}'
zstyle ':vcs_info:*' unstagedstr ' %{%F{178}%}*%{%f%b%}' zstyle ':vcs_info:*' unstagedstr ' %{%F{178}%}*%{%f%b%}'
#zstyle ':vcs_info:*' untrackedstr ' %{%F{39}%}?%{%f%b%}'
zstyle ':vcs_info:git:*' formats '%{%F{76}%}%b%{%f%}%c%u ' zstyle ':vcs_info:git:*' formats '%{%F{76}%}%b%{%f%}%c%u '
zstyle ':vcs_info:git:*' actionformats '%{%F{76}%}%b%{%f%}|%{%F{196}%}%a%{%f%}%c%u ' zstyle ':vcs_info:git:*' actionformats '%{%F{76}%}%b%{%f%} %{%F{196}%}%a%{%f%}%c%u '
zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
function +vi-git-untracked(){
if git status --porcelain | grep '??' &> /dev/null ; then
hook_com[unstaged]+=' %{%F{39}%}?%{%f%b%}'
fi
}
function preexec() { function preexec() {
_timer_start="$SECONDS" _timer_start="$SECONDS"

3
.local/bin/arch Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -e
podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/archlinux/archlinux:base

3
.local/bin/debian Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -e
podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/debian:12-slim

View File

@ -1,18 +1,16 @@
#!/bin/bash -e #!/bin/bash -e
CRI=(podman) OPT=()
CRI_OPT=()
if [ -z "$WAYLAND_DISPLAY" ]; then if [ -z "$WAYLAND_DISPLAY" ]; then
CRI_OPT+=( OPT+=(
--network=host --network=host
-e XAUTHORITY=/app/.Xauthority -e XAUTHORITY=/app/.Xauthority
-v "$XAUTHORITY:/app/.Xauthority:ro" -v "$XAUTHORITY:/app/.Xauthority:ro"
) )
fi fi
"${CRI[@]}" run --rm -it --name epitest \ podman run --rm -it --name epitest \
"${CRI_OPT[@]}" \ "${OPT[@]}" \
--ipc=host \ --ipc=host \
--device /dev/dri/ \ --device /dev/dri/ \
-e DISPLAY \ -e DISPLAY \
@ -25,6 +23,5 @@ fi
-v /usr/share/fonts/:/usr/share/fonts/:ro \ -v /usr/share/fonts/:/usr/share/fonts/:ro \
-v "$PWD:$PWD" \ -v "$PWD:$PWD" \
-w "$PWD" \ -w "$PWD" \
--ulimit nofile=8192:8192 \
docker.io/epitechcontent/epitest-docker:latest \ docker.io/epitechcontent/epitest-docker:latest \
"$@" "$@"

3
.local/bin/passotp Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -e
xdotool type --clearmodifiers --delay 0 "$(pass otp "$(cat /tmp/passselect)")"

View File

@ -7,7 +7,7 @@ password_files=("$prefix"/**/*.gpg)
password_files=("${password_files[@]#"$prefix"/}") password_files=("${password_files[@]#"$prefix"/}")
password_files=("${password_files[@]%.gpg}") password_files=("${password_files[@]%.gpg}")
password_file=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") password_file="$(printf '%s\n' "${password_files[@]}" | dmenu "$@")"
[ -n "$password_file" ] || exit [ -n "$password_file" ] || exit

View File

@ -95,8 +95,8 @@ echo "$$" > "$HOME/.cache/pidofbar"
sec=0 sec=0
while true; do while true; do
wait && { wait && {
[ "$((sec % 300))" = 0 ] && update_crypto [ "$((sec % 300))" = 10 ] && update_crypto
[ "$((sec % 10))" = 0 ] && { [ "$((sec % 10))" = 0 ] && {
update_cpu update_cpu
update_memory update_memory
update_sink_vol update_sink_vol

View File

@ -21,7 +21,6 @@ export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python"
export W3M_DIR="$XDG_STATE_HOME/w3m" export W3M_DIR="$XDG_STATE_HOME/w3m"
path=( path=(
"$HOME/bin"
"$HOME/.local/bin" "$HOME/.local/bin"
"$XDG_DATA_HOME/flatpak/exports/bin" "$XDG_DATA_HOME/flatpak/exports/bin"
/var/lib/flatpak/exports/bin /var/lib/flatpak/exports/bin

View File

@ -1,5 +0,0 @@
#!/bin/bash -e
CRI=(podman)
"${CRI[@]}" run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/archlinux/archlinux:base

View File

@ -1,5 +0,0 @@
#!/bin/bash -e
CRI=(podman)
"${CRI[@]}" run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/debian:12-slim

View File

@ -1,4 +0,0 @@
#!/bin/bash -e
xdotool type --clearmodifiers --delay 0 \
"$(pass otp "$(cat /tmp/passselect)")"