summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-30 00:50:16 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-10-30 00:50:16 +0100
commit15bc38edec39279f26969ca4b67126f6e544b831 (patch)
treec500f84a07c04acce18035b7635e93a2f710f162
parent0e5e622952fe51588f1537e621c63cbe4a91c136 (diff)
checkpoint
-rwxr-xr-xbin/extra/gdbcore8
-rwxr-xr-xbin/extra/notes_index4
-rwxr-xr-xconfig/common/tmux/tmux.conf14
-rw-r--r--config/essentials/zsh/.zshrc19
-rw-r--r--config/essentials/zsh/comp.zsh4
-rw-r--r--config/home/.zshenv2
6 files changed, 26 insertions, 25 deletions
diff --git a/bin/extra/gdbcore b/bin/extra/gdbcore
index 3364ce8..69b1a64 100755
--- a/bin/extra/gdbcore
+++ b/bin/extra/gdbcore
@@ -23,10 +23,10 @@ coredir=/var/lib/systemd/coredump
# Temporary file listing core files location, later used as location for the corefile
tmp="$(mktemp)"
+
if [ "$2" = "-r" ]; then
- recent="$(find "$coredir" -name 'core.assert*' -printf '%Ts %f\n' |
- sort -n |
- head -n 1 |
+ recent="$(find "$coredir" -name "core.${prog##*/}*" -printf '%Ts %f\n' |
+ sort -n -r | head -n 1 |
cut -f 2- -d' ')"
corefile="$coredir"/"$recent"
else
@@ -39,7 +39,7 @@ else
-e 's/\.[0-9]\+\.[0-9a-f]\+\.[0-9]\+\.[0-9]\+\.zst / /' \
"$tmp" |
awk '{print NR ".", "[" $3,$2"]", $1}' |
- sort -k 2 -k 3 -r |
+ sort -r -k 3 -k 2 |
fzf -0 --with-nth=2..)"
if [ -z "$choice" ]; then
rm "$tmp"
diff --git a/bin/extra/notes_index b/bin/extra/notes_index
index da5c6cf..28942cb 100755
--- a/bin/extra/notes_index
+++ b/bin/extra/notes_index
@@ -21,7 +21,7 @@ do
-name 'index.md' \
-printf '%f ' \
-exec grep '^# ' -m1 {} \; |
- sed 's/\(.\+\.md\) # \(.\+\)/- [\2](\1)/' |
+ sed 's/\(.\+\.md\) # \(.\+\)/- [\2][\1]/' |
sort -t '[' -k 2 -n >> index.md
if [ "$(find . -mindepth 2 -maxdepth 2 -type f -name '*.md' | wc -l)" -gt 0 ]
@@ -32,7 +32,7 @@ do
-maxdepth 1 \
-type d \
-not -name '.*'\
- -printf '- [%f](%f/index.md)\n' |
+ -printf '- [%f][%f/index.md]\n' |
sort -t '[' -k 2 >> index.md
fi
diff --git a/config/common/tmux/tmux.conf b/config/common/tmux/tmux.conf
index 7929836..9b09e44 100755
--- a/config/common/tmux/tmux.conf
+++ b/config/common/tmux/tmux.conf
@@ -85,17 +85,17 @@ if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
-bind-key -T copy-mode-vi 'M-h' select-pane -L
-bind-key -T copy-mode-vi 'M-j' select-pane -D
-bind-key -T copy-mode-vi 'M-k' select-pane -U
-bind-key -T copy-mode-vi 'M-l' select-pane -R
-bind-key -T copy-mode-vi 'M-\' select-pane -l
-
+bind -T copy-mode-vi 'M-h' select-pane -L
+bind -T copy-mode-vi 'M-j' select-pane -D
+bind -T copy-mode-vi 'M-k' select-pane -U
+bind -T copy-mode-vi 'M-l' select-pane -R
+bind -T copy-mode-vi 'M-\' select-pane -l
bind -n M-u previous-window
bind -n M-i next-window
-# Session navigeting with S-M-u|i
+bind -n M-O last-window
bind -n M-U switch-client -p
bind -n M-I switch-client -n
+bind -n M-O switch-client -l
# Renaming
bind n command-prompt "rename-window '%%'"
bind N command-prompt "rename-session '%%'"
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc
index f5debdb..690c7e8 100644
--- a/config/essentials/zsh/.zshrc
+++ b/config/essentials/zsh/.zshrc
@@ -16,15 +16,15 @@ autoload -z edit-command-line
zle -N edit-command-line
### Source files
-source_ex() { [ -f "$1" ] && . "$1"; } # source if exists
-source_ex /etc/grc.zsh
-source_ex /etc/profile.d/plan9.sh
-source_ex $XDG_CONFIG_HOME/zsh/comp.zsh
-source_ex $XDG_CONFIG_HOME/shell/functions.sh
-source_ex $XDG_CONFIG_HOME/shell/aliases.sh
-source_ex $XDG_CONFIG_HOME/zsh/widgets.zsh
-# . $XDG_CONFIG_HOME/zsh/prompt.zsh
-# . $XDG_CONFIG_HOME/zsh/plugins.zsh
+try_source() { [ -f "$1" ] && . "$1"; } # source if exists
+try_source /etc/grc.zsh
+# try_source /etc/profile.d/plan9.sh
+try_source $XDG_CONFIG_HOME/zsh/comp.zsh
+try_source $XDG_CONFIG_HOME/shell/functions.sh
+try_source $XDG_CONFIG_HOME/shell/aliases.sh
+try_source $XDG_CONFIG_HOME/zsh/widgets.zsh
+# try_source $XDG_CONFIG_HOME/zsh/prompt.zsh
+# try_source $XDG_CONFIG_HOME/zsh/plugins.zsh
### Programs
eval "$(starship init zsh)"
@@ -144,4 +144,3 @@ setopt notify
# zprof
-PATH="$PATH:$HOME/proj/chatty/v2/"
diff --git a/config/essentials/zsh/comp.zsh b/config/essentials/zsh/comp.zsh
index 999025f..f0af913 100644
--- a/config/essentials/zsh/comp.zsh
+++ b/config/essentials/zsh/comp.zsh
@@ -1,7 +1,7 @@
### Completion
# Find most of the stuff at https://github.com/zap-zsh/completions
-ZSH_COMPDUMP="$ZDOTDIR"/zcompcache
+export ZSH_COMPDUMP="$ZDOTDIR"/zcompcache
zmodload zsh/complist
zstyle ':compinstall' filename '/home/aluc/.zshrc'
@@ -41,7 +41,7 @@ zstyle ':completion:*' keep-prefix true
zstyle ':completion:*' menu select
fpath=($ZDOTDIR/completions $fpath)
-autoload -Uz compinit; compinit -d "$ZSH_COMPDUMP"
+autoload -Uz compinit; compinit
_dotnet_zsh_complete()
{
diff --git a/config/home/.zshenv b/config/home/.zshenv
index 6a40479..77012b1 100644
--- a/config/home/.zshenv
+++ b/config/home/.zshenv
@@ -104,3 +104,5 @@ export LD_LIBRARY_PATH=/usr/local/lib/
export MAKEFLAGS="-j$(nproc)"
export VAKKEN="$HOME/docs/school/2024-2025"
+
+PATH="$PATH:$HOME/proj/chatty/"