Compare commits
110 Commits
v2.1.0
...
create-def
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46a663d826 | ||
|
|
4e1f3bee77 | ||
|
|
1878ea4d99 | ||
|
|
beb2e6b865 | ||
|
|
f14f63b9e6 | ||
|
|
01ce4bb4dd | ||
|
|
02fbe0f305 | ||
|
|
2601311b62 | ||
|
|
dc53c34b6a | ||
|
|
418159bd31 | ||
|
|
10f909fdfc | ||
|
|
5372393211 | ||
|
|
6bf32a082e | ||
|
|
49ca5ee249 | ||
|
|
8651f6d8b0 | ||
|
|
cfbc71c117 | ||
|
|
fc58a79ea5 | ||
|
|
87469f5f43 | ||
|
|
5157932947 | ||
|
|
6599a6eb70 | ||
|
|
d09b6aa42a | ||
|
|
e9754b5460 | ||
|
|
8356358097 | ||
|
|
e57026a067 | ||
|
|
f5cd7a4237 | ||
|
|
381e43d124 | ||
|
|
844091341c | ||
|
|
bdcd78484b | ||
|
|
8c3c93eed1 | ||
|
|
19d85a7710 | ||
|
|
1f5a86ba8e | ||
|
|
a9d9faef24 | ||
|
|
16460b5203 | ||
|
|
bf07883e82 | ||
|
|
a66e8ebebd | ||
|
|
a57060ee31 | ||
|
|
9ca2081742 | ||
|
|
c9bacbe318 | ||
|
|
a0674703f8 | ||
|
|
627b5f4ead | ||
|
|
80767e8686 | ||
|
|
e260d28f43 | ||
|
|
8af2d3257f | ||
|
|
477ec351e7 | ||
|
|
6824ce0d0f | ||
|
|
70c0f70940 | ||
|
|
251997cf54 | ||
|
|
e79cfa76a8 | ||
|
|
a8a907791b | ||
|
|
0dbb81ee9b | ||
|
|
9ecf59dd60 | ||
|
|
78b2f926c8 | ||
|
|
40d7d074a9 | ||
|
|
8a83234298 | ||
|
|
88c7c4c748 | ||
|
|
ddef52c192 | ||
|
|
57ca3d74e5 | ||
|
|
8e67e717a0 | ||
|
|
d5ae9ffa05 | ||
|
|
1de4a49ab0 | ||
|
|
8493054cd0 | ||
|
|
dbd67e6354 | ||
|
|
bc1eee1857 | ||
|
|
9467ff2de3 | ||
|
|
e5a1b99497 | ||
|
|
2f6607c03d | ||
|
|
597c2f58eb | ||
|
|
633b5da37e | ||
|
|
816a660059 | ||
|
|
05d864c8b4 | ||
|
|
ca1ea6ccb8 | ||
|
|
8e601e1fca | ||
|
|
33ebce49b0 | ||
|
|
3d075602cb | ||
|
|
c87c5e5a04 | ||
|
|
8088effe9f | ||
|
|
653b389c9a | ||
|
|
7286bbb674 | ||
|
|
20ef3c821d | ||
|
|
05a5bfc9b4 | ||
|
|
95336e730f | ||
|
|
d5e445b743 | ||
|
|
00fe154e43 | ||
|
|
27742c8f43 | ||
|
|
15c22fb05b | ||
|
|
0d5b41b83a | ||
|
|
8065eb87d8 | ||
|
|
bee90aa121 | ||
|
|
29b1ed6c4e | ||
|
|
7fe02e7d68 | ||
|
|
ec428bc05f | ||
|
|
73bc6159ea | ||
|
|
136a2268ea | ||
|
|
0723059fb3 | ||
|
|
5e5b253dc6 | ||
|
|
9cc185c82d | ||
|
|
ba76610512 | ||
|
|
787d0c75a2 | ||
|
|
b84e687262 | ||
|
|
c499413812 | ||
|
|
c82754d423 | ||
|
|
9ec006a1b2 | ||
|
|
8fd668fbb3 | ||
|
|
25d02e1f3f | ||
|
|
261e1aec08 | ||
|
|
43206dba92 | ||
|
|
6f2f48b412 | ||
|
|
ca7f6ebb3b | ||
|
|
131f934f17 | ||
|
|
91177a6546 |
23
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Bug
|
||||
description: Report a problem
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Remember: Omarchy is an open source gift, not a product you bought from a vendor
|
||||
|
||||
- type: input
|
||||
id: system-details
|
||||
attributes:
|
||||
label: System details
|
||||
placeholder: e.g. AMD 9950X, NVIDIA 5090, Omarchy 2.1.0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: What's wrong?
|
||||
validations:
|
||||
required: true
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
15
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Documentation
|
||||
description: New pages or changes to existing
|
||||
labels: [documentation]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Remember: Omarchy is an open source gift, not a product you bought from a vendor
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: What correction or addition do we need?
|
||||
validations:
|
||||
required: true
|
||||
15
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Enhancement
|
||||
description: Feature or change
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Remember: Omarchy is an open source gift, not a product you bought from a vendor
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: What do you need?
|
||||
validations:
|
||||
required: true
|
||||
BIN
applications/icons/Basecamp.png
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
applications/icons/ChatGPT.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
applications/icons/Discord.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
applications/icons/Disk Usage.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
applications/icons/Docker.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
applications/icons/Figma.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
applications/icons/GitHub.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
applications/icons/Google Contacts.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
applications/icons/Google Messages.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
applications/icons/Google Photos.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
applications/icons/HEY.png
Normal file
|
After Width: | Height: | Size: 196 KiB |
BIN
applications/icons/WhatsApp.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
applications/icons/X.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
applications/icons/YouTube.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
applications/icons/Zoom.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
@@ -1,19 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Find all the audio sinks but exit if there are none
|
||||
sinks=($(wpctl status | sed -n '/Sinks:/,/Sources:/p' | grep -E '^\s*│\s+\*?\s*[0-9]+\.' | sed -E 's/^[^0-9]*([0-9]+)\..*/\1/'))
|
||||
[ ${#sinks[@]} -eq 0 ] && exit 1
|
||||
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
||||
|
||||
# Find current audio sink
|
||||
current=$(wpctl status | sed -n '/Sinks:/,/Sources:/p' | grep '^\s*│\s*\*' | sed -E 's/^[^0-9]*([0-9]+)\..*/\1/')
|
||||
sinks=$(pactl -f json list sinks | jq '[.[] | select([.ports[]? | .availability == "available"] | any)]')
|
||||
sinks_count=$(echo "$sinks" | jq '. | length')
|
||||
|
||||
# Find the next sink (looping around in the list)
|
||||
for i in "${!sinks[@]}"; do
|
||||
[ "${sinks[$i]}" = "$current" ] && next=${sinks[$(((i + 1) % ${#sinks[@]}))]}
|
||||
done
|
||||
next=${next:-${sinks[0]}}
|
||||
if [ "$sinks_count" -eq 0 ]; then
|
||||
swayosd-client \
|
||||
--monitor "$focused_monitor" \
|
||||
--custom-message "No audio devices found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set the next sink and ensure it's not muted
|
||||
wpctl set-default "$next"
|
||||
wpctl set-mute "$next" 0
|
||||
current_sink_name=$(pactl get-default-sink)
|
||||
current_sink_index=$(echo "$sinks" | jq -r --arg name "$current_sink_name" 'map(.name) | index($name)')
|
||||
|
||||
if [ "$current_sink_index" != "null" ]; then
|
||||
next_sink_index=$(((current_sink_index + 1) % sinks_count))
|
||||
else
|
||||
next_sink_index=0
|
||||
fi
|
||||
|
||||
next_sink=$(echo "$sinks" | jq -r ".[$next_sink_index]")
|
||||
next_sink_name=$(echo "$next_sink" | jq -r '.name')
|
||||
next_sink_description=$(echo "$next_sink" | jq -r '.description')
|
||||
next_sink_volume=$(echo "$next_sink" | jq -r \
|
||||
'.volume | to_entries[0].value.value_percent | sub("%"; "")')
|
||||
next_sink_is_muted=$(echo "$next_sink" | jq -r '.mute')
|
||||
|
||||
if [ "$next_sink_is_muted" = "true" ] || [ "$next_sink_volume" -eq 0 ]; then
|
||||
icon_state="muted"
|
||||
elif [ "$next_sink_volume" -le 33 ]; then
|
||||
icon_state="low"
|
||||
elif [ "$next_sink_volume" -le 66 ]; then
|
||||
icon_state="medium"
|
||||
else
|
||||
icon_state="high"
|
||||
fi
|
||||
|
||||
next_sink_volume_icon="sink-volume-${icon_state}-symbolic"
|
||||
|
||||
if [ "$next_sink_name" != "$current_sink_name" ]; then
|
||||
pactl set-default-sink "$next_sink_name"
|
||||
fi
|
||||
|
||||
swayosd-client \
|
||||
--monitor "$focused_monitor" \
|
||||
--custom-message "$next_sink_description" \
|
||||
--custom-icon "$next_sink_volume_icon"
|
||||
|
||||
@@ -6,7 +6,8 @@ FIRST_RUN_MODE=~/.local/state/omarchy/first-run.mode
|
||||
|
||||
if [[ -f "$FIRST_RUN_MODE" ]]; then
|
||||
rm -f "$FIRST_RUN_MODE"
|
||||
$OMARCHY_PATH/install/first-run/battery-monitor.sh
|
||||
$OMARCHY_PATH/install/first-run/firewall.sh
|
||||
bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/firewall.sh"
|
||||
bash "$OMARCHY_PATH/install/first-run/gnome-theme.sh"
|
||||
sudo rm -f /etc/sudoers.d/first-run
|
||||
fi
|
||||
|
||||
@@ -8,25 +8,47 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
screenrecording() {
|
||||
# Selects region or output
|
||||
SCOPE="$1"
|
||||
|
||||
# Selects audio inclusion or not
|
||||
AUDIO=$([[ $2 == "audio" ]] && echo "--audio")
|
||||
|
||||
start_screenrecording() {
|
||||
filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
|
||||
notify-send "Screen recording starting..." -t 1000
|
||||
sleep 1
|
||||
|
||||
if lspci | grep -Eqi 'nvidia|intel.*graphics'; then
|
||||
wf-recorder -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@"
|
||||
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" &
|
||||
else
|
||||
wl-screenrec -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@"
|
||||
wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" &
|
||||
fi
|
||||
|
||||
toggle_screenrecording_indicator
|
||||
}
|
||||
|
||||
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
|
||||
stop_screenrecording() {
|
||||
pkill -x wl-screenrec
|
||||
pkill -x wf-recorder
|
||||
|
||||
notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000
|
||||
elif [[ "$1" == "output" ]]; then
|
||||
screenrecording
|
||||
|
||||
sleep 0.2 # ensures the process is actually dead before we check
|
||||
toggle_screenrecording_indicator
|
||||
}
|
||||
|
||||
toggle_screenrecording_indicator() {
|
||||
pkill -RTMIN+8 waybar
|
||||
}
|
||||
|
||||
screenrecording_active() {
|
||||
pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null
|
||||
}
|
||||
|
||||
if screenrecording_active; then
|
||||
stop_screenrecording
|
||||
elif [[ "$SCOPE" == "output" ]]; then
|
||||
start_screenrecording
|
||||
else
|
||||
region=$(slurp) || exit 1
|
||||
screenrecording -g "$region"
|
||||
start_screenrecording -g "$region"
|
||||
fi
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
|
||||
pkill -x wl-screenrec
|
||||
pkill -x wf-recorder
|
||||
notify-send "Screen recording stopped" -t 2000
|
||||
fi
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
function exit_screensaver {
|
||||
hyprctl keyword cursor:invisible false
|
||||
pkill -x tte 2>/dev/null
|
||||
pkill -f "alacritty --class Screensaver" 2>/dev/null
|
||||
exit 0
|
||||
@@ -8,6 +9,8 @@ function exit_screensaver {
|
||||
|
||||
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
|
||||
|
||||
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 \
|
||||
|
||||
@@ -8,7 +8,7 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pkill slurp || hyprshot -m ${1:-region} --raw |
|
||||
pkill slurp || hyprshot -m ${1:-region} --raw --freeze |
|
||||
satty --filename - \
|
||||
--output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \
|
||||
--early-exit \
|
||||
|
||||
@@ -5,7 +5,7 @@ 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
|
||||
readlink -f "/proc/$shell_pid/cwd" 2>/dev/null || echo "$HOME"
|
||||
else
|
||||
echo "$HOME"
|
||||
fi
|
||||
|
||||
28
bin/omarchy-drive-info
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Drive, like /dev/nvme0, to display information about
|
||||
if (($# == 0)); then
|
||||
echo "Usage: omarchy-drive-info [/dev/drive]"
|
||||
exit 1
|
||||
else
|
||||
drive="$1"
|
||||
fi
|
||||
|
||||
# Find the root drive in case we are looking at partitions
|
||||
root_drive=$(lsblk -no PKNAME "$drive" 2>/dev/null | tail -n1)
|
||||
if [[ -n "$root_drive" ]]; then
|
||||
root_drive="/dev/$root_drive"
|
||||
else
|
||||
root_drive="$drive"
|
||||
fi
|
||||
|
||||
# Get basic disk information
|
||||
size=$(lsblk -dno SIZE "$drive" 2>/dev/null)
|
||||
model=$(lsblk -dno MODEL "$root_drive" 2>/dev/null)
|
||||
|
||||
# Format display string
|
||||
display="$drive"
|
||||
[[ -n "$size" ]] && display="$display ($size)"
|
||||
[[ -n "$model" ]] && display="$display - $model"
|
||||
|
||||
echo "$display"
|
||||
18
bin/omarchy-drive-select
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Select a drive from a list with info that includes space and brand
|
||||
|
||||
if (($# == 0)); then
|
||||
drives=$(lsblk -dpno NAME | grep -E '/dev/(sd|hd|vd|nvme|mmcblk|xv)')
|
||||
else
|
||||
drives="$@"
|
||||
fi
|
||||
|
||||
drives_with_info=""
|
||||
while IFS= read -r drive; do
|
||||
[[ -n "$drive" ]] || continue
|
||||
drives_with_info+="$(omarchy-drive-info "$drive")"$'\n'
|
||||
done <<<"$drives"
|
||||
|
||||
selected_drive="$(printf "%s" "$drives_with_info" | gum choose --header "Select drive")" || exit 1
|
||||
printf "%s\n" "$selected_drive" | awk '{print $1}'
|
||||
21
bin/omarchy-drive-set-password
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
encrypted_drives=$(blkid -t TYPE=crypto_LUKS -o device)
|
||||
|
||||
if [[ -n $encrypted_drives ]]; then
|
||||
if [[ $(wc -l <<<"$encrypted_drives") -eq 1 ]]; then
|
||||
drive_to_change="$encrypted_drives"
|
||||
else
|
||||
drive_to_change="$(omarchy-drive-select "$encrypted_drives")"
|
||||
fi
|
||||
|
||||
if [[ -n $drive_to_change ]]; then
|
||||
echo "Changing full-disk encryption password for $drive_to_change"
|
||||
sudo cryptsetup luksChangeKey --pbkdf argon2id --iter-time 2000 "$drive_to_change"
|
||||
else
|
||||
echo "No drive selected."
|
||||
fi
|
||||
else
|
||||
echo "No encrypted drives available."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: omarchy-install-dev-env <ruby|node|bun|go|laravel|symfony|php|python|elixir|phoenix|rust|java|ocaml|dotnet>" >&2
|
||||
echo "Usage: omarchy-install-dev-env <ruby|node|bun|go|laravel|symfony|php|python|elixir|phoenix|rust|java|ocaml|dotnet|clojure>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install_php() {
|
||||
sudo pacman -S php composer php-sqlite --noconfirm
|
||||
sudo pacman -S php composer php-sqlite xdebug --noconfirm
|
||||
|
||||
# Install Path for Composer
|
||||
if [[ ":$PATH:" != *":$HOME/.config/composer/vendor/bin:"* ]]; then
|
||||
@@ -28,6 +28,12 @@ install_php() {
|
||||
"pdo_mysql"
|
||||
)
|
||||
|
||||
# Enable Xdebug
|
||||
sudo sed -i \
|
||||
-e 's/^;zend_extension=xdebug.so/zend_extension=xdebug.so/' \
|
||||
-e 's/^;xdebug.mode=debug/xdebug.mode=debug/' \
|
||||
/etc/php/conf.d/xdebug.ini
|
||||
|
||||
for ext in "${extensions_to_enable[@]}"; do
|
||||
sudo sed -i "s/^;extension=${ext}/extension=${ext}/" "$php_ini_path"
|
||||
done
|
||||
@@ -125,4 +131,9 @@ dotnet)
|
||||
echo -e "Installing .NET...\n"
|
||||
mise use --global dotnet@latest
|
||||
;;
|
||||
clojure)
|
||||
echo -e "Installing Clojure...\n"
|
||||
omarchy-pkg-add rlwrap
|
||||
mise use --global clojure@latest
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
options=("MySQL" "PostgreSQL" "Redis" "MongoDB" "MariaDB")
|
||||
choices=$(printf "%s\n" "${options[@]}" | gum choose --no-limit --header "Select databases (space to select, return to install, esc to cancel)") || main_menu
|
||||
|
||||
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
|
||||
else
|
||||
choices="$@"
|
||||
fi
|
||||
|
||||
if [[ -n "$choices" ]]; then
|
||||
for db in $choices; do
|
||||
case $db in
|
||||
MySQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mysql8 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:8.4 ;;
|
||||
PostgreSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres16 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:16 ;;
|
||||
PostgreSQL) sudo docker run -d --restart unless-stopped -p "127.0.0.1:5432:5432" --name=postgres17 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:17 ;;
|
||||
MariaDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:3306:3306" --name=mariadb11 -e MARIADB_ROOT_PASSWORD= -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=true mariadb:11.8 ;;
|
||||
Redis) sudo docker run -d --restart unless-stopped -p "127.0.0.1:6379:6379" --name=redis redis:7 ;;
|
||||
MongoDB) sudo docker run -d --restart unless-stopped -p "127.0.0.1:27017:27017" --name mongodb -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=admin123 mongo:noble ;;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Adding multilib repository for 32-bit compatibility"
|
||||
sudo sed -i '/^\s*#\[multilib\]/,/^$/{s/^\s*#//}' /etc/pacman.conf
|
||||
|
||||
echo "Now pick dependencies matching your graphics card"
|
||||
sudo pacman -Syu --noconfirm steam
|
||||
setsid gtk-launch steam >/dev/null 2>&1 &
|
||||
|
||||
@@ -2,6 +2,21 @@
|
||||
|
||||
export PATH="$HOME/.local/share/omarchy/bin:$PATH"
|
||||
|
||||
# Set to true when going directly to a submenu, so we can exit directly
|
||||
BACK_TO_EXIT=false
|
||||
|
||||
back_to() {
|
||||
local parent_menu="$1"
|
||||
|
||||
if [[ "$BACK_TO_EXIT" == "true" ]]; then
|
||||
exit 0
|
||||
elif [[ -n "$parent_menu" ]]; then
|
||||
"$parent_menu"
|
||||
else
|
||||
show_main_menu
|
||||
fi
|
||||
}
|
||||
|
||||
menu() {
|
||||
local prompt="$1"
|
||||
local options="$2"
|
||||
@@ -80,7 +95,7 @@ show_style_menu() {
|
||||
show_theme_menu() {
|
||||
theme=$(menu "Theme" "$(omarchy-theme-list)" "" "$(omarchy-theme-current)")
|
||||
if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then
|
||||
show_main_menu
|
||||
back_to show_style_menu
|
||||
else
|
||||
omarchy-theme-set "$theme"
|
||||
fi
|
||||
@@ -89,7 +104,7 @@ show_theme_menu() {
|
||||
show_font_menu() {
|
||||
theme=$(menu "Font" "$(omarchy-font-list)" "-w 350" "$(omarchy-font-current)")
|
||||
if [[ "$theme" == "CNCLD" || -z "$theme" ]]; then
|
||||
show_main_menu
|
||||
back_to show_style_menu
|
||||
else
|
||||
omarchy-font-set "$theme"
|
||||
fi
|
||||
@@ -114,8 +129,10 @@ show_screenshot_menu() {
|
||||
}
|
||||
|
||||
show_screenrecord_menu() {
|
||||
case $(menu "Screenrecord" " Region\n Display") in
|
||||
case $(menu "Screenrecord" " Region\n Region + Audio\n Display\n Display + Audio") in
|
||||
*"Region + Audio"*) omarchy-cmd-screenrecord region audio ;;
|
||||
*Region*) omarchy-cmd-screenrecord ;;
|
||||
*"Display + Audio"*) omarchy-cmd-screenrecord output audio ;;
|
||||
*Display*) omarchy-cmd-screenrecord output ;;
|
||||
*) show_capture_menu ;;
|
||||
esac
|
||||
@@ -163,7 +180,7 @@ show_setup_power_menu() {
|
||||
profile=$(menu "Power Profile" "$(omarchy-powerprofiles-list)" "" "$(powerprofilesctl get)")
|
||||
|
||||
if [[ "$profile" == "CNCLD" || -z "$profile" ]]; then
|
||||
show_main_menu
|
||||
back_to show_setup_menu
|
||||
else
|
||||
powerprofilesctl set "$profile"
|
||||
fi
|
||||
@@ -213,7 +230,7 @@ show_install_editor_menu() {
|
||||
*VSCode*) install_and_launch "VSCode" "visual-studio-code-bin" "code" ;;
|
||||
*Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;;
|
||||
*Zed*) install_and_launch "Zed" "zed" "dev.zed.Zed" ;;
|
||||
*Sublime*) install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;;
|
||||
*Sublime*) aur_install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;;
|
||||
*Helix*) install "Helix" "helix" ;;
|
||||
*Emacs*) install "Emacs" "emacs-wayland" && systemctl --user enable --now emacs.service ;;
|
||||
*) show_install_menu ;;
|
||||
@@ -227,14 +244,14 @@ show_install_ai_menu() {
|
||||
echo ollama
|
||||
)
|
||||
|
||||
case $(menu "Install" " Claude Code\n Gemini\n OpenAI Codex [AUR]\n LM Studio\n Ollama\n Crush\n opencode") in
|
||||
case $(menu "Install" " Claude Code\n Gemini [AUR]\n OpenAI Codex [AUR]\n LM Studio\n Ollama\n Crush\n opencode") in
|
||||
*Claude*) install "Claude Code" "claude-code" ;;
|
||||
*OpenAI*) aur_install "OpenAI Codex" "openai-codex-bin" ;;
|
||||
*Gemini*) install "Gemini" "gemini-cli" ;;
|
||||
*Gemini*) aur_install "Gemini" "gemini-cli" ;;
|
||||
*Studio*) install "LM Studio" "lmstudio" ;;
|
||||
*Ollama*) install "Ollama" $ollama_pkg ;;
|
||||
*Crush*) install "Crush" "crush-bin" ;;
|
||||
*opencode*) install "opencode" "opencode-bin" ;;
|
||||
*opencode*) install "opencode" "opencode" ;;
|
||||
*) show_install_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -243,7 +260,7 @@ show_install_gaming_menu() {
|
||||
case $(menu "Install" " Steam\n RetroArch [AUR]\n Minecraft") in
|
||||
*Steam*) present_terminal omarchy-install-steam ;;
|
||||
*RetroArch*) aur_install_and_launch "RetroArch" "retroarch retroarch-assets libretro libretro-fbneo" "com.libretro.RetroArch.desktop" ;;
|
||||
*Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;;
|
||||
*Minecraft*) aur_install_and_launch "Minecraft [AUR]" "minecraft-launcher" "minecraft-launcher" ;;
|
||||
*) show_install_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -268,7 +285,7 @@ show_install_font_menu() {
|
||||
}
|
||||
|
||||
show_install_development_menu() {
|
||||
case $(menu "Install" " Ruby on Rails\n Docker DB\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml") in
|
||||
case $(menu "Install" " Ruby on Rails\n Docker DB\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml\n Clojure") in
|
||||
*Rails*) present_terminal "omarchy-install-dev-env ruby" ;;
|
||||
*Docker*) present_terminal omarchy-install-docker-dbs ;;
|
||||
*JavaScript*) show_install_javascript_menu ;;
|
||||
@@ -281,6 +298,7 @@ show_install_development_menu() {
|
||||
*Java*) present_terminal "omarchy-install-dev-env java" ;;
|
||||
*NET*) present_terminal "omarchy-install-dev-env dotnet" ;;
|
||||
*OCaml*) present_terminal "omarchy-install-dev-env ocaml" ;;
|
||||
*Clojure*) present_terminal "omarchy-install-dev-env clojure" ;;
|
||||
*) show_install_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -324,13 +342,14 @@ show_remove_menu() {
|
||||
}
|
||||
|
||||
show_update_menu() {
|
||||
case $(menu "Update" " Omarchy\n Config\n Themes\n Process\n Hardware\n Timezone") in
|
||||
case $(menu "Update" " Omarchy\n Config\n Themes\n Process\n Hardware\n Password\n Timezone") in
|
||||
*Omarchy*) present_terminal omarchy-update ;;
|
||||
*Config*) show_update_config_menu ;;
|
||||
*Themes*) present_terminal omarchy-theme-update ;;
|
||||
*Process*) show_update_process_menu ;;
|
||||
*Hardware*) show_update_hardware_menu ;;
|
||||
*Timezone*) omarchy-cmd-tzupdate ;;
|
||||
*Password*) show_update_password_menu ;;
|
||||
*) show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
@@ -368,6 +387,14 @@ show_update_hardware_menu() {
|
||||
esac
|
||||
}
|
||||
|
||||
show_update_password_menu() {
|
||||
case $(menu "Update Password" " Drive Encryption\n User") in
|
||||
*Drive*) present_terminal omarchy-drive-set-password ;;
|
||||
*User*) present_terminal passwd ;;
|
||||
*) show_update_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_system_menu() {
|
||||
case $(menu "System" " Lock\n Screensaver\n Suspend\n Relaunch\n Restart\n Shutdown") in
|
||||
*Lock*) omarchy-lock-screen ;;
|
||||
@@ -376,7 +403,7 @@ show_system_menu() {
|
||||
*Relaunch*) uwsm stop ;;
|
||||
*Restart*) systemctl reboot ;;
|
||||
*Shutdown*) systemctl poweroff ;;
|
||||
*) show_main_menu ;;
|
||||
*) back_to show_main_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -405,6 +432,7 @@ go_to_menu() {
|
||||
}
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
BACK_TO_EXIT=true
|
||||
go_to_menu "$1"
|
||||
else
|
||||
show_main_menu
|
||||
|
||||
@@ -83,7 +83,11 @@ 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'
|
||||
walker --dmenu --theme keybindings -p 'Keybindings' -w 800 -h "$menu_height"
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
fzf_args=(
|
||||
--multi
|
||||
--preview 'yay -Sii {1}'
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
fzf_args=(
|
||||
--multi
|
||||
--preview 'pacman -Sii {1}'
|
||||
@@ -19,6 +17,5 @@ pkg_names=$(pacman -Slq | fzf "${fzf_args[@]}")
|
||||
if [[ -n "$pkg_names" ]]; then
|
||||
# Convert newline-separated selections to space-separated for yay
|
||||
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -S --noconfirm
|
||||
sudo updatedb
|
||||
omarchy-show-done
|
||||
fi
|
||||
|
||||
@@ -17,6 +17,5 @@ pkg_names=$(yay -Qqe | fzf "${fzf_args[@]}")
|
||||
if [[ -n "$pkg_names" ]]; then
|
||||
# Convert newline-separated selections to space-separated for yay
|
||||
echo "$pkg_names" | tr '\n' ' ' | xargs sudo pacman -Rns --noconfirm
|
||||
sudo updatedb
|
||||
omarchy-show-done
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$1" == "-y" ]]; then
|
||||
sudo cp ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/
|
||||
sudo plymouth-set-default-theme -R omarchy
|
||||
sudo cp ~/.local/share/omarchy/default/plymouth/* /usr/share/plymouth/themes/omarchy/
|
||||
sudo plymouth-set-default-theme omarchy
|
||||
|
||||
if command -v limine-mkinitcpio &>/dev/null; then
|
||||
sudo limine-mkinitcpio
|
||||
else
|
||||
sudo mkinitcpio -P
|
||||
fi
|
||||
|
||||
@@ -37,8 +37,6 @@ EOF
|
||||
DHCP)
|
||||
sudo tee /etc/systemd/resolved.conf >/dev/null <<'EOF'
|
||||
[Resolve]
|
||||
DNS=
|
||||
FallbackDNS=
|
||||
DNSOverTLS=no
|
||||
EOF
|
||||
|
||||
|
||||
@@ -20,13 +20,16 @@ fi
|
||||
|
||||
ICON_DIR="$HOME/.local/share/applications/icons"
|
||||
DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop"
|
||||
ICON_PATH="$ICON_DIR/$APP_NAME.png"
|
||||
|
||||
mkdir -p "$ICON_DIR"
|
||||
|
||||
if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then
|
||||
echo "Error: Failed to download icon."
|
||||
return 1
|
||||
if [[ ! "$ICON_URL" =~ ^https?:// ]] && [ -f "$ICON_URL" ]; then
|
||||
ICON_PATH="$ICON_URL"
|
||||
else
|
||||
ICON_PATH="$ICON_DIR/$APP_NAME.png"
|
||||
mkdir -p "$ICON_DIR"
|
||||
if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then
|
||||
echo "Error: Failed to download icon."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $WINDOW_STYLE == "float" ]]; then
|
||||
|
||||
@@ -7,4 +7,4 @@ omarchy-update-git
|
||||
omarchy-migrate
|
||||
omarchy-update-system-pkgs
|
||||
omarchy-update-restart
|
||||
omarchy-restart-waybar # removes update-available icon
|
||||
omarchy-update-available-reset
|
||||
|
||||
4
bin/omarchy-update-available-reset
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure Waybar icon offering the available update is removed
|
||||
pkill -RTMIN+7 waybar
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -e "\e[32mUpdate Omarchy\e[0m"
|
||||
|
||||
git -C $OMARCHY_PATH pull --autostash
|
||||
git -C $OMARCHY_PATH diff --check || git -C $OMARCHY_PATH reset --merge
|
||||
|
||||
126
bin/omarchy-upload-log
Executable file
@@ -0,0 +1,126 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Upload logs to 0x0.st
|
||||
|
||||
LOG_TYPE="${1:-install}"
|
||||
TEMP_LOG="/tmp/upload-log.txt"
|
||||
SYSTEM_INFO="/tmp/system-info.txt"
|
||||
|
||||
# Get system information if fastfetch is available
|
||||
if command -v fastfetch >/dev/null 2>&1; then
|
||||
{
|
||||
echo "========================================="
|
||||
echo "SYSTEM INFORMATION"
|
||||
echo "========================================="
|
||||
# Use fastfetch with no logo to get clean output
|
||||
fastfetch --logo none --pipe 2>/dev/null || echo "Failed to get system info"
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "LOG CONTENT"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
} >"$SYSTEM_INFO"
|
||||
else
|
||||
# Fallback to basic info if fastfetch isn't available
|
||||
{
|
||||
echo "========================================="
|
||||
echo "SYSTEM INFORMATION"
|
||||
echo "========================================="
|
||||
echo "Hostname: $(hostname)"
|
||||
echo "Kernel: $(uname -r)"
|
||||
echo "Date: $(date)"
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "LOG CONTENT"
|
||||
echo "========================================="
|
||||
echo ""
|
||||
} >"$SYSTEM_INFO"
|
||||
fi
|
||||
|
||||
case "$LOG_TYPE" in
|
||||
install)
|
||||
ARCHINSTALL_LOG="/var/log/archinstall/install.log"
|
||||
OMARCHY_LOG="/var/log/omarchy-install.log"
|
||||
|
||||
# Combine system info with logs
|
||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
||||
cat $ARCHINSTALL_LOG $OMARCHY_LOG >>"$TEMP_LOG" 2>/dev/null
|
||||
|
||||
if [ ! -s "$TEMP_LOG" ]; then
|
||||
echo "Error: No install logs found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading installation log to 0x0.st..."
|
||||
;;
|
||||
|
||||
this-boot)
|
||||
# Combine system info with boot logs
|
||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
||||
journalctl -b 0 >>"$TEMP_LOG" 2>/dev/null
|
||||
|
||||
if [ ! -s "$TEMP_LOG" ]; then
|
||||
echo "Error: No logs found for current boot"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading current boot logs to 0x0.st..."
|
||||
;;
|
||||
|
||||
last-boot)
|
||||
# Combine system info with previous boot logs
|
||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
||||
journalctl -b -1 >>"$TEMP_LOG" 2>/dev/null
|
||||
|
||||
if [ ! -s "$TEMP_LOG" ]; then
|
||||
echo "Error: No logs found for previous boot"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading previous boot logs to 0x0.st..."
|
||||
;;
|
||||
|
||||
installed)
|
||||
# System info plus all installed packages
|
||||
cat "$SYSTEM_INFO" >"$TEMP_LOG"
|
||||
{
|
||||
echo ""
|
||||
echo "========================================="
|
||||
echo "INSTALLED PACKAGES (pacman -Q)"
|
||||
echo "========================================="
|
||||
pacman -Q 2>/dev/null || echo "Failed to get package list"
|
||||
} >>"$TEMP_LOG"
|
||||
|
||||
if [ ! -s "$TEMP_LOG" ]; then
|
||||
echo "Error: Failed to gather system information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Uploading system information to 0x0.st..."
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 [install|this-boot|last-boot|system-info]"
|
||||
echo " install - Upload installation logs (default)"
|
||||
echo " this-boot - Upload logs from current boot"
|
||||
echo " last-boot - Upload logs from previous boot"
|
||||
echo " installed - Upload system info and installed packages"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
|
||||
URL=$(curl -sF "file=@$TEMP_LOG" -Fexpires=24 https://0x0.st)
|
||||
|
||||
if [ $? -eq 0 ] && [ -n "$URL" ]; then
|
||||
echo "✓ Log uploaded successfully!"
|
||||
echo "Share this URL:"
|
||||
echo ""
|
||||
echo " $URL"
|
||||
echo ""
|
||||
echo "This link will expire in 24 hours."
|
||||
else
|
||||
echo "Error: Failed to upload log file"
|
||||
exit 1
|
||||
fi
|
||||
@@ -18,13 +18,16 @@ fi
|
||||
|
||||
ICON_DIR="$HOME/.local/share/applications/icons"
|
||||
DESKTOP_FILE="$HOME/.local/share/applications/$APP_NAME.desktop"
|
||||
ICON_PATH="$ICON_DIR/$APP_NAME.png"
|
||||
|
||||
mkdir -p "$ICON_DIR"
|
||||
|
||||
if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then
|
||||
echo "Error: Failed to download icon."
|
||||
return 1
|
||||
if [[ ! "$ICON_URL" =~ ^https?:// ]] && [ -f "$ICON_URL" ]; then
|
||||
ICON_PATH="$ICON_URL"
|
||||
else
|
||||
ICON_PATH="$ICON_DIR/$APP_NAME.png"
|
||||
mkdir -p "$ICON_DIR"
|
||||
if ! curl -sL -o "$ICON_PATH" "$ICON_URL"; then
|
||||
echo "Error: Failed to download icon."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cat >"$DESKTOP_FILE" <<EOF
|
||||
|
||||
3
boot.sh
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set install mode to online since boot.sh is used for curl installations
|
||||
export OMARCHY_INSTALL_MODE="online"
|
||||
|
||||
ansi_art=' ▄▄▄
|
||||
▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄
|
||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
$terminal = uwsm app -- alacritty
|
||||
$browser = omarchy-launch-browser
|
||||
|
||||
bindd = SUPER, return, Terminal, exec, $terminal --working-directory=$(omarchy-cmd-terminal-cwd)
|
||||
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, M, Music, exec, uwsm app -- spotify
|
||||
|
||||
@@ -16,4 +16,5 @@ source = ~/.config/hypr/monitors.conf
|
||||
source = ~/.config/hypr/input.conf
|
||||
source = ~/.config/hypr/bindings.conf
|
||||
source = ~/.config/hypr/envs.conf
|
||||
source = ~/.config/hypr/looknfeel.conf
|
||||
source = ~/.config/hypr/autostart.conf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makes hyprsunset do nothing to the screen by default
|
||||
# Without this, the default applies some tint to the monitor
|
||||
profile {
|
||||
time = 00:00
|
||||
time = 07:00
|
||||
identity = true
|
||||
}
|
||||
@@ -9,6 +9,9 @@ input {
|
||||
repeat_rate = 40
|
||||
repeat_delay = 600
|
||||
|
||||
# Start with numlock on by default
|
||||
numlock_by_default = true
|
||||
|
||||
# Increase sensitity for mouse/trackpack (default: 0)
|
||||
# sensitivity = 0.35
|
||||
|
||||
@@ -26,3 +29,7 @@ input {
|
||||
|
||||
# Scroll faster in the terminal
|
||||
windowrule = scrolltouchpad 1.5, class:Alacritty
|
||||
|
||||
# Enable touchpad gestures for changing workspaces
|
||||
# See https://wiki.hyprland.org/Configuring/Gestures/
|
||||
# gesture = 3, horizontal, workspace
|
||||
|
||||
17
config/hypr/looknfeel.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
# Change the default Omarchy look'n'feel
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general {
|
||||
# No gaps between windows
|
||||
# gaps_in = 0
|
||||
# gaps_out = 0
|
||||
|
||||
# Use master layout instead of dwindle
|
||||
# layout = master
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
# Use round window corners
|
||||
# rounding = 8
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
"spacing": 0,
|
||||
"height": 26,
|
||||
"modules-left": ["custom/omarchy", "hyprland/workspaces"],
|
||||
"modules-center": ["clock", "custom/update"],
|
||||
"modules-center": ["clock", "custom/update", "custom/screenrecording-indicator"],
|
||||
"modules-right": [
|
||||
"group/tray-expander",
|
||||
"bluetooth",
|
||||
@@ -48,6 +48,7 @@
|
||||
"exec": "omarchy-update-available",
|
||||
"on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update",
|
||||
"tooltip-format": "Omarchy update available",
|
||||
"signal": 7,
|
||||
"interval": 3600
|
||||
},
|
||||
|
||||
@@ -57,8 +58,8 @@
|
||||
"on-click": "alacritty -e btop"
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%A %H:%M}",
|
||||
"format-alt": "{:%d %B W%V %Y}",
|
||||
"format": "{:L%A %H:%M}",
|
||||
"format-alt": "{:L%d %B W%V %Y}",
|
||||
"tooltip": false,
|
||||
"on-click-right": "omarchy-cmd-tzupdate"
|
||||
},
|
||||
@@ -124,6 +125,12 @@
|
||||
"format": " ",
|
||||
"tooltip": false
|
||||
},
|
||||
"custom/screenrecording-indicator": {
|
||||
"on-click": "omarchy-cmd-screenrecord",
|
||||
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
|
||||
"signal": 8,
|
||||
"return-type": "json"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 12,
|
||||
"spacing": 12
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#bluetooth,
|
||||
#pulseaudio,
|
||||
#custom-omarchy,
|
||||
#custom-screenrecording-indicator,
|
||||
#custom-update {
|
||||
min-width: 12px;
|
||||
margin: 0 7.5px;
|
||||
@@ -61,3 +62,13 @@ tooltip {
|
||||
.hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#custom-screenrecording-indicator {
|
||||
min-width: 12px;
|
||||
margin-left: 8.75px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#custom-screenrecording-indicator.active {
|
||||
color: #a55555;
|
||||
}
|
||||
|
||||
@@ -10,5 +10,5 @@ if [[ ! -v BASH_COMPLETION_VERSINFO && -f /usr/share/bash-completion/bash_comple
|
||||
fi
|
||||
|
||||
# Set complete path
|
||||
export PATH="./bin:$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
set +h
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Browser types
|
||||
windowrule = tag +chromium-based-browser, class:([cC]hrom(e|ium)|[bB]rave-browser|Microsoft-edge|Vivaldi-stable)
|
||||
windowrule = tag +firefox-based-browser, class:(Firefox|zen|librewolf)
|
||||
windowrule = tag +firefox-based-browser, class:([fF]irefox|zen|librewolf)
|
||||
|
||||
# Force chromium-based browsers into a tile to deal with --app bug
|
||||
windowrule = tile, tag:chromium-based-browser
|
||||
@@ -10,4 +10,4 @@ windowrule = opacity 1 0.97, tag:chromium-based-browser
|
||||
windowrule = opacity 1 0.97, tag:firefox-based-browser
|
||||
|
||||
# Some video sites should never have opacity applied to them
|
||||
windowrule = opacity 1.0 1.0, initialTitle:(youtube\.com_/|app\.zoom\.us_/wc/home)
|
||||
windowrule = opacity 1.0 1.0, initialTitle:((?i)(?:[a-z0-9-]+\.)*youtube\.com_/|app\.zoom\.us_/wc/home)
|
||||
|
||||
@@ -7,7 +7,7 @@ bindld = , XF86PowerOff, Power menu, exec, omarchy-menu system
|
||||
bindd = SUPER, K, Show key bindings, exec, omarchy-menu-keybindings
|
||||
|
||||
# Aesthetics
|
||||
bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, pkill -SIGUSR1 waybar
|
||||
bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, omarchy-toggle-waybar
|
||||
bindd = SUPER CTRL, SPACE, Next background in theme, exec, omarchy-theme-bg-next
|
||||
bindd = SUPER SHIFT CTRL, SPACE, Pick new theme, exec, omarchy-menu theme
|
||||
|
||||
@@ -33,8 +33,10 @@ bindd = SHIFT, PRINT, Screenshot of window, exec, omarchy-cmd-screenshot window
|
||||
bindd = CTRL, PRINT, Screenshot of display, exec, omarchy-cmd-screenshot output
|
||||
|
||||
# Screen recordings
|
||||
bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord
|
||||
bindd = ALT, PRINT, Screen record a region, exec, omarchy-cmd-screenrecord region
|
||||
bindd = ALT SHIFT, PRINT, Screen record a region with audio, exec, omarchy-cmd-screenrecord region audio
|
||||
bindd = CTRL ALT, PRINT, Screen record display, exec, omarchy-cmd-screenrecord output
|
||||
bindd = CTRL ALT SHIFT, PRINT, Screen record display with audio, exec, omarchy-cmd-screenrecord output audio
|
||||
|
||||
# Color picker
|
||||
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a
|
||||
|
||||
@@ -10,6 +10,11 @@ env = SDL_VIDEODRIVER,wayland
|
||||
env = MOZ_ENABLE_WAYLAND,1
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||
env = OZONE_PLATFORM,wayland
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
|
||||
# Allow better support for screen sharing (Google Meet, Discord, etc)
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = XDG_SESSION_DESKTOP,Hyprland
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
|
||||
@@ -14,8 +14,3 @@ input {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
16
default/mako/core.ini
Normal file
@@ -0,0 +1,16 @@
|
||||
anchor=top-right
|
||||
default-timeout=5000
|
||||
width=420
|
||||
height=110
|
||||
|
||||
[app-name=Spotify]
|
||||
invisible=1
|
||||
|
||||
[mode=do-not-disturb]
|
||||
invisible=true
|
||||
|
||||
[mode=do-not-disturb app-name=notify-send]
|
||||
invisible=false
|
||||
|
||||
[urgency=critical]
|
||||
default-timeout=0
|
||||
@@ -22,8 +22,8 @@ Include = /etc/pacman.d/mirrorlist
|
||||
[extra]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# [multilib]
|
||||
# Include = /etc/pacman.d/mirrorlist
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[omarchy]
|
||||
SigLevel = Optional TrustAll
|
||||
|
||||
@@ -7,3 +7,5 @@ ModuleName=script
|
||||
ImageDir=/usr/share/plymouth/themes/omarchy
|
||||
ScriptFile=/usr/share/plymouth/themes/omarchy/omarchy.script
|
||||
ConsoleLogBackgroundColor=0x1a1b26
|
||||
MonospaceFont=Cantarell 11
|
||||
Font=Cantarell 11
|
||||
|
||||
7
default/waybar/indicators/screen-recording.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
|
||||
echo '{"text": "", "tooltip": "Stop recording", "class": "active"}'
|
||||
else
|
||||
echo '{"text": ""}'
|
||||
fi
|
||||
64
install.sh
Executable file → Normal file
@@ -1,58 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Exit immediately if a command exits with a non-zero status
|
||||
set -eE
|
||||
set -eEo pipefail
|
||||
|
||||
OMARCHY_PATH="$HOME/.local/share/omarchy"
|
||||
OMARCHY_INSTALL="$OMARCHY_PATH/install"
|
||||
# Define Omarchy locations
|
||||
export OMARCHY_PATH="$HOME/.local/share/omarchy"
|
||||
export OMARCHY_INSTALL="$OMARCHY_PATH/install"
|
||||
export OMARCHY_INSTALL_LOG_FILE="/var/log/omarchy-install.log"
|
||||
export PATH="$OMARCHY_PATH/bin:$PATH"
|
||||
|
||||
# Preparation
|
||||
source $OMARCHY_INSTALL/preflight/show-env.sh
|
||||
source $OMARCHY_INSTALL/preflight/trap-errors.sh
|
||||
source $OMARCHY_INSTALL/preflight/guard.sh
|
||||
source $OMARCHY_INSTALL/preflight/chroot.sh
|
||||
source $OMARCHY_INSTALL/preflight/pacman.sh
|
||||
source $OMARCHY_INSTALL/preflight/migrations.sh
|
||||
source $OMARCHY_INSTALL/preflight/first-run-mode.sh
|
||||
|
||||
# Packaging
|
||||
source $OMARCHY_INSTALL/packages.sh
|
||||
source $OMARCHY_INSTALL/packaging/fonts.sh
|
||||
source $OMARCHY_INSTALL/packaging/lazyvim.sh
|
||||
source $OMARCHY_INSTALL/packaging/webapps.sh
|
||||
source $OMARCHY_INSTALL/packaging/tuis.sh
|
||||
|
||||
# Configuration
|
||||
source $OMARCHY_INSTALL/config/config.sh
|
||||
source $OMARCHY_INSTALL/config/theme.sh
|
||||
source $OMARCHY_INSTALL/config/branding.sh
|
||||
source $OMARCHY_INSTALL/config/git.sh
|
||||
source $OMARCHY_INSTALL/config/gpg.sh
|
||||
source $OMARCHY_INSTALL/config/timezones.sh
|
||||
source $OMARCHY_INSTALL/config/increase-sudo-tries.sh
|
||||
source $OMARCHY_INSTALL/config/increase-lockout-limit.sh
|
||||
source $OMARCHY_INSTALL/config/ssh-flakiness.sh
|
||||
source $OMARCHY_INSTALL/config/detect-keyboard-layout.sh
|
||||
source $OMARCHY_INSTALL/config/xcompose.sh
|
||||
source $OMARCHY_INSTALL/config/mise-ruby.sh
|
||||
source $OMARCHY_INSTALL/config/docker.sh
|
||||
source $OMARCHY_INSTALL/config/mimetypes.sh
|
||||
source $OMARCHY_INSTALL/config/localdb.sh
|
||||
source $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/network.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/bluetooth.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/printer.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/usb-autosuspend.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/ignore-power-button.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/nvidia.sh
|
||||
source $OMARCHY_INSTALL/config/hardware/fix-f13-amd-audio-input.sh
|
||||
|
||||
# Login
|
||||
source $OMARCHY_INSTALL/login/plymouth.sh
|
||||
source $OMARCHY_INSTALL/login/limine-snapper.sh
|
||||
source $OMARCHY_INSTALL/login/alt-bootloaders.sh
|
||||
|
||||
# Finishing
|
||||
source $OMARCHY_INSTALL/reboot.sh
|
||||
# Install
|
||||
source "$OMARCHY_INSTALL/helpers/all.sh"
|
||||
source "$OMARCHY_INSTALL/preflight/all.sh"
|
||||
source "$OMARCHY_INSTALL/packaging/all.sh"
|
||||
source "$OMARCHY_INSTALL/config/all.sh"
|
||||
source "$OMARCHY_INSTALL/login/all.sh"
|
||||
source "$OMARCHY_INSTALL/post-install/all.sh"
|
||||
|
||||
27
install/config/all.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
run_logged $OMARCHY_INSTALL/config/config.sh
|
||||
run_logged $OMARCHY_INSTALL/config/theme.sh
|
||||
run_logged $OMARCHY_INSTALL/config/branding.sh
|
||||
run_logged $OMARCHY_INSTALL/config/git.sh
|
||||
run_logged $OMARCHY_INSTALL/config/gpg.sh
|
||||
run_logged $OMARCHY_INSTALL/config/timezones.sh
|
||||
run_logged $OMARCHY_INSTALL/config/increase-sudo-tries.sh
|
||||
run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh
|
||||
run_logged $OMARCHY_INSTALL/config/ssh-flakiness.sh
|
||||
run_logged $OMARCHY_INSTALL/config/detect-keyboard-layout.sh
|
||||
run_logged $OMARCHY_INSTALL/config/xcompose.sh
|
||||
run_logged $OMARCHY_INSTALL/config/mise-ruby.sh
|
||||
run_logged $OMARCHY_INSTALL/config/mise-work.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/sudoless-asdcontrol.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/bluetooth.sh
|
||||
run_logged $OMARCHY_INSTALL/config/hardware/printer.sh
|
||||
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
|
||||
2
install/config/branding.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
2
install/config/config.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copy over Omarchy configs
|
||||
mkdir -p ~/.config
|
||||
cp -R ~/.local/share/omarchy/config/* ~/.config/
|
||||
|
||||
11
install/config/detect-keyboard-layout.sh
Executable file → Normal file
@@ -1,16 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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"
|
||||
|
||||
layout=$(grep '^XKBLAYOUT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
variant=$(grep '^XKBVARIANT=' "$conf" | cut -d= -f2 | tr -d '"')
|
||||
|
||||
if [[ -n "$layout" ]]; then
|
||||
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 [[ -n "$variant" ]]; then
|
||||
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
|
||||
|
||||
2
install/config/docker.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Configure Docker daemon:
|
||||
# - limit log size to avoid running out of disk
|
||||
# - use host's DNS resolver
|
||||
|
||||
4
install/config/git.sh
Executable file → Normal file
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Ensure git settings live under ~/.config
|
||||
mkdir -p ~/.config/git
|
||||
touch ~/.config/git/config
|
||||
|
||||
# Set common git aliases
|
||||
git config --global alias.co checkout
|
||||
|
||||
2
install/config/gpg.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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/
|
||||
|
||||
2
install/config/hardware/bluetooth.sh
Executable file → Normal file
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Turn on bluetooth by default
|
||||
chrootable_systemctl_enable bluetooth.service
|
||||
|
||||
5
install/config/hardware/fix-apple-bcm4360.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
# Install wifi drivers for 2013-2015 MacBooks using the BCM4360 chip
|
||||
if lspci -nnv | grep -A2 "14e4:43a0" | grep -q "106b:"; then
|
||||
echo "Apple BCM4360 detected"
|
||||
sudo pacman -S --noconfirm --needed broadcom-wl dkms linux-headers
|
||||
fi
|
||||
4
install/config/hardware/fix-f13-amd-audio-input.sh
Executable file → Normal file
@@ -1,6 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
AMD_AUDIO_CARD=$(pactl list cards | grep -B20 "Family 17h/19h" | grep "Name: " | awk '{print $2}')
|
||||
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
|
||||
|
||||
2
install/config/hardware/fix-fkeys.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
3
install/config/hardware/ignore-power-button.sh
Executable file → Normal file
@@ -1,5 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
11
install/config/hardware/intel.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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
|
||||
elif [[ "${INTEL_GPU,,}" =~ "gma" ]]; then
|
||||
# Older generations from 2008 to ~2014-2017 use libva-intel-driver
|
||||
sudo pacman -S --needed --noconfirm libva-intel-driver
|
||||
fi
|
||||
fi
|
||||
2
install/config/hardware/network.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure iwd service will be started
|
||||
sudo systemctl enable iwd.service
|
||||
|
||||
|
||||
7
install/config/hardware/nvidia.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ==============================================================================
|
||||
# Hyprland NVIDIA Setup Script for Arch Linux
|
||||
# ==============================================================================
|
||||
@@ -30,11 +28,6 @@ if [ -n "$(lspci | grep -i 'nvidia')" ]; then
|
||||
KERNEL_HEADERS="linux-hardened-headers"
|
||||
fi
|
||||
|
||||
# Enable multilib repository for 32-bit libraries
|
||||
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
||||
sudo sed -i '/^#\[multilib\]/,/^#Include/ s/^#//' /etc/pacman.conf
|
||||
fi
|
||||
|
||||
# force package database refresh
|
||||
sudo pacman -Syu --noconfirm
|
||||
|
||||
|
||||
5
install/config/hardware/printer.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
chrootable_systemctl_enable cups.service
|
||||
|
||||
# Disable multicast dns in resolved. Avahi will provide this for better network printer discovery
|
||||
@@ -7,6 +5,9 @@ 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 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
|
||||
|
||||
33
install/config/hardware/set-wireless-regdom.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
# First check that wireless-regdb is there
|
||||
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/}
|
||||
|
||||
# Some timezones are formatted with the two letter country code at the start
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
# Also set it one off now
|
||||
if command -v iw &>/dev/null; then
|
||||
sudo iw reg set ${COUNTRY}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
3
install/config/hardware/usb-autosuspend.sh
Executable file → Normal file
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
2
install/config/increase-lockout-limit.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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"
|
||||
|
||||
2
install/config/increase-sudo-tries.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
install/config/lazyvim.sh
Normal file
@@ -0,0 +1 @@
|
||||
omarchy-lazyvim-setup
|
||||
0
install/config/localdb.sh
Executable file → Normal file
2
install/config/mimetypes.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
omarchy-refresh-applications
|
||||
update-desktop-database ~/.local/share/applications
|
||||
|
||||
|
||||
23
install/config/mise-ruby.sh
Executable file → Normal file
@@ -1,7 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install Ruby using gcc-14 for compatibility
|
||||
mise settings set ruby.ruby_build_opts "CC=gcc-14 CXX=g++-14"
|
||||
|
||||
# Trust .ruby-version
|
||||
mise settings add idiomatic_version_file_enable_tools ruby
|
||||
|
||||
# Install pre-built Ruby + Rails for x86_64
|
||||
if [[ $(uname -m) == "x86_64" ]]; then
|
||||
RUBY_VERSION="3.4.5"
|
||||
RUBY_TARBALL="ruby-${RUBY_VERSION}-rails-8.0.2.1-x86_64.tar.gz"
|
||||
RUBY_URL="https://pkgs.omarchy.org/ruby/${RUBY_TARBALL}"
|
||||
MISE_RUBY_DIR="$HOME/.local/share/mise/installs/ruby"
|
||||
OFFLINE_CACHE="/var/cache/omarchy/ruby"
|
||||
|
||||
mkdir -p "$MISE_RUBY_DIR"
|
||||
|
||||
if [[ ${OMARCHY_INSTALL_MODE:-offline} == "offline" ]]; then
|
||||
echo "Installing Ruby from offline cache..."
|
||||
tar -xzf "${OFFLINE_CACHE}/${RUBY_TARBALL}" -C "$MISE_RUBY_DIR"
|
||||
else
|
||||
echo "Downloading pre-built Ruby ${RUBY_VERSION}..."
|
||||
curl -fsSL "$RUBY_URL" | tar -xz -C "$MISE_RUBY_DIR"
|
||||
fi
|
||||
|
||||
mise use --global "ruby@${RUBY_VERSION}"
|
||||
fi
|
||||
|
||||
9
install/config/mise-work.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
# Add ./bin to path for all items in ~/Work
|
||||
mkdir -p "$HOME/Work"
|
||||
|
||||
cat >"$HOME/Work/.mise.toml" <<'EOF'
|
||||
[env]
|
||||
_.path = "{{ cwd }}/bin"
|
||||
EOF
|
||||
|
||||
mise trust ~/Work/.mise.toml
|
||||
2
install/config/ssh-flakiness.sh
Executable file → Normal file
@@ -1,4 +1,2 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Solve common flakiness with SSH
|
||||
echo "net.ipv4.tcp_mtu_probing=1" | sudo tee -a /etc/sysctl.d/99-sysctl.conf
|
||||
|
||||
2
install/config/sudoless-asdcontrol.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
7
install/config/theme.sh
Executable file → Normal file
@@ -1,13 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
|
||||
|
||||
# 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
|
||||
sudo gtk-update-icon-cache /usr/share/icons/Yaru
|
||||
|
||||
# Setup theme links
|
||||
mkdir -p ~/.config/omarchy/themes
|
||||
|
||||
2
install/config/timezones.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
|
||||
2
install/config/xcompose.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set default XCompose that is triggered with CapsLock
|
||||
tee ~/.XCompose >/dev/null <<EOF
|
||||
include "%H/.local/share/omarchy/default/xcompose"
|
||||
|
||||
2
install/first-run/battery-monitor.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ls /sys/class/power_supply/BAT* &>/dev/null; then
|
||||
# This computer runs on a battery
|
||||
powerprofilesctl set balanced || true
|
||||
|
||||
5
install/first-run/firewall.sh
Executable file → Normal file
@@ -1,5 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Allow nothing in, everything out
|
||||
sudo ufw default deny incoming
|
||||
sudo ufw default allow outgoing
|
||||
@@ -17,6 +15,9 @@ sudo ufw allow in proto udp from 172.16.0.0/12 to 172.17.0.1 port 53 comment 'al
|
||||
# Turn on the firewall
|
||||
sudo ufw --force enable
|
||||
|
||||
# Enable UFW systemd service to start on boot
|
||||
sudo systemctl enable ufw
|
||||
|
||||
# Turn on Docker protections
|
||||
sudo ufw-docker install
|
||||
sudo ufw reload
|
||||
|
||||
5
install/first-run/gnome-theme.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
|
||||
|
||||
sudo gtk-update-icon-cache /usr/share/icons/Yaru
|
||||
4
install/helpers/all.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
source $OMARCHY_INSTALL/helpers/chroot.sh
|
||||
source $OMARCHY_INSTALL/helpers/presentation.sh
|
||||
source $OMARCHY_INSTALL/helpers/errors.sh
|
||||
source $OMARCHY_INSTALL/helpers/logging.sh
|
||||
3
install/preflight/chroot.sh → install/helpers/chroot.sh
Executable file → Normal file
@@ -6,3 +6,6 @@ chrootable_systemctl_enable() {
|
||||
sudo systemctl enable --now $1
|
||||
fi
|
||||
}
|
||||
|
||||
# Export the function so it's available in subshells
|
||||
export -f chrootable_systemctl_enable
|
||||
159
install/helpers/errors.sh
Normal file
@@ -0,0 +1,159 @@
|
||||
# Directs user to Omarchy Discord
|
||||
QR_CODE='
|
||||
█▀▀▀▀▀█ ▄ ▄ ▀▄▄▄█ █▀▀▀▀▀█
|
||||
█ ███ █ ▄▄▄▄▀▄▀▄▀ █ ███ █
|
||||
█ ▀▀▀ █ ▄█ ▄█▄▄▀ █ ▀▀▀ █
|
||||
▀▀▀▀▀▀▀ ▀▄█ █ █ █ ▀▀▀▀▀▀▀
|
||||
▀▀█▀▀▄▀▀▀▀▄█▀▀█ ▀ █ ▀ █
|
||||
█▄█ ▄▄▀▄▄ ▀ ▄ ▀█▄▄▄▄ ▀ ▀█
|
||||
▄ ▄▀█ ▀▄▀▀▀▄ ▄█▀▄█▀▄▀▄▀█▀
|
||||
█ ▄▄█▄▀▄█ ▄▄▄ ▀ ▄▀██▀ ▀█
|
||||
▀ ▀ ▀ █ ▀▄ ▀▀█▀▀▀█▄▀
|
||||
█▀▀▀▀▀█ ▀█ ▄▀▀ █ ▀ █▄▀██
|
||||
█ ███ █ █▀▄▄▀ █▀███▀█▄██▄
|
||||
█ ▀▀▀ █ ██ ▀ █▄█ ▄▄▄█▀ █
|
||||
▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀▀▀▀'
|
||||
|
||||
# Track if we're already handling an error to prevent double-trapping
|
||||
ERROR_HANDLING=false
|
||||
|
||||
# Cursor is usually hidden while we install
|
||||
show_cursor() {
|
||||
printf "\033[?25h"
|
||||
}
|
||||
|
||||
# Display truncated log lines from the install log
|
||||
show_log_tail() {
|
||||
if [[ -f $OMARCHY_INSTALL_LOG_FILE ]]; then
|
||||
local log_lines=$(($TERM_HEIGHT - $LOGO_HEIGHT - 35))
|
||||
local max_line_width=$((LOGO_WIDTH - 4))
|
||||
|
||||
tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" | while IFS= read -r line; do
|
||||
if ((${#line} > max_line_width)); then
|
||||
local truncated_line="${line:0:$max_line_width}..."
|
||||
else
|
||||
local truncated_line="$line"
|
||||
fi
|
||||
|
||||
gum style "$truncated_line"
|
||||
done
|
||||
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
# Display the failed command or script name
|
||||
show_failed_script_or_command() {
|
||||
if [[ -n ${CURRENT_SCRIPT:-} ]]; then
|
||||
gum style "Failed script: $CURRENT_SCRIPT"
|
||||
else
|
||||
# Truncate long command lines to fit the display
|
||||
local cmd="$BASH_COMMAND"
|
||||
local max_cmd_width=$((LOGO_WIDTH - 4))
|
||||
|
||||
if ((${#cmd} > max_cmd_width)); then
|
||||
cmd="${cmd:0:$max_cmd_width}..."
|
||||
fi
|
||||
|
||||
gum style "$cmd"
|
||||
fi
|
||||
}
|
||||
|
||||
# Save original stdout and stderr for trap to use
|
||||
save_original_outputs() {
|
||||
exec 3>&1 4>&2
|
||||
}
|
||||
|
||||
# Restore stdout and stderr to original (saved in FD 3 and 4)
|
||||
# This ensures output goes to screen, not log file
|
||||
restore_outputs() {
|
||||
if [ -e /proc/self/fd/3 ] && [ -e /proc/self/fd/4 ]; then
|
||||
exec 1>&3 2>&4
|
||||
fi
|
||||
}
|
||||
|
||||
# Error handler
|
||||
catch_errors() {
|
||||
# Prevent recursive error handling
|
||||
if [[ $ERROR_HANDLING == true ]]; then
|
||||
return
|
||||
else
|
||||
ERROR_HANDLING=true
|
||||
fi
|
||||
|
||||
# Store exit code immediately before it gets overwritten
|
||||
local exit_code=$?
|
||||
|
||||
stop_log_output
|
||||
restore_outputs
|
||||
|
||||
clear_logo
|
||||
show_cursor
|
||||
|
||||
gum style --foreground 1 --padding "1 0 1 $PADDING_LEFT" "Omarchy installation stopped!"
|
||||
show_log_tail
|
||||
|
||||
gum style "This command halted with exit code $exit_code:"
|
||||
show_failed_script_or_command
|
||||
|
||||
gum style "$QR_CODE"
|
||||
echo
|
||||
gum style "Get help from the community via QR code or at https://discord.gg/tXFUdasqhY"
|
||||
|
||||
# Offer options menu
|
||||
while true; do
|
||||
options=()
|
||||
|
||||
# If online install, show retry first
|
||||
if [[ ${OMARCHY_INSTALL_MODE:-offline} == "online" ]]; then
|
||||
options+=("Retry installation")
|
||||
fi
|
||||
|
||||
# Add upload option if internet is available
|
||||
if ping -c 1 -W 1 1.1.1.1 >/dev/null 2>&1; then
|
||||
options+=("Upload log for support")
|
||||
fi
|
||||
|
||||
# Add remaining options
|
||||
options+=("View full log")
|
||||
options+=("Exit")
|
||||
|
||||
choice=$(gum choose "${options[@]}" --header "What would you like to do?" --height 6 --padding "1 $PADDING_LEFT")
|
||||
|
||||
case "$choice" in
|
||||
"Retry installation")
|
||||
bash ~/.local/share/omarchy/install.sh
|
||||
break
|
||||
;;
|
||||
"View full log")
|
||||
less "$OMARCHY_INSTALL_LOG_FILE"
|
||||
;;
|
||||
"Upload log for support")
|
||||
omarchy-upload-install-log
|
||||
;;
|
||||
"Exit" | "")
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Exit handler - ensures cleanup happens on any exit
|
||||
exit_handler() {
|
||||
local exit_code=$?
|
||||
|
||||
# Only run if we're exiting with an error and haven't already handled it
|
||||
if [[ $exit_code -ne 0 && $ERROR_HANDLING != true ]]; then
|
||||
catch_errors
|
||||
else
|
||||
stop_log_output
|
||||
show_cursor
|
||||
fi
|
||||
}
|
||||
|
||||
# Set up traps
|
||||
trap catch_errors ERR INT TERM
|
||||
trap exit_handler EXIT
|
||||
|
||||
# Save original outputs in case we trap
|
||||
save_original_outputs
|
||||
134
install/helpers/logging.sh
Normal file
@@ -0,0 +1,134 @@
|
||||
start_log_output() {
|
||||
local ANSI_SAVE_CURSOR="\033[s"
|
||||
local ANSI_RESTORE_CURSOR="\033[u"
|
||||
local ANSI_CLEAR_LINE="\033[2K"
|
||||
local ANSI_HIDE_CURSOR="\033[?25l"
|
||||
local ANSI_RESET="\033[0m"
|
||||
local ANSI_GRAY="\033[90m"
|
||||
|
||||
# Save cursor position and hide cursor
|
||||
printf $ANSI_SAVE_CURSOR
|
||||
printf $ANSI_HIDE_CURSOR
|
||||
|
||||
(
|
||||
local log_lines=20
|
||||
local max_line_width=$((LOGO_WIDTH - 4))
|
||||
|
||||
while true; do
|
||||
# Read the last N lines into an array
|
||||
mapfile -t current_lines < <(tail -n $log_lines "$OMARCHY_INSTALL_LOG_FILE" 2>/dev/null)
|
||||
|
||||
# Build complete output buffer with escape sequences
|
||||
output=""
|
||||
for ((i = 0; i < log_lines; i++)); do
|
||||
line="${current_lines[i]:-}"
|
||||
|
||||
# Truncate if needed
|
||||
if [ ${#line} -gt $max_line_width ]; then
|
||||
line="${line:0:$max_line_width}..."
|
||||
fi
|
||||
|
||||
# Add clear line escape and formatted output for each line
|
||||
if [ -n "$line" ]; then
|
||||
output+="${ANSI_CLEAR_LINE}${ANSI_GRAY}${PADDING_LEFT_SPACES} → ${line}${ANSI_RESET}\n"
|
||||
else
|
||||
output+="${ANSI_CLEAR_LINE}${PADDING_LEFT_SPACES}\n"
|
||||
fi
|
||||
done
|
||||
|
||||
printf "${ANSI_RESTORE_CURSOR}%b" "$output"
|
||||
|
||||
sleep 0.1
|
||||
done
|
||||
) &
|
||||
monitor_pid=$!
|
||||
}
|
||||
|
||||
stop_log_output() {
|
||||
if [ -n "${monitor_pid:-}" ]; then
|
||||
kill $monitor_pid 2>/dev/null || true
|
||||
wait $monitor_pid 2>/dev/null || true
|
||||
unset monitor_pid
|
||||
fi
|
||||
}
|
||||
|
||||
start_install_log() {
|
||||
sudo touch "$OMARCHY_INSTALL_LOG_FILE"
|
||||
sudo chmod 666 "$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
export OMARCHY_START_TIME=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
|
||||
echo "=== Omarchy Installation Started: $OMARCHY_START_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
start_log_output
|
||||
}
|
||||
|
||||
stop_install_log() {
|
||||
stop_log_output
|
||||
show_cursor
|
||||
|
||||
if [[ -n ${OMARCHY_INSTALL_LOG_FILE:-} ]]; then
|
||||
OMARCHY_END_TIME=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
echo "=== Omarchy Installation Completed: $OMARCHY_END_TIME ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
echo "" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
echo "=== Installation Time Summary ===" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
if [ -f "/var/log/archinstall/install.log" ]; then
|
||||
ARCHINSTALL_START=$(grep -m1 '^\[' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true)
|
||||
ARCHINSTALL_END=$(grep 'Installation completed without any errors' /var/log/archinstall/install.log 2>/dev/null | sed 's/^\[\([^]]*\)\].*/\1/' || true)
|
||||
|
||||
if [ -n "$ARCHINSTALL_START" ] && [ -n "$ARCHINSTALL_END" ]; then
|
||||
ARCH_START_EPOCH=$(date -d "$ARCHINSTALL_START" +%s)
|
||||
ARCH_END_EPOCH=$(date -d "$ARCHINSTALL_END" +%s)
|
||||
ARCH_DURATION=$((ARCH_END_EPOCH - ARCH_START_EPOCH))
|
||||
|
||||
ARCH_MINS=$((ARCH_DURATION / 60))
|
||||
ARCH_SECS=$((ARCH_DURATION % 60))
|
||||
|
||||
echo "Archinstall: ${ARCH_MINS}m ${ARCH_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$OMARCHY_START_TIME" ]; then
|
||||
OMARCHY_START_EPOCH=$(date -d "$OMARCHY_START_TIME" +%s)
|
||||
OMARCHY_END_EPOCH=$(date -d "$OMARCHY_END_TIME" +%s)
|
||||
OMARCHY_DURATION=$((OMARCHY_END_EPOCH - OMARCHY_START_EPOCH))
|
||||
|
||||
OMARCHY_MINS=$((OMARCHY_DURATION / 60))
|
||||
OMARCHY_SECS=$((OMARCHY_DURATION % 60))
|
||||
|
||||
echo "Omarchy: ${OMARCHY_MINS}m ${OMARCHY_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
if [ -n "$ARCH_DURATION" ]; then
|
||||
TOTAL_DURATION=$((ARCH_DURATION + OMARCHY_DURATION))
|
||||
TOTAL_MINS=$((TOTAL_DURATION / 60))
|
||||
TOTAL_SECS=$((TOTAL_DURATION % 60))
|
||||
echo "Total: ${TOTAL_MINS}m ${TOTAL_SECS}s" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
echo "=================================" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
echo "Rebooting system..." >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
run_logged() {
|
||||
local script="$1"
|
||||
|
||||
export CURRENT_SCRIPT="$script"
|
||||
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting: $script" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
|
||||
# Use bash -c to create a clean subshell
|
||||
bash -c "source '$script'" </dev/null >>"$OMARCHY_INSTALL_LOG_FILE" 2>&1
|
||||
|
||||
local exit_code=$?
|
||||
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Completed: $script" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
unset CURRENT_SCRIPT
|
||||
else
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Failed: $script (exit code: $exit_code)" >>"$OMARCHY_INSTALL_LOG_FILE"
|
||||
fi
|
||||
|
||||
return $exit_code
|
||||
}
|
||||