Bash : Add style reload support.

This commit is contained in:
Dmitry Voronin 2024-08-20 15:14:18 +03:00
parent 6e2c86552e
commit cae2deab26
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
3 changed files with 17 additions and 1 deletions

View file

@ -2,6 +2,6 @@
text = ''
set $term ${config.setting.terminal.bin}
bindsym --to-code $mod+Escape exec $term -e bash -c "tmux new-session -A -s $USER; bash"
bindsym --to-code $mod+Escape exec $term -e bash -i -c "tmux new-session -A -s $USER; bash -i"
'';
}

View file

@ -0,0 +1,8 @@
{ ... }: {
text = ''
function reload() {
source ~/.bashrc
}
trap reload USR1
'';
}

View file

@ -3,10 +3,18 @@
# Reload.
function reload() {
re() {
# Sway.
swaymsg reload
# Waybar.
pkill waybar
swaymsg exec waybar
# Tmux.
tmux source-file ~/.config/tmux/tmux.conf
# Bash.
pkill -SIGUSR1 bash
}
_sway_iterate_sockets re