Bash : Add style reload support.
This commit is contained in:
parent
6e2c86552e
commit
cae2deab26
|
@ -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"
|
||||
'';
|
||||
}
|
||||
|
|
8
home/program/bash/module/Reload.nix
Normal file
8
home/program/bash/module/Reload.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }: {
|
||||
text = ''
|
||||
function reload() {
|
||||
source ~/.bashrc
|
||||
}
|
||||
trap reload USR1
|
||||
'';
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue