3 ms·
This little script in my i3 keybindings opens a new terminal with the same working directory as the currently focused terminal, pretty useful for my workflow:
by pkos98 4y ago
This little script in my i3 keybindings opens a new terminal with the same working directory as the currently focused terminal, pretty useful for my workflow:
bindsym ctrl+$alt+t exec xdotool getactivewindow getwindowpid | xargs ps | grep "alacritty" && (xdotool getactivewindow getwindowpid | xargs pgrep -P | xargs pwdx | cut -d":" -f 2 | xargs alacritty --working-directory ) || WINIT_X11_SCALE_FACTOR=1 alacritty
https://github.com/pkos98/Dotfiles/blob/master/config/i3/config#L53 https://github.com/pkos98/Dotfiles/blob/master/config/i3/con...
I probably scratched some parts together from the internet a couple of years ago.
- mburee 4y agohttps://codeberg.org/dnkl/foot/wiki#user-content-spawning-new-terminal-instances-in-the-current-working-directory https://codeberg.org/dnkl/foot/wiki#user-content-spawning-ne... Maybe something like this could do the same? But could also rely on that specific terminal emulator
- zwog 4y agoAlacritty has this function built-in, just define `SpawnNewInstance` in the config file: key_bindings: - { key: T, mods: Control|Shift, action: SpawnNewInstance } https://wiki.archlinux.org/title/Alacritty#Spawn_new_instance_in_same_directory https://wiki.archlinux.org/title/Alacritty#Spawn_new_instanc...
- akho 4y ago`alacritty --working-directory $(xcwd)` would be a bit shorter :)