mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
93 Commits
omarchy-do
...
super-copy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edbafe7a13 | ||
|
|
b97cba39af | ||
|
|
6d20a13076 | ||
|
|
bf4fb40877 | ||
|
|
4365a52a08 | ||
|
|
f701cf7c6d | ||
|
|
9c5cf01410 | ||
|
|
6ea9c9311e | ||
|
|
66abd7dc2e | ||
|
|
819da32ebb | ||
|
|
5b062cddce | ||
|
|
e9ab1d9bcc | ||
|
|
f956233ecf | ||
|
|
e6d1a2f754 | ||
|
|
dfd133df87 | ||
|
|
2326018341 | ||
|
|
011174699c | ||
|
|
1ffed127db | ||
|
|
a38d80ee9f | ||
|
|
a401c74083 | ||
|
|
5faa2c8d49 | ||
|
|
3f25fcbd98 | ||
|
|
14b020dcfb | ||
|
|
c91c75a5e6 | ||
|
|
e3658556ea | ||
|
|
2971a25a4f | ||
|
|
2c14252d7d | ||
|
|
b0ee5d2e79 | ||
|
|
7a7266aed0 | ||
|
|
6892304277 | ||
|
|
6aac67a1d5 | ||
|
|
5aa39c9261 | ||
|
|
5da10be63e | ||
|
|
2316c2f365 | ||
|
|
ea7d98e6b7 | ||
|
|
443173e29d | ||
|
|
164fc5ceb1 | ||
|
|
9c24150e69 | ||
|
|
479f20d294 | ||
|
|
bb4df39bbd | ||
|
|
d4fddd7c75 | ||
|
|
3cb52c0b38 | ||
|
|
cab70bbe4f | ||
|
|
5f2013a482 | ||
|
|
f2021a95a4 | ||
|
|
2e0064943b | ||
|
|
c7aa0f570a | ||
|
|
a079af948b | ||
|
|
6544d1b970 | ||
|
|
bbe4461c05 | ||
|
|
bba224e9a5 | ||
|
|
4283533858 | ||
|
|
e0f16b9098 | ||
|
|
7819ae354e | ||
|
|
058b233da8 | ||
|
|
1ac8e96df3 | ||
|
|
977103011e | ||
|
|
9903a9b333 | ||
|
|
a51011fbb8 | ||
|
|
1022734a67 | ||
|
|
67011160b2 | ||
|
|
f634bfeeb6 | ||
|
|
ea6b6c6b7f | ||
|
|
499e7383c2 | ||
|
|
9b8819d9b9 | ||
|
|
a8f76783e3 | ||
|
|
796ef67ede | ||
|
|
0eccf22921 | ||
|
|
971422b757 | ||
|
|
076da663f5 | ||
|
|
b92ebff29b | ||
|
|
8e5b59995a | ||
|
|
dc49358a81 | ||
|
|
cd39bbf692 | ||
|
|
fba17b7da4 | ||
|
|
25df782e2f | ||
|
|
d4b0ba5d94 | ||
|
|
a74b426c9f | ||
|
|
e0a50f12a7 | ||
|
|
96b64189a6 | ||
|
|
3376838dfb | ||
|
|
0f3e6f5101 | ||
|
|
4d9f932e6c | ||
|
|
607915a5d1 | ||
|
|
38d536ba9d | ||
|
|
441ee10d70 | ||
|
|
45465d3e7c | ||
|
|
4d50c8bd33 | ||
|
|
ad30ef6339 | ||
|
|
19d1ee2b00 | ||
|
|
2666e75666 | ||
|
|
d40c1ba454 | ||
|
|
648832dcc6 |
9
.editorconfig
Normal file
9
.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
2
applications/hidden/electron36.desktop
Normal file
2
applications/hidden/electron36.desktop
Normal file
@@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
2
applications/hidden/electron37.desktop
Normal file
2
applications/hidden/electron37.desktop
Normal file
@@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
2
applications/hidden/java-java-openjdk.desktop
Normal file
2
applications/hidden/java-java-openjdk.desktop
Normal file
@@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
2
applications/hidden/jconsole-java-openjdk.desktop
Normal file
2
applications/hidden/jconsole-java-openjdk.desktop
Normal file
@@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
2
applications/hidden/jshell-java-openjdk.desktop
Normal file
2
applications/hidden/jshell-java-openjdk.desktop
Normal file
@@ -0,0 +1,2 @@
|
||||
[Desktop Entry]
|
||||
Hidden=true
|
||||
@@ -2,7 +2,7 @@
|
||||
Name=Neovim
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text files
|
||||
Exec=$TERMINAL --class=nvim --title=nvim -e nvim -- %F
|
||||
Exec=omarchy-launch-editor %F
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Keywords=Text;editor;
|
||||
|
||||
@@ -9,6 +9,7 @@ if [[ -f "$FIRST_RUN_MODE" ]]; then
|
||||
|
||||
bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/firewall.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh"
|
||||
sudo rm -f /etc/sudoers.d/first-run
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ SCOPE="$1"
|
||||
AUDIO=$([[ $2 == "audio" ]] && echo "--audio")
|
||||
|
||||
start_screenrecording() {
|
||||
filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
|
||||
local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
|
||||
|
||||
if lspci | grep -qi 'nvidia'; then
|
||||
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" &
|
||||
@@ -47,7 +47,8 @@ screenrecording_active() {
|
||||
if screenrecording_active; then
|
||||
stop_screenrecording
|
||||
elif [[ "$SCOPE" == "output" ]]; then
|
||||
start_screenrecording
|
||||
output=$(slurp -o) || exit 1
|
||||
start_screenrecording -g "$output"
|
||||
else
|
||||
region=$(slurp) || exit 1
|
||||
start_screenrecording -g "$region"
|
||||
|
||||
@@ -18,7 +18,7 @@ hyprctl keyword cursor:invisible true
|
||||
while true; do
|
||||
effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1)
|
||||
tte -i ~/.config/omarchy/branding/screensaver.txt \
|
||||
--frame-rate 240 --canvas-width 0 --canvas-height $(($(tput lines) - 2)) --anchor-canvas c --anchor-text c \
|
||||
--frame-rate 240 --canvas-width 0 --canvas-height $(($(tput lines) - 1)) --anchor-canvas c --anchor-text c \
|
||||
"$effect" &
|
||||
|
||||
while pgrep -x tte >/dev/null; do
|
||||
|
||||
@@ -5,7 +5,13 @@ terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
|
||||
shell_pid=$(pgrep -P "$terminal_pid" | head -n1)
|
||||
|
||||
if [[ -n $shell_pid ]]; then
|
||||
readlink -f "/proc/$shell_pid/cwd" 2>/dev/null || echo "$HOME"
|
||||
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
|
||||
|
||||
if [[ -d $cwd ]]; then
|
||||
echo "$cwd"
|
||||
else
|
||||
echo "$HOME"
|
||||
fi
|
||||
else
|
||||
echo "$HOME"
|
||||
fi
|
||||
|
||||
@@ -1,161 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Request sudo upfront to avoid prompts during checks
|
||||
sudo -v
|
||||
|
||||
# Keep sudo alive during the script
|
||||
(while true; do sudo -v; sleep 50; done) &
|
||||
SUDO_REFRESH_PID=$!
|
||||
trap "kill $SUDO_REFRESH_PID 2>/dev/null" EXIT
|
||||
|
||||
# Define Omarchy locations
|
||||
export OMARCHY_PATH="/home/ryan/Work/omarchy/omarchy-installer"
|
||||
export OMARCHY_INSTALL="$OMARCHY_PATH/install"
|
||||
|
||||
# Track results
|
||||
failed_checks=0
|
||||
passed_checks=0
|
||||
skipped_checks=0
|
||||
total_checks=0
|
||||
|
||||
# Function to display a message with icon
|
||||
show_message() {
|
||||
local type="$1"
|
||||
local msg="$2"
|
||||
case "$type" in
|
||||
error) printf " ❌ ERROR %s\n" "$msg" ;;
|
||||
warning) printf " ⚠️ WARNING %s\n" "$msg" ;;
|
||||
info) printf " ✅ OK %s\n" "$msg" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Function to check a single script
|
||||
check_script() {
|
||||
local script="$1"
|
||||
local script_name="${script#$OMARCHY_INSTALL/}"
|
||||
|
||||
# Check if script has verify function
|
||||
if ! bash -c "source '$script' && declare -f omarchy_verify" >/dev/null 2>&1; then
|
||||
((skipped_checks++))
|
||||
return
|
||||
fi
|
||||
|
||||
((total_checks++))
|
||||
|
||||
# Get friendly name
|
||||
local friendly_name=$(bash -c "source '$script' 2>/dev/null; echo \"\${OMARCHY_DESCRIPTION:-$script_name}\"")
|
||||
|
||||
# Run verification in subshell and capture output
|
||||
local output
|
||||
output=$(
|
||||
errors=()
|
||||
warnings=()
|
||||
infos=()
|
||||
|
||||
add_error() { errors+=("$1"); }
|
||||
add_warning() { warnings+=("$1"); }
|
||||
add_info() { infos+=("$1"); }
|
||||
|
||||
source "$script"
|
||||
omarchy_verify
|
||||
exit_code=$?
|
||||
|
||||
# Output results with delimiters
|
||||
echo "EXIT:$exit_code"
|
||||
for e in "${errors[@]}"; do echo "ERROR:$e"; done
|
||||
for w in "${warnings[@]}"; do echo "WARNING:$w"; done
|
||||
for i in "${infos[@]}"; do echo "INFO:$i"; done
|
||||
)
|
||||
|
||||
# Parse output
|
||||
local exit_code errors=() warnings=() infos=()
|
||||
while IFS= read -r line; do
|
||||
case "$line" in
|
||||
EXIT:*) exit_code="${line#EXIT:}" ;;
|
||||
ERROR:*) errors+=("${line#ERROR:}") ;;
|
||||
WARNING:*) warnings+=("${line#WARNING:}") ;;
|
||||
INFO:*) infos+=("${line#INFO:}") ;;
|
||||
esac
|
||||
done <<< "$output"
|
||||
|
||||
# Handle skipped (return code 2)
|
||||
if [[ $exit_code -eq 2 ]]; then
|
||||
((skipped_checks++))
|
||||
return
|
||||
fi
|
||||
|
||||
# Count messages
|
||||
local error_count=${#errors[@]}
|
||||
local warning_count=${#warnings[@]}
|
||||
|
||||
# Determine status
|
||||
local status_icon status_color
|
||||
if [[ $error_count -gt 0 ]]; then
|
||||
status_icon="❌"
|
||||
status_color="1" # Red
|
||||
((failed_checks++))
|
||||
elif [[ $warning_count -gt 0 ]]; then
|
||||
status_icon="⚠️"
|
||||
status_color="3" # Yellow
|
||||
((passed_checks++))
|
||||
else
|
||||
status_icon="✅"
|
||||
status_color="2" # Green
|
||||
((passed_checks++))
|
||||
fi
|
||||
|
||||
# Display result
|
||||
printf "%s %s\n" "$status_icon" "$(gum style --foreground "$status_color" --bold "$friendly_name")"
|
||||
|
||||
# Display messages if any errors or warnings
|
||||
if [[ $error_count -gt 0 || $warning_count -gt 0 ]]; then
|
||||
for msg in "${errors[@]}"; do
|
||||
show_message error "$msg"
|
||||
done
|
||||
|
||||
for msg in "${warnings[@]}"; do
|
||||
show_message warning "$msg"
|
||||
done
|
||||
|
||||
for msg in "${infos[@]}"; do
|
||||
show_message info "$msg"
|
||||
done
|
||||
fi
|
||||
|
||||
echo
|
||||
}
|
||||
|
||||
# Main execution
|
||||
echo
|
||||
gum style --italic --foreground 7 "Running health checks..."
|
||||
echo
|
||||
|
||||
# Process all scripts
|
||||
while IFS= read -r script; do
|
||||
# Skip certain directories
|
||||
if [[ "$script" == */all.sh ]] ||
|
||||
[[ "$script" == */helpers/* ]] ||
|
||||
[[ "$script" == */preflight/* ]] ||
|
||||
[[ "$script" == */first-run/* ]] ||
|
||||
[[ "$script" == */post-install/* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
check_script "$script"
|
||||
done < <(find "$OMARCHY_INSTALL" -type f -name "*.sh" | sort)
|
||||
|
||||
# Display summary
|
||||
echo
|
||||
echo "Summary:"
|
||||
echo " Passed: $passed_checks/$total_checks"
|
||||
[[ $failed_checks -gt 0 ]] && echo " Failed: $failed_checks/$total_checks"
|
||||
[[ $skipped_checks -gt 0 ]] && echo " Skipped: $skipped_checks"
|
||||
|
||||
echo
|
||||
|
||||
if [[ $failed_checks -gt 0 ]]; then
|
||||
echo "❌ Some checks failed. Please review the errors above."
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All checks passed!"
|
||||
fi
|
||||
@@ -3,7 +3,7 @@
|
||||
options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB")
|
||||
|
||||
if [[ "$#" -eq 0 ]]; then
|
||||
choices=$(printf "%s\n" "${options[@]}" | gum choose --header "Select databases (space to select, return to install, esc to cancel)") || main_menu
|
||||
choices=$(printf "%s\n" "${options[@]}" | gum choose --header "Select database (return to install, esc to cancel)") || main_menu
|
||||
else
|
||||
choices="$@"
|
||||
fi
|
||||
|
||||
@@ -4,5 +4,5 @@ echo "Installing all dependencies..."
|
||||
omarchy-pkg-add dropbox dropbox-cli libappindicator-gtk3 python-gpgme nautilus-dropbox
|
||||
|
||||
echo "Starting Dropbox..."
|
||||
uwsm app -- dropbox-cli start &>/dev/null &
|
||||
uwsm-app -- dropbox-cli start &>/dev/null &
|
||||
echo "See Dropbox icon behind hover tray in top right and right-click for setup."
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec setsid uwsm app -- alacritty --class=Omarchy -o font.size=9 -e bash -c 'fastfetch; read -n 1 -s'
|
||||
exec setsid uwsm-app -- alacritty --class=Omarchy -o font.size=9 -e bash -c 'fastfetch; read -n 1 -s'
|
||||
|
||||
@@ -9,4 +9,4 @@ else
|
||||
private_flag="--incognito"
|
||||
fi
|
||||
|
||||
exec setsid uwsm app -- "$browser_exec" "${@/--private/$private_flag}"
|
||||
exec setsid uwsm-app -- "$browser_exec" "${@/--private/$private_flag}"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
case "${EDITOR:-nvim}" in
|
||||
nvim | vim | nano | micro | hx)
|
||||
exec setsid uwsm app -- "$TERMINAL" -e "$EDITOR" "$@"
|
||||
nvim | vim | nano | micro | hx | helix)
|
||||
exec setsid uwsm-app -- "$TERMINAL" -e "$EDITOR" "$@"
|
||||
;;
|
||||
*)
|
||||
exec setsid uwsm app -- "$EDITOR" "$@"
|
||||
exec setsid uwsm-app -- "$EDITOR" "$@"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
cmd="$*"
|
||||
exec setsid uwsm app -- alacritty --class=Omarchy --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done"
|
||||
exec setsid uwsm-app -- alacritty -o font.size=9 --class=Omarchy --title=Omarchy -e bash -c "omarchy-show-logo; $cmd; omarchy-show-done"
|
||||
@@ -6,7 +6,7 @@ if (($# == 0)); then
|
||||
fi
|
||||
|
||||
WINDOW_PATTERN="$1"
|
||||
LAUNCH_COMMAND="${2:-"uwsm app -- $WINDOW_PATTERN"}"
|
||||
LAUNCH_COMMAND="${2:-"uwsm-app -- $WINDOW_PATTERN"}"
|
||||
WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class|test("\\b" + $p + "\\b";"i")) or (.title|test("\\b" + $p + "\\b";"i")))|.address' | head -n1)
|
||||
|
||||
if [[ -n $WINDOW_ADDRESS ]]; then
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (($# == 0)); then
|
||||
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url]"
|
||||
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url-and-flags...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec omarchy-launch-or-focus "$1" "omarchy-launch-webapp '$2'"
|
||||
WINDOW_PATTERN="$1"
|
||||
shift
|
||||
LAUNCH_COMMAND="omarchy-launch-webapp $@"
|
||||
|
||||
exec omarchy-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_COMMAND"
|
||||
@@ -3,8 +3,8 @@
|
||||
browser=$(xdg-settings get default-web-browser)
|
||||
|
||||
case $browser in
|
||||
google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi*) ;;
|
||||
google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium-browser*) ;;
|
||||
*) browser="chromium.desktop" ;;
|
||||
esac
|
||||
|
||||
exec setsid uwsm app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}"
|
||||
exec setsid uwsm-app -- $(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$browser 2>/dev/null | head -1) --app="$1" "${@:2}"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec setsid uwsm app -- "$TERMINAL" --class=Impala -e impala "$@"
|
||||
exec setsid uwsm-app -- "$TERMINAL" --class=Impala -e impala "$@"
|
||||
|
||||
@@ -9,4 +9,4 @@ if pgrep -x "1password" >/dev/null; then
|
||||
fi
|
||||
|
||||
# Avoid running screensaver when locked
|
||||
pkill -f "$TERMINAL --class Screensaver"
|
||||
pkill -f "alacritty --class Screensaver"
|
||||
|
||||
@@ -286,8 +286,9 @@ show_install_ai_menu() {
|
||||
echo ollama
|
||||
)
|
||||
|
||||
case $(menu "Install" " Claude Code\n Gemini [AUR]\n OpenAI Codex [AUR]\n LM Studio\n Ollama\n Crush\n opencode") in
|
||||
case $(menu "Install" " Claude Code\n Cursor CLI [AUR]\n Gemini [AUR]\n OpenAI Codex [AUR]\n LM Studio\n Ollama\n Crush\n opencode") in
|
||||
*Claude*) install "Claude Code" "claude-code" ;;
|
||||
*Cursor*) aur_install "Cursor CLI" "cursor-cli" ;;
|
||||
*OpenAI*) aur_install "OpenAI Codex" "openai-codex-bin" ;;
|
||||
*Gemini*) aur_install "Gemini" "gemini-cli" ;;
|
||||
*Studio*) install "LM Studio" "lmstudio" ;;
|
||||
@@ -451,9 +452,9 @@ show_system_menu() {
|
||||
*Lock*) omarchy-lock-screen ;;
|
||||
*Screensaver*) omarchy-launch-screensaver force ;;
|
||||
*Suspend*) systemctl suspend ;;
|
||||
*Relaunch*) uwsm stop ;;
|
||||
*Restart*) systemctl reboot ;;
|
||||
*Shutdown*) systemctl poweroff ;;
|
||||
*Relaunch*) omarchy-state clear relaunch-required && sudo systemctl restart sddm ;;
|
||||
*Restart*) omarchy-state clear re*-required && systemctl reboot ;;
|
||||
*Shutdown*) omarchy-state clear re*-required && systemctl poweroff ;;
|
||||
*) back_to show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -3,6 +3,69 @@
|
||||
# A script to display Hyprland keybindings defined in your configuration
|
||||
# using walker for an interactive search menu.
|
||||
|
||||
declare -A KEYCODE_SYM_MAP
|
||||
|
||||
build_keymap_cache() {
|
||||
local keymap
|
||||
keymap="$(xkbcli compile-keymap)" || {
|
||||
echo "Failed to compile keymap" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
while IFS=, read -r code sym; do
|
||||
[[ -z "$code" || -z "$sym" ]] && continue
|
||||
KEYCODE_SYM_MAP["$code"]="$sym"
|
||||
done < <(
|
||||
awk '
|
||||
BEGIN { sec = "" }
|
||||
/xkb_keycodes/ { sec = "codes"; next }
|
||||
/xkb_symbols/ { sec = "syms"; next }
|
||||
sec == "codes" {
|
||||
if (match($0, /<([A-Za-z0-9_]+)>\s*=\s*([0-9]+)\s*;/, m)) code_by_name[m[1]] = m[2]
|
||||
}
|
||||
sec == "syms" {
|
||||
if (match($0, /key\s*<([A-Za-z0-9_]+)>\s*\{\s*\[\s*([^, \]]+)/, m)) sym_by_name[m[1]] = m[2]
|
||||
}
|
||||
END {
|
||||
for (k in code_by_name) {
|
||||
c = code_by_name[k]
|
||||
s = sym_by_name[k]
|
||||
if (c != "" && s != "" && s != "NoSymbol") print c "," s
|
||||
}
|
||||
}
|
||||
' <<<"$keymap"
|
||||
)
|
||||
}
|
||||
|
||||
lookup_keycode_cached() {
|
||||
printf '%s\n' "${KEYCODE_SYM_MAP[$1]}"
|
||||
}
|
||||
|
||||
parse_keycodes() {
|
||||
local start end elapsed
|
||||
[[ "${DEBUG:-0}" == "1" ]] && start=$(date +%s.%N)
|
||||
while IFS= read -r line; do
|
||||
if [[ "$line" =~ code:([0-9]+) ]]; then
|
||||
code="${BASH_REMATCH[1]}"
|
||||
symbol=$(lookup_keycode_cached "$code" "$XKB_KEYMAP_CACHE")
|
||||
echo "${line/code:${code}/$symbol}"
|
||||
else
|
||||
echo "$line"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$DEBUG" == "1" ]]; then
|
||||
end=$(date +%s.%N)
|
||||
# fall back to awk if bc is missing
|
||||
if command -v bc >/dev/null 2>&1; then
|
||||
elapsed=$(echo "$end - $start" | bc)
|
||||
else
|
||||
elapsed=$(awk -v s="$start" -v e="$end" 'BEGIN{printf "%.6f", (e - s)}')
|
||||
fi
|
||||
echo "[DEBUG] parse_keycodes elapsed: ${elapsed}s" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
# Fetch dynamic keybindings from Hyprland
|
||||
#
|
||||
# Also do some pre-processing:
|
||||
@@ -11,30 +74,31 @@
|
||||
# - Map numeric modifier key mask to a textual rendition
|
||||
# - Output comma-separated values that the parser can understand
|
||||
dynamic_bindings() {
|
||||
hyprctl -j binds | \
|
||||
jq -r '.[] | {modmask, key, keycode, description, dispatcher, arg} | "\(.modmask),\(.key)@\(.keycode),\(.description),\(.dispatcher),\(.arg)"' | \
|
||||
hyprctl -j binds |
|
||||
jq -r '.[] | {modmask, key, keycode, description, dispatcher, arg} | "\(.modmask),\(.key)@\(.keycode),\(.description),\(.dispatcher),\(.arg)"' |
|
||||
sed -r \
|
||||
-e 's/null//' \
|
||||
-e 's,~/.local/share/omarchy/bin/,,' \
|
||||
-e 's,uwsm app -- ,,' \
|
||||
-e 's/@0//' \
|
||||
-e 's/,@/,code:/' \
|
||||
-e 's/^0,/,/' \
|
||||
-e 's/^1,/SHIFT,/' \
|
||||
-e 's/^4,/CTRL,/' \
|
||||
-e 's/^5,/SHIFT CTRL,/' \
|
||||
-e 's/^8,/ALT,/' \
|
||||
-e 's/^9,/SHIFT ALT,/' \
|
||||
-e 's/^12,/CTRL ALT,/' \
|
||||
-e 's/^13,/SHIFT CTRL ALT,/' \
|
||||
-e 's/^64,/SUPER,/' \
|
||||
-e 's/^65,/SUPER SHIFT,/' \
|
||||
-e 's/^68,/SUPER CTRL,/' \
|
||||
-e 's/^69,/SUPER SHIFT CTRL,/' \
|
||||
-e 's/^72,/SUPER ALT,/' \
|
||||
-e 's/^73,/SUPER SHIFT ALT,/' \
|
||||
-e 's/^76,/SUPER CTRL ALT,/' \
|
||||
-e 's/^77,/SUPER SHIFT CTRL ALT,/'
|
||||
-e 's/null//' \
|
||||
-e 's,~/.local/share/omarchy/bin/,,' \
|
||||
-e 's,uwsm app -- ,,' \
|
||||
-e 's,uwsm-app -- ,,' \
|
||||
-e 's/@0//' \
|
||||
-e 's/,@/,code:/' \
|
||||
-e 's/^0,/,/' \
|
||||
-e 's/^1,/SHIFT,/' \
|
||||
-e 's/^4,/CTRL,/' \
|
||||
-e 's/^5,/SHIFT CTRL,/' \
|
||||
-e 's/^8,/ALT,/' \
|
||||
-e 's/^9,/SHIFT ALT,/' \
|
||||
-e 's/^12,/CTRL ALT,/' \
|
||||
-e 's/^13,/SHIFT CTRL ALT,/' \
|
||||
-e 's/^64,/SUPER,/' \
|
||||
-e 's/^65,/SUPER SHIFT,/' \
|
||||
-e 's/^68,/SUPER CTRL,/' \
|
||||
-e 's/^69,/SUPER SHIFT CTRL,/' \
|
||||
-e 's/^72,/SUPER ALT,/' \
|
||||
-e 's/^73,/SUPER SHIFT ALT,/' \
|
||||
-e 's/^76,/SUPER CTRL ALT,/' \
|
||||
-e 's/^77,/SUPER SHIFT CTRL ALT,/'
|
||||
}
|
||||
|
||||
# Parse and format keybindings
|
||||
@@ -86,8 +150,10 @@ parse_bindings() {
|
||||
monitor_height=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .height')
|
||||
menu_height=$((monitor_height * 40 / 100))
|
||||
|
||||
dynamic_bindings | \
|
||||
sort -u | \
|
||||
parse_bindings | \
|
||||
walker --dmenu --theme keybindings -p 'Keybindings' -w 800 -h "$menu_height"
|
||||
build_keymap_cache
|
||||
|
||||
dynamic_bindings |
|
||||
sort -u |
|
||||
parse_keycodes |
|
||||
parse_bindings |
|
||||
walker --dmenu --theme keybindings -p 'Keybindings' -w 800 -h "$menu_height"
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo pacman -S --noconfirm --needed "$@" || exit 1
|
||||
|
||||
for pkg in "$@"; do
|
||||
# Secondary check to handle states where pacman doesn't actually register an error
|
||||
if ! pacman -Q "$pkg" &>/dev/null; then
|
||||
sudo pacman -S --noconfirm "$pkg" || exit 1
|
||||
echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -x $1
|
||||
setsid uwsm app -- $1 >/dev/null 2>&1 &
|
||||
setsid uwsm-app -- $1 >/dev/null 2>&1 &
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -e "Restarting pirewire audio service...\n"
|
||||
echo -e "Restarting pipewire audio service...\n"
|
||||
systemctl --user restart pipewire.service
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
pkill walker
|
||||
# FIXME: Just deal with the memory leak for now.
|
||||
# See https://github.com/basecamp/omarchy/issues/698
|
||||
setsid uwsm app -- walker --gapplication-service &
|
||||
setsid uwsm-app -- walker --gapplication-service &
|
||||
echo # Always end in success so we don't terminate further running
|
||||
|
||||
@@ -20,7 +20,7 @@ print_info() {
|
||||
}
|
||||
|
||||
check_fingerprint_hardware() {
|
||||
if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix|elan|validity'; then
|
||||
if ! lsusb | grep -Eiq 'fingerprint|synaptics|goodix|elan|validity|FPC'; then
|
||||
print_error "\nNo fingerprint sensor detected."
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@ TOTAL=${#BACKGROUNDS[@]}
|
||||
if [[ $TOTAL -eq 0 ]]; then
|
||||
notify-send "No background was found for theme" -t 2000
|
||||
pkill -x swaybg
|
||||
setsid uwsm app -- swaybg --color '#000000' >/dev/null 2>&1 &
|
||||
setsid uwsm-app -- swaybg --color '#000000' >/dev/null 2>&1 &
|
||||
else
|
||||
# Get current background from symlink
|
||||
if [[ -L "$CURRENT_BACKGROUND_LINK" ]]; then
|
||||
@@ -44,5 +44,5 @@ else
|
||||
|
||||
# Relaunch swaybg
|
||||
pkill -x swaybg
|
||||
setsid uwsm app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
|
||||
setsid uwsm-app -- swaybg -i "$CURRENT_BACKGROUND_LINK" -m fill >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
@@ -30,9 +30,10 @@ hyprctl reload
|
||||
pkill -SIGUSR2 btop
|
||||
makoctl reload
|
||||
|
||||
# Change gnome, browser, vscode themes
|
||||
# Change gnome, browser, vscode, cursor themes
|
||||
omarchy-theme-set-terminal
|
||||
omarchy-theme-set-gnome
|
||||
omarchy-theme-set-eza
|
||||
omarchy-theme-set-browser
|
||||
omarchy-theme-set-vscode
|
||||
omarchy-theme-set-cursor
|
||||
|
||||
@@ -4,16 +4,17 @@ CHROMIUM_THEME=~/.config/omarchy/current/theme/chromium.theme
|
||||
|
||||
if omarchy-cmd-present chromium || omarchy-cmd-present brave; then
|
||||
if [[ -f $CHROMIUM_THEME ]]; then
|
||||
rgb=$(<$CHROMIUM_THEME)
|
||||
THEME_RGB_COLOR=$(<$CHROMIUM_THEME)
|
||||
THEME_HEX_COLOR=$(printf '#%02x%02x%02x' ${rgb//,/ })
|
||||
else
|
||||
# Use a default, neutral grey if theme doesn't have a color
|
||||
THEME_RGB_COLOR="28,32,39"
|
||||
THEME_HEX_COLOR="#1c2027"
|
||||
fi
|
||||
|
||||
if omarchy-cmd-present chromium; then
|
||||
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\"}" | tee "/etc/chromium/policies/managed/color.json" >/dev/null
|
||||
chromium --refresh-platform-policy --no-startup-window
|
||||
rm -f /etc/chromium/policies/managed/color.json
|
||||
chromium --no-startup-window --set-theme-color="$THEME_RGB_COLOR"
|
||||
fi
|
||||
|
||||
if omarchy-cmd-present brave; then
|
||||
|
||||
4
bin/omarchy-theme-set-cursor
Executable file
4
bin/omarchy-theme-set-cursor
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Call the VSCode theme setter with Cursor-specific parameters
|
||||
omarchy-theme-set-vscode cursor "$HOME/.config/Cursor/User/settings.json" "$HOME/.local/state/omarchy/toggles/skip-cursor-theme-changes" Cursor
|
||||
@@ -3,43 +3,47 @@
|
||||
# Note: We cannot use `jq` to update settings.json because it’s JSONC (allows comments),
|
||||
# which jq doesn’t support.
|
||||
|
||||
VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json"
|
||||
VS_CODE_SETTINGS="$HOME/.config/Code/User/settings.json"
|
||||
VS_CODE_SKIP_FLAG="$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes"
|
||||
# Parameters: EDITOR_CMD SETTINGS_PATH SKIP_FLAG EDITOR_NAME
|
||||
EDITOR_CMD="${1:-code}"
|
||||
SETTINGS_PATH="${2:-$HOME/.config/Code/User/settings.json}"
|
||||
SKIP_FLAG="${3:-$HOME/.local/state/omarchy/toggles/skip-vscode-theme-changes}"
|
||||
EDITOR_NAME="${4:-VS Code}"
|
||||
|
||||
if omarchy-cmd-present code && [[ ! -f "$VS_CODE_SKIP_FLAG" ]]; then
|
||||
VS_CODE_THEME="$HOME/.config/omarchy/current/theme/vscode.json"
|
||||
|
||||
if omarchy-cmd-present "$EDITOR_CMD" && [[ ! -f "$SKIP_FLAG" ]]; then
|
||||
if [[ -f "$VS_CODE_THEME" ]]; then
|
||||
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
|
||||
extension=$(jq -r '.extension' "$VS_CODE_THEME")
|
||||
|
||||
# Install VS Code theme extension
|
||||
if [[ -n "$extension" ]] && ! code --list-extensions | grep -Fxq "$extension"; then
|
||||
notify-send " Installing VS Code theme for $theme_name"
|
||||
code --install-extension "$extension" >/dev/null
|
||||
# Install $EDITOR_NAME theme extension
|
||||
if [[ -n "$extension" ]] && ! "$EDITOR_CMD" --list-extensions | grep -Fxq "$extension"; then
|
||||
notify-send " Installing $EDITOR_NAME theme for $theme_name"
|
||||
"$EDITOR_CMD" --install-extension "$extension" >/dev/null
|
||||
fi
|
||||
|
||||
# Create config file if there isn't already one
|
||||
mkdir -p "$(dirname "$VS_CODE_SETTINGS")"
|
||||
if [[ ! -f "$VS_CODE_SETTINGS" ]]; then
|
||||
printf '{\n}\n' > "$VS_CODE_SETTINGS"
|
||||
mkdir -p "$(dirname "$SETTINGS_PATH")"
|
||||
if [[ ! -f "$SETTINGS_PATH" ]]; then
|
||||
printf '{\n}\n' > "$SETTINGS_PATH"
|
||||
fi
|
||||
|
||||
# Create a `workbench.colorTheme` entry in settings.
|
||||
if ! grep -q '"workbench.colorTheme"' "$VS_CODE_SETTINGS"; then
|
||||
# Create a `workbench.colorTheme` entry in settings.
|
||||
if ! grep -q '"workbench.colorTheme"' "$SETTINGS_PATH"; then
|
||||
# Insert `"workbench.colorTheme": "",` immediately after the first `{`
|
||||
# Use sed's first-match range (0,/{/) to only replace the first `{`
|
||||
sed -i --follow-symlinks -E '0,/\{/{s/\{/{\
|
||||
"workbench.colorTheme": "",/}' "$VS_CODE_SETTINGS"
|
||||
"workbench.colorTheme": "",/}' "$SETTINGS_PATH"
|
||||
fi
|
||||
|
||||
# Update theme
|
||||
sed -i --follow-symlinks -E \
|
||||
"s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \
|
||||
"$VS_CODE_SETTINGS"
|
||||
"$SETTINGS_PATH"
|
||||
else
|
||||
# Remove theme from settings.json when the theme doesn't have vscode support
|
||||
if [[ -f "$VS_CODE_SETTINGS" ]]; then
|
||||
sed -i --follow-symlinks -E '/"workbench\.colorTheme"[[:space:]]*:[^,}]*,?/d' "$VS_CODE_SETTINGS"
|
||||
# Remove theme from settings.json when the theme doesn't have $EDITOR_NAME support
|
||||
if [[ -f "$SETTINGS_PATH" ]]; then
|
||||
sed -i --follow-symlinks -E '/"workbench\.colorTheme"[[:space:]]*:[^,}]*,?/d' "$SETTINGS_PATH"
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -4,6 +4,6 @@ if pgrep -x hypridle >/dev/null; then
|
||||
pkill -x hypridle
|
||||
notify-send "Stop locking computer when idle"
|
||||
else
|
||||
uwsm app -- hypridle >/dev/null 2>&1 &
|
||||
uwsm-app -- hypridle >/dev/null 2>&1 &
|
||||
notify-send "Now locking computer when idle"
|
||||
fi
|
||||
|
||||
@@ -6,7 +6,7 @@ OFF_TEMP=6000
|
||||
|
||||
# Ensure hyprsunset is running
|
||||
if ! pgrep -x hyprsunset; then
|
||||
setsid uwsm app -- hyprsunset &
|
||||
setsid uwsm-app -- hyprsunset &
|
||||
sleep 1 # Give it time to register
|
||||
fi
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
if pgrep -x waybar >/dev/null; then
|
||||
pkill -x waybar
|
||||
else
|
||||
uwsm app -- waybar >/dev/null 2>&1 &
|
||||
uwsm-app -- waybar >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
@@ -43,7 +43,7 @@ cat >"$DESKTOP_FILE" <<EOF
|
||||
Version=1.0
|
||||
Name=$APP_NAME
|
||||
Comment=$APP_NAME
|
||||
Exec=$TERMINAL --class $APP_CLASS -e $APP_EXEC
|
||||
Exec=\$TERMINAL --class=$APP_CLASS -e $APP_EXEC
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=$ICON_PATH
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
git -C "$OMARCHY_PATH" describe --tags $(git -C "$OMARCHY_PATH" rev-list --tags --max-count=1)
|
||||
cat $OMARCHY_PATH/version
|
||||
|
||||
11
bin/omarchy-webapp-handler-hey
Executable file
11
bin/omarchy-webapp-handler-hey
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
url="$1"
|
||||
web_url="https://app.hey.com"
|
||||
|
||||
# Handle mailto: URLs
|
||||
if [[ $url =~ ^mailto: ]]; then
|
||||
email=$(echo "$url" | sed 's/mailto://')
|
||||
web_url="https://app.hey.com/messages/new?to=$email"
|
||||
fi
|
||||
|
||||
exec omarchy-launch-webapp "$web_url"
|
||||
@@ -6,7 +6,7 @@ DESKTOP_DIR="$HOME/.local/share/applications/"
|
||||
if [ "$#" -eq 0 ]; then
|
||||
# Find all web apps
|
||||
while IFS= read -r -d '' file; do
|
||||
if grep -q '^Exec=.*omarchy-launch-webapp.*' "$file"; then
|
||||
if grep -q '^Exec=.*\(omarchy-launch-webapp\|omarchy-webapp-handler\).*' "$file"; then
|
||||
WEB_APPS+=("$(basename "${file%.desktop}")")
|
||||
fi
|
||||
done < <(find "$DESKTOP_DIR" -name '*.desktop' -print0)
|
||||
|
||||
@@ -16,5 +16,6 @@ decorations = "None"
|
||||
|
||||
[keyboard]
|
||||
bindings = [
|
||||
{ key = "F11", action = "ToggleFullscreen" }
|
||||
{ key = "F11", action = "ToggleFullscreen" },
|
||||
{ key = "Insert", mods = "Shift", action = "Paste" }
|
||||
]
|
||||
|
||||
@@ -7,10 +7,12 @@ font-style = Regular
|
||||
font-size = 9
|
||||
|
||||
# Window
|
||||
window-theme = ghostty
|
||||
window-padding-x = 14
|
||||
window-padding-y = 14
|
||||
confirm-close-surface=false
|
||||
resize-overlay = never
|
||||
gtk-toolbar-style = flat
|
||||
|
||||
# Cursor styling
|
||||
cursor-style = "block"
|
||||
@@ -19,3 +21,7 @@ shell-integration-features = no-cursor
|
||||
|
||||
# Keyboard bindings
|
||||
keybind = f11=toggle_fullscreen
|
||||
keybind = shift+insert=paste_from_clipboard
|
||||
|
||||
# SSH session terminfo
|
||||
shell-integration-features = ssh-env
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Extra autostart processes
|
||||
# exec-once = uwsm app -- my-service
|
||||
# exec-once = uwsm-app -- my-service
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
# Application bindings
|
||||
$terminal = uwsm app -- $TERMINAL
|
||||
$terminal = uwsm-app -- $TERMINAL
|
||||
$browser = omarchy-launch-browser
|
||||
|
||||
bindd = SUPER, return, Terminal, exec, $terminal --working-directory="$(omarchy-cmd-terminal-cwd)"
|
||||
bindd = SUPER, F, File manager, exec, uwsm app -- nautilus --new-window
|
||||
bindd = SUPER, RETURN, Terminal, exec, $terminal --working-directory="$(omarchy-cmd-terminal-cwd)"
|
||||
bindd = SUPER, F, File manager, exec, uwsm-app -- nautilus --new-window
|
||||
bindd = SUPER, B, Browser, exec, $browser
|
||||
bindd = SUPER SHIFT, B, Browser (private), exec, $browser --private
|
||||
bindd = SUPER, M, Music, exec, omarchy-launch-or-focus spotify
|
||||
bindd = SUPER, N, Editor, exec, omarchy-launch-editor
|
||||
bindd = SUPER, T, Activity, exec, $terminal -e btop
|
||||
bindd = SUPER, D, Docker, exec, $terminal -e lazydocker
|
||||
bindd = SUPER, G, Signal, exec, omarchy-launch-or-focus signal "uwsm app -- signal-desktop"
|
||||
bindd = SUPER, O, Obsidian, exec, omarchy-launch-or-focus obsidian "uwsm app -- obsidian -disable-gpu --enable-wayland-ime"
|
||||
bindd = SUPER, slash, Passwords, exec, uwsm app -- 1password
|
||||
bindd = SUPER, G, Signal, exec, omarchy-launch-or-focus signal "uwsm-app -- signal-desktop"
|
||||
bindd = SUPER, O, Obsidian, exec, omarchy-launch-or-focus "^obsidian$" "uwsm-app -- obsidian -disable-gpu --enable-wayland-ime"
|
||||
bindd = SUPER, SLASH, Passwords, exec, uwsm-app -- 1password
|
||||
|
||||
# If your web app url contains #, type it as ## to prevent hyperland treat it as comments
|
||||
# If your web app url contains #, type it as ## to prevent hyprland from treating it as a comment
|
||||
bindd = SUPER, A, ChatGPT, exec, omarchy-launch-webapp "https://chatgpt.com"
|
||||
bindd = SUPER SHIFT, A, Grok, exec, omarchy-launch-webapp "https://grok.com"
|
||||
bindd = SUPER, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/"
|
||||
bindd = SUPER SHIFT, C, Calendar, exec, omarchy-launch-webapp "https://app.hey.com/calendar/weeks/"
|
||||
bindd = SUPER, E, Email, exec, omarchy-launch-webapp "https://app.hey.com"
|
||||
bindd = SUPER, Y, YouTube, exec, omarchy-launch-or-focus-webapp YouTube "https://youtube.com/"
|
||||
bindd = SUPER SHIFT, G, WhatsApp, exec, omarchy-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
input {
|
||||
# Use multiple keyboard layouts and switch between them with Left Alt + Right Alt
|
||||
# kb_layout = us,dk,eu
|
||||
kb_options = compose:caps # ,grp:alts_toggle
|
||||
kb_options = compose:caps # ,grp:shifts_toggle
|
||||
|
||||
# Change speed of keyboard repeat
|
||||
repeat_rate = 40
|
||||
@@ -12,7 +12,7 @@ input {
|
||||
# Start with numlock on by default
|
||||
numlock_by_default = true
|
||||
|
||||
# Increase sensitity for mouse/trackpack (default: 0)
|
||||
# Increase sensitivity for mouse/trackpad (default: 0)
|
||||
# sensitivity = 0.35
|
||||
|
||||
touchpad {
|
||||
|
||||
@@ -15,3 +15,9 @@ decoration {
|
||||
# Use round window corners
|
||||
# rounding = 8
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Dwindle-Layout/
|
||||
dwindle {
|
||||
# Avoid overly wide single-window layouts on wide screens
|
||||
# single_window_aspect_ratio = 1 1
|
||||
}
|
||||
|
||||
56
config/nvim/lua/plugins/all-themes.lua
Normal file
56
config/nvim/lua/plugins/all-themes.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
return {
|
||||
-- Load all theme plugins but don't apply them
|
||||
-- This ensures all colorschemes are available for hot-reloading
|
||||
{
|
||||
"ribru17/bamboo.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"sainnhe/everforest",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"tahayvr/matteblack.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"shaunsingh/nord.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
}
|
||||
45
config/nvim/lua/plugins/omarchy-theme-hotreload.lua
Normal file
45
config/nvim/lua/plugins/omarchy-theme-hotreload.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
return {
|
||||
{
|
||||
name = "theme-hotreload",
|
||||
dir = vim.fn.stdpath("config"),
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local transparency_file = vim.fn.stdpath("config") .. "/plugin/after/transparency.lua"
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyReload",
|
||||
callback = function()
|
||||
package.loaded["plugins.theme"] = nil
|
||||
|
||||
vim.schedule(function()
|
||||
local ok, theme_spec = pcall(require, "plugins.theme")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
for _, spec in ipairs(theme_spec) do
|
||||
if spec[1] == "LazyVim/LazyVim" and spec.opts and spec.opts.colorscheme then
|
||||
local colorscheme = spec.opts.colorscheme
|
||||
|
||||
require("lazy.core.loader").colorscheme(colorscheme)
|
||||
|
||||
vim.defer_fn(function()
|
||||
pcall(vim.cmd.colorscheme, colorscheme)
|
||||
|
||||
if vim.fn.filereadable(transparency_file) == 1 then
|
||||
vim.defer_fn(function()
|
||||
vim.cmd.source(transparency_file)
|
||||
end, 5)
|
||||
end
|
||||
end, 5)
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "tokyonight",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -21,7 +21,7 @@ path = "~/.config/hypr/hyprland.conf"
|
||||
hidden = true
|
||||
|
||||
[builtins.applications]
|
||||
launch_prefix = "uwsm app -- "
|
||||
launch_prefix = "uwsm-app -- "
|
||||
placeholder = " Search..."
|
||||
prioritize_new = false
|
||||
context_aware = false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Browser types
|
||||
windowrule = tag +chromium-based-browser, class:([cC]hrom(e|ium)|[bB]rave-browser|Microsoft-edge|Vivaldi-stable)
|
||||
windowrule = tag +chromium-based-browser, class:([cC]hrom(e|ium)|[bB]rave-browser|Microsoft-edge|Vivaldi-stable|helium)
|
||||
windowrule = tag +firefox-based-browser, class:([fF]irefox|zen|librewolf)
|
||||
|
||||
# Force chromium-based browsers into a tile to deal with --app bug
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Float Steam, fullscreen RetroArch
|
||||
# Float Steam
|
||||
windowrule = float, class:steam
|
||||
windowrule = center, class:steam, title:Steam
|
||||
windowrule = opacity 1 1, class:steam
|
||||
|
||||
@@ -5,6 +5,7 @@ windowrule = size 800 600, tag:floating-window
|
||||
|
||||
windowrule = tag +floating-window, class:(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float)
|
||||
windowrule = tag +floating-window, class:(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus), title:^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files)
|
||||
windowrule = float, class:org.gnome.Calculator
|
||||
|
||||
# Fullscreen screensaver
|
||||
windowrule = fullscreen, class:Screensaver
|
||||
|
||||
@@ -4,7 +4,7 @@ exec-once = uwsm app -- waybar
|
||||
exec-once = uwsm app -- fcitx5
|
||||
exec-once = uwsm app -- swaybg -i ~/.config/omarchy/current/background -m fill
|
||||
exec-once = uwsm app -- swayosd-server
|
||||
exec-once = uwsm app -- walker --gapplication-service &
|
||||
exec-once = uwsm app -- walker --gapplication-service
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+'
|
||||
exec-once = omarchy-cmd-first-run
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Deprecated bindings file. New installations include everything directly.
|
||||
|
||||
bindd = SUPER, return, Terminal, exec, $terminal
|
||||
bindd = SUPER, RETURN, Terminal, exec, $terminal
|
||||
bindd = SUPER, F, File manager, exec, $fileManager
|
||||
bindd = SUPER, B, Web browser, exec, $browser
|
||||
bindd = SUPER, M, Music player, exec, $music
|
||||
@@ -9,7 +9,7 @@ bindd = SUPER, T, Top, exec, $terminal -e btop
|
||||
bindd = SUPER, D, Lazy Docker, exec, $terminal -e lazydocker
|
||||
bindd = SUPER, G, Messenger, exec, $messenger
|
||||
bindd = SUPER, O, Obsidian, exec, obsidian -disable-gpu
|
||||
bindd = SUPER, slash, Password manager, exec, $passwordManager
|
||||
bindd = SUPER, SLASH, Password manager, exec, $passwordManager
|
||||
|
||||
source = ~/.local/share/omarchy/default/hypr/bindings/media.conf
|
||||
source = ~/.local/share/omarchy/default/hypr/bindings/tiling.conf
|
||||
|
||||
@@ -5,15 +5,15 @@ bindd = CTRL ALT, DELETE, Close all Windows, exec, omarchy-cmd-close-all-windows
|
||||
# Control tiling
|
||||
bindd = SUPER, J, Toggle split, togglesplit, # dwindle
|
||||
bindd = SUPER, P, Pseudo window, pseudo, # dwindle
|
||||
bindd = SUPER, V, Toggle floating, togglefloating,
|
||||
bindd = SUPER SHIFT, V, Toggle floating, togglefloating,
|
||||
bindd = SHIFT, F11, Force full screen, fullscreen, 0
|
||||
bindd = ALT, F11, Full width, fullscreen, 1
|
||||
|
||||
# Move focus with SUPER + arrow keys
|
||||
bindd = SUPER, left, Move focus left, movefocus, l
|
||||
bindd = SUPER, right, Move focus right, movefocus, r
|
||||
bindd = SUPER, up, Move focus up, movefocus, u
|
||||
bindd = SUPER, down, Move focus down, movefocus, d
|
||||
bindd = SUPER, LEFT, Move focus left, movefocus, l
|
||||
bindd = SUPER, RIGHT, Move focus right, movefocus, r
|
||||
bindd = SUPER, UP, Move focus up, movefocus, u
|
||||
bindd = SUPER, DOWN, Move focus down, movefocus, d
|
||||
|
||||
# Switch workspaces with SUPER + [0-9]
|
||||
bindd = SUPER, code:10, Switch to workspace 1, workspace, 1
|
||||
@@ -39,22 +39,22 @@ bindd = SUPER SHIFT, code:17, Move window to workspace 8, movetoworkspace, 8
|
||||
bindd = SUPER SHIFT, code:18, Move window to workspace 9, movetoworkspace, 9
|
||||
bindd = SUPER SHIFT, code:19, Move window to workspace 10, movetoworkspace, 10
|
||||
|
||||
# Tab between workspaces
|
||||
# TAB between workspaces
|
||||
bindd = SUPER, TAB, Next workspace, workspace, e+1
|
||||
bindd = SUPER SHIFT, TAB, Previous workspace, workspace, e-1
|
||||
bindd = SUPER CTRL, TAB, Former workspace, workspace, previous
|
||||
|
||||
# Swap active window with the one next to it with SUPER + SHIFT + arrow keys
|
||||
bindd = SUPER SHIFT, left, Swap window to the left, swapwindow, l
|
||||
bindd = SUPER SHIFT, right, Swap window to the right, swapwindow, r
|
||||
bindd = SUPER SHIFT, up, Swap window up, swapwindow, u
|
||||
bindd = SUPER SHIFT, down, Swap window down, swapwindow, d
|
||||
bindd = SUPER SHIFT, LEFT, Swap window to the left, swapwindow, l
|
||||
bindd = SUPER SHIFT, RIGHT, Swap window to the right, swapwindow, r
|
||||
bindd = SUPER SHIFT, UP, Swap window up, swapwindow, u
|
||||
bindd = SUPER SHIFT, DOWN, Swap window down, swapwindow, d
|
||||
|
||||
# Cycle through applications on active workspace
|
||||
bindd = ALT, Tab, Cycle to next window, cyclenext
|
||||
bindd = ALT SHIFT, Tab, Cycle to prev window, cyclenext, prev
|
||||
bindd = ALT, Tab, Reveal active window on top, bringactivetotop
|
||||
bindd = ALT SHIFT, Tab, Reveal active window on top, bringactivetotop
|
||||
bindd = ALT, TAB, Cycle to next window, cyclenext
|
||||
bindd = ALT SHIFT, TAB, Cycle to prev window, cyclenext, prev
|
||||
bindd = ALT, TAB, Reveal active window on top, bringactivetotop
|
||||
bindd = ALT SHIFT, TAB, Reveal active window on top, bringactivetotop
|
||||
|
||||
# Resize active window
|
||||
bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key
|
||||
@@ -63,9 +63,30 @@ bindd = SUPER SHIFT, code:20, Shrink window up, resizeactive, 0 -100
|
||||
bindd = SUPER SHIFT, code:21, Expand window down, resizeactive, 0 100
|
||||
|
||||
# Scroll through existing workspaces with SUPER + scroll
|
||||
bindd = SUPER, mouse_down, Scroll active workspace forward, workspace, e+1
|
||||
bindd = SUPER, mouse_up, Scroll active workspace backward, workspace, e-1
|
||||
bindd = SUPER, MOUSE_DOWN, Scroll active workspace forward, workspace, e+1
|
||||
bindd = SUPER, MOUSE_UP, Scroll active workspace backward, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindmd = SUPER, mouse:272, Move window, movewindow
|
||||
bindmd = SUPER, mouse:273, Resize window, resizewindow
|
||||
|
||||
# Toggle groups
|
||||
bindd = SUPER ALT, RETURN, Toggle window grouping, togglegroup
|
||||
bindd = SUPER ALT, BACKSPACE, Move active window out of group, moveoutofgroup
|
||||
|
||||
# Join groups
|
||||
bindd = SUPER ALT, LEFT, Move window to group on left, moveintogroup, l
|
||||
bindd = SUPER ALT, RIGHT, Move window to group on right, moveintogroup, r
|
||||
bindd = SUPER ALT, UP, Move window to group on top, moveintogroup, u
|
||||
bindd = SUPER ALT, DOWN, Move window to group on bottom, moveintogroup, d
|
||||
|
||||
# Navigate a single set of grouped windows
|
||||
bindd = SUPER ALT, TAB, Next window in group, changegroupactive, f
|
||||
bindd = SUPER ALT SHIFT, TAB, Previous window in group, changegroupactive, b
|
||||
|
||||
# Activate window in a group by number
|
||||
bindd = SUPER ALT, 1, Switch to group window 1, changegroupactive, 1
|
||||
bindd = SUPER ALT, 2, Switch to group window 2, changegroupactive, 2
|
||||
bindd = SUPER ALT, 3, Switch to group window 3, changegroupactive, 3
|
||||
bindd = SUPER ALT, 4, Switch to group window 4, changegroupactive, 4
|
||||
bindd = SUPER ALT, 5, Switch to group window 5, changegroupactive, 5
|
||||
|
||||
@@ -45,3 +45,7 @@ bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
|
||||
|
||||
# File sharing
|
||||
bindd = CTRL SUPER, S, Share, exec, omarchy-menu share
|
||||
|
||||
# Copy / Paste
|
||||
bind = SUPER, C, sendshortcut, CTRL, Insert,
|
||||
bind = SUPER, V, sendshortcut, SHIFT, Insert,
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# Variables
|
||||
$activeBorderColor = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
$inactiveBorderColor = rgba(595959aa)
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general {
|
||||
gaps_in = 5
|
||||
@@ -8,8 +12,8 @@ general {
|
||||
border_size = 2
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
col.active_border = $activeBorderColor
|
||||
col.inactive_border = $inactiveBorderColor
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false
|
||||
@@ -41,6 +45,38 @@ decoration {
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#group
|
||||
group {
|
||||
col.border_active = $activeBorderColor
|
||||
col.border_inactive = $inactiveBorderColor
|
||||
col.border_locked_active = -1
|
||||
col.border_locked_inactive = -1
|
||||
|
||||
groupbar {
|
||||
font_size = 12
|
||||
font_family = monospace
|
||||
font_weight_active = ultraheavy
|
||||
font_weight_inactive = normal
|
||||
|
||||
indicator_height = 0
|
||||
indicator_gap = 5
|
||||
height = 22
|
||||
gaps_in = 5
|
||||
gaps_out = 0
|
||||
|
||||
text_color = rgb(ffffff)
|
||||
text_color_inactive = rgba(ffffff90)
|
||||
col.active = rgba(00000040)
|
||||
col.inactive = rgba(00000020)
|
||||
|
||||
gradients = true
|
||||
gradient_rounding = 0
|
||||
gradient_round_only_edges = false
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
||||
animations {
|
||||
enabled = yes, please :)
|
||||
@@ -86,6 +122,7 @@ misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
focus_on_activate = true
|
||||
anr_missed_pings = 3
|
||||
}
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#cursor
|
||||
|
||||
@@ -2,6 +2,12 @@ anchor=top-right
|
||||
default-timeout=5000
|
||||
width=420
|
||||
height=110
|
||||
outer-margin=20
|
||||
padding=10,15
|
||||
border-size=2
|
||||
max-icon-size=32
|
||||
font=sans-serif 14px
|
||||
format=<span line_height="1.2"><b>%s</b>\n%b</span>
|
||||
|
||||
[app-name=Spotify]
|
||||
invisible=1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
OMARCHY_DESCRIPTION="Firewall Configuration"
|
||||
|
||||
omarchy_verify() {
|
||||
# Check if UFW is enabled
|
||||
sudo ufw status | grep -q "Status: active" || add_error "UFW firewall not active"
|
||||
|
||||
# Check if UFW service is enabled
|
||||
systemctl is-enabled ufw &>/dev/null || add_error "UFW service not enabled"
|
||||
|
||||
# Check default policies - they're on one line as "Default: deny (incoming), allow (outgoing), deny (routed)"
|
||||
sudo ufw status verbose | grep -q "Default:.*deny (incoming)" || add_error "UFW default incoming policy not set to deny"
|
||||
sudo ufw status verbose | grep -q "Default:.*allow (outgoing)" || add_error "UFW default outgoing policy not set to allow"
|
||||
|
||||
# Check specific rules are present
|
||||
sudo ufw status numbered | grep -q "53317/udp" || add_error "LocalSend UDP port 53317 not allowed"
|
||||
sudo ufw status numbered | grep -q "53317/tcp" || add_error "LocalSend TCP port 53317 not allowed"
|
||||
sudo ufw status numbered | grep -q "22/tcp" || add_error "SSH port 22 not allowed"
|
||||
|
||||
# Check Docker DNS rule
|
||||
sudo ufw status numbered | grep -q "allow-docker-dns" || add_error "Docker DNS rule not configured"
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
OMARCHY_DESCRIPTION="GNOME Theme Settings"
|
||||
|
||||
omarchy_verify() {
|
||||
gsettings get org.gnome.desktop.interface gtk-theme &>/dev/null || add_error "Cannot access GTK theme setting"
|
||||
gsettings get org.gnome.desktop.interface color-scheme &>/dev/null || add_error "Cannot access color scheme setting"
|
||||
gsettings get org.gnome.desktop.interface icon-theme &>/dev/null || add_error "Cannot access icon theme setting"
|
||||
|
||||
[[ -d /usr/share/icons ]] || add_error "Icon themes directory missing"
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
OMARCHY_DESCRIPTION="Power Profile & Battery Settings"
|
||||
|
||||
omarchy_verify() {
|
||||
if ls /sys/class/power_supply/BAT* &>/dev/null; then
|
||||
current_profile=$(powerprofilesctl get 2>/dev/null)
|
||||
[[ "$current_profile" == "balanced" ]] || add_error "Power profile not set to balanced for battery device"
|
||||
|
||||
systemctl --user is-enabled omarchy-battery-monitor.timer &>/dev/null || add_error "Battery monitor timer not enabled"
|
||||
else
|
||||
current_profile=$(powerprofilesctl get 2>/dev/null)
|
||||
[[ "$current_profile" == "performance" ]] || add_error "Power profile not set to performance for AC device"
|
||||
fi
|
||||
}
|
||||
@@ -14,6 +14,7 @@ run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh
|
||||
run_logged $OMARCHY_INSTALL/config/docker.sh
|
||||
run_logged $OMARCHY_INSTALL/config/mimetypes.sh
|
||||
run_logged $OMARCHY_INSTALL/config/localdb.sh
|
||||
run_logged $OMARCHY_INSTALL/config/fast-shutdown.sh
|
||||
run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
||||
@@ -24,6 +25,6 @@ run_logged $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/nvidia.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-bcm4360.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-bcm43xx.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-spi-keyboard.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
OMARCHY_DESCRIPTION="Branding Config"
|
||||
|
||||
omarchy_install() {
|
||||
mkdir -p ~/.config/omarchy/branding
|
||||
cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt
|
||||
cp ~/.local/share/omarchy/logo.txt ~/.config/omarchy/branding/screensaver.txt
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d ~/.config/omarchy/branding ]] || add_error "Branding directory missing"
|
||||
[[ -f ~/.config/omarchy/branding/about.txt ]] || add_error "About branding file missing"
|
||||
[[ -f ~/.config/omarchy/branding/screensaver.txt ]] || add_error "Screensaver branding file missing"
|
||||
}
|
||||
# Allow the user to change the branding for fastfetch and screensaver
|
||||
mkdir -p ~/.config/omarchy/branding
|
||||
cp ~/.local/share/omarchy/icon.txt ~/.config/omarchy/branding/about.txt
|
||||
cp ~/.local/share/omarchy/logo.txt ~/.config/omarchy/branding/screensaver.txt
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
OMARCHY_DESCRIPTION="Config Files"
|
||||
# Copy over Omarchy configs
|
||||
mkdir -p ~/.config
|
||||
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
||||
|
||||
omarchy_install() {
|
||||
# Copy over Omarchy configs
|
||||
mkdir -p ~/.config
|
||||
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
||||
|
||||
# Use default bashrc from Omarchy
|
||||
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d ~/.config ]] || add_error "Config directory missing"
|
||||
[[ -f ~/.bashrc ]] || add_error "Bashrc file missing"
|
||||
|
||||
[[ -d ~/.config/hypr ]] || add_error "Hypr config missing"
|
||||
[[ -d ~/.config/waybar ]] || add_error "Waybar config missing"
|
||||
}
|
||||
# Use default bashrc from Omarchy
|
||||
cp ~/.local/share/omarchy/default/bashrc ~/.bashrc
|
||||
|
||||
@@ -1,29 +1,13 @@
|
||||
OMARCHY_DESCRIPTION="Keyboard Layout Config"
|
||||
# Copy over the keyboard layout that's been set in Arch during install to Hyprland
|
||||
conf="/etc/vconsole.conf"
|
||||
hyprconf="$HOME/.config/hypr/input.conf"
|
||||
|
||||
omarchy_install() {
|
||||
# Copy over the keyboard layout that's been set in Arch during install to Hyprland
|
||||
conf="/etc/vconsole.conf"
|
||||
hyprconf="$HOME/.config/hypr/input.conf"
|
||||
if grep -q '^XKBLAYOUT=' "$conf"; then
|
||||
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = $layout" "$hyprconf"
|
||||
fi
|
||||
|
||||
if grep -q '^XKBLAYOUT=' "$conf"; then
|
||||
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_layout = $layout" "$hyprconf"
|
||||
fi
|
||||
|
||||
if grep -q '^XKBVARIANT=' "$conf"; then
|
||||
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf"
|
||||
fi
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f "$HOME/.config/hypr/input.conf" ]] || add_error "Hyprland input config missing"
|
||||
|
||||
# If vconsole.conf has keyboard layout, check if it's in hypr config
|
||||
if [[ -f "/etc/vconsole.conf" ]] && grep -q '^XKBLAYOUT=' "/etc/vconsole.conf"; then
|
||||
layout=$(grep '^XKBLAYOUT=' "/etc/vconsole.conf" | cut -d= -f2 | tr -d '"')
|
||||
if [[ -f "$HOME/.config/hypr/input.conf" ]]; then
|
||||
grep -q "kb_layout = $layout" "$HOME/.config/hypr/input.conf" || add_error "Keyboard layout not configured in Hyprland"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
if grep -q '^XKBVARIANT=' "$conf"; then
|
||||
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
sed -i "/^[[:space:]]*kb_options *=/i\ kb_variant = $variant" "$hyprconf"
|
||||
fi
|
||||
|
||||
@@ -1,52 +1,32 @@
|
||||
OMARCHY_DESCRIPTION="Docker Configuration"
|
||||
|
||||
omarchy_install() {
|
||||
# Configure Docker daemon:
|
||||
# - limit log size to avoid running out of disk
|
||||
# - use host's DNS resolver
|
||||
sudo mkdir -p /etc/docker
|
||||
sudo tee /etc/docker/daemon.json >/dev/null <<'EOF'
|
||||
# Configure Docker daemon:
|
||||
# - limit log size to avoid running out of disk
|
||||
# - use host's DNS resolver
|
||||
sudo mkdir -p /etc/docker
|
||||
sudo tee /etc/docker/daemon.json >/dev/null <<'EOF'
|
||||
{
|
||||
"log-driver": "json-file",
|
||||
"log-opts": { "max-size": "10m", "max-file": "5" },
|
||||
"dns": ["172.17.0.1"],
|
||||
"bip": "172.17.0.1/16"
|
||||
"log-driver": "json-file",
|
||||
"log-opts": { "max-size": "10m", "max-file": "5" },
|
||||
"dns": ["172.17.0.1"],
|
||||
"bip": "172.17.0.1/16"
|
||||
}
|
||||
EOF
|
||||
|
||||
# Expose systemd-resolved to our Docker network
|
||||
sudo mkdir -p /etc/systemd/resolved.conf.d
|
||||
echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/resolved.conf.d/20-docker-dns.conf >/dev/null
|
||||
sudo systemctl restart systemd-resolved
|
||||
# Expose systemd-resolved to our Docker network
|
||||
sudo mkdir -p /etc/systemd/resolved.conf.d
|
||||
echo -e '[Resolve]\nDNSStubListenerExtra=172.17.0.1' | sudo tee /etc/systemd/resolved.conf.d/20-docker-dns.conf >/dev/null
|
||||
sudo systemctl restart systemd-resolved
|
||||
|
||||
# Start Docker automatically
|
||||
sudo systemctl enable docker
|
||||
# Start Docker automatically
|
||||
sudo systemctl enable docker
|
||||
|
||||
# Give this user privileged Docker access
|
||||
sudo usermod -aG docker ${USER}
|
||||
# Give this user privileged Docker access
|
||||
sudo usermod -aG docker ${USER}
|
||||
|
||||
# Prevent Docker from preventing boot for network-online.target
|
||||
sudo mkdir -p /etc/systemd/system/docker.service.d
|
||||
sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF'
|
||||
# Prevent Docker from preventing boot for network-online.target
|
||||
sudo mkdir -p /etc/systemd/system/docker.service.d
|
||||
sudo tee /etc/systemd/system/docker.service.d/no-block-boot.conf <<'EOF'
|
||||
[Unit]
|
||||
DefaultDependencies=no
|
||||
EOF
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/docker/daemon.json ]] || add_error "Docker daemon.json missing"
|
||||
[[ -f /etc/systemd/resolved.conf.d/20-docker-dns.conf ]] || add_error "Docker DNS config missing"
|
||||
[[ -f /etc/systemd/system/docker.service.d/no-block-boot.conf ]] || add_error "Docker boot config missing"
|
||||
|
||||
getent group docker >/dev/null 2>&1 || add_error "Docker group does not exist"
|
||||
|
||||
groups "$USER" | grep -q docker || add_error "User $USER not in docker group"
|
||||
|
||||
if systemctl list-unit-files | grep -q docker.service; then
|
||||
systemctl is-enabled docker >/dev/null 2>&1 || add_error "Docker service not enabled"
|
||||
|
||||
systemctl is-active docker >/dev/null 2>&1 || add_warning "Docker service is not running (may be intentional)"
|
||||
fi
|
||||
}
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
7
install/config/fast-shutdown.sh
Executable file
7
install/config/fast-shutdown.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
sudo mkdir -p /etc/systemd/system.conf.d
|
||||
|
||||
cat <<EOF | sudo tee /etc/systemd/system.conf.d/10-faster-shutdown.conf
|
||||
[Manager]
|
||||
DefaultTimeoutStopSec=5s
|
||||
EOF
|
||||
sudo systemctl daemon-reload
|
||||
@@ -1,14 +1,2 @@
|
||||
OMARCHY_DESCRIPTION="Powerprofilesctl"
|
||||
|
||||
omarchy_install() {
|
||||
# Ensure we use system python3 and not mise's python3
|
||||
sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/powerprofilesctl
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /usr/bin/powerprofilesctl ]] || add_error "powerprofilesctl not found"
|
||||
|
||||
if [[ -f /usr/bin/powerprofilesctl ]]; then
|
||||
head -n1 /usr/bin/powerprofilesctl | grep -q "^#!/bin/python3$" || add_error "powerprofilesctl shebang not fixed"
|
||||
fi
|
||||
}
|
||||
# Ensure we use system python3 and not mise's python3
|
||||
sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/powerprofilesctl
|
||||
|
||||
@@ -1,41 +1,20 @@
|
||||
OMARCHY_DESCRIPTION="Git"
|
||||
# Ensure git settings live under ~/.config
|
||||
mkdir -p ~/.config/git
|
||||
touch ~/.config/git/config
|
||||
|
||||
omarchy_install() {
|
||||
# Ensure git settings live under ~/.config
|
||||
mkdir -p ~/.config/git
|
||||
touch ~/.config/git/config
|
||||
# Set common git aliases
|
||||
git config --global alias.co checkout
|
||||
git config --global alias.br branch
|
||||
git config --global alias.ci commit
|
||||
git config --global alias.st status
|
||||
git config --global pull.rebase true
|
||||
git config --global init.defaultBranch master
|
||||
|
||||
# Set common git aliases
|
||||
git config --global alias.co checkout
|
||||
git config --global alias.br branch
|
||||
git config --global alias.ci commit
|
||||
git config --global alias.st status
|
||||
git config --global pull.rebase true
|
||||
git config --global init.defaultBranch master
|
||||
# Set identification from install inputs
|
||||
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
|
||||
git config --global user.name "$OMARCHY_USER_NAME"
|
||||
fi
|
||||
|
||||
# Set identification from install inputs
|
||||
if [[ -n "${OMARCHY_USER_NAME//[[:space:]]/}" ]]; then
|
||||
git config --global user.name "$OMARCHY_USER_NAME"
|
||||
fi
|
||||
|
||||
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
|
||||
git config --global user.email "$OMARCHY_USER_EMAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d ~/.config/git ]] || add_error "Git config directory missing"
|
||||
[[ -f ~/.config/git/config ]] || add_error "Git config file missing"
|
||||
|
||||
command -v git >/dev/null 2>&1 || add_error "Git not installed"
|
||||
|
||||
if command -v git >/dev/null 2>&1; then
|
||||
git config --global pull.rebase >/dev/null || add_error "Git pull.rebase not configured"
|
||||
git config --global init.defaultBranch >/dev/null || add_error "Git defaultBranch not configured"
|
||||
|
||||
git config --global alias.co >/dev/null || add_error "Git alias 'co' not configured"
|
||||
git config --global alias.br >/dev/null || add_error "Git alias 'br' not configured"
|
||||
git config --global alias.ci >/dev/null || add_error "Git alias 'ci' not configured"
|
||||
git config --global alias.st >/dev/null || add_error "Git alias 'st' not configured"
|
||||
fi
|
||||
}
|
||||
if [[ -n "${OMARCHY_USER_EMAIL//[[:space:]]/}" ]]; then
|
||||
git config --global user.email "$OMARCHY_USER_EMAIL"
|
||||
fi
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
OMARCHY_DESCRIPTION="GPG"
|
||||
|
||||
omarchy_install() {
|
||||
# Setup GPG configuration with multiple keyservers for better reliability
|
||||
sudo mkdir -p /etc/gnupg
|
||||
sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/
|
||||
sudo chmod 644 /etc/gnupg/dirmngr.conf
|
||||
sudo gpgconf --kill dirmngr || true
|
||||
sudo gpgconf --launch dirmngr || true
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d /etc/gnupg ]] || add_error "GPG config directory missing"
|
||||
[[ -f /etc/gnupg/dirmngr.conf ]] || add_error "GPG dirmngr.conf missing"
|
||||
|
||||
if [[ -f /etc/gnupg/dirmngr.conf ]]; then
|
||||
local perms=$(stat -c %a /etc/gnupg/dirmngr.conf)
|
||||
[[ "$perms" == "644" ]] || add_error "GPG dirmngr.conf has incorrect permissions: $perms (should be 644)"
|
||||
fi
|
||||
}
|
||||
# Setup GPG configuration with multiple keyservers for better reliability
|
||||
sudo mkdir -p /etc/gnupg
|
||||
sudo cp ~/.local/share/omarchy/default/gpg/dirmngr.conf /etc/gnupg/
|
||||
sudo chmod 644 /etc/gnupg/dirmngr.conf
|
||||
sudo gpgconf --kill dirmngr || true
|
||||
sudo gpgconf --launch dirmngr || true
|
||||
|
||||
@@ -1,9 +1,2 @@
|
||||
OMARCHY_DESCRIPTION="Enable Bluetooth Service"
|
||||
|
||||
omarchy_install() {
|
||||
chrootable_systemctl_enable bluetooth.service
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
systemctl is-enabled bluetooth.service >/dev/null 2>&1 || add_error "Bluetooth service not enabled"
|
||||
}
|
||||
# Turn on bluetooth by default
|
||||
chrootable_systemctl_enable bluetooth.service
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
OMARCHY_DESCRIPTION="Apple BCM4360 WiFi Driver"
|
||||
|
||||
should_run() {
|
||||
lspci -nnv | grep -A2 "14e4:43a0" | grep -q "106b:"
|
||||
}
|
||||
|
||||
omarchy_install() {
|
||||
should_run || return 0
|
||||
|
||||
echo "Apple BCM4360 detected"
|
||||
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
should_run || return 2
|
||||
|
||||
omarchy-pkg-present broadcom-wl || add_error "Broadcom wireless driver not installed"
|
||||
}
|
||||
11
install/config/hardware/fix-apple-bcm43xx.sh
Normal file
11
install/config/hardware/fix-apple-bcm43xx.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
# Install Wi-Fi drivers for Broadcom chips on MacBooks:
|
||||
# - BCM4360 (2013–2015)
|
||||
# - BCM4331 (2012, early 2013)
|
||||
|
||||
pci_info=$(lspci -nnv)
|
||||
|
||||
if echo "$pci_info" | grep -q "106b:" &&
|
||||
(echo "$pci_info" | grep -q "14e4:43a0" || echo "$pci_info" | grep -q "14e4:4331"); then
|
||||
echo "Apple BCM4360 / BCM4331 detected"
|
||||
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
|
||||
fi
|
||||
@@ -1,23 +1,12 @@
|
||||
OMARCHY_DESCRIPTION="MacBook SPI Keyboard Support"
|
||||
|
||||
should_run() {
|
||||
[[ "$(cat /sys/class/dmi/id/product_name 2>/dev/null)" =~ MacBook12,1|MacBookPro13,[123]|MacBookPro14,[123] ]]
|
||||
}
|
||||
|
||||
omarchy_install() {
|
||||
should_run || return 0
|
||||
|
||||
# Detect MacBook models that need SPI keyboard modules
|
||||
product_name="$(cat /sys/class/dmi/id/product_name 2>/dev/null)"
|
||||
if [[ "$product_name" =~ MacBook[89],1|MacBook1[02],1|MacBookPro13,[123]|MacBookPro14,[123] ]]; then
|
||||
echo "Detected MacBook with SPI keyboard"
|
||||
|
||||
sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms
|
||||
echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
should_run || return 2 # Return 2 to indicate "not applicable"
|
||||
|
||||
# Check if driver is installed
|
||||
pacman -Q macbook12-spi-driver-dkms &>/dev/null || add_error "MacBook SPI driver not installed"
|
||||
|
||||
# Check if mkinitcpio config exists
|
||||
[[ -f /etc/mkinitcpio.conf.d/macbook_spi_modules.conf ]] || add_error "MacBook SPI modules config missing"
|
||||
}
|
||||
if [[ "$product_name" == "MacBook8,1" ]]; then
|
||||
echo "MODULES=(applespi spi_pxa2xx_platform spi_pxa2xx_pci)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
|
||||
else
|
||||
echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
OMARCHY_DESCRIPTION="Apple T2 MacBook Support"
|
||||
|
||||
# Detect T2 MacBook models using PCI IDs: 106b:1801 or 106b:1802
|
||||
should_run() {
|
||||
lspci -nn | grep -q "106b:180[12]"
|
||||
}
|
||||
|
||||
# Installation function
|
||||
omarchy_install() {
|
||||
should_run || return 0
|
||||
|
||||
# Detect T2 MacBook models using PCI IDs
|
||||
# Vendor: 106b (Apple), Device IDs: 1801 or 1802 (T2 Security Chip)
|
||||
if lspci -nn | grep -q "106b:180[12]"; then
|
||||
echo "Detected MacBook with T2 chip. Installing support items..."
|
||||
|
||||
sudo pacman -S --noconfirm --needed \
|
||||
linux-t2 \
|
||||
linux-t2-headers \
|
||||
apple-t2-audio-config \
|
||||
apple-bcm-firmware \
|
||||
t2fanrd \
|
||||
tiny-dfr
|
||||
linux-t2 \
|
||||
linux-t2-headers \
|
||||
apple-t2-audio-config \
|
||||
apple-bcm-firmware \
|
||||
t2fanrd \
|
||||
tiny-dfr
|
||||
|
||||
echo "apple-bce" | sudo tee /etc/modules-load.d/t2.conf >/dev/null
|
||||
|
||||
@@ -28,22 +20,9 @@ omarchy_install() {
|
||||
options brcmfmac feature_disable=0x82000
|
||||
EOF
|
||||
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee /etc/limine-entry-tool.d/t2-mac.conf >/dev/null
|
||||
sudo mkdir -p /etc/limine-entry-tool.d
|
||||
cat <<EOF | sudo tee /etc/limine-entry-tool.d/t2-mac.conf >/dev/null
|
||||
# Generated by Omarchy installer for T2 Mac support
|
||||
KERNEL_CMDLINE[default]+="intel_iommu=on iommu=pt pcie_ports=compat"
|
||||
EOF
|
||||
}
|
||||
|
||||
# Verification function
|
||||
omarchy_verify() {
|
||||
should_run || return 2
|
||||
|
||||
pacman -Q linux-t2 &>/dev/null || add_error "T2 Linux kernel not installed"
|
||||
|
||||
# Check if config files exist
|
||||
[[ -f /etc/modules-load.d/t2.conf ]] || add_error "T2 modules config missing"
|
||||
[[ -f /etc/mkinitcpio.conf.d/apple-t2.conf ]] || add_error "T2 mkinitcpio config missing"
|
||||
[[ -f /etc/modprobe.d/brcmfmac.conf ]] || add_error "T2 WiFi fix config missing"
|
||||
[[ -f /etc/limine-entry-tool.d/t2-mac.conf ]] || add_error "T2 boot config missing"
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
OMARCHY_DESCRIPTION="Framework 13 AMD Audio Input Fix"
|
||||
|
||||
should_run() {
|
||||
AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true)
|
||||
[[ -n "$AMD_AUDIO_CARD" ]]
|
||||
}
|
||||
|
||||
omarchy_install() {
|
||||
should_run || return 0
|
||||
AMD_AUDIO_CARD=$(pactl list cards 2>/dev/null | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}' || true)
|
||||
|
||||
if [[ -n $AMD_AUDIO_CARD ]]; then
|
||||
pactl set-card-profile "$AMD_AUDIO_CARD" "HiFi (Mic1, Mic2, Speaker)" 2>/dev/null || true
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
should_run || return 2
|
||||
|
||||
pactl list cards | grep -A10 "$AMD_AUDIO_CARD" | grep -q "Active Profile:" || add_error "AMD audio profile not configured"
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
OMARCHY_DESCRIPTION="Set F-keys as F-keys by default"
|
||||
|
||||
omarchy_install() {
|
||||
# Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys
|
||||
if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then
|
||||
echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf
|
||||
fi
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/modprobe.d/hid_apple.conf ]] || add_error "Apple HID config missing"
|
||||
|
||||
if [[ -f /etc/modprobe.d/hid_apple.conf ]]; then
|
||||
grep -q "options hid_apple fnmode=2" /etc/modprobe.d/hid_apple.conf || add_error "F-key mode not configured"
|
||||
fi
|
||||
}
|
||||
# Ensure that F-keys on Apple-like keyboards (such as Lofree Flow84) are always F-keys
|
||||
if [[ ! -f /etc/modprobe.d/hid_apple.conf ]]; then
|
||||
echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/hid_apple.conf
|
||||
fi
|
||||
|
||||
@@ -1,15 +1,2 @@
|
||||
OMARCHY_DESCRIPTION="Disable power button"
|
||||
|
||||
omarchy_install() {
|
||||
# Disable shutting system down on power button to bind it to power menu afterwards
|
||||
sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/systemd/logind.conf ]] || add_error "Logind config missing"
|
||||
|
||||
# Check if power button is set to ignore
|
||||
if [[ -f /etc/systemd/logind.conf ]]; then
|
||||
grep -q "^HandlePowerKey=ignore" /etc/systemd/logind.conf || add_error "Power button not set to ignore"
|
||||
fi
|
||||
}
|
||||
# Disable shutting system down on power button to bind it to power menu afterwards
|
||||
sudo sed -i 's/.*HandlePowerKey=.*/HandlePowerKey=ignore/' /etc/systemd/logind.conf
|
||||
|
||||
@@ -1,30 +1,11 @@
|
||||
OMARCHY_DESCRIPTION="Setup Intel video acceleration"
|
||||
|
||||
should_run() {
|
||||
INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel' || true)
|
||||
[[ -n "$INTEL_GPU" ]]
|
||||
}
|
||||
|
||||
omarchy_install() {
|
||||
should_run || return 0
|
||||
|
||||
# This installs hardware video acceleration for Intel GPUs
|
||||
# Check if we have an Intel GPU at all
|
||||
if INTEL_GPU=$(lspci | grep -iE 'vga|3d|display' | grep -i 'intel'); then
|
||||
# HD Graphics and newer uses intel-media-driver
|
||||
if [[ "${INTEL_GPU,,}" =~ "hd graphics"|"xe"|"iris" ]]; then
|
||||
sudo pacman -S --needed --noconfirm intel-media-driver
|
||||
sudo pacman -S --needed --noconfirm intel-media-driver
|
||||
elif [[ "${INTEL_GPU,,}" =~ "gma" ]]; then
|
||||
# Older generations from 2008 to ~2014-2017 use libva-intel-driver
|
||||
sudo pacman -S --needed --noconfirm libva-intel-driver
|
||||
# Older generations from 2008 to ~2014-2017 use libva-intel-driver
|
||||
sudo pacman -S --needed --noconfirm libva-intel-driver
|
||||
fi
|
||||
}
|
||||
|
||||
# Verification function
|
||||
omarchy_verify() {
|
||||
should_run || return 2
|
||||
|
||||
# Check if appropriate driver is installed
|
||||
if [[ "${INTEL_GPU,,}" =~ "hd graphics"|"xe"|"iris" ]]; then
|
||||
pacman -Q intel-media-driver &>/dev/null || add_error "Intel media driver not installed"
|
||||
elif [[ "${INTEL_GPU,,}" =~ "gma" ]]; then
|
||||
pacman -Q libva-intel-driver &>/dev/null || add_error "Intel VA-API driver not installed"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
OMARCHY_DESCRIPTION="Network Config"
|
||||
# Ensure iwd service will be started
|
||||
sudo systemctl enable iwd.service
|
||||
|
||||
omarchy_install() {
|
||||
sudo systemctl enable iwd.service
|
||||
|
||||
sudo systemctl disable systemd-networkd-wait-online.service
|
||||
sudo systemctl mask systemd-networkd-wait-online.service
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
systemctl is-enabled iwd.service >/dev/null 2>&1 || add_error "IWD service not enabled"
|
||||
|
||||
systemctl is-enabled systemd-networkd-wait-online.service 2>&1 | grep -q "masked" || add_error "systemd-networkd-wait-online not masked"
|
||||
}
|
||||
# Prevent systemd-networkd-wait-online timeout on boot
|
||||
sudo systemctl disable systemd-networkd-wait-online.service
|
||||
sudo systemctl mask systemd-networkd-wait-online.service
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
OMARCHY_DESCRIPTION="NVIDIA GPU Configuration"
|
||||
|
||||
should_run() {
|
||||
NVIDIA_GPU=$(lspci | grep -i 'nvidia' || true)
|
||||
[[ -n "$NVIDIA_GPU" ]]
|
||||
}
|
||||
|
||||
omarchy_install() {
|
||||
should_run || return 0
|
||||
# ==============================================================================
|
||||
# Hyprland NVIDIA Setup Script for Arch Linux
|
||||
# ==============================================================================
|
||||
# This script automates the installation and configuration of NVIDIA drivers
|
||||
# for use with Hyprland on Arch Linux, following the official Hyprland wiki.
|
||||
#
|
||||
# Author: https://github.com/Kn0ax
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
# --- GPU Detection ---
|
||||
if [ -n "$(lspci | grep -i 'nvidia')" ]; then
|
||||
# --- Driver Selection ---
|
||||
# Turing (16xx, 20xx), Ampere (30xx), Ada (40xx), and newer recommend the open-source kernel modules
|
||||
if echo "$NVIDIA_GPU" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
|
||||
NVIDIA_DRIVER_PACKAGE="nvidia-open-dkms"
|
||||
if echo "$(lspci | grep -i 'nvidia')" | grep -q -E "RTX [2-9][0-9]|GTX 16"; then
|
||||
NVIDIA_DRIVER_PACKAGE="nvidia-open-dkms"
|
||||
else
|
||||
NVIDIA_DRIVER_PACKAGE="nvidia-dkms"
|
||||
NVIDIA_DRIVER_PACKAGE="nvidia-dkms"
|
||||
fi
|
||||
|
||||
# Check which kernel is installed and set appropriate headers package
|
||||
KERNEL_HEADERS="linux-headers" # Default
|
||||
if pacman -Q linux-zen &>/dev/null; then
|
||||
KERNEL_HEADERS="linux-zen-headers"
|
||||
KERNEL_HEADERS="linux-zen-headers"
|
||||
elif pacman -Q linux-lts &>/dev/null; then
|
||||
KERNEL_HEADERS="linux-lts-headers"
|
||||
KERNEL_HEADERS="linux-lts-headers"
|
||||
elif pacman -Q linux-hardened &>/dev/null; then
|
||||
KERNEL_HEADERS="linux-hardened-headers"
|
||||
KERNEL_HEADERS="linux-hardened-headers"
|
||||
fi
|
||||
|
||||
# force package database refresh
|
||||
@@ -64,9 +67,9 @@ omarchy_install() {
|
||||
sudo mkinitcpio -P
|
||||
|
||||
# Add NVIDIA environment variables to hyprland.conf
|
||||
HYPRLAND_CONF="$HOME/.config/hypr/envs.conf"
|
||||
HYPRLAND_CONF="$HOME/.config/hypr/hyprland.conf"
|
||||
if [ -f "$HYPRLAND_CONF" ]; then
|
||||
cat >>"$HYPRLAND_CONF" <<'EOF'
|
||||
cat >>"$HYPRLAND_CONF" <<'EOF'
|
||||
|
||||
# NVIDIA environment variables
|
||||
env = NVD_BACKEND,direct
|
||||
@@ -74,22 +77,4 @@ env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
should_run || return 2
|
||||
|
||||
pacman -Q nvidia-dkms &>/dev/null || pacman -Q nvidia-open-dkms &>/dev/null || add_error "NVIDIA driver not installed"
|
||||
|
||||
[[ -f /etc/modprobe.d/nvidia.conf ]] || add_error "NVIDIA modprobe config missing"
|
||||
|
||||
if [[ -f /etc/modprobe.d/nvidia.conf ]]; then
|
||||
grep -q "options nvidia_drm modeset=1" /etc/modprobe.d/nvidia.conf || add_error "NVIDIA DRM modeset not enabled"
|
||||
fi
|
||||
|
||||
grep -q "nvidia" /etc/mkinitcpio.conf || add_error "NVIDIA modules not in mkinitcpio.conf"
|
||||
|
||||
if [[ -f "$HOME/.config/hypr/hyprland.conf" ]]; then
|
||||
grep -q "LIBVA_DRIVER_NAME,nvidia" "$HOME/.config/hypr/hyprland.conf" || add_error "NVIDIA env vars not in Hyprland config"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -1,32 +1,16 @@
|
||||
OMARCHY_DESCRIPTION="Printer Config"
|
||||
chrootable_systemctl_enable cups.service
|
||||
|
||||
omarchy_install() {
|
||||
chrootable_systemctl_enable cups.service
|
||||
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
|
||||
sudo mkdir -p /etc/systemd/resolved.conf.d
|
||||
echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf
|
||||
chrootable_systemctl_enable avahi-daemon.service
|
||||
|
||||
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
|
||||
sudo mkdir -p /etc/systemd/resolved.conf.d
|
||||
echo -e "[Resolve]\nMulticastDNS=no" | sudo tee /etc/systemd/resolved.conf.d/10-disable-multicast.conf
|
||||
chrootable_systemctl_enable avahi-daemon.service
|
||||
# Enable mDNS resolution for .local domains
|
||||
sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf
|
||||
|
||||
# Enable mDNS resolution for .local domains
|
||||
sudo sed -i 's/^hosts:.*/hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns/' /etc/nsswitch.conf
|
||||
# Enable automatically adding remote printers
|
||||
if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
|
||||
echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf
|
||||
fi
|
||||
|
||||
# Enable automatically adding remote printers
|
||||
if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
|
||||
echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf
|
||||
fi
|
||||
|
||||
chrootable_systemctl_enable cups-browsed.service
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
systemctl is-enabled cups.service >/dev/null 2>&1 || add_error "CUPS service not enabled"
|
||||
systemctl is-enabled avahi-daemon.service >/dev/null 2>&1 || add_error "Avahi daemon not enabled"
|
||||
systemctl is-enabled cups-browsed.service >/dev/null 2>&1 || add_error "CUPS browsed service not enabled"
|
||||
|
||||
[[ -f /etc/systemd/resolved.conf.d/10-disable-multicast.conf ]] || add_error "Multicast DNS config missing"
|
||||
|
||||
grep -q "mdns_minimal" /etc/nsswitch.conf || add_error "mDNS not configured in nsswitch.conf"
|
||||
|
||||
[[ -f /etc/cups/cups-browsed.conf ]] && grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf || add_error "Remote printers not enabled in CUPS"
|
||||
}
|
||||
chrootable_systemctl_enable cups-browsed.service
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
OMARCHY_DESCRIPTION="Wireless Regdom"
|
||||
# First check that wireless-regdb is there
|
||||
if [ -f "/etc/conf.d/wireless-regdom" ]; then
|
||||
unset WIRELESS_REGDOM
|
||||
. /etc/conf.d/wireless-regdom
|
||||
fi
|
||||
|
||||
omarchy_install() {
|
||||
if [ -f "/etc/conf.d/wireless-regdom" ]; then
|
||||
unset WIRELESS_REGDOM
|
||||
. /etc/conf.d/wireless-regdom
|
||||
fi
|
||||
# If the region is already set, we're done
|
||||
if [ ! -n "${WIRELESS_REGDOM}" ]; then
|
||||
# Get the current timezone
|
||||
if [ -e "/etc/localtime" ]; then
|
||||
TIMEZONE=$(readlink -f /etc/localtime)
|
||||
TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/}
|
||||
|
||||
if [ ! -n "${WIRELESS_REGDOM}" ]; then
|
||||
if [ -e "/etc/localtime" ]; then
|
||||
TIMEZONE=$(readlink -f /etc/localtime)
|
||||
TIMEZONE=${TIMEZONE#/usr/share/zoneinfo/}
|
||||
# Some timezones are formatted with the two letter country code at the start
|
||||
COUNTRY="${TIMEZONE%%/*}"
|
||||
|
||||
COUNTRY="${TIMEZONE%%/*}"
|
||||
# If we don't have a two letter country, get it from the timezone table
|
||||
if [[ ! "$COUNTRY" =~ ^[A-Z]{2}$ ]] && [ -f "/usr/share/zoneinfo/zone.tab" ]; then
|
||||
COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab)
|
||||
fi
|
||||
|
||||
if [[ ! "$COUNTRY" =~ ^[A-Z]{2}$ ]] && [ -f "/usr/share/zoneinfo/zone.tab" ]; then
|
||||
COUNTRY=$(awk -v tz="$TIMEZONE" '$3 == tz {print $1; exit}' /usr/share/zoneinfo/zone.tab)
|
||||
fi
|
||||
# Check if we have a two letter country code
|
||||
if [[ "$COUNTRY" =~ ^[A-Z]{2}$ ]]; then
|
||||
# Append it to the wireless-regdom conf file that is used at boot
|
||||
echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom >/dev/null
|
||||
|
||||
if [[ "$COUNTRY" =~ ^[A-Z]{2}$ ]]; then
|
||||
echo "WIRELESS_REGDOM=\"$COUNTRY\"" | sudo tee -a /etc/conf.d/wireless-regdom >/dev/null
|
||||
|
||||
if command -v iw &>/dev/null; then
|
||||
sudo iw reg set ${COUNTRY}
|
||||
fi
|
||||
# Also set it one off now
|
||||
if command -v iw &>/dev/null; then
|
||||
sudo iw reg set ${COUNTRY}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/conf.d/wireless-regdom ]] || add_error "Wireless regdom config missing"
|
||||
|
||||
if [[ -f /etc/conf.d/wireless-regdom ]]; then
|
||||
grep -q "^WIRELESS_REGDOM=" /etc/conf.d/wireless-regdom || add_error "Wireless regulatory domain not configured"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
OMARCHY_DESCRIPTION="USB Autosuspend"
|
||||
# Disable USB autosuspend to prevent peripheral disconnection issues
|
||||
if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
|
||||
echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf
|
||||
fi
|
||||
|
||||
omarchy_install() {
|
||||
# Disable USB autosuspend to prevent peripheral disconnection issues
|
||||
if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
|
||||
echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf
|
||||
fi
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/modprobe.d/disable-usb-autosuspend.conf ]] || add_error "USB autosuspend config missing"
|
||||
|
||||
if [[ -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
|
||||
grep -q "options usbcore autosuspend=-1" /etc/modprobe.d/disable-usb-autosuspend.conf || add_error "USB autosuspend not disabled"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,16 +1,3 @@
|
||||
OMARCHY_DESCRIPTION="Lockout Limit"
|
||||
|
||||
omarchy_install() {
|
||||
# Increase lockout limit to 10 and decrease timeout to 2 minutes
|
||||
sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
||||
sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/pam.d/system-auth ]] || add_error "PAM system-auth file missing"
|
||||
|
||||
if [[ -f /etc/pam.d/system-auth ]]; then
|
||||
grep -q "pam_faillock.so.*deny=10" /etc/pam.d/system-auth || add_error "Faillock deny limit not set to 10"
|
||||
grep -q "pam_faillock.so.*unlock_time=120" /etc/pam.d/system-auth || add_error "Faillock unlock time not set to 120"
|
||||
fi
|
||||
}
|
||||
# Increase lockout limit to 10 and decrease timeout to 2 minutes
|
||||
sudo sed -i 's|^\(auth\s\+required\s\+pam_faillock.so\)\s\+preauth.*$|\1 preauth silent deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
||||
sudo sed -i 's|^\(auth\s\+\[default=die\]\s\+pam_faillock.so\)\s\+authfail.*$|\1 authfail deny=10 unlock_time=120|' "/etc/pam.d/system-auth"
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
OMARCHY_DESCRIPTION="Sudo lockout limit"
|
||||
|
||||
omarchy_install() {
|
||||
# Give the user 10 instead of 3 tries to fat finger their password before lockout
|
||||
echo "Defaults passwd_tries=10" | sudo tee /etc/sudoers.d/passwd-tries
|
||||
sudo chmod 440 /etc/sudoers.d/passwd-tries
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
sudo test -f /etc/sudoers.d/passwd-tries || add_error "Sudoers passwd-tries file missing"
|
||||
|
||||
if sudo test -f /etc/sudoers.d/passwd-tries; then
|
||||
local perms=$(sudo stat -c %a /etc/sudoers.d/passwd-tries)
|
||||
[[ "$perms" == "440" ]] || add_error "Sudoers file has incorrect permissions: $perms (should be 440)"
|
||||
|
||||
sudo grep -q "passwd_tries=10" /etc/sudoers.d/passwd-tries || add_error "Passwd tries not set to 10"
|
||||
fi
|
||||
}
|
||||
# Give the user 10 instead of 3 tries to fat finger their password before lockout
|
||||
echo "Defaults passwd_tries=10" | sudo tee /etc/sudoers.d/passwd-tries
|
||||
sudo chmod 440 /etc/sudoers.d/passwd-tries
|
||||
|
||||
@@ -1,10 +1 @@
|
||||
OMARCHY_DESCRIPTION="LazyVim"
|
||||
|
||||
omarchy_install() {
|
||||
omarchy-lazyvim-setup
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d ~/.config/nvim ]] || add_error "Neovim config directory missing"
|
||||
[[ -d ~/.local/share/nvim/lazy ]] || add_error "LazyVim plugins directory missing"
|
||||
}
|
||||
omarchy-lazyvim-setup
|
||||
|
||||
@@ -1,12 +1,2 @@
|
||||
OMARCHY_DESCRIPTION="LocalDB"
|
||||
|
||||
omarchy_install() {
|
||||
# Update localdb so that locate will find everything installed
|
||||
sudo updatedb
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /var/lib/mlocate/mlocate.db ]] || [[ -f /var/lib/plocate/plocate.db ]] || add_error "Locate database missing"
|
||||
|
||||
command -v locate >/dev/null 2>&1 || add_error "Locate command not available"
|
||||
}
|
||||
# Update localdb so that locate will find everything installed
|
||||
sudo updatedb
|
||||
|
||||
@@ -1,48 +1,38 @@
|
||||
OMARCHY_DESCRIPTION="Mimetypes"
|
||||
omarchy-refresh-applications
|
||||
update-desktop-database ~/.local/share/applications
|
||||
|
||||
omarchy_install() {
|
||||
omarchy-refresh-applications
|
||||
update-desktop-database ~/.local/share/applications
|
||||
# Open all images with imv
|
||||
xdg-mime default imv.desktop image/png
|
||||
xdg-mime default imv.desktop image/jpeg
|
||||
xdg-mime default imv.desktop image/gif
|
||||
xdg-mime default imv.desktop image/webp
|
||||
xdg-mime default imv.desktop image/bmp
|
||||
xdg-mime default imv.desktop image/tiff
|
||||
|
||||
# Open all images with imv
|
||||
xdg-mime default imv.desktop image/png
|
||||
xdg-mime default imv.desktop image/jpeg
|
||||
xdg-mime default imv.desktop image/gif
|
||||
xdg-mime default imv.desktop image/webp
|
||||
xdg-mime default imv.desktop image/bmp
|
||||
xdg-mime default imv.desktop image/tiff
|
||||
# Open PDFs with the Document Viewer
|
||||
xdg-mime default org.gnome.Evince.desktop application/pdf
|
||||
|
||||
# Open PDFs with the Document Viewer
|
||||
xdg-mime default org.gnome.Evince.desktop application/pdf
|
||||
# Use Chromium as the default browser
|
||||
xdg-settings set default-web-browser chromium.desktop
|
||||
xdg-mime default chromium.desktop x-scheme-handler/http
|
||||
xdg-mime default chromium.desktop x-scheme-handler/https
|
||||
|
||||
# Use Chromium as the default browser
|
||||
xdg-settings set default-web-browser chromium.desktop
|
||||
xdg-mime default chromium.desktop x-scheme-handler/http
|
||||
xdg-mime default chromium.desktop x-scheme-handler/https
|
||||
# Open video files with mpv
|
||||
xdg-mime default mpv.desktop video/mp4
|
||||
xdg-mime default mpv.desktop video/x-msvideo
|
||||
xdg-mime default mpv.desktop video/x-matroska
|
||||
xdg-mime default mpv.desktop video/x-flv
|
||||
xdg-mime default mpv.desktop video/x-ms-wmv
|
||||
xdg-mime default mpv.desktop video/mpeg
|
||||
xdg-mime default mpv.desktop video/ogg
|
||||
xdg-mime default mpv.desktop video/webm
|
||||
xdg-mime default mpv.desktop video/quicktime
|
||||
xdg-mime default mpv.desktop video/3gpp
|
||||
xdg-mime default mpv.desktop video/3gpp2
|
||||
xdg-mime default mpv.desktop video/x-ms-asf
|
||||
xdg-mime default mpv.desktop video/x-ogm+ogg
|
||||
xdg-mime default mpv.desktop video/x-theora+ogg
|
||||
xdg-mime default mpv.desktop application/ogg
|
||||
|
||||
# Open video files with mpv
|
||||
xdg-mime default mpv.desktop video/mp4
|
||||
xdg-mime default mpv.desktop video/x-msvideo
|
||||
xdg-mime default mpv.desktop video/x-matroska
|
||||
xdg-mime default mpv.desktop video/x-flv
|
||||
xdg-mime default mpv.desktop video/x-ms-wmv
|
||||
xdg-mime default mpv.desktop video/mpeg
|
||||
xdg-mime default mpv.desktop video/ogg
|
||||
xdg-mime default mpv.desktop video/webm
|
||||
xdg-mime default mpv.desktop video/quicktime
|
||||
xdg-mime default mpv.desktop video/3gpp
|
||||
xdg-mime default mpv.desktop video/3gpp2
|
||||
xdg-mime default mpv.desktop video/x-ms-asf
|
||||
xdg-mime default mpv.desktop video/x-ogm+ogg
|
||||
xdg-mime default mpv.desktop video/x-theora+ogg
|
||||
xdg-mime default mpv.desktop application/ogg
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d ~/.local/share/applications ]] || add_error "Applications directory missing"
|
||||
|
||||
xdg-mime query default image/png | grep -q "imv.desktop" || add_error "Image viewer not set for PNG"
|
||||
xdg-mime query default application/pdf | grep -q "Evince.desktop" || add_error "PDF viewer not set"
|
||||
xdg-mime query default x-scheme-handler/http | grep -q "chromium.desktop" || add_warning "Browser not set to Chromium"
|
||||
xdg-mime query default video/mp4 | grep -q "mpv.desktop" || add_error "Video player not set for MP4"
|
||||
}
|
||||
# Use Hey for mailto: links
|
||||
xdg-mime default HEY.desktop x-scheme-handler/mailto
|
||||
|
||||
@@ -1,23 +1,9 @@
|
||||
OMARCHY_DESCRIPTION="Mise"
|
||||
# Add ./bin to path for all items in ~/Work
|
||||
mkdir -p "$HOME/Work"
|
||||
|
||||
omarchy_install() {
|
||||
# Add ./bin to path for all items in ~/Work
|
||||
mkdir -p "$HOME/Work"
|
||||
|
||||
cat >"$HOME/Work/.mise.toml" <<'EOF'
|
||||
cat >"$HOME/Work/.mise.toml" <<'EOF'
|
||||
[env]
|
||||
_.path = "{{ cwd }}/bin"
|
||||
EOF
|
||||
|
||||
mise trust ~/Work/.mise.toml
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d "$HOME/Work" ]] || add_error "Work directory missing"
|
||||
|
||||
[[ -f "$HOME/Work/.mise.toml" ]] || add_error "Mise config missing in Work directory"
|
||||
|
||||
if [[ -f "$HOME/Work/.mise.toml" ]]; then
|
||||
grep -q '_.path' "$HOME/Work/.mise.toml" || add_error "Mise path configuration missing"
|
||||
fi
|
||||
}
|
||||
mise trust ~/Work/.mise.toml
|
||||
|
||||
@@ -1,14 +1,2 @@
|
||||
OMARCHY_DESCRIPTION="SSH Flakiness Fix"
|
||||
|
||||
omarchy_install() {
|
||||
# Solve common flakiness with SSH
|
||||
echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f /etc/sysctl.d/99-sysctl.conf ]] || add_error "Sysctl config file missing"
|
||||
|
||||
if [[ -f /etc/sysctl.d/99-sysctl.conf ]]; then
|
||||
grep -q "net.ipv4.tcp_mtu_probing=1" /etc/sysctl.d/99-sysctl.conf || add_error "TCP MTU probing not configured"
|
||||
fi
|
||||
}
|
||||
# Solve common flakiness with SSH
|
||||
echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
OMARCHY_DESCRIPTION="ASDControl Sudoless Brightness Control"
|
||||
|
||||
omarchy_install() {
|
||||
# Setup sudo-less controls for controlling brightness on Apple Displays
|
||||
echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol
|
||||
sudo chmod 440 /etc/sudoers.d/asdcontrol
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
sudo test -f /etc/sudoers.d/asdcontrol || add_error "ASDControl sudoers file missing"
|
||||
|
||||
if sudo test -f /etc/sudoers.d/asdcontrol; then
|
||||
local perms=$(sudo stat -c %a /etc/sudoers.d/asdcontrol)
|
||||
[[ "$perms" == "440" ]] || add_error "Sudoers file has incorrect permissions: $perms (should be 440)"
|
||||
|
||||
sudo grep -q "NOPASSWD: /usr/local/bin/asdcontrol" /etc/sudoers.d/asdcontrol || add_error "ASDControl sudoers rule not configured"
|
||||
fi
|
||||
}
|
||||
# Setup sudo-less controls for controlling brightness on Apple Displays
|
||||
echo "$USER ALL=(ALL) NOPASSWD: /usr/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol
|
||||
sudo chmod 440 /etc/sudoers.d/asdcontrol
|
||||
|
||||
@@ -1,52 +1,31 @@
|
||||
OMARCHY_DESCRIPTION="Theme"
|
||||
# Set links for Nautilius action icons
|
||||
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
|
||||
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
|
||||
|
||||
omarchy_install() {
|
||||
# Set links for Nautilius action icons
|
||||
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-previous-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg
|
||||
sudo ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
|
||||
# Setup theme links
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
for f in ~/.local/share/omarchy/themes/*; do ln -nfs "$f" ~/.config/omarchy/themes/; done
|
||||
|
||||
# Setup theme links
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
for f in ~/.local/share/omarchy/themes/*; do ln -nfs "$f" ~/.config/omarchy/themes/; done
|
||||
# Set initial theme
|
||||
mkdir -p ~/.config/omarchy/current
|
||||
ln -snf ~/.config/omarchy/themes/tokyo-night ~/.config/omarchy/current/theme
|
||||
ln -snf ~/.config/omarchy/current/theme/backgrounds/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png ~/.config/omarchy/current/background
|
||||
|
||||
# Set initial theme
|
||||
mkdir -p ~/.config/omarchy/current
|
||||
ln -snf ~/.config/omarchy/themes/tokyo-night ~/.config/omarchy/current/theme
|
||||
ln -snf ~/.config/omarchy/current/theme/backgrounds/1-scenery-pink-lakeside-sunset-lake-landscape-scenic-panorama-7680x3215-144.png ~/.config/omarchy/current/background
|
||||
# Set specific app links for current theme
|
||||
ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua
|
||||
|
||||
# Set specific app links for current theme
|
||||
ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua
|
||||
mkdir -p ~/.config/btop/themes
|
||||
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
|
||||
mkdir -p ~/.config/btop/themes
|
||||
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
mkdir -p ~/.config/mako
|
||||
ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config
|
||||
|
||||
mkdir -p ~/.config/mako
|
||||
ln -snf ~/.config/omarchy/current/theme/mako.ini ~/.config/mako/config
|
||||
mkdir -p ~/.config/eza
|
||||
ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml
|
||||
|
||||
mkdir -p ~/.config/eza
|
||||
ln -snf ~/.config/omarchy/current/theme/eza.yml ~/.config/eza/theme.yml
|
||||
# Add managed policy directories for Chromium and Brave for theme changes
|
||||
sudo mkdir -p /etc/chromium/policies/managed
|
||||
sudo chmod a+rw /etc/chromium/policies/managed
|
||||
|
||||
# Add managed policy directories for Chromium and Brave for theme changes
|
||||
sudo mkdir -p /etc/chromium/policies/managed
|
||||
sudo chmod a+rw /etc/chromium/policies/managed
|
||||
|
||||
sudo mkdir -p /etc/brave/policies/managed
|
||||
sudo chmod a+rw /etc/brave/policies/managed
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -d ~/.config/omarchy/themes ]] || add_error "Theme directory missing: ~/.config/omarchy/themes"
|
||||
[[ -L ~/.config/omarchy/current/theme ]] || add_error "Current theme symlink missing"
|
||||
[[ -L ~/.config/omarchy/current/background ]] || add_error "Background symlink missing"
|
||||
|
||||
[[ -L /usr/share/icons/Yaru/scalable/actions/go-previous-symbolic.svg ]] || add_error "Nautilus previous icon not linked"
|
||||
[[ -L /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg ]] || add_error "Nautilus next icon not linked"
|
||||
|
||||
[[ -L ~/.config/nvim/lua/plugins/theme.lua ]] || add_error "Neovim theme link missing"
|
||||
[[ -L ~/.config/btop/themes/current.theme ]] || add_error "btop theme link missing"
|
||||
[[ -L ~/.config/mako/config ]] || add_error "mako config link missing"
|
||||
[[ -L ~/.config/eza/theme.yml ]] || add_error "eza theme link missing"
|
||||
|
||||
[[ -d /etc/chromium/policies/managed ]] || add_error "Chromium policy directory missing"
|
||||
[[ -d /etc/brave/policies/managed ]] || add_error "Brave policy directory missing"
|
||||
}
|
||||
sudo mkdir -p /etc/brave/policies/managed
|
||||
sudo chmod a+rw /etc/brave/policies/managed
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
OMARCHY_DESCRIPTION="Timezone Update Permissions"
|
||||
|
||||
omarchy_install() {
|
||||
# Ensure timezone can be updated without needing to sudo
|
||||
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
|
||||
# Ensure timezone can be updated without needing to sudo
|
||||
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
|
||||
%wheel ALL=(root) NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl
|
||||
EOF
|
||||
sudo chmod 0440 /etc/sudoers.d/omarchy-tzupdate
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
sudo test -f /etc/sudoers.d/omarchy-tzupdate || add_error "Timezone sudoers file missing"
|
||||
|
||||
if sudo test -f /etc/sudoers.d/omarchy-tzupdate; then
|
||||
local perms=$(sudo stat -c %a /etc/sudoers.d/omarchy-tzupdate)
|
||||
[[ "$perms" == "440" ]] || add_error "Sudoers file has incorrect permissions: $perms (should be 440)"
|
||||
|
||||
sudo grep -q "NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl" /etc/sudoers.d/omarchy-tzupdate || add_error "Timezone sudoers rule not configured"
|
||||
fi
|
||||
}
|
||||
sudo chmod 0440 /etc/sudoers.d/omarchy-tzupdate
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
OMARCHY_DESCRIPTION="XCompose"
|
||||
|
||||
omarchy_install() {
|
||||
# Set default XCompose that is triggered with CapsLock
|
||||
tee ~/.XCompose >/dev/null <<EOF
|
||||
# Set default XCompose that is triggered with CapsLock
|
||||
tee ~/.XCompose >/dev/null <<EOF
|
||||
include "%H/.local/share/omarchy/default/xcompose"
|
||||
|
||||
# Identification
|
||||
<Multi_key> <space> <n> : "$OMARCHY_USER_NAME"
|
||||
<Multi_key> <space> <e> : "$OMARCHY_USER_EMAIL"
|
||||
EOF
|
||||
}
|
||||
|
||||
omarchy_verify() {
|
||||
[[ -f ~/.XCompose ]] || add_error "XCompose file missing"
|
||||
|
||||
if [[ -f ~/.XCompose ]]; then
|
||||
grep -q "include.*xcompose" ~/.XCompose || add_error "XCompose include directive missing"
|
||||
fi
|
||||
}
|
||||
|
||||
4
install/first-run/dns-resolver.sh
Normal file
4
install/first-run/dns-resolver.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
# https://wiki.archlinux.org/title/Systemd-resolved
|
||||
echo "Symlink resolved stub-resolv to /etc/resolv.conf"
|
||||
|
||||
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||
@@ -1,3 +1,3 @@
|
||||
if ! ping -c3 -W1 1.1.1.1 >/dev/null 2>&1; then
|
||||
notify-send " Click to Setup Wi-Fi" "Tab between sections, space selects, ? for help." -u critical -t 30000
|
||||
notify-send " Click to Setup Wi-Fi" "Tab to navigate, Space to select, ? for help." -u critical -t 30000
|
||||
fi
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user