From 7c98658d24ce3332cdc2f38deec00eee18f0a434 Mon Sep 17 00:00:00 2001 From: ange Date: Wed, 24 Apr 2024 19:22:30 +0200 Subject: [PATCH] feat: bin -> .local/bin, vcs_info untracked --- .config/nvim/pack/plugins/opt/treesitter | 2 +- .config/zsh/.zprofile | 9 +++------ .config/zsh/.zshrc | 2 -- .config/zsh/aliases/docker.zsh | 2 -- .config/zsh/aliases/general.zsh | 2 -- .config/zsh/aliases/kubectl.zsh | 2 -- .config/zsh/input.zsh | 6 ++---- .config/zsh/theme.zsh | 11 +++++++++-- {bin => .local/bin}/am | 0 .local/bin/arch | 3 +++ {bin => .local/bin}/crypto | 0 .local/bin/debian | 3 +++ {bin => .local/bin}/epitest | 11 ++++------- {bin => .local/bin}/light | 0 {bin => .local/bin}/lock | 0 {bin => .local/bin}/mouse_360 | 0 {bin => .local/bin}/passinfo | 0 {bin => .local/bin}/passopen | 0 .local/bin/passotp | 3 +++ {bin => .local/bin}/passpass | 0 {bin => .local/bin}/passselect | 2 +- {bin => .local/bin}/passuser | 0 {bin => .local/bin}/sbar | 4 ++-- {bin => .local/bin}/steam | 0 {bin => .local/bin}/vol | 0 {bin => .local/bin}/wlp | 0 .zshenv | 1 - bin/arch | 5 ----- bin/debian | 5 ----- bin/passotp | 4 ---- 30 files changed, 31 insertions(+), 46 deletions(-) rename {bin => .local/bin}/am (100%) create mode 100755 .local/bin/arch rename {bin => .local/bin}/crypto (100%) create mode 100755 .local/bin/debian rename {bin => .local/bin}/epitest (80%) rename {bin => .local/bin}/light (100%) rename {bin => .local/bin}/lock (100%) rename {bin => .local/bin}/mouse_360 (100%) rename {bin => .local/bin}/passinfo (100%) rename {bin => .local/bin}/passopen (100%) create mode 100755 .local/bin/passotp rename {bin => .local/bin}/passpass (100%) rename {bin => .local/bin}/passselect (81%) rename {bin => .local/bin}/passuser (100%) rename {bin => .local/bin}/sbar (97%) rename {bin => .local/bin}/steam (100%) rename {bin => .local/bin}/vol (100%) rename {bin => .local/bin}/wlp (100%) delete mode 100755 bin/arch delete mode 100755 bin/debian delete mode 100755 bin/passotp diff --git a/.config/nvim/pack/plugins/opt/treesitter b/.config/nvim/pack/plugins/opt/treesitter index dc71d94..b04ccbd 160000 --- a/.config/nvim/pack/plugins/opt/treesitter +++ b/.config/nvim/pack/plugins/opt/treesitter @@ -1 +1 @@ -Subproject commit dc71d94fe223763d28ab49ee3de4fd7081a84891 +Subproject commit b04ccbd0e041bb05f3eef271124da02497d9d10c diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 09b819c..0f96a94 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -1,15 +1,12 @@ -# vim: ft=zsh - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" [ "$XDG_VTNR" = 1 ] && { - GUILOG="$HOME/.local/share/gui.log" + GUILOG="$HOME/.local/share/xorg/gui.log" - mkdir -p "$(dirname "$GUILOG")" - mv "$GUILOG" "$GUILOG.old" 2> /dev/null + mv "$GUILOG" "$GUILOG.old" export XDG_CURRENT_DESKTOP=Unity - exec startx > "$GUILOG" 2>&1 + exec startx &> "$GUILOG" } #[ "$XDG_VTNR" = 1 ] && exec Hyprland diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index de194c7..f46aa57 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,5 +1,3 @@ -# vim: ft=zsh - autoload -Uz bashcompinit compinit zmodload zsh/complist diff --git a/.config/zsh/aliases/docker.zsh b/.config/zsh/aliases/docker.zsh index 0fd4277..2fdf51f 100644 --- a/.config/zsh/aliases/docker.zsh +++ b/.config/zsh/aliases/docker.zsh @@ -1,5 +1,3 @@ -# vim: ft=zsh - alias dk='docker' ## container diff --git a/.config/zsh/aliases/general.zsh b/.config/zsh/aliases/general.zsh index 2a60e7e..370b422 100644 --- a/.config/zsh/aliases/general.zsh +++ b/.config/zsh/aliases/general.zsh @@ -1,5 +1,3 @@ -# vim: ft=zsh - function update() { $TERM --hold -e "$SHELL" -ic "pac -Syu && echo -e '\e[32mDONE'" & $TERM --hold -e "$SHELL" -ic "flatpak update && echo -e '\e[32mDONE'" & diff --git a/.config/zsh/aliases/kubectl.zsh b/.config/zsh/aliases/kubectl.zsh index 3db9ae2..19da8f8 100644 --- a/.config/zsh/aliases/kubectl.zsh +++ b/.config/zsh/aliases/kubectl.zsh @@ -1,5 +1,3 @@ -# vim: ft=zsh - function kxn() { 1="$(echo - "$1" | tr -c '[:alnum:]-_' '[ *]')" local ctx; ctx="$(awk '{print tolower($1)}' <<< "$1")" diff --git a/.config/zsh/input.zsh b/.config/zsh/input.zsh index 9e9911f..8ef9f16 100644 --- a/.config/zsh/input.zsh +++ b/.config/zsh/input.zsh @@ -1,8 +1,8 @@ function zle-line-init() { -echoti smkx + echoti smkx } function zle-line-finish() { -echoti rmkx + echoti rmkx } zle -N zle-line-init 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 vicmd '^[[1;5D' backward-word - bindkey ' ' magic-space # [Space] - don't do history expansion - # file rename magick bindkey "^[m" copy-prev-shell-word diff --git a/.config/zsh/theme.zsh b/.config/zsh/theme.zsh index 7a24d82..509adcd 100644 --- a/.config/zsh/theme.zsh +++ b/.config/zsh/theme.zsh @@ -1,5 +1,6 @@ autoload -Uz vcs_info colors && colors +export GROFF_NO_SGR=1 export LESS_TERMCAP_mb="${fg_bold[red]}" export LESS_TERMCAP_md="${fg_bold[red]}" 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:*' stagedstr ' %{%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:*' 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() { _timer_start="$SECONDS" diff --git a/bin/am b/.local/bin/am similarity index 100% rename from bin/am rename to .local/bin/am diff --git a/.local/bin/arch b/.local/bin/arch new file mode 100755 index 0000000..a19d92c --- /dev/null +++ b/.local/bin/arch @@ -0,0 +1,3 @@ +#!/bin/bash -e + +podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/archlinux/archlinux:base diff --git a/bin/crypto b/.local/bin/crypto similarity index 100% rename from bin/crypto rename to .local/bin/crypto diff --git a/.local/bin/debian b/.local/bin/debian new file mode 100755 index 0000000..3a25af4 --- /dev/null +++ b/.local/bin/debian @@ -0,0 +1,3 @@ +#!/bin/bash -e + +podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/debian:12-slim diff --git a/bin/epitest b/.local/bin/epitest similarity index 80% rename from bin/epitest rename to .local/bin/epitest index f63ba05..0659bd3 100755 --- a/bin/epitest +++ b/.local/bin/epitest @@ -1,18 +1,16 @@ #!/bin/bash -e -CRI=(podman) -CRI_OPT=() - +OPT=() if [ -z "$WAYLAND_DISPLAY" ]; then - CRI_OPT+=( + OPT+=( --network=host -e XAUTHORITY=/app/.Xauthority -v "$XAUTHORITY:/app/.Xauthority:ro" ) fi -"${CRI[@]}" run --rm -it --name epitest \ - "${CRI_OPT[@]}" \ +podman run --rm -it --name epitest \ + "${OPT[@]}" \ --ipc=host \ --device /dev/dri/ \ -e DISPLAY \ @@ -25,6 +23,5 @@ fi -v /usr/share/fonts/:/usr/share/fonts/:ro \ -v "$PWD:$PWD" \ -w "$PWD" \ - --ulimit nofile=8192:8192 \ docker.io/epitechcontent/epitest-docker:latest \ "$@" diff --git a/bin/light b/.local/bin/light similarity index 100% rename from bin/light rename to .local/bin/light diff --git a/bin/lock b/.local/bin/lock similarity index 100% rename from bin/lock rename to .local/bin/lock diff --git a/bin/mouse_360 b/.local/bin/mouse_360 similarity index 100% rename from bin/mouse_360 rename to .local/bin/mouse_360 diff --git a/bin/passinfo b/.local/bin/passinfo similarity index 100% rename from bin/passinfo rename to .local/bin/passinfo diff --git a/bin/passopen b/.local/bin/passopen similarity index 100% rename from bin/passopen rename to .local/bin/passopen diff --git a/.local/bin/passotp b/.local/bin/passotp new file mode 100755 index 0000000..c4181b0 --- /dev/null +++ b/.local/bin/passotp @@ -0,0 +1,3 @@ +#!/bin/bash -e + +xdotool type --clearmodifiers --delay 0 "$(pass otp "$(cat /tmp/passselect)")" diff --git a/bin/passpass b/.local/bin/passpass similarity index 100% rename from bin/passpass rename to .local/bin/passpass diff --git a/bin/passselect b/.local/bin/passselect similarity index 81% rename from bin/passselect rename to .local/bin/passselect index b02b0ce..0efdeb5 100755 --- a/bin/passselect +++ b/.local/bin/passselect @@ -7,7 +7,7 @@ password_files=("$prefix"/**/*.gpg) password_files=("${password_files[@]#"$prefix"/}") 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 diff --git a/bin/passuser b/.local/bin/passuser similarity index 100% rename from bin/passuser rename to .local/bin/passuser diff --git a/bin/sbar b/.local/bin/sbar similarity index 97% rename from bin/sbar rename to .local/bin/sbar index 501ad02..c571819 100755 --- a/bin/sbar +++ b/.local/bin/sbar @@ -95,8 +95,8 @@ echo "$$" > "$HOME/.cache/pidofbar" sec=0 while true; do wait && { - [ "$((sec % 300))" = 0 ] && update_crypto - [ "$((sec % 10))" = 0 ] && { + [ "$((sec % 300))" = 10 ] && update_crypto + [ "$((sec % 10))" = 0 ] && { update_cpu update_memory update_sink_vol diff --git a/bin/steam b/.local/bin/steam similarity index 100% rename from bin/steam rename to .local/bin/steam diff --git a/bin/vol b/.local/bin/vol similarity index 100% rename from bin/vol rename to .local/bin/vol diff --git a/bin/wlp b/.local/bin/wlp similarity index 100% rename from bin/wlp rename to .local/bin/wlp diff --git a/.zshenv b/.zshenv index 3361c87..4e80fc8 100644 --- a/.zshenv +++ b/.zshenv @@ -21,7 +21,6 @@ export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python" export W3M_DIR="$XDG_STATE_HOME/w3m" path=( - "$HOME/bin" "$HOME/.local/bin" "$XDG_DATA_HOME/flatpak/exports/bin" /var/lib/flatpak/exports/bin diff --git a/bin/arch b/bin/arch deleted file mode 100755 index 114e785..0000000 --- a/bin/arch +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -CRI=(podman) - -"${CRI[@]}" run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/archlinux/archlinux:base diff --git a/bin/debian b/bin/debian deleted file mode 100755 index a1ab773..0000000 --- a/bin/debian +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e - -CRI=(podman) - -"${CRI[@]}" run --rm -it -v "$PWD:/mnt/" -w /mnt/ docker.io/debian:12-slim diff --git a/bin/passotp b/bin/passotp deleted file mode 100755 index 2b064e4..0000000 --- a/bin/passotp +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e - -xdotool type --clearmodifiers --delay 0 \ - "$(pass otp "$(cat /tmp/passselect)")"