Compare commits
2 Commits
fc529b368d
...
ghostty
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57e96e529a | ||
|
|
363be8e6fe |
@@ -1,9 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
24
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -1,24 +0,0 @@
|
|||||||
name: Bug
|
|
||||||
description: Report a validated bug -- NOT FOR SUPPORT REQUESTS
|
|
||||||
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?
|
|
||||||
description: Describe the issue, include steps to recreate it if possible, and attach the output of `omarchy-debug` if possible
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +0,0 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
|
||||||
- name: Suggestion
|
|
||||||
url: https://github.com/basecamp/omarchy/discussions/categories/suggestions
|
|
||||||
about: Suggest a new feature, change to existing feature, or other ideas in Discussions.
|
|
||||||
- name: Support
|
|
||||||
url: https://omarchy.org/discord
|
|
||||||
about: Need help? Join our Discord community for support with any issues. GitHub issues should be used for verified bugs only.
|
|
||||||
62
AGENTS.md
@@ -1,62 +0,0 @@
|
|||||||
# Style
|
|
||||||
|
|
||||||
- Two spaces for indentation, no tabs
|
|
||||||
- Use Bash syntax for conditionals: `[[ -f $file ]]`, not `[ -f "$file" ]`
|
|
||||||
|
|
||||||
# Command Naming
|
|
||||||
|
|
||||||
All commands start with `omarchy-`. Prefixes indicate purpose:
|
|
||||||
|
|
||||||
- `cmd-` - check if commands exist, misc utility commands
|
|
||||||
- `pkg-` - package management helpers
|
|
||||||
- `hw-` - hardware detection (return exit codes for use in conditionals)
|
|
||||||
- `refresh-` - copy default config to user's `~/.config/`
|
|
||||||
- `restart-` - restart a component
|
|
||||||
- `launch-` - open applications
|
|
||||||
- `install-` - install optional software
|
|
||||||
- `setup-` - interactive setup wizards
|
|
||||||
- `toggle-` - toggle features on/off
|
|
||||||
- `theme-` - theme management
|
|
||||||
- `update-` - update components
|
|
||||||
|
|
||||||
# Helper Commands
|
|
||||||
|
|
||||||
Use these instead of raw shell commands:
|
|
||||||
|
|
||||||
- `omarchy-cmd-missing` / `omarchy-cmd-present` - check for commands
|
|
||||||
- `omarchy-pkg-missing` / `omarchy-pkg-present` - check for packages
|
|
||||||
- `omarchy-pkg-add` - install packages (handles both pacman and AUR)
|
|
||||||
- `omarchy-hw-asus-rog` - detect ASUS ROG hardware (and similar `hw-*` commands)
|
|
||||||
|
|
||||||
# Config Structure
|
|
||||||
|
|
||||||
- `config/` - default configs copied to `~/.config/`
|
|
||||||
- `default/themed/*.tpl` - templates with `{{ variable }}` placeholders for theme colors
|
|
||||||
- `themes/*/colors.toml` - theme color definitions (accent, background, foreground, color0-15)
|
|
||||||
|
|
||||||
# Refresh Pattern
|
|
||||||
|
|
||||||
To copy a default config to user config with automatic backup:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
omarchy-refresh-config hypr/hyprlock.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
This copies `~/.local/share/omarchy/config/hypr/hyprlock.conf` to `~/.config/hypr/hyprlock.conf`.
|
|
||||||
|
|
||||||
# Migrations
|
|
||||||
|
|
||||||
To create a new migration, run `omarchy-dev-add-migration --no-edit`. This creates a migration file named after the unix timestamp of the last commit.
|
|
||||||
|
|
||||||
Migration format:
|
|
||||||
- No shebang line
|
|
||||||
- Start with an `echo` describing what the migration does
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```bash
|
|
||||||
echo "Disable fingerprint in hyprlock if fingerprint auth is not configured"
|
|
||||||
|
|
||||||
if omarchy-cmd-missing fprintd-list || ! fprintd-list "$USER" 2>/dev/null | grep -q "finger"; then
|
|
||||||
sed -i 's/fingerprint:enabled = .*/fingerprint:enabled = false/' ~/.config/hypr/hyprlock.conf
|
|
||||||
fi
|
|
||||||
```
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
# Omarchy
|
# Omarchy
|
||||||
|
|
||||||
Omarchy is a beautiful, modern & opinionated Linux distribution by DHH.
|
Turn a fresh Arch installation into a fully-configured, beautiful, and modern web development system based on Hyprland by running a single command. That's the one-line pitch for Omarchy (like it was for Omakub). No need to write bespoke configs for every essential tool just to get started or to be up on all the latest command-line tools. Omarchy is an opinionated take on what Linux can be at its best.
|
||||||
|
|
||||||
Read more at [omarchy.org](https://omarchy.org).
|
Read more at [omarchy.org](https://omarchy.org).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Omarchy is released under the [MIT License](https://opensource.org/licenses/MIT).
|
Omarchy is released under the [MIT License](https://opensource.org/licenses/MIT).
|
||||||
|
|
||||||
|
|||||||
11
applications/About.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=About
|
||||||
|
Comment=System information from Fastfetch
|
||||||
|
Exec=alacritty --class=About --title=About -e bash -c 'fastfetch; read -n 1 -s'
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=Arch
|
||||||
|
Categories=GTK;
|
||||||
|
StartupNotify=false
|
||||||
|
|
||||||
11
applications/Activity.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Activity
|
||||||
|
Comment=System activity from btop
|
||||||
|
Exec=alacritty --class=Activity --title=Activity -e btop
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=Activity
|
||||||
|
Categories=GTK;
|
||||||
|
StartupNotify=false
|
||||||
|
|
||||||
11
applications/Basecamp.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Basecamp
|
||||||
|
Comment=Basecamp Project Management
|
||||||
|
Exec=chromium --new-window --ozone-platform=wayland --app="https://launchpad.37signals.com" --name=Basecamp --class=Basecamp
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=Basecamp
|
||||||
|
Categories=GTK;
|
||||||
|
MimeType=text/html;text/xml;application/xhtml_xml;
|
||||||
|
StartupNotify=true
|
||||||
11
applications/Docker.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Docker
|
||||||
|
Comment=Manage Docker containers with LazyDocker
|
||||||
|
Exec=alacritty --class=Docker --title=Docker -e lazydocker
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=Docker
|
||||||
|
Categories=GTK;
|
||||||
|
StartupNotify=false
|
||||||
|
|
||||||
11
applications/HEY.desktop
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=HEY
|
||||||
|
Comment=HEY Email + Calendar
|
||||||
|
Exec=chromium --new-window --ozone-platform=wayland --app="https://app.hey.com" --name=HEY --class=HEY
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=HEY
|
||||||
|
Categories=GTK;
|
||||||
|
MimeType=text/html;text/xml;application/xhtml_xml;
|
||||||
|
StartupNotify=true
|
||||||
12
applications/Zoom.desktop
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Zoom
|
||||||
|
Comment=Zoom Video Conference
|
||||||
|
Exec=env QT_SCALE_FACTOR=2 /usr/bin/zoom %U
|
||||||
|
Icon=Zoom
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Encoding=UTF-8
|
||||||
|
Categories=Network;Application;
|
||||||
|
StartupWMClass=zoom
|
||||||
|
MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/zoomphonecall;x-scheme-handler/zoomphonesms;x-scheme-handler/zoomcontactcentercall;application/x-zoom
|
||||||
|
X-KDE-Protocols=zoommtg;zoomus;tel;callto;zoomphonecall;zoomphonesms;zoomcontactcentercall;
|
||||||
10
applications/blueberry.desktop
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Bluetooth
|
||||||
|
Comment=Configure Bluetooth settings
|
||||||
|
Icon=bluetooth
|
||||||
|
Exec=env GTK_THEME=Adwaita-dark blueberry
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=GTK;GNOME;Settings;HardwareSettings;X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;
|
||||||
|
StartupNotify=true
|
||||||
|
NotShowIn=GNOME;KDE;Unity;
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Hidden=true
|
|
||||||
BIN
applications/icons/Activity.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
applications/icons/Arch.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 75 KiB |
@@ -1,51 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Media Player
|
|
||||||
Name[ar]=مشغل وسائط mpv
|
|
||||||
Name[ca]=Reproductor multimèdia mpv
|
|
||||||
Name[cs]=mpv přehrávač
|
|
||||||
Name[da]=mpv-medieafspiller
|
|
||||||
Name[fr]=Lecteur multimédia mpv
|
|
||||||
Name[it]=Lettore multimediale mpv
|
|
||||||
Name[ja]=mpv メディアプレイヤー
|
|
||||||
Name[pl]=Odtwarzacz mpv
|
|
||||||
Name[ru]=Проигрыватель mpv
|
|
||||||
Name[tr]=mpv Ortam Oynatıcı
|
|
||||||
Name[zh_CN]=mpv 媒体播放器
|
|
||||||
Name[zh_TW]=mpv 媒體播放器
|
|
||||||
GenericName=Multimedia player
|
|
||||||
GenericName[ar]=مُشَغِّل وسائط متعددة
|
|
||||||
GenericName[cs]=Multimediální přehrávač
|
|
||||||
GenericName[da]=Multimedieafspiller
|
|
||||||
GenericName[fr]=Lecteur multimédia
|
|
||||||
GenericName[it]=Lettore multimediale
|
|
||||||
GenericName[ja]=マルチメディアプレイヤー
|
|
||||||
GenericName[ru]=Мультимедийный проигрыватель
|
|
||||||
GenericName[tr]=Çoklu ortam oynatıcı
|
|
||||||
GenericName[zh_CN]=多媒体播放器
|
|
||||||
GenericName[zh_TW]=多媒體播放器
|
|
||||||
Comment=Play movies and songs
|
|
||||||
Comment[ar]=شَغِّل الأفلام والأغاني
|
|
||||||
Comment[ca]=Reproduïu vídeos i cançons
|
|
||||||
Comment[cs]=Přehrává filmy a hudbu
|
|
||||||
Comment[da]=Afspil film og sange
|
|
||||||
Comment[de]=Filme und Musik abspielen
|
|
||||||
Comment[es]=Reproduzca vídeos y canciones
|
|
||||||
Comment[fr]=Lire des vidéos et des musiques
|
|
||||||
Comment[ja]=映画や音楽を再生する
|
|
||||||
Comment[it]=Riproduci video e canzoni
|
|
||||||
Comment[pl]=Odtwarzaj filmy i muzykę
|
|
||||||
Comment[ru]=Воспроизведение фильмов и музыки
|
|
||||||
Comment[tr]=Filmleri ve şarkıları oynatın
|
|
||||||
Comment[zh_CN]=播放电影和歌曲
|
|
||||||
Comment[zh_TW]=播放電影和歌曲
|
|
||||||
Icon=mpv
|
|
||||||
TryExec=mpv
|
|
||||||
Exec=mpv --player-operation-mode=pseudo-gui -- %U
|
|
||||||
Terminal=false
|
|
||||||
Categories=AudioVideo;Audio;Video;Player;TV;
|
|
||||||
MimeType=application/ogg;application/x-ogg;application/mxf;application/sdp;application/smil;application/x-smil;application/streamingmedia;application/x-streamingmedia;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/aac;audio/x-aac;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/aiff;audio/x-aiff;audio/m4a;audio/x-m4a;application/x-extension-m4a;audio/mp1;audio/x-mp1;audio/mp2;audio/x-mp2;audio/mp3;audio/x-mp3;audio/mpeg;audio/mpeg2;audio/mpeg3;audio/mpegurl;audio/x-mpegurl;audio/mpg;audio/x-mpg;audio/rn-mpeg;audio/musepack;audio/x-musepack;audio/ogg;audio/scpls;audio/x-scpls;audio/vnd.rn-realaudio;audio/wav;audio/x-pn-wav;audio/x-pn-windows-pcm;audio/x-realaudio;audio/x-pn-realaudio;audio/x-ms-wma;audio/x-pls;audio/x-wav;video/mpeg;video/x-mpeg2;video/x-mpeg3;video/mp4v-es;video/x-m4v;video/mp4;application/x-extension-mp4;video/divx;video/vnd.divx;video/msvideo;video/x-msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/x-ms-afs;video/x-ms-asf;audio/x-ms-asf;application/vnd.ms-asf;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-avi;video/avi;video/x-flic;video/fli;video/x-flc;video/flv;video/x-flv;video/x-theora;video/x-theora+ogg;video/x-matroska;video/mkv;audio/x-matroska;application/x-matroska;video/webm;audio/webm;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;video/x-ogm;video/x-ogm+ogg;application/x-ogm;application/x-ogm-audio;application/x-ogm-video;application/x-shorten;audio/x-shorten;audio/x-ape;audio/x-wavpack;audio/x-tta;audio/AMR;audio/ac3;audio/eac3;audio/amr-wb;video/mp2t;audio/flac;audio/mp4;application/x-mpegurl;video/vnd.mpegurl;application/vnd.apple.mpegurl;audio/x-pn-au;video/3gp;video/3gpp;video/3gpp2;audio/3gpp;audio/3gpp2;video/dv;audio/dv;audio/opus;audio/vnd.dts;audio/vnd.dts.hd;audio/x-adpcm;application/x-cue;audio/m3u;audio/vnd.wave;video/vnd.avi;
|
|
||||||
X-KDE-Protocols=appending,file,ftp,hls,http,https,mms,mpv,rtmp,rtmps,rtmpt,rtmpts,rtp,rtsp,rtsps,sftp,srt,srtp,webdav,webdavs
|
|
||||||
StartupWMClass=mpv
|
|
||||||
Keywords=mpv;media;player;video;audio;tv;
|
|
||||||
Keywords[ar]=mpv;إم بي في;ام بي في;وسائط;مشغل;فيديو;مرئية;صوتي;تلفاز;
|
|
||||||
12
applications/nvim.desktop
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Neovim
|
||||||
|
GenericName=Text Editor
|
||||||
|
Comment=Edit text files
|
||||||
|
Exec=alacritty -e nvim -- %F
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Keywords=Text;editor;
|
||||||
|
Icon=nvim
|
||||||
|
Categories=Utility;TextEditor;
|
||||||
|
StartupNotify=false
|
||||||
|
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||||
10
applications/org.pulseaudio.pavucontrol.desktop
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Volume Control
|
||||||
|
Comment=Adjust the volume level
|
||||||
|
Exec=env GTK_THEME=Adwaita-dark pavucontrol
|
||||||
|
Icon=multimedia-volume-control
|
||||||
|
StartupNotify=true
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;Audio;Mixer;GTK;Settings;X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;
|
||||||
|
Keywords=pavucontrol;PulseAudio;Microphone;Volume;Fade;Balance;Headset;Speakers;Headphones;Audio;Mixer;Output;Input;Devices;Playback;Recording;System Sounds;Sound Card;Settings;Preferences;
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Name=Typora
|
|
||||||
GenericName=Markdown Editor
|
|
||||||
Exec=typora --enable-wayland-ime %U
|
|
||||||
Icon=typora
|
|
||||||
Type=Application
|
|
||||||
StartupNotify=true
|
|
||||||
Categories=Office;WordProcessor;
|
|
||||||
MimeType=text/markdown;text/x-markdown;
|
|
||||||
|
|
||||||
14
applications/vlc.desktop
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=VLC media player
|
||||||
|
GenericName=Media player
|
||||||
|
Comment=Read, capture, broadcast your multimedia streams
|
||||||
|
Exec=env QT_SCALE_FACTOR=2 /usr/bin/vlc --started-from-file %U
|
||||||
|
TryExec=/usr/bin/vlc
|
||||||
|
Icon=vlc
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;Player;Recorder;
|
||||||
|
MimeType=application/ogg;application/x-ogg;audio/ogg;audio/vorbis;audio/x-vorbis;audio/x-vorbis+ogg;video/ogg;video/x-ogm;video/x-ogm+ogg;video/x-theora+ogg;video/x-theora;audio/x-speex;audio/opus;application/x-flac;audio/flac;audio/x-flac;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;audio/x-ms-wma;video/x-ms-asf;video/x-ms-asf-plugin;video/x-ms-asx;video/x-ms-wm;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvx;video/x-msvideo;audio/x-pn-windows-acm;video/divx;video/msvideo;video/vnd.divx;video/avi;video/x-avi;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;audio/vnd.rn-realaudio;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-real-audio;audio/x-realaudio;video/vnd.rn-realvideo;audio/mpeg;audio/mpg;audio/mp1;audio/mp2;audio/mp3;audio/x-mp1;audio/x-mp2;audio/x-mp3;audio/x-mpeg;audio/x-mpg;video/mp2t;video/mpeg;video/mpeg-system;video/x-mpeg;video/x-mpeg2;video/x-mpeg-system;application/mpeg4-iod;application/mpeg4-muxcodetable;application/x-extension-m4a;application/x-extension-mp4;audio/aac;audio/m4a;audio/mp4;audio/x-m4a;audio/x-aac;video/mp4;video/mp4v-es;video/x-m4v;application/x-quicktime-media-link;application/x-quicktimeplayer;video/quicktime;application/x-matroska;audio/x-matroska;video/x-matroska;video/webm;audio/webm;audio/3gpp;audio/3gpp2;audio/AMR;audio/AMR-WB;video/3gp;video/3gpp;video/3gpp2;x-scheme-handler/mms;x-scheme-handler/mmsh;x-scheme-handler/rtsp;x-scheme-handler/rtp;x-scheme-handler/rtmp;x-scheme-handler/icy;x-scheme-handler/icyx;application/x-cd-image;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;application/ram;application/xspf+xml;audio/mpegurl;audio/x-mpegurl;audio/scpls;audio/x-scpls;text/google-video-pointer;text/x-google-video-pointer;video/vnd.mpegurl;application/vnd.apple.mpegurl;application/vnd.ms-asf;application/vnd.ms-wpl;application/sdp;audio/dv;video/dv;audio/x-aiff;audio/x-pn-aiff;video/x-anim;video/x-nsv;video/fli;video/flv;video/x-flc;video/x-fli;video/x-flv;audio/wav;audio/x-pn-au;audio/x-pn-wav;audio/x-wav;audio/x-adpcm;audio/ac3;audio/eac3;audio/vnd.dts;audio/vnd.dts.hd;audio/vnd.dolby.heaac.1;audio/vnd.dolby.heaac.2;audio/vnd.dolby.mlp;audio/basic;audio/midi;audio/x-ape;audio/x-gsm;audio/x-musepack;audio/x-tta;audio/x-wavpack;audio/x-shorten;application/x-shockwave-flash;application/x-flash-video;misc/ultravox;image/vnd.rn-realpix;audio/x-it;audio/x-mod;audio/x-s3m;audio/x-xm;application/mxf;
|
||||||
|
X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb
|
||||||
|
Keywords=Player;Capture;DVD;Audio;Video;Server;Broadcast;
|
||||||
7
bin/apple-display-brightness
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)"
|
||||||
|
else
|
||||||
|
sudo asdcontrol $(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1) -- "$1"
|
||||||
|
fi
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Designed to be run by systemd timer every 30 seconds and alerts if battery is low
|
|
||||||
|
|
||||||
BATTERY_THRESHOLD=10
|
|
||||||
NOTIFICATION_FLAG="/run/user/$UID/omarchy_battery_notified"
|
|
||||||
BATTERY_LEVEL=$(omarchy-battery-remaining)
|
|
||||||
BATTERY_STATE=$(upower -i $(upower -e | grep 'BAT') | grep -E "state" | awk '{print $2}')
|
|
||||||
|
|
||||||
send_notification() {
|
|
||||||
notify-send -u critical " Time to recharge!" "Battery is down to ${1}%" -i battery-caution -t 30000
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -n "$BATTERY_LEVEL" && "$BATTERY_LEVEL" =~ ^[0-9]+$ ]]; then
|
|
||||||
if [[ $BATTERY_STATE == "discharging" && $BATTERY_LEVEL -le $BATTERY_THRESHOLD ]]; then
|
|
||||||
if [[ ! -f $NOTIFICATION_FLAG ]]; then
|
|
||||||
send_notification $BATTERY_LEVEL
|
|
||||||
touch $NOTIFICATION_FLAG
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
rm -f $NOTIFICATION_FLAG
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns true if a battery is present on the system.
|
|
||||||
# Used by the battery monitor and other battery-related checks.
|
|
||||||
|
|
||||||
for bat in /sys/class/power_supply/BAT*; do
|
|
||||||
[[ -r "$bat/present" ]] &&
|
|
||||||
[[ "$(cat "$bat/present")" == "1" ]] &&
|
|
||||||
[[ "$(cat "$bat/type")" == "Battery" ]] &&
|
|
||||||
exit 0
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns the battery percentage remaining as an integer.
|
|
||||||
# Used by the battery monitor and the Ctrl + Shift + Super + B hotkey.
|
|
||||||
|
|
||||||
upower -i $(upower -e | grep BAT) \
|
|
||||||
| awk -F: '/percentage/ {
|
|
||||||
gsub(/[%[:space:]]/, "", $2);
|
|
||||||
val=$2;
|
|
||||||
printf("%d\n", (val+0.5))
|
|
||||||
exit
|
|
||||||
}'
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the branch for Omarchy's git repository.
|
|
||||||
|
|
||||||
if (($# == 0)); then
|
|
||||||
echo "Usage: omarchy-branch-set [master|rc|dev]"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
branch="$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$branch" != "master" && "$branch" != "rc" && "$branch" != "dev" ]]; then
|
|
||||||
echo "Error: Invalid branch '$branch'. Must be one of: master, rc, dev"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
git -C $OMARCHY_PATH switch $branch
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Adjust brightness on the most likely display device.
|
|
||||||
# Usage: omarchy-brightness-display <step>
|
|
||||||
|
|
||||||
step="${1:-+5%}"
|
|
||||||
|
|
||||||
# Start with the first possible output, then refine to the most likely given an order heuristic.
|
|
||||||
device="$(ls -1 /sys/class/backlight 2>/dev/null | head -n1)"
|
|
||||||
for candidate in amdgpu_bl* intel_backlight acpi_video*; do
|
|
||||||
if [[ -e "/sys/class/backlight/$candidate" ]]; then
|
|
||||||
device="$candidate"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Set the actual brightness of the display device.
|
|
||||||
brightnessctl -d "$device" set "$step" >/dev/null
|
|
||||||
|
|
||||||
# Use SwayOSD to display the new brightness setting.
|
|
||||||
omarchy-swayosd-brightness "$(brightnessctl -d "$device" -m | cut -d',' -f4 | tr -d '%')"
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Adjust the brightness on Apple Studio Displays and Apple XDR Displays using asdcontrol.
|
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
echo "Adjust Apple Display Brightness by passing +5000 or -5000 (or any range from 0-60000)"
|
|
||||||
else
|
|
||||||
device="$(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1)"
|
|
||||||
sudo asdcontrol "$device" -- "$1" >/dev/null
|
|
||||||
value="$(sudo asdcontrol "$device" | awk -F= '/BRIGHTNESS=/{print $2+0}')"
|
|
||||||
omarchy-swayosd-brightness "$(( value * 100 / 60000 ))"
|
|
||||||
fi
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Adjust keyboard backlight brightness using available steps.
|
|
||||||
# Usage: omarchy-brightness-keyboard <up|down>
|
|
||||||
|
|
||||||
direction="${1:-up}"
|
|
||||||
|
|
||||||
# Find keyboard backlight device (look for *kbd_backlight* pattern in leds class).
|
|
||||||
device=""
|
|
||||||
for candidate in /sys/class/leds/*kbd_backlight*; do
|
|
||||||
if [[ -e "$candidate" ]]; then
|
|
||||||
device="$(basename "$candidate")"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z "$device" ]]; then
|
|
||||||
echo "No keyboard backlight device found" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get current and max brightness to determine step size.
|
|
||||||
max_brightness="$(brightnessctl -d "$device" max)"
|
|
||||||
current_brightness="$(brightnessctl -d "$device" get)"
|
|
||||||
|
|
||||||
# Calculate step as one unit (keyboards typically have discrete levels like 0-3).
|
|
||||||
if [[ "$direction" == "up" ]]; then
|
|
||||||
new_brightness=$((current_brightness + 1))
|
|
||||||
[[ $new_brightness -gt $max_brightness ]] && new_brightness=$max_brightness
|
|
||||||
else
|
|
||||||
new_brightness=$((current_brightness - 1))
|
|
||||||
[[ $new_brightness -lt 0 ]] && new_brightness=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set the new brightness.
|
|
||||||
brightnessctl -d "$device" set "$new_brightness" >/dev/null
|
|
||||||
|
|
||||||
# Use SwayOSD to display the new brightness setting.
|
|
||||||
percent=$((new_brightness * 100 / max_brightness))
|
|
||||||
omarchy-swayosd-brightness "$percent"
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the Omarchy channel, which dictates what git branch and package repository is used.
|
|
||||||
#
|
|
||||||
# Stable uses the master branch, which only sees updates on official releases, and
|
|
||||||
# the stable package repository, which typically lags the edge by a month to ensure
|
|
||||||
# better compatibility.
|
|
||||||
#
|
|
||||||
# Edge tracks the latest package repository, but still relies on the master branch,
|
|
||||||
# so new packages which require config changes may cause conflicts or errors.
|
|
||||||
#
|
|
||||||
# Dev tracks the active development dev branch, which may include partial or broken updates,
|
|
||||||
# as well as the latest package repository. This should only be used by Omarchy developers
|
|
||||||
# and people with a lot of experience managing Linux systems.
|
|
||||||
|
|
||||||
if (($# == 0)); then
|
|
||||||
echo "Usage: omarchy-channel-set [stable|rc|edge|dev]"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
channel="$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$channel" in
|
|
||||||
"stable") omarchy-branch-set "master" && omarchy-refresh-pacman "stable" && sudo pacman -Suu --noconfirm ;;
|
|
||||||
"rc") omarchy-branch-set "rc" && omarchy-refresh-pacman "rc" && sudo pacman -Suu --noconfirm ;;
|
|
||||||
"edge") omarchy-branch-set "master" && omarchy-refresh-pacman "edge" ;;
|
|
||||||
"dev") omarchy-branch-set "dev" && omarchy-refresh-pacman "edge" ;;
|
|
||||||
*) echo "Unknown channel: $channel"; exit 1; ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
omarchy-update -y
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Switch between audio outputs while preserving the mute status. By default mapped to Super + Mute.
|
|
||||||
|
|
||||||
focused_monitor="$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
|
||||||
|
|
||||||
sinks=$(pactl -f json list sinks | jq '[.[] | select((.ports | length == 0) or ([.ports[]? | .availability != "not available"] | any))]')
|
|
||||||
sinks_count=$(echo "$sinks" | jq '. | length')
|
|
||||||
|
|
||||||
if [ "$sinks_count" -eq 0 ]; then
|
|
||||||
swayosd-client \
|
|
||||||
--monitor "$focused_monitor" \
|
|
||||||
--custom-message "No audio devices found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
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')
|
|
||||||
if [ "$next_sink_description" = "(null)" ] || [ "$next_sink_description" = "null" ] || [ -z "$next_sink_description" ]; then
|
|
||||||
sink_id=$(echo "$next_sink" | jq -r '.properties."object.id"')
|
|
||||||
next_sink_description=$(wpctl status | grep -E "\s+\*?\s+${sink_id}\." | sed -E 's/^.*[0-9]+\.\s+//' | sed -E 's/\s+\[.*$//')
|
|
||||||
fi
|
|
||||||
|
|
||||||
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"
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Finish the installation of Omarchy with items that can only be done after logging in.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
FIRST_RUN_MODE=~/.local/state/omarchy/first-run.mode
|
|
||||||
|
|
||||||
if [[ -f "$FIRST_RUN_MODE" ]]; then
|
|
||||||
rm -f "$FIRST_RUN_MODE"
|
|
||||||
|
|
||||||
bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh"
|
|
||||||
bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.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"
|
|
||||||
bash "$OMARCHY_PATH/install/first-run/elephant.sh"
|
|
||||||
sudo rm -f /etc/sudoers.d/first-run
|
|
||||||
|
|
||||||
bash "$OMARCHY_PATH/install/first-run/welcome.sh"
|
|
||||||
bash "$OMARCHY_PATH/install/first-run/wifi.sh"
|
|
||||||
fi
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns true if any of the commands passed in as arguments are missing on the system.
|
|
||||||
|
|
||||||
for cmd in "$@"; do
|
|
||||||
if ! command -v "$cmd" &>/dev/null; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns true if all the commands passed in as arguments exit on the system.
|
|
||||||
|
|
||||||
for cmd in "$@"; do
|
|
||||||
command -v "$cmd" &>/dev/null || exit 1
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Reboot command that first closes all application windows (thus giving them a chance to save state).
|
|
||||||
# This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly.
|
|
||||||
|
|
||||||
omarchy-state clear re*-required
|
|
||||||
|
|
||||||
# Schedule the reboot to happen after closing windows (detached from terminal)
|
|
||||||
nohup bash -c "sleep 2 && systemctl reboot --no-wall" >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
# Now close all windows
|
|
||||||
omarchy-hyprland-window-close-all
|
|
||||||
sleep 1 # Allow apps like Chrome to shutdown correctly
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Start and stop a screenrecording, which will be saved to ~/Videos by default.
|
|
||||||
# Alternative location can be set via OMARCHY_SCREENRECORD_DIR or XDG_VIDEOS_DIR ENVs.
|
|
||||||
|
|
||||||
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
|
||||||
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
|
|
||||||
|
|
||||||
if [[ ! -d "$OUTPUT_DIR" ]]; then
|
|
||||||
notify-send "Screen recording directory does not exist: $OUTPUT_DIR" -u critical -t 3000
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DESKTOP_AUDIO="false"
|
|
||||||
MICROPHONE_AUDIO="false"
|
|
||||||
WEBCAM="false"
|
|
||||||
WEBCAM_DEVICE=""
|
|
||||||
STOP_RECORDING="false"
|
|
||||||
|
|
||||||
for arg in "$@"; do
|
|
||||||
case "$arg" in
|
|
||||||
--with-desktop-audio) DESKTOP_AUDIO="true" ;;
|
|
||||||
--with-microphone-audio) MICROPHONE_AUDIO="true" ;;
|
|
||||||
--with-webcam) WEBCAM="true" ;;
|
|
||||||
--webcam-device=*) WEBCAM_DEVICE="${arg#*=}" ;;
|
|
||||||
--stop-recording) STOP_RECORDING="true"
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
cleanup_webcam() {
|
|
||||||
pkill -f "WebcamOverlay" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
start_webcam_overlay() {
|
|
||||||
cleanup_webcam
|
|
||||||
|
|
||||||
# Auto-detect first available webcam if none specified
|
|
||||||
if [[ -z "$WEBCAM_DEVICE" ]]; then
|
|
||||||
WEBCAM_DEVICE=$(v4l2-ctl --list-devices 2>/dev/null | grep -m1 "^\s*/dev/video" | tr -d '\t')
|
|
||||||
if [[ -z "$WEBCAM_DEVICE" ]]; then
|
|
||||||
notify-send "No webcam devices found" -u critical -t 3000
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get monitor scale
|
|
||||||
local scale=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .scale')
|
|
||||||
|
|
||||||
# Target width (base 360px, scaled to monitor)
|
|
||||||
local target_width=$(awk "BEGIN {printf \"%.0f\", 360 * $scale}")
|
|
||||||
|
|
||||||
# Try preferred 16:9 resolutions in order, use first available
|
|
||||||
local preferred_resolutions=("640x360" "1280x720" "1920x1080")
|
|
||||||
local video_size_arg=""
|
|
||||||
local available_formats=$(v4l2-ctl --list-formats-ext -d "$WEBCAM_DEVICE" 2>/dev/null)
|
|
||||||
|
|
||||||
for resolution in "${preferred_resolutions[@]}"; do
|
|
||||||
if echo "$available_formats" | grep -q "$resolution"; then
|
|
||||||
video_size_arg="-video_size $resolution"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ffplay -f v4l2 $video_size_arg -framerate 30 "$WEBCAM_DEVICE" \
|
|
||||||
-vf "scale=${target_width}:-1" \
|
|
||||||
-window_title "WebcamOverlay" \
|
|
||||||
-noborder \
|
|
||||||
-fflags nobuffer -flags low_delay \
|
|
||||||
-probesize 32 -analyzeduration 0 \
|
|
||||||
-loglevel quiet &
|
|
||||||
sleep 1
|
|
||||||
}
|
|
||||||
|
|
||||||
start_screenrecording() {
|
|
||||||
local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
|
|
||||||
local audio_devices=""
|
|
||||||
local audio_args=""
|
|
||||||
|
|
||||||
[[ "$DESKTOP_AUDIO" == "true" ]] && audio_devices+="default_output"
|
|
||||||
|
|
||||||
if [[ "$MICROPHONE_AUDIO" == "true" ]]; then
|
|
||||||
# Merge audio tracks into one - separate tracks only play one at a time in most players
|
|
||||||
[[ -n "$audio_devices" ]] && audio_devices+="|"
|
|
||||||
audio_devices+="default_input"
|
|
||||||
fi
|
|
||||||
|
|
||||||
[[ -n "$audio_devices" ]] && audio_args+="-a $audio_devices"
|
|
||||||
|
|
||||||
gpu-screen-recorder -w portal -f 60 -fallback-cpu-encoding yes -o "$filename" $audio_args -ac aac &
|
|
||||||
toggle_screenrecording_indicator
|
|
||||||
}
|
|
||||||
|
|
||||||
stop_screenrecording() {
|
|
||||||
pkill -SIGINT -f "^gpu-screen-recorder" # SIGINT required to save video properly
|
|
||||||
|
|
||||||
# Wait a maximum of 5 seconds to finish before hard killing
|
|
||||||
local count=0
|
|
||||||
while pgrep -f "^gpu-screen-recorder" >/dev/null && [ $count -lt 50 ]; do
|
|
||||||
sleep 0.1
|
|
||||||
count=$((count + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
if pgrep -f "^gpu-screen-recorder" >/dev/null; then
|
|
||||||
pkill -9 -f "^gpu-screen-recorder"
|
|
||||||
cleanup_webcam
|
|
||||||
notify-send "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." -u critical -t 5000
|
|
||||||
else
|
|
||||||
cleanup_webcam
|
|
||||||
notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000
|
|
||||||
fi
|
|
||||||
toggle_screenrecording_indicator
|
|
||||||
}
|
|
||||||
|
|
||||||
toggle_screenrecording_indicator() {
|
|
||||||
pkill -RTMIN+8 waybar
|
|
||||||
}
|
|
||||||
|
|
||||||
screenrecording_active() {
|
|
||||||
pgrep -f "^gpu-screen-recorder" >/dev/null || pgrep -f "WebcamOverlay" >/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
if screenrecording_active; then
|
|
||||||
if pgrep -f "WebcamOverlay" >/dev/null && ! pgrep -f "^gpu-screen-recorder" >/dev/null; then
|
|
||||||
cleanup_webcam
|
|
||||||
else
|
|
||||||
stop_screenrecording
|
|
||||||
fi
|
|
||||||
elif [[ "$STOP_RECORDING" == "false" ]]; then
|
|
||||||
[[ "$WEBCAM" == "true" ]] && start_webcam_overlay
|
|
||||||
|
|
||||||
start_screenrecording || cleanup_webcam
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Run the Omarchy screensaver using random effects from TTE.
|
|
||||||
|
|
||||||
screensaver_in_focus() {
|
|
||||||
hyprctl activewindow -j | jq -e '.class == "org.omarchy.screensaver"' >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
exit_screensaver() {
|
|
||||||
hyprctl keyword cursor:invisible false &>/dev/null || true
|
|
||||||
pkill -x tte 2>/dev/null
|
|
||||||
pkill -f org.omarchy.screensaver 2>/dev/null
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Exit the screensaver on signals and input from keyboard and mouse
|
|
||||||
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
|
|
||||||
|
|
||||||
printf '\033]11;rgb:00/00/00\007' # Set background color to black
|
|
||||||
|
|
||||||
hyprctl keyword cursor:invisible true &>/dev/null
|
|
||||||
|
|
||||||
tty=$(tty 2>/dev/null)
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
tte -i ~/.config/omarchy/branding/screensaver.txt \
|
|
||||||
--frame-rate 120 --canvas-width 0 --canvas-height 0 --reuse-canvas --anchor-canvas c --anchor-text c\
|
|
||||||
--random-effect --exclude-effects dev_worm \
|
|
||||||
--no-eol --no-restore-cursor &
|
|
||||||
|
|
||||||
while pgrep -t "${tty#/dev/}" -x tte >/dev/null; do
|
|
||||||
if read -n1 -t 1 || ! screensaver_in_focus; then
|
|
||||||
exit_screensaver
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Take a screenshot of the whole screen, a specific window, or a user-drawn region.
|
|
||||||
# Saves to ~/Pictures by default, but that can be changed via OMARCHY_SCREENSHOT_DIR or XDG_PICTURES_DIR ENVs.
|
|
||||||
|
|
||||||
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
|
||||||
OUTPUT_DIR="${OMARCHY_SCREENSHOT_DIR:-${XDG_PICTURES_DIR:-$HOME/Pictures}}"
|
|
||||||
|
|
||||||
if [[ ! -d "$OUTPUT_DIR" ]]; then
|
|
||||||
notify-send "Screenshot directory does not exist: $OUTPUT_DIR" -u critical -t 3000
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
pkill slurp && exit 0
|
|
||||||
|
|
||||||
MODE="${1:-smart}"
|
|
||||||
PROCESSING="${2:-slurp}"
|
|
||||||
|
|
||||||
get_rectangles() {
|
|
||||||
local active_workspace=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .activeWorkspace.id')
|
|
||||||
hyprctl monitors -j | jq -r --arg ws "$active_workspace" '.[] | select(.activeWorkspace.id == ($ws | tonumber)) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"'
|
|
||||||
hyprctl clients -j | jq -r --arg ws "$active_workspace" '.[] | select(.workspace.id == ($ws | tonumber)) | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Select based on mode
|
|
||||||
case "$MODE" in
|
|
||||||
region)
|
|
||||||
wayfreeze & PID=$!
|
|
||||||
sleep .1
|
|
||||||
SELECTION=$(slurp 2>/dev/null)
|
|
||||||
kill $PID 2>/dev/null
|
|
||||||
;;
|
|
||||||
windows)
|
|
||||||
wayfreeze & PID=$!
|
|
||||||
sleep .1
|
|
||||||
SELECTION=$(get_rectangles | slurp -r 2>/dev/null)
|
|
||||||
kill $PID 2>/dev/null
|
|
||||||
;;
|
|
||||||
fullscreen)
|
|
||||||
SELECTION=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | "\(.x),\(.y) \((.width / .scale) | floor)x\((.height / .scale) | floor)"')
|
|
||||||
;;
|
|
||||||
smart|*)
|
|
||||||
RECTS=$(get_rectangles)
|
|
||||||
wayfreeze & PID=$!
|
|
||||||
sleep .1
|
|
||||||
SELECTION=$(echo "$RECTS" | slurp 2>/dev/null)
|
|
||||||
kill $PID 2>/dev/null
|
|
||||||
|
|
||||||
# If the selction area is L * W < 20, we'll assume you were trying to select whichever
|
|
||||||
# window or output it was inside of to prevent accidental 2px snapshots
|
|
||||||
if [[ "$SELECTION" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+)$ ]]; then
|
|
||||||
if (( ${BASH_REMATCH[3]} * ${BASH_REMATCH[4]} < 20 )); then
|
|
||||||
click_x="${BASH_REMATCH[1]}"
|
|
||||||
click_y="${BASH_REMATCH[2]}"
|
|
||||||
|
|
||||||
while IFS= read -r rect; do
|
|
||||||
if [[ "$rect" =~ ^([0-9]+),([0-9]+)[[:space:]]([0-9]+)x([0-9]+) ]]; then
|
|
||||||
rect_x="${BASH_REMATCH[1]}"
|
|
||||||
rect_y="${BASH_REMATCH[2]}"
|
|
||||||
rect_width="${BASH_REMATCH[3]}"
|
|
||||||
rect_height="${BASH_REMATCH[4]}"
|
|
||||||
|
|
||||||
if (( click_x >= rect_x && click_x < rect_x+rect_width && click_y >= rect_y && click_y < rect_y+rect_height )); then
|
|
||||||
SELECTION="${rect_x},${rect_y} ${rect_width}x${rect_height}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done <<< "$RECTS"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
[ -z "$SELECTION" ] && exit 0
|
|
||||||
|
|
||||||
if [[ $PROCESSING == "slurp" ]]; then
|
|
||||||
grim -g "$SELECTION" - |
|
|
||||||
satty --filename - \
|
|
||||||
--output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \
|
|
||||||
--early-exit \
|
|
||||||
--actions-on-enter save-to-clipboard \
|
|
||||||
--save-after-copy \
|
|
||||||
--copy-command 'wl-copy'
|
|
||||||
else
|
|
||||||
grim -g "$SELECTION" - | wl-copy
|
|
||||||
fi
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Share clipboard, file, or folder using LocalSend. Bound to Super + Ctrl + S by default.
|
|
||||||
|
|
||||||
if (($# == 0)); then
|
|
||||||
echo "Usage: omarchy-cmd-share [clipboard|file|folder]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
MODE="$1"
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [[ $MODE == "clipboard" ]]; then
|
|
||||||
TEMP_FILE=$(mktemp --suffix=.txt)
|
|
||||||
wl-paste >"$TEMP_FILE"
|
|
||||||
FILES="$TEMP_FILE"
|
|
||||||
else
|
|
||||||
if (($# > 0)); then
|
|
||||||
FILES="$*"
|
|
||||||
else
|
|
||||||
if [[ $MODE == "folder" ]]; then
|
|
||||||
# Pick a single folder from home directory
|
|
||||||
FILES=$(find "$HOME" -type d 2>/dev/null | fzf)
|
|
||||||
else
|
|
||||||
# Pick one or more files from home directory
|
|
||||||
FILES=$(find "$HOME" -type f 2>/dev/null | fzf --multi)
|
|
||||||
fi
|
|
||||||
[ -z "$FILES" ] && exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run LocalSend in its own systemd service (detached from terminal)
|
|
||||||
# Convert newline-separated files to space-separated arguments
|
|
||||||
if [[ $MODE != "clipboard" ]] && echo "$FILES" | grep -q $'\n'; then
|
|
||||||
# Multiple files selected - convert newlines to array
|
|
||||||
readarray -t FILE_ARRAY <<<"$FILES"
|
|
||||||
systemd-run --user --quiet --collect localsend --headless send "${FILE_ARRAY[@]}"
|
|
||||||
else
|
|
||||||
# Single file or clipboard mode
|
|
||||||
systemd-run --user --quiet --collect localsend --headless send "$FILES"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Note: Temporary file will remain until system cleanup for clipboard mode
|
|
||||||
# This ensures the file content is available for the LocalSend GUI
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Shutdown command that first closes all application windows (thus giving them a chance to save state).
|
|
||||||
# This is particularly helpful for applications like Chromium that otherwise won't shutdown cleanly.
|
|
||||||
|
|
||||||
omarchy-state clear re*-required
|
|
||||||
|
|
||||||
# Schedule the shutdown to happen after closing windows (detached from terminal)
|
|
||||||
nohup bash -c "sleep 2 && systemctl poweroff --no-wall" >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
# Now close all windows
|
|
||||||
omarchy-hyprland-window-close-all
|
|
||||||
sleep 1 # Allow apps like Chrome to shutdown correctly
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns the current working directory of the active terminal window,
|
|
||||||
# so a new terminal window can be started in the same directory.
|
|
||||||
|
|
||||||
# Go from current active terminal to its child shell process and run cwd there
|
|
||||||
terminal_pid=$(hyprctl activewindow | awk '/pid:/ {print $2}')
|
|
||||||
shell_pid=$(pgrep -P "$terminal_pid" | tail -n1)
|
|
||||||
|
|
||||||
if [[ -n $shell_pid ]]; then
|
|
||||||
cwd=$(readlink -f "/proc/$shell_pid/cwd" 2>/dev/null)
|
|
||||||
shell=$(readlink -f "/proc/$shell_pid/exe" 2>/dev/null)
|
|
||||||
|
|
||||||
# Check if $shell is a valid shell and $cwd is a directory.
|
|
||||||
if grep -qs "$shell" /etc/shells && [[ -d $cwd ]]; then
|
|
||||||
echo "$cwd"
|
|
||||||
else
|
|
||||||
echo "$HOME"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$HOME"
|
|
||||||
fi
|
|
||||||
7
bin/omarchy-config-link
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Link all the key config files to omarchy's internal versions for quicker testing
|
||||||
|
ln -nsf ~/.local/share/omarchy/config/hypr/hyprland.conf ~/.config/hypr/
|
||||||
|
ln -nsf ~/.local/share/omarchy/config/hypr/hypridle.conf ~/.config/hypr/
|
||||||
|
ln -nsf ~/.local/share/omarchy/config/waybar/config ~/.config/waybar/
|
||||||
|
ln -nsf ~/.local/share/omarchy/config/wofi/config ~/.config/wofi/
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Return exhaustive debugging information about the system to help diagnose problems.
|
|
||||||
|
|
||||||
NO_SUDO=false
|
|
||||||
PRINT_ONLY=false
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case "$1" in
|
|
||||||
--no-sudo)
|
|
||||||
NO_SUDO=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--print)
|
|
||||||
PRINT_ONLY=true
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option: $1"
|
|
||||||
echo "Usage: omarchy-debug [--no-sudo] [--print]"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
LOG_FILE="/tmp/omarchy-debug.log"
|
|
||||||
|
|
||||||
if [ "$NO_SUDO" = true ]; then
|
|
||||||
DMESG_OUTPUT="(skipped - --no-sudo flag used)"
|
|
||||||
else
|
|
||||||
DMESG_OUTPUT="$(sudo dmesg)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat > "$LOG_FILE" <<EOF
|
|
||||||
Date: $(date)
|
|
||||||
Hostname: $(hostname)
|
|
||||||
Omarchy Branch: $(git -C "$OMARCHY_PATH" branch --show-current 2>/dev/null || echo "unknown")
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
SYSTEM INFORMATION
|
|
||||||
=========================================
|
|
||||||
$(inxi -Farz)
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
DMESG
|
|
||||||
=========================================
|
|
||||||
$DMESG_OUTPUT
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
JOURNALCTL (CURRENT BOOT, ERRORS ONLY)
|
|
||||||
=========================================
|
|
||||||
$(journalctl -b -p 4..1)
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
INSTALLED PACKAGES
|
|
||||||
=========================================
|
|
||||||
$({ expac -S '%n %v (%r)' $(pacman -Qqe) 2>/dev/null; comm -13 <(pacman -Sql | sort) <(pacman -Qqe | sort) | xargs -r expac -Q '%n %v (AUR)'; } | sort)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ "$PRINT_ONLY" = true ]; then
|
|
||||||
cat "$LOG_FILE"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
OPTIONS=("View log" "Save in current directory")
|
|
||||||
if ping -c 1 8.8.8.8 >/dev/null 2>&1; then
|
|
||||||
OPTIONS=("Upload log" "${OPTIONS[@]}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
ACTION=$(gum choose "${OPTIONS[@]}")
|
|
||||||
|
|
||||||
case "$ACTION" in
|
|
||||||
"Upload log")
|
|
||||||
echo "Uploading debug log to 0x0.st..."
|
|
||||||
URL=$(curl -sF "file=@$LOG_FILE" -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
|
|
||||||
;;
|
|
||||||
"View log")
|
|
||||||
less "$LOG_FILE"
|
|
||||||
;;
|
|
||||||
"Save in current directory")
|
|
||||||
cp "$LOG_FILE" "./omarchy-debug.log"
|
|
||||||
echo "✓ Log saved to $(pwd)/omarchy-debug.log"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Creates a new Omarchy migration named after the unix timestamp of the last commit.
|
|
||||||
# Only intended for Omarchy developers.
|
|
||||||
|
|
||||||
cd ~/.local/share/omarchy
|
|
||||||
migration_file="$HOME/.local/share/omarchy/migrations/$(git log -1 --format=%cd --date=unix).sh"
|
|
||||||
touch $migration_file
|
|
||||||
|
|
||||||
if [[ "$1" != "--no-edit" ]]; then
|
|
||||||
nvim $migration_file
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $migration_file
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns drive information about a given volumne, like /dev/nvme0, which is used by omarchy-drive-select.
|
|
||||||
|
|
||||||
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"
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Select a drive from a list with info that includes space and brand. Used by omarchy-drive-set-password.
|
|
||||||
|
|
||||||
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}'
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set a new encryption password for a drive selected.
|
|
||||||
|
|
||||||
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,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns the name of the current monospace font being used by extracting it from the Waybar stylesheet.
|
|
||||||
# This can be changed using omarchy-font-set.
|
|
||||||
|
|
||||||
grep -oP 'font-family:\s*["'\'']?\K[^;"'\'']+' ~/.config/waybar/style.css | head -n1
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Returns a list of all the monospace fonts available on the system that can be set using omarchy-font-set.
|
|
||||||
|
|
||||||
fc-list :spacing=100 -f "%{family[0]}\n" | grep -v -i -E 'emoji|signwriting|omarchy' | sort -u
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Set the system-wide monospace font that should be used by the terminal, hyprlock, waybar, swayosd, etc.
|
|
||||||
# The font name must be one of the ones returned by omarchy-font-list.
|
|
||||||
|
|
||||||
font_name="$1"
|
|
||||||
|
|
||||||
if [[ -n "$font_name" ]]; then
|
|
||||||
if fc-list | grep -iq "$font_name"; then
|
|
||||||
if [[ -f ~/.config/alacritty/alacritty.toml ]]; then
|
|
||||||
sed -i "s/family = \".*\"/family = \"$font_name\"/g" ~/.config/alacritty/alacritty.toml
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f ~/.config/kitty/kitty.conf ]]; then
|
|
||||||
sed -i "s/^font_family .*/font_family $font_name/g" ~/.config/kitty/kitty.conf
|
|
||||||
pkill -USR1 kitty
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -f ~/.config/ghostty/config ]]; then
|
|
||||||
sed -i "s/font-family = \".*\"/font-family = \"$font_name\"/g" ~/.config/ghostty/config
|
|
||||||
pkill -SIGUSR2 ghostty
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "s/font_family = .*/font_family = $font_name/g" ~/.config/hypr/hyprlock.conf
|
|
||||||
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/waybar/style.css
|
|
||||||
sed -i "s/font-family: .*/font-family: '$font_name';/g" ~/.config/swayosd/style.css
|
|
||||||
xmlstarlet ed -L \
|
|
||||||
-u '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/string' \
|
|
||||||
-v "$font_name" \
|
|
||||||
~/.config/fontconfig/fonts.conf
|
|
||||||
|
|
||||||
omarchy-restart-waybar
|
|
||||||
omarchy-restart-swayosd
|
|
||||||
|
|
||||||
if pgrep -x ghostty; then
|
|
||||||
notify-send " You must restart Ghostty to see font change"
|
|
||||||
fi
|
|
||||||
|
|
||||||
omarchy-hook font-set "$font_name"
|
|
||||||
else
|
|
||||||
echo "Font '$font_name' not found."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Usage: omarchy-font-set <font-name>"
|
|
||||||
fi
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Check if hibernation is supported
|
|
||||||
if [[ ! -f /sys/power/image_size ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Sum all swap sizes (excluding zram)
|
|
||||||
SWAPSIZE_KB=$(awk '!/Filename|zram/ {sum += $3} END {print sum+0}' /proc/swaps)
|
|
||||||
SWAPSIZE=$(( 1024 * ${SWAPSIZE_KB:-0} ))
|
|
||||||
|
|
||||||
HIBERNATION_IMAGE_SIZE=$(cat /sys/power/image_size)
|
|
||||||
|
|
||||||
if [[ "$SWAPSIZE" -gt "$HIBERNATION_IMAGE_SIZE" ]] && [[ -f /etc/mkinitcpio.conf.d/omarchy_resume.conf ]]; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Removes hibernation setup: disables swap, removes swapfile, removes fstab entry,
|
|
||||||
# removes resume hook, and removes suspend-then-hibernate configuration.
|
|
||||||
|
|
||||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf"
|
|
||||||
|
|
||||||
# Check if hibernation is configured
|
|
||||||
if [ ! -f "$MKINITCPIO_CONF" ] || ! grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; then
|
|
||||||
echo "Hibernation is not set up"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! gum confirm "Remove hibernation setup?"; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
SWAP_SUBVOLUME="/swap"
|
|
||||||
SWAP_FILE="$SWAP_SUBVOLUME/swapfile"
|
|
||||||
|
|
||||||
# Disable swap if active
|
|
||||||
if swapon --show | grep -q "$SWAP_FILE"; then
|
|
||||||
echo "Disabling swap on $SWAP_FILE"
|
|
||||||
sudo swapoff "$SWAP_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove swapfile
|
|
||||||
if [ -f "$SWAP_FILE" ]; then
|
|
||||||
echo "Removing swapfile"
|
|
||||||
sudo rm "$SWAP_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove swap subvolume
|
|
||||||
if sudo btrfs subvolume show "$SWAP_SUBVOLUME" &>/dev/null; then
|
|
||||||
echo "Removing Btrfs subvolume $SWAP_SUBVOLUME"
|
|
||||||
sudo btrfs subvolume delete "$SWAP_SUBVOLUME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove fstab entry
|
|
||||||
if grep -Fq "$SWAP_FILE" /etc/fstab; then
|
|
||||||
echo "Removing swapfile from /etc/fstab"
|
|
||||||
sudo cp -a /etc/fstab "/etc/fstab.$(date +%Y%m%d%H%M%S).back"
|
|
||||||
sudo sed -i "\|$SWAP_FILE|d" /etc/fstab
|
|
||||||
sudo sed -i '/^# Btrfs swapfile for system hibernation$/d' /etc/fstab
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove suspend-then-hibernate configuration
|
|
||||||
echo "Removing suspend-then-hibernate configuration"
|
|
||||||
sudo rm -f /etc/systemd/logind.conf.d/lid.conf
|
|
||||||
sudo rm -f /etc/systemd/sleep.conf.d/hibernate.conf
|
|
||||||
|
|
||||||
# Remove mkinitcpio resume hook
|
|
||||||
echo "Removing resume hook"
|
|
||||||
sudo rm "$MKINITCPIO_CONF"
|
|
||||||
|
|
||||||
echo "Regenerating initramfs..."
|
|
||||||
sudo limine-mkinitcpio
|
|
||||||
|
|
||||||
echo "Hibernation removed"
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab,
|
|
||||||
# adds a resume hook to mkinitcpio, and configures suspend-then-hibernate.
|
|
||||||
|
|
||||||
if [[ ! -f /sys/power/image_size ]]; then
|
|
||||||
echo -e "\033[31mError: Hibernation is not supported on your system\033[0m" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf"
|
|
||||||
|
|
||||||
# Check if hibernation is already configured
|
|
||||||
if [ -f "$MKINITCPIO_CONF" ] && grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF"; then
|
|
||||||
echo "Hibernation is already set up"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $1 != "--force" ]]; then
|
|
||||||
MEM_TOTAL_HUMAN=$(free --human | awk '/Mem/ {print $2}')
|
|
||||||
if ! gum confirm "Use $MEM_TOTAL_HUMAN on boot drive to make hibernation available?"; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
SWAP_SUBVOLUME="/swap"
|
|
||||||
SWAP_FILE="$SWAP_SUBVOLUME/swapfile"
|
|
||||||
|
|
||||||
# Create btrfs subvolume for swap
|
|
||||||
if ! sudo btrfs subvolume show "$SWAP_SUBVOLUME" &>/dev/null; then
|
|
||||||
echo "Creating Btrfs subvolume"
|
|
||||||
sudo btrfs subvolume create "$SWAP_SUBVOLUME"
|
|
||||||
sudo chattr +C "$SWAP_SUBVOLUME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create swapfile
|
|
||||||
if ! sudo swaplabel "$SWAP_FILE" &>/dev/null; then
|
|
||||||
echo "Creating swapfile in Btrfs subvolume"
|
|
||||||
MEM_TOTAL_KB="$(awk '/MemTotal/ {print $2}' /proc/meminfo)k"
|
|
||||||
sudo btrfs filesystem mkswapfile -s "$MEM_TOTAL_KB" "$SWAP_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add swapfile to fstab
|
|
||||||
if ! grep -Fq "$SWAP_FILE" /etc/fstab; then
|
|
||||||
echo "Adding swapfile to /etc/fstab"
|
|
||||||
sudo cp -a /etc/fstab "/etc/fstab.$(date +%Y%m%d%H%M%S).back"
|
|
||||||
printf "\n# Btrfs swapfile for system hibernation\n%s none swap defaults,pri=0 0 0\n" "$SWAP_FILE" | sudo tee -a /etc/fstab >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Enable swap
|
|
||||||
if ! swapon --show | grep -q "$SWAP_FILE"; then
|
|
||||||
echo "Enabling swap on $SWAP_FILE"
|
|
||||||
sudo swapon -p 0 "$SWAP_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add resume hook to mkinitcpio
|
|
||||||
sudo mkdir -p /etc/mkinitcpio.conf.d
|
|
||||||
echo "Adding resume hook to $MKINITCPIO_CONF"
|
|
||||||
echo "HOOKS+=(resume)" | sudo tee "$MKINITCPIO_CONF" >/dev/null
|
|
||||||
|
|
||||||
# Ensure keyboard backlight doesn't prevent sleep
|
|
||||||
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/
|
|
||||||
|
|
||||||
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
|
|
||||||
if grep -q "\[s2idle\]" /sys/power/mem_sleep 2>/dev/null; then
|
|
||||||
LIMINE_DROP_IN="/etc/limine-entry-tool.d/rtc-alarm.conf"
|
|
||||||
if [[ ! -f "$LIMINE_DROP_IN" ]]; then
|
|
||||||
echo "Enabling ACPI RTC alarm for s2idle suspend"
|
|
||||||
sudo mkdir -p /etc/limine-entry-tool.d
|
|
||||||
echo 'KERNEL_CMDLINE[default]+="rtc_cmos.use_acpi_alarm=1"' | sudo tee "$LIMINE_DROP_IN" >/dev/null
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Regenerate initramfs and boot entry
|
|
||||||
echo "Regenerating initramfs..."
|
|
||||||
sudo limine-mkinitcpio
|
|
||||||
sudo limine-update
|
|
||||||
|
|
||||||
echo
|
|
||||||
|
|
||||||
if [[ $1 != "--force" ]] && gum confirm "Reboot to enable hibernation?"; then
|
|
||||||
omarchy-cmd-reboot
|
|
||||||
fi
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Run a named hook, like post-update (available in ~/.config/omarchy/hooks/post-update).
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [[ $# -lt 1 ]]; then
|
|
||||||
echo "Usage: omarchy-hook [name] [args...]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
HOOK=$1
|
|
||||||
HOOK_PATH="$HOME/.config/omarchy/hooks/$1"
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [[ -f $HOOK_PATH ]]; then
|
|
||||||
bash "$HOOK_PATH" "$@"
|
|
||||||
fi
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Detect whether the computer is an Asus ROG machine.
|
|
||||||
|
|
||||||
[[ "$(cat /sys/class/dmi/id/sys_vendor 2>/dev/null)" == "ASUSTeK COMPUTER INC." ]] &&
|
|
||||||
grep -q "ROG" /sys/class/dmi/id/product_family 2>/dev/null
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Close all open windows
|
|
||||||
hyprctl clients -j | \
|
|
||||||
jq -r ".[].address" | \
|
|
||||||
xargs -I{} hyprctl dispatch closewindow address:{}
|
|
||||||
|
|
||||||
# Move to first workspace
|
|
||||||
hyprctl dispatch workspace 1
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Toggle to pop-out a tile to stay fixed on a display basis.
|
|
||||||
|
|
||||||
# Usage:
|
|
||||||
# omarchy-hyprland-window-pop [width height [x y]]
|
|
||||||
#
|
|
||||||
# Arguments:
|
|
||||||
# width Optional. Width of the floating window. Default: 1300
|
|
||||||
# height Optional. Height of the floating window. Default: 900
|
|
||||||
# x Optional. X position of the window. Must provide both X and Y to take effect.
|
|
||||||
# y Optional. Y position of the window. Must provide both X and Y to take effect.
|
|
||||||
#
|
|
||||||
# Behavior:
|
|
||||||
# - If the window is already pinned, it will be unpinned and removed from the pop layer.
|
|
||||||
# - If the window is not pinned, it will be floated, resized, moved/centered, pinned, brought to top, and popped.
|
|
||||||
|
|
||||||
width=${1:-1300}
|
|
||||||
height=${2:-900}
|
|
||||||
x=${3:-}
|
|
||||||
y=${4:-}
|
|
||||||
|
|
||||||
active=$(hyprctl activewindow -j)
|
|
||||||
pinned=$(echo "$active" | jq ".pinned")
|
|
||||||
addr=$(echo "$active" | jq -r ".address")
|
|
||||||
|
|
||||||
if [[ $pinned == "true" ]]; then
|
|
||||||
hyprctl -q --batch \
|
|
||||||
"dispatch pin address:$addr;" \
|
|
||||||
"dispatch togglefloating address:$addr;" \
|
|
||||||
"dispatch tagwindow -pop address:$addr;"
|
|
||||||
elif [[ -n $addr ]]; then
|
|
||||||
hyprctl dispatch togglefloating address:$addr
|
|
||||||
hyprctl dispatch resizeactive exact $width $height address:$addr
|
|
||||||
|
|
||||||
if [[ -n $x && -n $y ]]; then
|
|
||||||
hyprctl dispatch moveactive $x $y address:$addr
|
|
||||||
else
|
|
||||||
hyprctl dispatch centerwindow address:$addr
|
|
||||||
fi
|
|
||||||
|
|
||||||
hyprctl -q --batch \
|
|
||||||
"dispatch pin address:$addr;" \
|
|
||||||
"dispatch alterzorder top address:$addr;" \
|
|
||||||
"dispatch tagwindow +pop address:$addr;"
|
|
||||||
fi
|
|
||||||