mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
33 Commits
1a1fe6ba52
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d346f5d522 | ||
|
|
f152ff68ea | ||
|
|
01d7296616 | ||
|
|
b573a37e33 | ||
|
|
68b4939993 | ||
|
|
b3dd14a038 | ||
|
|
7dc638358b | ||
|
|
3e07255fbc | ||
|
|
02fd1961b9 | ||
|
|
40bff09c84 | ||
|
|
6ff13fc071 | ||
|
|
a33cf4f287 | ||
|
|
2e2d78088a | ||
|
|
b1af966819 | ||
|
|
e055358721 | ||
|
|
8b6e2466a3 | ||
|
|
560500d8ec | ||
|
|
463417a281 | ||
|
|
bbb57e98c1 | ||
|
|
e38dd063a6 | ||
|
|
a4d6e3ab03 | ||
|
|
fc529b368d | ||
|
|
ce01b6e0d6 | ||
|
|
450d4dd82b | ||
|
|
8895384b0e | ||
|
|
e4b7372666 | ||
|
|
a30448ceec | ||
|
|
4fadf666e6 | ||
|
|
07ede07193 | ||
|
|
527819b750 | ||
|
|
98bfe20839 | ||
|
|
4d48409926 | ||
|
|
ffafe1727e |
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# Take a screenshot of the whole screen, a specific window, or a user-drawn region.
|
# Take a screenshot of the whole screen, a specific window, or a user-drawn region.
|
||||||
# Saves to ~/Pictures by default, but that can be changed via OMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs.
|
# Saves to ~/Pictures by default, but that can be changed via OMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs.
|
||||||
|
# Editor defaults to Satty but can be changed via --editor=<name> or OMARCHY_SCREENSHOT_EDITOR env
|
||||||
|
|
||||||
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
||||||
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
|
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
|
||||||
@@ -13,6 +14,32 @@ fi
|
|||||||
|
|
||||||
pkill slurp && exit 0
|
pkill slurp && exit 0
|
||||||
|
|
||||||
|
SCREENSHOT_EDITOR="${OMARCHY_SCREENSHOT_EDITOR:-satty}"
|
||||||
|
|
||||||
|
# Parse --editor flag from any position
|
||||||
|
ARGS=()
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [[ "$arg" == --editor=* ]]; then
|
||||||
|
SCREENSHOT_EDITOR="${arg#--editor=}"
|
||||||
|
else
|
||||||
|
ARGS+=("$arg")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -- "${ARGS[@]}"
|
||||||
|
|
||||||
|
open_editor() {
|
||||||
|
local filepath="$1"
|
||||||
|
if [[ "$SCREENSHOT_EDITOR" == "satty" ]]; then
|
||||||
|
satty --filename "$filepath" \
|
||||||
|
--output-filename "$filepath" \
|
||||||
|
--actions-on-enter save-to-clipboard \
|
||||||
|
--save-after-copy \
|
||||||
|
--copy-command 'wl-copy'
|
||||||
|
else
|
||||||
|
$SCREENSHOT_EDITOR "$filepath"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
MODE="${1:-smart}"
|
MODE="${1:-smart}"
|
||||||
PROCESSING="${2:-slurp}"
|
PROCESSING="${2:-slurp}"
|
||||||
|
|
||||||
@@ -24,32 +51,35 @@ get_rectangles() {
|
|||||||
|
|
||||||
# Select based on mode
|
# Select based on mode
|
||||||
case "$MODE" in
|
case "$MODE" in
|
||||||
region)
|
region)
|
||||||
wayfreeze & PID=$!
|
wayfreeze &
|
||||||
|
PID=$!
|
||||||
sleep .1
|
sleep .1
|
||||||
SELECTION=$(slurp 2>/dev/null)
|
SELECTION=$(slurp 2>/dev/null)
|
||||||
kill $PID 2>/dev/null
|
kill $PID 2>/dev/null
|
||||||
;;
|
;;
|
||||||
windows)
|
windows)
|
||||||
wayfreeze & PID=$!
|
wayfreeze &
|
||||||
|
PID=$!
|
||||||
sleep .1
|
sleep .1
|
||||||
SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
|
SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
|
||||||
kill $PID 2>/dev/null
|
kill $PID 2>/dev/null
|
||||||
;;
|
;;
|
||||||
fullscreen)
|
fullscreen)
|
||||||
SELECTION=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"')
|
SELECTION=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"')
|
||||||
;;
|
;;
|
||||||
smart|*)
|
smart | *)
|
||||||
RECTS=$(get_rectangles)
|
RECTS=$(get_rectangles)
|
||||||
wayfreeze & PID=$!
|
wayfreeze &
|
||||||
|
PID=$!
|
||||||
sleep .1
|
sleep .1
|
||||||
SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
|
SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
|
||||||
kill $PID 2>/dev/null
|
kill $PID 2>/dev/null
|
||||||
|
|
||||||
# If the selction area is L * W < 20, we'll assume you were trying to select whichever
|
# If the selection area is L * W < 20, we'll assume you were trying to select whichever
|
||||||
# window or output it was inside of to prevent accidental 2px snapshots
|
# window or output it was inside of to prevent accidental 2px snapshots
|
||||||
if [[ "$SELECTION" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+)$ ]]; then
|
if [[ "$SELECTION" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+)$ ]]; then
|
||||||
if (( ${BASH_REMATCH[3]} * ${BASH_REMATCH[4]} < 20 )); then
|
if ((${BASH_REMATCH[3]} * ${BASH_REMATCH[4]} < 20)); then
|
||||||
click_x="${BASH_REMATCH[1]}"
|
click_x="${BASH_REMATCH[1]}"
|
||||||
click_y="${BASH_REMATCH[2]}"
|
click_y="${BASH_REMATCH[2]}"
|
||||||
|
|
||||||
@@ -60,27 +90,30 @@ case "$MODE" in
|
|||||||
rect_width="${BASH_REMATCH[3]}"
|
rect_width="${BASH_REMATCH[3]}"
|
||||||
rect_height="${BASH_REMATCH[4]}"
|
rect_height="${BASH_REMATCH[4]}"
|
||||||
|
|
||||||
if (( click_x >= rect_x && click_x < rect_x+rect_width && click_y >= rect_y && click_y < rect_y+rect_height )); then
|
if ((click_x >= rect_x && click_x < rect_x + rect_width && click_y >= rect_y && click_y < rect_y + rect_height)); then
|
||||||
SELECTION="${rect_x},${rect_y} ${rect_width}x${rect_height}"
|
SELECTION="${rect_x},${rect_y} ${rect_width}x${rect_height}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done <<< "$RECTS"
|
done <<<"$RECTS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ -z "$SELECTION" ] && exit 0
|
[[ -z $SELECTION ]] && exit 0
|
||||||
|
|
||||||
|
FILENAME="screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
|
FILEPATH="$OUTPUT_DIR/$FILENAME"
|
||||||
|
|
||||||
if [[ $PROCESSING == "slurp" ]]; then
|
if [[ $PROCESSING == "slurp" ]]; then
|
||||||
grim -g "$SELECTION" - |
|
grim -g "$SELECTION" "$FILEPATH" || exit 1
|
||||||
satty --filename - \
|
wl-copy <"$FILEPATH"
|
||||||
--output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \
|
|
||||||
--early-exit \
|
(
|
||||||
--actions-on-enter save-to-clipboard \
|
ACTION=$(notify-send "Screenshot saved to clipboard and file" "Edit with Super + Alt + , (or click this)" -t 10000 -i "$FILEPATH" -A "default=edit")
|
||||||
--save-after-copy \
|
[[ "$ACTION" == "default" ]] && open_editor "$FILEPATH"
|
||||||
--copy-command 'wl-copy'
|
) &
|
||||||
else
|
else
|
||||||
grim -g "$SELECTION" - | wl-copy
|
grim -g "$SELECTION" - | wl-copy
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -59,11 +59,7 @@ sudo mkdir -p /etc/mkinitcpio.conf.d
|
|||||||
echo "Adding resume hook to $MKINITCPIO_CONF"
|
echo "Adding resume hook to $MKINITCPIO_CONF"
|
||||||
echo "HOOKS+=(resume)" | sudo tee "$MKINITCPIO_CONF" >/dev/null
|
echo "HOOKS+=(resume)" | sudo tee "$MKINITCPIO_CONF" >/dev/null
|
||||||
|
|
||||||
# Configure suspend-then-hibernate
|
# Ensure keyboard backlight doesn't prevent sleep
|
||||||
echo "Configuring suspend-then-hibernate"
|
|
||||||
sudo mkdir -p /etc/systemd/logind.conf.d /etc/systemd/sleep.conf.d /usr/lib/systemd/system-sleep
|
|
||||||
sudo cp "$OMARCHY_PATH/default/systemd/lid.conf" /etc/systemd/logind.conf.d/
|
|
||||||
sudo cp "$OMARCHY_PATH/default/systemd/hibernate.conf" /etc/systemd/sleep.conf.d/
|
|
||||||
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/
|
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/
|
||||||
|
|
||||||
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
|
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
|
||||||
|
|||||||
@@ -99,21 +99,13 @@ show_trigger_menu() {
|
|||||||
|
|
||||||
show_capture_menu() {
|
show_capture_menu() {
|
||||||
case $(menu "Capture" " Screenshot\n Screenrecord\n Color") in
|
case $(menu "Capture" " Screenshot\n Screenrecord\n Color") in
|
||||||
*Screenshot*) show_screenshot_menu ;;
|
*Screenshot*) omarchy-cmd-screenshot ;;
|
||||||
*Screenrecord*) show_screenrecord_menu ;;
|
*Screenrecord*) show_screenrecord_menu ;;
|
||||||
*Color*) pkill hyprpicker || hyprpicker -a ;;
|
*Color*) pkill hyprpicker || hyprpicker -a ;;
|
||||||
*) show_trigger_menu ;;
|
*) show_trigger_menu ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
show_screenshot_menu() {
|
|
||||||
case $(menu "Screenshot" " Snap with Editing\n Straight to Clipboard") in
|
|
||||||
*Editing*) omarchy-cmd-screenshot smart ;;
|
|
||||||
*Clipboard*) omarchy-cmd-screenshot smart clipboard ;;
|
|
||||||
*) show_capture_menu ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
get_webcam_list() {
|
get_webcam_list() {
|
||||||
v4l2-ctl --list-devices 2>/dev/null | while IFS= read -r line; do
|
v4l2-ctl --list-devices 2>/dev/null | while IFS= read -r line; do
|
||||||
if [[ "$line" != $'\t'* && -n "$line" ]]; then
|
if [[ "$line" != $'\t'* && -n "$line" ]]; then
|
||||||
@@ -148,7 +140,10 @@ show_screenrecord_menu() {
|
|||||||
*"With desktop audio") omarchy-cmd-screenrecord --with-desktop-audio ;;
|
*"With desktop audio") omarchy-cmd-screenrecord --with-desktop-audio ;;
|
||||||
*"With desktop + microphone audio") omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
|
*"With desktop + microphone audio") omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio ;;
|
||||||
*"With desktop + microphone audio + webcam")
|
*"With desktop + microphone audio + webcam")
|
||||||
local device=$(show_webcam_select_menu) || { back_to show_capture_menu; return; }
|
local device=$(show_webcam_select_menu) || {
|
||||||
|
back_to show_capture_menu
|
||||||
|
return
|
||||||
|
}
|
||||||
omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
|
omarchy-cmd-screenrecord --with-desktop-audio --with-microphone-audio --with-webcam --webcam-device="$device"
|
||||||
;;
|
;;
|
||||||
*) back_to show_capture_menu ;;
|
*) back_to show_capture_menu ;;
|
||||||
@@ -491,7 +486,7 @@ show_remove_elixir_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show_update_menu() {
|
show_update_menu() {
|
||||||
case $(menu "Update" " Omarchy\n Channel\n Config\n Extra Themes\n Process\n Hardware\n Firmware\n Password\n Timezone\n Time") in
|
case $(menu "Update" " Omarchy\n Channel\n Config\n Extra Themes\n Process\n Hardware\n Firmware\n Password\n Timezone\n Time") in
|
||||||
*Omarchy*) present_terminal omarchy-update ;;
|
*Omarchy*) present_terminal omarchy-update ;;
|
||||||
*Channel*) show_update_channel_menu ;;
|
*Channel*) show_update_channel_menu ;;
|
||||||
*Config*) show_update_config_menu ;;
|
*Config*) show_update_config_menu ;;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ fzf_args=(
|
|||||||
pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
|
pkg_names=$(yay -Slqa | fzf "${fzf_args[@]}")
|
||||||
|
|
||||||
if [[ -n "$pkg_names" ]]; then
|
if [[ -n "$pkg_names" ]]; then
|
||||||
# Convert newline-separated selections to space-separated for yay
|
# Add aur/ prefix to each package name and convert to space-separated for yay
|
||||||
echo "$pkg_names" | tr '\n' ' ' | xargs yay -S --noconfirm
|
echo "$pkg_names" | sed 's/^/aur\//' | tr '\n' ' ' | xargs yay -S --noconfirm
|
||||||
sudo updatedb
|
sudo updatedb
|
||||||
omarchy-show-done
|
omarchy-show-done
|
||||||
fi
|
fi
|
||||||
|
|||||||
6
bin/omarchy-refresh-tmux
Executable file
6
bin/omarchy-refresh-tmux
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Overwrite the user tmux config with the Omarchy default and reload tmux.
|
||||||
|
|
||||||
|
omarchy-refresh-config tmux/tmux.conf
|
||||||
|
tmux source-file ~/.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
|
||||||
5
bin/omarchy-wifi-powersave
Executable file
5
bin/omarchy-wifi-powersave
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
for iface in /sys/class/net/*/wireless; do
|
||||||
|
iface="$(basename "$(dirname "$iface")")"
|
||||||
|
iw dev "$iface" set power_save "$1" 2>/dev/null
|
||||||
|
done
|
||||||
@@ -2,5 +2,3 @@
|
|||||||
--ozone-platform-hint=wayland
|
--ozone-platform-hint=wayland
|
||||||
--enable-features=TouchpadOverscrollHistoryNavigation
|
--enable-features=TouchpadOverscrollHistoryNavigation
|
||||||
--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url
|
--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url
|
||||||
# Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957
|
|
||||||
--disable-features=WaylandWpColorManagerV1
|
|
||||||
|
|||||||
@@ -2,5 +2,3 @@
|
|||||||
--ozone-platform-hint=wayland
|
--ozone-platform-hint=wayland
|
||||||
--enable-features=TouchpadOverscrollHistoryNavigation
|
--enable-features=TouchpadOverscrollHistoryNavigation
|
||||||
--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url
|
--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url
|
||||||
# Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957
|
|
||||||
--disable-features=WaylandWpColorManagerV1
|
|
||||||
|
|||||||
@@ -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, 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"
|
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
|
# Overwrite existing bindings, like putting Omarchy Menu on Super + Space
|
||||||
# unbind = SUPER, SPACE
|
# unbind = SUPER, SPACE
|
||||||
# bindd = SUPER, SPACE, Omarchy menu, exec, omarchy-menu
|
# bindd = SUPER, SPACE, Omarchy menu, exec, omarchy-menu
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://opencode.ai/config.json",
|
"$schema": "https://opencode.ai/config.json",
|
||||||
"theme": "system"
|
"theme": "system",
|
||||||
|
"autoupdate": false
|
||||||
}
|
}
|
||||||
|
|||||||
95
config/tmux/tmux.conf
Normal file
95
config/tmux/tmux.conf
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
# Prefix
|
||||||
|
set -g prefix C-Space
|
||||||
|
set -g prefix2 C-b
|
||||||
|
bind C-Space send-prefix
|
||||||
|
|
||||||
|
# Reload config
|
||||||
|
bind q source-file ~/.config/tmux/tmux.conf
|
||||||
|
|
||||||
|
# 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 Controls
|
||||||
|
bind h split-window -h -c "#{pane_current_path}"
|
||||||
|
bind v split-window -v -c "#{pane_current_path}"
|
||||||
|
bind -n C-M-PageUp split-window -h -c "#{pane_current_path}"
|
||||||
|
bind -n C-M-PageDown split-window -v -c "#{pane_current_path}"
|
||||||
|
bind -n C-M-Home split-window -h -c "#{pane_current_path}"
|
||||||
|
bind -n C-M-End kill-pane
|
||||||
|
|
||||||
|
bind -n C-M-Left select-pane -L
|
||||||
|
bind -n C-M-Right select-pane -R
|
||||||
|
bind -n C-M-Up select-pane -U
|
||||||
|
bind -n C-M-Down select-pane -D
|
||||||
|
|
||||||
|
bind -n C-M-S-Left resize-pane -L 5
|
||||||
|
bind -n C-M-S-Down resize-pane -D 5
|
||||||
|
bind -n C-M-S-Up resize-pane -U 5
|
||||||
|
bind -n C-M-S-Right resize-pane -R 5
|
||||||
|
|
||||||
|
# Window navigation
|
||||||
|
bind r command-prompt -I "#W" "rename-window -- '%%'"
|
||||||
|
bind c new-window -c "#{pane_current_path}"
|
||||||
|
bind x kill-window
|
||||||
|
bind -n C-S-Home new-window -c "#{pane_current_path}"
|
||||||
|
bind -n C-S-End kill-window
|
||||||
|
|
||||||
|
bind -n C-S-PageUp next-window
|
||||||
|
bind -n C-S-PageDown previous-window
|
||||||
|
|
||||||
|
bind -n M-1 select-window -t 1
|
||||||
|
bind -n M-2 select-window -t 2
|
||||||
|
bind -n M-3 select-window -t 3
|
||||||
|
bind -n M-4 select-window -t 4
|
||||||
|
bind -n M-5 select-window -t 5
|
||||||
|
bind -n M-6 select-window -t 6
|
||||||
|
bind -n M-7 select-window -t 7
|
||||||
|
bind -n M-8 select-window -t 8
|
||||||
|
bind -n M-9 select-window -t 9
|
||||||
|
|
||||||
|
# Session controls
|
||||||
|
bind R command-prompt -I "#S" "rename-session -- '%%'"
|
||||||
|
bind C new-session
|
||||||
|
bind X kill-session
|
||||||
|
bind -n C-M-S-Home new-session -c "#{pane_current_path}"
|
||||||
|
bind -n C-M-S-End kill-session
|
||||||
|
|
||||||
|
bind -n C-M-S-PageUp switch-client -p
|
||||||
|
bind -n C-M-S-PageDown switch-client -n
|
||||||
|
|
||||||
|
# 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
|
||||||
|
set -g allow-passthrough 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
|
||||||
@@ -7,6 +7,7 @@ if command -v eza &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||||
|
alias eff='$EDITOR $(ff)'
|
||||||
|
|
||||||
if command -v zoxide &> /dev/null; then
|
if command -v zoxide &> /dev/null; then
|
||||||
alias cd="zd"
|
alias cd="zd"
|
||||||
@@ -34,6 +35,7 @@ alias ....='cd ../../..'
|
|||||||
alias c='opencode'
|
alias c='opencode'
|
||||||
alias d='docker'
|
alias d='docker'
|
||||||
alias r='rails'
|
alias r='rails'
|
||||||
|
alias t='tmux attach || tmux new -s Work'
|
||||||
n() { if [ "$#" -eq 0 ]; then nvim .; else nvim "$@"; fi; }
|
n() { if [ "$#" -eq 0 ]; then nvim .; else nvim "$@"; fi; }
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
|
|||||||
@@ -4,15 +4,33 @@ alias decompress="tar -xzf"
|
|||||||
|
|
||||||
# Write iso file to sd card
|
# Write iso file to sd card
|
||||||
iso2sd() {
|
iso2sd() {
|
||||||
if [ $# -ne 2 ]; then
|
if [[ $# -lt 1 ]]; then
|
||||||
echo "Usage: iso2sd <input_file> <output_device>"
|
echo "Usage: iso2sd <input_file> [output_device]"
|
||||||
echo "Example: iso2sd ~/Downloads/ubuntu-25.04-desktop-amd64.iso /dev/sda"
|
echo "Example: iso2sd ~/Downloads/ubuntu-25.04-desktop-amd64.iso /dev/sda"
|
||||||
echo -e "\nAvailable SD cards:"
|
return 1
|
||||||
lsblk -d -o NAME | grep -E '^sd[a-z]' | awk '{print "/dev/"$1}'
|
|
||||||
else
|
|
||||||
sudo dd bs=4M status=progress oflag=sync if="$1" of="$2"
|
|
||||||
sudo eject $2
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local iso="$1"
|
||||||
|
local drive="$2"
|
||||||
|
|
||||||
|
if [[ -z $drive ]]; then
|
||||||
|
local available_sds=$(lsblk -dpno NAME | grep -E '/dev/sd')
|
||||||
|
|
||||||
|
if [[ -z $available_sds ]]; then
|
||||||
|
echo "No SD drives found and no drive specified"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
drive=$(omarchy-drive-select "$available_sds")
|
||||||
|
|
||||||
|
if [[ -z $drive ]]; then
|
||||||
|
echo "No drive selected"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo dd bs=4M status=progress oflag=sync if="$iso" of="$drive"
|
||||||
|
sudo eject "$drive"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Format an entire drive for a single partition using exFAT
|
# Format an entire drive for a single partition using exFAT
|
||||||
@@ -87,3 +105,62 @@ img2png() {
|
|||||||
-define png:exclude-chunk=all \
|
-define png:exclude-chunk=all \
|
||||||
"${img%.*}-optimized.png"
|
"${img%.*}-optimized.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# SSH Port Forwarding Functions
|
||||||
|
fip() {
|
||||||
|
[[ $# -lt 2 ]] && echo "Usage: fip <host> <port1> [port2] ..." && return 1
|
||||||
|
local host="$1"
|
||||||
|
shift
|
||||||
|
for port in "$@"; do
|
||||||
|
ssh -f -N -L "$port:localhost:$port" "$host" && echo "Forwarding localhost:$port -> $host:$port"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
dip() {
|
||||||
|
[[ $# -eq 0 ]] && echo "Usage: dip <port1> [port2] ..." && return 1
|
||||||
|
for port in "$@"; do
|
||||||
|
pkill -f "ssh.*-L $port:localhost:$port" && echo "Stopped forwarding port $port" || echo "No forwarding on port $port"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
lip() {
|
||||||
|
pgrep -af "ssh.*-L [0-9]+:localhost:[0-9]+" || echo "No active forwards"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create a tmux layout for dev with editor, ai, and terminal
|
||||||
|
tml() {
|
||||||
|
local current_dir="${PWD}"
|
||||||
|
local editor_pane ai_pane
|
||||||
|
local ai="$1"
|
||||||
|
|
||||||
|
# Get current pane ID (will become editor pane after splits)
|
||||||
|
editor_pane=$(tmux display-message -p '#{pane_id}')
|
||||||
|
|
||||||
|
# Split window vertically - top 85%, bottom 15%
|
||||||
|
tmux split-window -v -p 15 -c "$current_dir"
|
||||||
|
|
||||||
|
# Go back to top pane (editor_pane) and split it horizontally
|
||||||
|
tmux select-pane -t "$editor_pane"
|
||||||
|
tmux split-window -h -p 30 -c "$current_dir"
|
||||||
|
|
||||||
|
# After horizontal split, cursor is in the right pane (new pane)
|
||||||
|
# Get its ID and run ai there
|
||||||
|
ai_pane=$(tmux display-message -p '#{pane_id}')
|
||||||
|
tmux send-keys -t "$ai_pane" "$ai" C-m
|
||||||
|
|
||||||
|
# Run nvim in the left pane
|
||||||
|
tmux send-keys -t "$editor_pane" "$EDITOR ." C-m
|
||||||
|
|
||||||
|
# Select the nvim pane for focus
|
||||||
|
tmux select-pane -t "$editor_pane"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create a dev layout using tmux with editor, opencode, and terminal
|
||||||
|
nic() {
|
||||||
|
tml c
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create a dev layout using tmux with editor, claude, and terminal
|
||||||
|
nicx() {
|
||||||
|
tml cx
|
||||||
|
}
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ bindd = CTRL, F2, Apple Display brightness up, exec, omarchy-brightness-display-
|
|||||||
bindd = SHIFT CTRL, F2, Apple Display full brightness, exec, omarchy-brightness-display-apple +60000
|
bindd = SHIFT CTRL, F2, Apple Display full brightness, exec, omarchy-brightness-display-apple +60000
|
||||||
|
|
||||||
# Captures
|
# Captures
|
||||||
bindd = , PRINT, Screenshot with editing, exec, omarchy-cmd-screenshot
|
bindd = , PRINT, Screenshot, exec, omarchy-cmd-screenshot
|
||||||
bindd = SHIFT, PRINT, Screenshot to clipboard, exec, omarchy-cmd-screenshot smart clipboard
|
|
||||||
bindd = ALT, PRINT, Screenrecording, exec, omarchy-menu screenrecord
|
bindd = ALT, PRINT, Screenrecording, exec, omarchy-menu screenrecord
|
||||||
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
|
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
|
||||||
|
|
||||||
|
|||||||
@@ -28,3 +28,7 @@ on-button-left=exec sh -c 'omarchy-notification-dismiss "Update System"; omarchy
|
|||||||
|
|
||||||
[summary~="Learn Keybindings"]
|
[summary~="Learn Keybindings"]
|
||||||
on-button-left=exec sh -c 'omarchy-notification-dismiss "Learn Keybindings"; omarchy-menu-keybindings'
|
on-button-left=exec sh -c 'omarchy-notification-dismiss "Learn Keybindings"; omarchy-menu-keybindings'
|
||||||
|
|
||||||
|
[summary~="Screenshot copied & saved"]
|
||||||
|
max-icon-size=80
|
||||||
|
format=<b>%s</b>\n%b
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[Sleep]
|
|
||||||
HibernateDelaySec=90min
|
|
||||||
SuspendEstimationSec=0
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Login]
|
|
||||||
HandleLidSwitch=suspend-then-hibernate
|
|
||||||
@@ -20,6 +20,7 @@ run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh
|
|||||||
run_logged $OMARCHY_INSTALL/config/input-group.sh
|
run_logged $OMARCHY_INSTALL/config/input-group.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh
|
run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh
|
run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh
|
||||||
|
run_logged $OMARCHY_INSTALL/config/wifi-powersave-rules.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hibernation.sh
|
run_logged $OMARCHY_INSTALL/config/hibernation.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
||||||
|
|||||||
9
install/config/wifi-powersave-rules.sh
Normal file
9
install/config/wifi-powersave-rules.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
if omarchy-battery-present; then
|
||||||
|
cat <<EOF | sudo tee "/etc/udev/rules.d/99-wifi-powersave.rules"
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="0", RUN+="$HOME/.local/share/omarchy/bin/omarchy-wifi-powersave on"
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="$HOME/.local/share/omarchy/bin/omarchy-wifi-powersave off"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo udevadm control --reload
|
||||||
|
sudo udevadm trigger --subsystem-match=power_supply
|
||||||
|
fi
|
||||||
@@ -120,6 +120,7 @@ swayosd
|
|||||||
system-config-printer
|
system-config-printer
|
||||||
tldr
|
tldr
|
||||||
tree-sitter-cli
|
tree-sitter-cli
|
||||||
|
tmux
|
||||||
tobi-try
|
tobi-try
|
||||||
ttf-cascadia-mono-nerd
|
ttf-cascadia-mono-nerd
|
||||||
ttf-ia-writer
|
ttf-ia-writer
|
||||||
|
|||||||
3
migrations/1769616857.sh
Normal file
3
migrations/1769616857.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
echo "Turn off opencode's own auto-update feature (we rely on pacman)"
|
||||||
|
|
||||||
|
omarchy-refresh-config opencode/opencode.json
|
||||||
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
|
||||||
3
migrations/1770811646.sh
Normal file
3
migrations/1770811646.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
echo "Disable WiFi power save on AC power"
|
||||||
|
|
||||||
|
source $OMARCHY_PATH/install/config/wifi-powersave-rules.sh
|
||||||
14
migrations/1771188969.sh
Normal file
14
migrations/1771188969.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
echo "Remove temporary Wayland color manager disabling flag from existing Chromium configs"
|
||||||
|
|
||||||
|
# This reverts the workaround originally added by migration 1760401344.sh
|
||||||
|
# Remove flag and comment from chromium-flags.conf only if found
|
||||||
|
if [[ -f ~/.config/chromium-flags.conf ]]; then
|
||||||
|
sed -i '/--disable-features=WaylandWpColorManagerV1/d' ~/.config/chromium-flags.conf
|
||||||
|
sed -i '/# Chromium crash workaround for Wayland color management on Hyprland/d' ~/.config/chromium-flags.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove flag and comment from brave-flags.conf only if found
|
||||||
|
if [[ -f ~/.config/brave-flags.conf ]]; then
|
||||||
|
sed -i '/--disable-features=WaylandWpColorManagerV1/d' ~/.config/brave-flags.conf
|
||||||
|
sed -i '/# Chromium crash workaround for Wayland color management on Hyprland/d' ~/.config/brave-flags.conf
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user