Compare commits
No commits in common. "a5b4ab1037e345ee8bb5105fc85f7408f85f1792" and "3407d87191d27041147c41072473e9ddab820ebf" have entirely different histories.
a5b4ab1037
...
3407d87191
3 changed files with 6 additions and 73 deletions
38
bash/.bashrc
38
bash/.bashrc
|
@ -14,6 +14,11 @@ export MACHINE_START_SWAY=false # Whether to start Sway from bash
|
||||||
# Source machine-specific config
|
# Source machine-specific config
|
||||||
[[ -f ~/.machine_config ]] && source ~/.machine_config
|
[[ -f ~/.machine_config ]] && source ~/.machine_config
|
||||||
|
|
||||||
|
# Execute tmux in Alacritty
|
||||||
|
if [[ "$TERM" == "alacritty" || "$TERM_PROGRAM" == "WezTerm" ]]; then
|
||||||
|
exec tmux
|
||||||
|
fi
|
||||||
|
|
||||||
# SSH without checking or adding host keys to known_hosts
|
# SSH without checking or adding host keys to known_hosts
|
||||||
# Useful for cloud server rescue environment & installation
|
# Useful for cloud server rescue environment & installation
|
||||||
alias sshtmp="ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'"
|
alias sshtmp="ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'"
|
||||||
|
@ -102,39 +107,6 @@ function sshts() {
|
||||||
_ssh $(tsselect)
|
_ssh $(tsselect)
|
||||||
}
|
}
|
||||||
|
|
||||||
# SSH shorthands for WezTerm
|
|
||||||
function assert_wezterm() {
|
|
||||||
[ "$TERM_PROGRAM" == "WezTerm" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# sshwez and sshmuxwez are used for spawning tabs in WezTerm
|
|
||||||
# that uses its native multiplexer; this is useful for connecting
|
|
||||||
# to home servers etc. and make use of WezTerm's native panes
|
|
||||||
function sshwez() {
|
|
||||||
assert_wezterm || return
|
|
||||||
wezterm cli spawn --domain-name "SSH:$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
function sshmuxwez() {
|
|
||||||
assert_wezterm || return
|
|
||||||
wezterm cli spawn --domain-name "SSHMUX:$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# moshwez{,ts,scrts} simply runs mosh inside a new WezTerm tab
|
|
||||||
# Ideal for remote connections
|
|
||||||
function moshwez() {
|
|
||||||
assert_wezterm || return
|
|
||||||
wezterm cli spawn -- mosh "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function moshwezts() {
|
|
||||||
moshwez $(tsselect)
|
|
||||||
}
|
|
||||||
|
|
||||||
function moshwezscrts() {
|
|
||||||
moshwez $(tsselect) -- screen -RR -d
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add local to path
|
# Add local to path
|
||||||
export PATH="$PATH:~/.local/bin"
|
export PATH="$PATH:~/.local/bin"
|
||||||
|
|
||||||
|
|
|
@ -277,9 +277,6 @@ for_window [app_id="pavucontrol"] floating enable
|
||||||
# Makes service management a bit cleaner
|
# Makes service management a bit cleaner
|
||||||
exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"
|
exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||||
|
|
||||||
# Import environment to D-Bus as well for xdg-desktop-portals etc
|
|
||||||
exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
|
||||||
|
|
||||||
# Restart kanshi if it is running
|
# Restart kanshi if it is running
|
||||||
# This restores monitor configuration on reload
|
# This restores monitor configuration on reload
|
||||||
exec_always "systemctl --user is-active kanshi && systemctl --user restart kanshi"
|
exec_always "systemctl --user is-active kanshi && systemctl --user restart kanshi"
|
||||||
|
|
|
@ -3,41 +3,5 @@ return {
|
||||||
color_scheme = "Gruvbox dark, medium (base16)",
|
color_scheme = "Gruvbox dark, medium (base16)",
|
||||||
font = wezterm.font("FiraCode Nerd Font Mono"),
|
font = wezterm.font("FiraCode Nerd Font Mono"),
|
||||||
font_size = 10.5,
|
font_size = 10.5,
|
||||||
enable_tab_bar = true,
|
enable_tab_bar = false, -- I use tmux
|
||||||
use_ime = true,
|
|
||||||
scrollback_lines = 65536,
|
|
||||||
tab_bar_at_bottom = true,
|
|
||||||
window_padding = {
|
|
||||||
top = '0.5cell',
|
|
||||||
-- We already have the tab bar at bottom
|
|
||||||
bottom = '0',
|
|
||||||
left = '1cell',
|
|
||||||
right = '1cell'
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
-- The default Ctrl+Tab conflicts with Sway
|
|
||||||
{
|
|
||||||
key = 'Tab',
|
|
||||||
mods = 'SHIFT',
|
|
||||||
action = wezterm.action.ActivateTabRelative(1),
|
|
||||||
},
|
|
||||||
-- Reload config forcibly
|
|
||||||
{
|
|
||||||
key = 'r',
|
|
||||||
mods = 'CTRL|SHIFT',
|
|
||||||
action = wezterm.action.ReloadConfiguration,
|
|
||||||
},
|
|
||||||
-- Spawn panes in the **DEFAULT** domain
|
|
||||||
-- to use the current domain, use Ctrl + Alt + Shift + " or %
|
|
||||||
{
|
|
||||||
key = '"',
|
|
||||||
mods = 'CTRL|SUPER|ALT|SHIFT',
|
|
||||||
action = wezterm.action.SplitVertical { domain = 'DefaultDomain' },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key = '%',
|
|
||||||
mods = 'CTRL|SUPER|ALT|SHIFT',
|
|
||||||
action = wezterm.action.SplitHorizontal { domain = 'DefaultDomain' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue