diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-01-09 16:52:07 +0100 | 
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-01-09 16:52:07 +0100 | 
| commit | c8283a1ef06b15ab0b5871655f4bfaefe9518673 (patch) | |
| tree | ee892a974ed799f708078def24e02f42cb70b5fa | |
| parent | cc216ca760a6b22c8b8041f525859f4201a52d1f (diff) | |
| parent | 11137f566712166f593eee3466a0287b8f3fad7b (diff) | |
Merge branch 'main' of db:dotfiles
| -rw-r--r-- | .gitattributes | 2 | ||||
| -rwxr-xr-x | bin/extra/gdbcore | 13 | ||||
| -rwxr-xr-x | bin/extra/p.sh | 10 | ||||
| -rwxr-xr-x | bin/guiscripts/vrec | 5 | ||||
| -rwxr-xr-x | bin/menuscripts/mgame | 3 | ||||
| -rw-r--r-- | config/essentials/git/config | 2 | ||||
| -rw-r--r-- | config/essentials/shell/aliases.sh | 3 | ||||
| -rw-r--r-- | config/essentials/shell/functions.sh | 6 | ||||
| -rw-r--r-- | config/essentials/zsh/comp.zsh | 2 | ||||
| l--------- | config/extra/jftui/input.conf | 2 | ||||
| l--------- | config/extra/jftui/mpv.conf | 2 | 
11 files changed, 37 insertions, 13 deletions
diff --git a/.gitattributes b/.gitattributes index 00f0b60..176a458 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -config/essentials/zsh/.zshrc filter=gpgid
\ No newline at end of file +* text=auto diff --git a/bin/extra/gdbcore b/bin/extra/gdbcore index 667db3e..6daafa8 100755 --- a/bin/extra/gdbcore +++ b/bin/extra/gdbcore @@ -1,6 +1,7 @@  #!/bin/sh -# Open the latest core file for program with gdb +# Open the latest core file for program $1 with gdb +# If no program supplied then use the most recent one  # RETURN VALUES  # 0 - success  # 1 - if the program was not found or not executable @@ -8,6 +9,8 @@  # 3 - zstd failed  # 4 - wrong usage +cache="$HOME/.cache/gdbcore_prog" +  if [ "$#" -lt 1 ]; then      >&2 printf 'usage: gdbcore [-r] <program>\n'  fi @@ -17,7 +20,13 @@ if [ "$1" = "-r" ]; then      shift  fi -prog="$1" +if [ "$1" ]; then +    prog="$1" +    printf '%s\n' "$prog" > "$cache" +else +    prog="$(cat "$cache")" +fi +  if [ ! -x "$prog" ]; then      prog="$(which "$prog" 2>/dev/null)"      [ -x "$prog" ] || exit 1 diff --git a/bin/extra/p.sh b/bin/extra/p.sh index ff36e71..681b9ab 100755 --- a/bin/extra/p.sh +++ b/bin/extra/p.sh @@ -661,14 +661,17 @@ html="/tmp/pk_tmp.html"  [ "$pokemon" ] || pokemon="$(ask_pokemon)"  [ "$pokemon" ] || exit 1 -case "$1" in +choice="$(printf 'evolution\nmoves\nstats\n' | commander -c -w 3)" +[ "$choice" ] || exit 1 + +case "$choice" in      # evolution      e*)          url="https://pokemondb.net/pokedex/$pokemon"          curl -Ls "$url" > "$html"          level1="$(pup -p 'span.infocard:nth-child(2) > small:nth-child(2) text{}' < "$html")"          level2="$(pup -p 'span.infocard:nth-child(4) > small:nth-child(2) text{}' < "$html")" -        herbe "_p.sh" "$level1\n$level2" +        herbe "_p.sh" "$level1" "$level2"      ;;      # moves @@ -676,7 +679,4 @@ case "$1" in      # stats      s*) $BROWSER "https://www.smogon.com/dex/bw/pokemon/$pokemon/" ;; -    *)   -        choice="$(printf 'evolution\nmoves\nstats\n' | commander -c -w 3)" -        [ "$choice" ] && pokemon="$pokemon" $0 "$choice" ;;  esac diff --git a/bin/guiscripts/vrec b/bin/guiscripts/vrec index 4d3f8db..6af8d58 100755 --- a/bin/guiscripts/vrec +++ b/bin/guiscripts/vrec @@ -72,7 +72,10 @@ fi  # Set audio variable  if [ "$1" = "-a" ]  then -	audio="-f pulse -ac 2 -i default" +    ## Mic +	# audio="-f pulse -ac 2 -i default" +    ## Desktop +	audio="-f pulse -i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -ac 1"  	shift  fi  output="$(date +%F_%H-%M-%S)" diff --git a/bin/menuscripts/mgame b/bin/menuscripts/mgame index 7c90a2b..cd7a7b0 100755 --- a/bin/menuscripts/mgame +++ b/bin/menuscripts/mgame @@ -4,7 +4,7 @@ steam_games()  {      # List every manifest file and get the id of the games from the file names and the name of the      # game from the file. -    find $HOME/.local/share/Steam/steamapps \ +    find ~/.local/share/Steam/steamapps \          -maxdepth 1 -type f -iname 'appmanifest_*.acf' |          while read -r File; do              Name="$(grep '"name"' "$File" | cut -f 4 -d '"')" @@ -15,6 +15,7 @@ steam_games()  }  Choice="$(steam_games | cut -f 2- -d' ' | dmenu -c -i -x)" +[ "$Choice" ] || exit 1  ID="$(steam_games | grep "[0-9]\+ $Choice" | cut -f 1 -d ' ')"  setsid steam steam://rungameid/"$ID" diff --git a/config/essentials/git/config b/config/essentials/git/config index 605d4b2..d64ae1a 100644 --- a/config/essentials/git/config +++ b/config/essentials/git/config @@ -16,3 +16,5 @@  	gpgsign = true  [gpg]  	program = /usr/bin/gpg +[core] +	autocrlf = input diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index 59b844c..10a72b1 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -296,7 +296,7 @@ alias ytdl='yt-dlp --restrict-filenames --embed-chapters -S "res:1080" -o "%(cha  # emacs aliases  alias emacsd='emacs --daemon'  alias emacsdbg='emacs --debug-init' -alias e='emacsclient -c -a "emacs"' +alias emacs='emacsclient -c -a "emacs"'  # docker aliases  alias dcb='docker build' @@ -321,6 +321,7 @@ alias cfg='edit_git_file ~/proj/dotfiles/'  alias ncfg='edit_git_file ~/.config/nvim'  alias gmod='git status --short | sed '\''/^\s*M/!d;s/^\s*M\s*//'\'' | fzf | xargs vi'  alias gclc='git clone "$(clipo)"' +alias gcan!='git commit --all --amend --no-edit'  # docker  alias dorm='docker container rm $(docker container ls -a | tail -n +2 | fzf -m | awk '\''{print $1}'\'')' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index ab257fd..f249c14 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -381,3 +381,9 @@ ssh() {      done      /usr/bin/ssh $@  } + +ssl_req() { +    [ "$1" ] || return 1 +    [ "$2" ] || return 2 +    openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "$1" -keyout "$2" +} diff --git a/config/essentials/zsh/comp.zsh b/config/essentials/zsh/comp.zsh index 7cded53..538d697 100644 --- a/config/essentials/zsh/comp.zsh +++ b/config/essentials/zsh/comp.zsh @@ -42,6 +42,8 @@ zstyle ':completion:*' menu select  fpath=($ZDOTDIR/completions $fpath)  autoload -Uz compinit; compinit +autoload -U +X bashcompinit && bashcompinit +complete -C /usr/bin/syncthing syncthing  _dotnet_zsh_complete()  { diff --git a/config/extra/jftui/input.conf b/config/extra/jftui/input.conf index dd02820..3dc6aa2 120000 --- a/config/extra/jftui/input.conf +++ b/config/extra/jftui/input.conf @@ -1 +1 @@ -/home/aluc/src/dotfiles/config/common/mpv/input.conf
\ No newline at end of file +/home/aluc/.config/mpv/input.conf
\ No newline at end of file diff --git a/config/extra/jftui/mpv.conf b/config/extra/jftui/mpv.conf index 55c1286..fd59595 120000 --- a/config/extra/jftui/mpv.conf +++ b/config/extra/jftui/mpv.conf @@ -1 +1 @@ -/home/aluc/src/dotfiles/config/common/mpv/mpv.conf
\ No newline at end of file +/home/aluc/.config/mpv/mpv.conf
\ No newline at end of file  | 
