mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Merge branch 'dev' into rc
This commit is contained in:
@@ -35,6 +35,7 @@ GROUP_DESCRIPTIONS[channel]="Omarchy release channel management"
|
||||
GROUP_DESCRIPTIONS[cmd]="Command and shortcut helpers"
|
||||
GROUP_DESCRIPTIONS[config]="System configuration helpers"
|
||||
GROUP_DESCRIPTIONS[debug]="Diagnostics and support logs"
|
||||
GROUP_DESCRIPTIONS[default]="Default application selection"
|
||||
GROUP_DESCRIPTIONS[dev]="Omarchy development tools"
|
||||
GROUP_DESCRIPTIONS[drive]="Drive selection and encryption"
|
||||
GROUP_DESCRIPTIONS[font]="Font management"
|
||||
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set the default browser for Omarchy and XDG handlers
|
||||
# omarchy:args=[chromium|chrome|brave|brave-origin|edge|firefox|zen]
|
||||
# omarchy:examples=omarchy default browser firefox | omarchy default browser brave
|
||||
|
||||
if (($# == 0)); then
|
||||
case "$(xdg-settings get default-web-browser)" in
|
||||
chromium.desktop) echo "chromium" ;;
|
||||
google-chrome.desktop) echo "chrome" ;;
|
||||
brave-browser.desktop) echo "brave" ;;
|
||||
brave-origin-beta.desktop) echo "brave-origin" ;;
|
||||
microsoft-edge.desktop) echo "edge" ;;
|
||||
firefox.desktop) echo "firefox" ;;
|
||||
zen.desktop) echo "zen" ;;
|
||||
*) xdg-settings get default-web-browser ;;
|
||||
esac
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
chromium) desktop_id="chromium.desktop"; name="Chromium"; glyph="" ;;
|
||||
chrome) desktop_id="google-chrome.desktop"; name="Chrome"; glyph="" ;;
|
||||
brave) desktop_id="brave-browser.desktop"; name="Brave"; glyph="" ;;
|
||||
brave-origin) desktop_id="brave-origin-beta.desktop"; name="Brave Origin"; glyph="" ;;
|
||||
edge) desktop_id="microsoft-edge.desktop"; name="Edge"; glyph="" ;;
|
||||
firefox) desktop_id="firefox.desktop"; name="Firefox"; glyph="" ;;
|
||||
zen) desktop_id="zen.desktop"; name="Zen"; glyph="" ;;
|
||||
*)
|
||||
echo "Usage: omarchy-default-browser <chromium|chrome|brave|brave-origin|edge|firefox|zen>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
xdg-settings set default-web-browser "$desktop_id"
|
||||
xdg-mime default "$desktop_id" x-scheme-handler/http
|
||||
xdg-mime default "$desktop_id" x-scheme-handler/https
|
||||
xdg-mime default "$desktop_id" text/html
|
||||
|
||||
notify-send -u low "$glyph $name is now the default browser"
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set the default editor for $EDITOR
|
||||
# omarchy:args=[code|cursor|zed|sublime_text|helix|vim|emacs|nvim]
|
||||
# omarchy:examples=omarchy default editor | omarchy default editor code | omarchy default editor helix
|
||||
|
||||
if (($# == 0)); then
|
||||
sed -n 's/^export EDITOR=//p' ~/.config/uwsm/default | head -n 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
code) editor="code"; name="VSCode"; glyph="" ;;
|
||||
cursor) editor="cursor"; name="Cursor"; glyph="" ;;
|
||||
zed) editor="zed"; name="Zed"; glyph="" ;;
|
||||
sublime_text) editor="sublime_text"; name="Sublime Text"; glyph="" ;;
|
||||
helix) editor="helix"; name="Helix"; glyph="" ;;
|
||||
vim) editor="vim"; name="Vim"; glyph="" ;;
|
||||
emacs) editor="emacs"; name="Emacs"; glyph="" ;;
|
||||
nvim) editor="nvim"; name="Neovim"; glyph="" ;;
|
||||
*)
|
||||
echo "Usage: omarchy-default-editor <code|cursor|zed|sublime_text|helix|vim|emacs|nvim>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
sed -i "s/^export EDITOR=.*/export EDITOR=$editor/" ~/.config/uwsm/default
|
||||
|
||||
export EDITOR="$editor"
|
||||
notify-send -u low "$glyph $name is now the default editor" " Effective after logging out"
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set the default terminal used by xdg-terminal-exec
|
||||
# omarchy:args=[alacritty|foot|ghostty|kitty]
|
||||
# omarchy:examples=omarchy default terminal ghostty | omarchy default terminal kitty
|
||||
|
||||
if (($# == 0)); then
|
||||
desktop_id=$(grep -vE '^($|#)' ~/.config/xdg-terminals.list 2>/dev/null | head -n 1)
|
||||
case "$desktop_id" in
|
||||
Alacritty.desktop) echo "alacritty" ;;
|
||||
foot.desktop) echo "foot" ;;
|
||||
com.mitchellh.ghostty.desktop) echo "ghostty" ;;
|
||||
kitty.desktop) echo "kitty" ;;
|
||||
*) echo "$desktop_id" ;;
|
||||
esac
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
alacritty) desktop_id="Alacritty.desktop"; name="Alacritty"; glyph="" ;;
|
||||
foot) desktop_id="foot.desktop"; name="Foot"; glyph="" ;;
|
||||
ghostty) desktop_id="com.mitchellh.ghostty.desktop"; name="Ghostty"; glyph="" ;;
|
||||
kitty) desktop_id="kitty.desktop"; name="Kitty"; glyph="" ;;
|
||||
*)
|
||||
echo "Usage: omarchy-default-terminal <alacritty|foot|ghostty|kitty>"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
cat >~/.config/xdg-terminals.list <<EOF
|
||||
# Terminal emulator preference order for xdg-terminal-exec
|
||||
# The first found and valid terminal will be used
|
||||
$desktop_id
|
||||
EOF
|
||||
|
||||
notify-send -u low "$glyph $name is now the default terminal"
|
||||
@@ -1,24 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Install a supported browser and make it the default
|
||||
# omarchy:summary=Install a supported browser
|
||||
# omarchy:args=<chrome|brave|brave-origin|edge|firefox|zen>
|
||||
# omarchy:examples=omarchy install browser firefox | omarchy install browser brave
|
||||
|
||||
make_default() {
|
||||
xdg-settings set default-web-browser "$1"
|
||||
xdg-mime default "$1" x-scheme-handler/http
|
||||
xdg-mime default "$1" x-scheme-handler/https
|
||||
xdg-mime default "$1" text/html
|
||||
}
|
||||
|
||||
setup_policy_directory() {
|
||||
sudo mkdir -p "$1"
|
||||
sudo chmod a+rw "$1"
|
||||
}
|
||||
|
||||
announce_default_browser() {
|
||||
announce_browser_installed() {
|
||||
echo ""
|
||||
echo "$1 is now the default browser. Start it with Super + Shift + Return."
|
||||
echo "$1 browser installed. Make it the default via Setup > Defaults > Browser."
|
||||
}
|
||||
|
||||
copy_chromium_flags() {
|
||||
@@ -45,9 +38,8 @@ chrome)
|
||||
|
||||
setup_policy_directory /etc/opt/chrome/policies/managed
|
||||
copy_chromium_flags ~/.config/chrome-flags.conf
|
||||
make_default google-chrome.desktop
|
||||
omarchy-theme-set-browser
|
||||
announce_default_browser "Chrome"
|
||||
announce_browser_installed "Chrome"
|
||||
;;
|
||||
edge)
|
||||
echo "Installing Edge..."
|
||||
@@ -55,9 +47,8 @@ edge)
|
||||
|
||||
setup_policy_directory /etc/opt/edge/policies/managed
|
||||
copy_chromium_flags ~/.config/microsoft-edge-stable-flags.conf
|
||||
make_default microsoft-edge.desktop
|
||||
omarchy-theme-set-browser
|
||||
announce_default_browser "Edge"
|
||||
announce_browser_installed "Edge"
|
||||
;;
|
||||
brave)
|
||||
echo "Installing Brave..."
|
||||
@@ -65,9 +56,8 @@ brave)
|
||||
|
||||
setup_policy_directory /etc/brave/policies/managed
|
||||
copy_chromium_flags ~/.config/brave-flags.conf
|
||||
make_default brave-browser.desktop
|
||||
omarchy-theme-set-browser
|
||||
announce_default_browser "Brave"
|
||||
announce_browser_installed "Brave"
|
||||
;;
|
||||
brave-origin)
|
||||
echo "Installing Brave Origin..."
|
||||
@@ -77,9 +67,8 @@ brave-origin)
|
||||
mkdir -p ~/.config
|
||||
# FIXME: Use normal chromium flags when Brave Origin wrapper has been fixed
|
||||
echo "--load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url" > ~/.config/brave-origin-beta-flags.conf
|
||||
make_default brave-origin-beta.desktop
|
||||
omarchy-theme-set-browser
|
||||
announce_default_browser "Brave Origin"
|
||||
announce_browser_installed "Brave Origin"
|
||||
;;
|
||||
firefox)
|
||||
echo "Installing Firefox..."
|
||||
@@ -87,8 +76,7 @@ firefox)
|
||||
|
||||
setup_firefox_preferences /usr/lib/firefox/distribution
|
||||
setup_firefox_wayland
|
||||
make_default firefox.desktop
|
||||
announce_default_browser "Firefox"
|
||||
announce_browser_installed "Firefox"
|
||||
;;
|
||||
zen)
|
||||
echo "Installing Zen..."
|
||||
@@ -96,8 +84,7 @@ zen)
|
||||
|
||||
setup_firefox_preferences /opt/zen-browser/distribution
|
||||
setup_firefox_wayland
|
||||
make_default zen.desktop
|
||||
announce_default_browser "Zen"
|
||||
announce_browser_installed "Zen"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-install-browser <chrome|brave|brave-origin|edge|firefox|zen>"
|
||||
|
||||
+112
-5
@@ -277,7 +277,7 @@ show_setup_menu() {
|
||||
local options=" Audio\n Wifi\n Bluetooth\n Power Profile\n System Sleep\n Monitors"
|
||||
[[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings"
|
||||
[[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input"
|
||||
options="$options\n DNS\n Security\n Config"
|
||||
options="$options\n Defaults\n DNS\n Security\n Config"
|
||||
|
||||
case $(menu "Setup" "$options") in
|
||||
*Audio*) omarchy-launch-audio ;;
|
||||
@@ -288,6 +288,7 @@ show_setup_menu() {
|
||||
*Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;;
|
||||
*Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;;
|
||||
*Input*) open_in_editor ~/.config/hypr/input.conf ;;
|
||||
*Defaults*) show_setup_default_menu ;;
|
||||
*DNS*) present_terminal omarchy-setup-dns ;;
|
||||
*Security*) show_setup_security_menu ;;
|
||||
*Config*) show_setup_config_menu ;;
|
||||
@@ -313,9 +314,114 @@ show_setup_security_menu() {
|
||||
esac
|
||||
}
|
||||
|
||||
show_setup_default_menu() {
|
||||
case $(menu "Default" " Browser\n Terminal\n Editor") in
|
||||
*Browser*) show_setup_default_browser_menu ;;
|
||||
*Terminal*) show_setup_default_terminal_menu ;;
|
||||
*Editor*) show_setup_default_editor_menu ;;
|
||||
*) show_setup_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
browser_desktop_exists() {
|
||||
[[ -f ~/.local/share/applications/$1 || -f ~/.nix-profile/share/applications/$1 || -f /usr/share/applications/$1 ]]
|
||||
}
|
||||
|
||||
show_setup_default_browser_menu() {
|
||||
local options=""
|
||||
browser_desktop_exists chromium.desktop && options="$options Chromium"
|
||||
browser_desktop_exists google-chrome.desktop && options="${options:+$options\n} Chrome"
|
||||
browser_desktop_exists brave-browser.desktop && options="${options:+$options\n} Brave"
|
||||
browser_desktop_exists brave-origin-beta.desktop && options="${options:+$options\n} Brave Origin"
|
||||
browser_desktop_exists microsoft-edge.desktop && options="${options:+$options\n} Edge"
|
||||
browser_desktop_exists firefox.desktop && options="${options:+$options\n} Firefox"
|
||||
browser_desktop_exists zen.desktop && options="${options:+$options\n} Zen"
|
||||
|
||||
local current=""
|
||||
case "$(omarchy-default-browser)" in
|
||||
chromium) current=" Chromium" ;;
|
||||
chrome) current=" Chrome" ;;
|
||||
brave) current=" Brave" ;;
|
||||
brave-origin) current=" Brave Origin" ;;
|
||||
edge) current=" Edge" ;;
|
||||
firefox) current=" Firefox" ;;
|
||||
zen) current=" Zen" ;;
|
||||
esac
|
||||
|
||||
case $(menu "Default Browser" "$options" "" "$current") in
|
||||
*Chromium*) omarchy-default-browser chromium ;;
|
||||
*Chrome*) omarchy-default-browser chrome ;;
|
||||
*"Brave Origin"*) omarchy-default-browser brave-origin ;;
|
||||
*Brave*) omarchy-default-browser brave ;;
|
||||
*Edge*) omarchy-default-browser edge ;;
|
||||
*Firefox*) omarchy-default-browser firefox ;;
|
||||
*Zen*) omarchy-default-browser zen ;;
|
||||
*) show_setup_default_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_setup_default_terminal_menu() {
|
||||
local options=""
|
||||
omarchy-cmd-present alacritty && options="$options Alacritty"
|
||||
omarchy-cmd-present foot && options="${options:+$options\n} Foot"
|
||||
omarchy-cmd-present ghostty && options="${options:+$options\n} Ghostty"
|
||||
omarchy-cmd-present kitty && options="${options:+$options\n} Kitty"
|
||||
|
||||
local current=""
|
||||
case "$(omarchy-default-terminal)" in
|
||||
alacritty) current=" Alacritty" ;;
|
||||
foot) current=" Foot" ;;
|
||||
ghostty) current=" Ghostty" ;;
|
||||
kitty) current=" Kitty" ;;
|
||||
esac
|
||||
|
||||
case $(menu "Default Terminal" "$options" "" "$current") in
|
||||
*Alacritty*) omarchy-default-terminal alacritty ;;
|
||||
*Foot*) omarchy-default-terminal foot ;;
|
||||
*Ghostty*) omarchy-default-terminal ghostty ;;
|
||||
*Kitty*) omarchy-default-terminal kitty ;;
|
||||
*) show_setup_default_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_setup_default_editor_menu() {
|
||||
local options=""
|
||||
omarchy-cmd-present nvim && options="$options Neovim"
|
||||
omarchy-cmd-present code && options="${options:+$options\n} VSCode"
|
||||
omarchy-cmd-present cursor && options="${options:+$options\n} Cursor"
|
||||
omarchy-cmd-present zed && options="${options:+$options\n} Zed"
|
||||
omarchy-cmd-present sublime_text && options="${options:+$options\n} Sublime Text"
|
||||
omarchy-cmd-present helix && options="${options:+$options\n} Helix"
|
||||
omarchy-cmd-present vim && options="${options:+$options\n} Vim"
|
||||
omarchy-cmd-present emacs && options="${options:+$options\n} Emacs"
|
||||
|
||||
local current=""
|
||||
case "$(omarchy-default-editor)" in
|
||||
nvim) current=" Neovim" ;;
|
||||
code) current=" VSCode" ;;
|
||||
cursor) current=" Cursor" ;;
|
||||
zed) current=" Zed" ;;
|
||||
sublime_text) current=" Sublime Text" ;;
|
||||
helix) current=" Helix" ;;
|
||||
vim) current=" Vim" ;;
|
||||
emacs) current=" Emacs" ;;
|
||||
esac
|
||||
|
||||
case $(menu "Default Editor" "$options" "" "$current") in
|
||||
*Neovim*) omarchy-default-editor nvim ;;
|
||||
*VSCode*) omarchy-default-editor code ;;
|
||||
*Cursor*) omarchy-default-editor cursor ;;
|
||||
*Zed*) omarchy-default-editor zed ;;
|
||||
*Sublime*) omarchy-default-editor sublime_text ;;
|
||||
*Helix*) omarchy-default-editor helix ;;
|
||||
*Vim*) omarchy-default-editor vim ;;
|
||||
*Emacs*) omarchy-default-editor emacs ;;
|
||||
*) show_setup_default_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_setup_config_menu() {
|
||||
case $(menu "Setup" " Defaults\n Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n Walker\n Waybar\n XCompose") in
|
||||
*Defaults*) open_in_editor ~/.config/uwsm/default ;;
|
||||
case $(menu "Setup" " Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n Walker\n Waybar\n XCompose") in
|
||||
*Hyprland*) open_in_editor ~/.config/hypr/hyprland.conf ;;
|
||||
*Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && omarchy-restart-hypridle ;;
|
||||
*Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
|
||||
@@ -371,7 +477,7 @@ show_install_menu() {
|
||||
}
|
||||
|
||||
show_install_browser_menu() {
|
||||
case $(menu "Install" " Chrome\n Edge\n Brave\n Brave Origin\n Firefox\n Zen") in
|
||||
case $(menu "Install" " Chrome\n Edge\n Brave\n Brave Origin\n Firefox\n Zen") in
|
||||
*Chrome*) present_terminal "omarchy-install-browser chrome" ;;
|
||||
*Edge*) present_terminal "omarchy-install-browser edge" ;;
|
||||
*"Brave Origin"*) present_terminal "omarchy-install-browser brave-origin" ;;
|
||||
@@ -395,12 +501,13 @@ show_install_service_menu() {
|
||||
}
|
||||
|
||||
show_install_editor_menu() {
|
||||
case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Emacs") in
|
||||
case $(menu "Install" " VSCode\n Cursor\n Zed\n Sublime Text\n Helix\n Vim\n Emacs") in
|
||||
*VSCode*) present_terminal omarchy-install-vscode ;;
|
||||
*Cursor*) install_and_launch "Cursor" "cursor-bin" "cursor" ;;
|
||||
*Zed*) present_terminal omarchy-install-zed ;;
|
||||
*Sublime*) install_and_launch "Sublime Text" "sublime-text-4" "sublime_text" ;;
|
||||
*Helix*) present_terminal omarchy-install-helix ;;
|
||||
*Vim*) install "Vim" "vim" ;;
|
||||
*Emacs*) install "Emacs" "emacs-wayland" && systemctl --user enable --now emacs.service ;;
|
||||
*) show_install_menu ;;
|
||||
esac
|
||||
|
||||
@@ -23,4 +23,4 @@ format_temperature() {
|
||||
temperature=$(format_temperature "$temperature")
|
||||
wind=${wind//km\// km/}
|
||||
|
||||
echo "$(omarchy-weather-icon) $place · Temperature $temperature · Wind $wind"
|
||||
echo "$(omarchy-weather-icon) $place · Temp $temperature · Wind $wind"
|
||||
|
||||
Reference in New Issue
Block a user