mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
6 Commits
tmux
...
4fadf666e6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4fadf666e6 | ||
|
|
07ede07193 | ||
|
|
527819b750 | ||
|
|
98bfe20839 | ||
|
|
4d48409926 | ||
|
|
ffafe1727e |
5
bin/omarchy-refresh-tmux
Executable file
5
bin/omarchy-refresh-tmux
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Overwrite the user tmux config with the Omarchy default and reload tmux.
|
||||
|
||||
omarchy-refresh-config tmux/tmux.conf
|
||||
9
bin/omarchy-theme-refresh
Executable file
9
bin/omarchy-theme-refresh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Refresh the current theme from its templates.
|
||||
|
||||
THEME_NAME_PATH="$HOME/.config/omarchy/current/theme.name"
|
||||
|
||||
if [[ -f $THEME_NAME_PATH ]]; then
|
||||
omarchy-theme-set "$(cat $THEME_NAME_PATH)"
|
||||
fi
|
||||
@@ -25,6 +25,9 @@ bindd = SUPER SHIFT, P, Google Photos, exec, omarchy-launch-or-focus-webapp "Goo
|
||||
bindd = SUPER SHIFT, X, X, exec, omarchy-launch-webapp "https://x.com/"
|
||||
bindd = SUPER SHIFT ALT, X, X Post, exec, omarchy-launch-webapp "https://x.com/compose/post"
|
||||
|
||||
# Add extra bindings
|
||||
# bind = SUPER SHIFT, R, exec, alacritty -e ssh your-server
|
||||
|
||||
# Overwrite existing bindings, like putting Omarchy Menu on Super + Space
|
||||
# unbind = SUPER, SPACE
|
||||
# bindd = SUPER, SPACE, Omarchy menu, exec, omarchy-menu
|
||||
|
||||
67
config/tmux/tmux.conf
Normal file
67
config/tmux/tmux.conf
Normal file
@@ -0,0 +1,67 @@
|
||||
# Prefix
|
||||
set -g prefix C-Space
|
||||
set -g prefix2 C-b
|
||||
bind C-Space send-prefix
|
||||
|
||||
# General
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",*:RGB"
|
||||
set -g mouse on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set -g renumber-windows on
|
||||
set -g history-limit 50000
|
||||
set -g escape-time 0
|
||||
set -g focus-events on
|
||||
set -g set-clipboard on
|
||||
setw -g aggressive-resize on
|
||||
set -g detach-on-destroy off
|
||||
|
||||
# Status bar
|
||||
set -g status-position top
|
||||
set -g status-interval 5
|
||||
set -g status-left-length 30
|
||||
set -g status-right-length 50
|
||||
set -g window-status-separator ""
|
||||
|
||||
# Theme
|
||||
set -g status-style "bg=default,fg=default"
|
||||
set -g status-left "#[fg=black,bg=blue,bold] #S #[bg=default] "
|
||||
set -g status-right "#[fg=blue]#{?client_prefix,PREFIX ,}#[fg=brightblack]#h "
|
||||
set -g window-status-format "#[fg=brightblack] #I:#W "
|
||||
set -g window-status-current-format "#[fg=blue,bold] #I:#W "
|
||||
set -g pane-border-style "fg=brightblack"
|
||||
set -g pane-active-border-style "fg=blue"
|
||||
set -g message-style "bg=default,fg=blue"
|
||||
set -g message-command-style "bg=default,fg=blue"
|
||||
set -g mode-style "bg=blue,fg=black"
|
||||
setw -g clock-mode-colour blue
|
||||
|
||||
# Reload config
|
||||
bind M-r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
# Rename window / session
|
||||
bind r command-prompt -I "#W" "rename-window -- '%%'"
|
||||
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
||||
|
||||
# Vi mode for copy
|
||||
setw -g mode-keys vi
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
|
||||
# Pane resizing
|
||||
bind -r S-Left resize-pane -L 1
|
||||
bind -r S-Down resize-pane -D 1
|
||||
bind -r S-Up resize-pane -U 1
|
||||
bind -r S-Right resize-pane -R 1
|
||||
|
||||
# Saner splits that open in the same directory
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# New windows in same directory
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
# Sessions
|
||||
bind C new-session
|
||||
bind X kill-session
|
||||
@@ -34,6 +34,7 @@ alias ....='cd ../../..'
|
||||
alias c='opencode'
|
||||
alias d='docker'
|
||||
alias r='rails'
|
||||
alias t='tmux attach || tmux new -s Work'
|
||||
n() { if [ "$#" -eq 0 ]; then nvim .; else nvim "$@"; fi; }
|
||||
|
||||
# Git
|
||||
|
||||
@@ -87,3 +87,18 @@ img2png() {
|
||||
-define png:exclude-chunk=all \
|
||||
"${img%.*}-optimized.png"
|
||||
}
|
||||
|
||||
# SSH Port Forwarding Functions
|
||||
fip() {
|
||||
[[ -z "$1" || -z "$2" ]] && echo "Usage: fip <port> <host>" && return 1
|
||||
ssh -f -N -L "$1:localhost:$1" "$2" && echo "Forwarding localhost:$1 -> $2:$1"
|
||||
}
|
||||
|
||||
dip() {
|
||||
[[ -z "$1" ]] && echo "Usage: dip <port>" && return 1
|
||||
pkill -f "ssh.*-L $1:localhost:$1" && echo "Stopped forwarding port $1" || echo "No forwarding on port $1"
|
||||
}
|
||||
|
||||
lip() {
|
||||
pgrep -af "ssh.*-L [0-9]+:localhost:[0-9]+" || echo "No active forwards"
|
||||
}
|
||||
|
||||
@@ -3,3 +3,8 @@ bindd = SUPER, C, Universal copy, sendshortcut, CTRL, Insert,
|
||||
bindd = SUPER, V, Universal paste, sendshortcut, SHIFT, Insert,
|
||||
bindd = SUPER, X, Universal cut, sendshortcut, CTRL, X,
|
||||
bindd = SUPER CTRL, V, Clipboard manager, exec, omarchy-launch-walker -m clipboard
|
||||
|
||||
# Nautilus compatibility
|
||||
bindd = SUPER, C, Nautilus Copy, sendshortcut, CTRL,c, active, class:^(org.gnome.Nautilus)$
|
||||
bindd = SUPER, V, Nautilus Paste, sendshortcut, CTRL,v, active, class:^(org.gnome.Nautilus)$
|
||||
bindd = SUPER, X, Nautilus Cut, sendshortcut, CTRL,x, active, class:^(org.gnome.Nautilus)$
|
||||
|
||||
@@ -120,6 +120,7 @@ swayosd
|
||||
system-config-printer
|
||||
tldr
|
||||
tree-sitter-cli
|
||||
tmux
|
||||
tobi-try
|
||||
ttf-cascadia-mono-nerd
|
||||
ttf-ia-writer
|
||||
|
||||
9
migrations/1770638893.sh
Normal file
9
migrations/1770638893.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
echo "Add Tmux as an option with themed styling"
|
||||
|
||||
omarchy-pkg-add tmux
|
||||
|
||||
if [[ ! -f ~/.config/tmux/tmux.conf ]]; then
|
||||
mkdir -p ~/.config/tmux
|
||||
cp $OMARCHY_PATH/config/tmux/tmux.conf ~/.config/tmux/tmux.conf
|
||||
omarchy-theme-refresh
|
||||
fi
|
||||
Reference in New Issue
Block a user