Skip to content

Commit 53923d1

Browse files
committed
Backport some interesting idea
1 parent 889a4a6 commit 53923d1

File tree

9 files changed

+39
-6
lines changed

9 files changed

+39
-6
lines changed

archlinux/install/hyprland/bin/omarchy-cmd-screenrecord

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AUDIO=$([[ $2 == "audio" ]] && echo "--audio")
1717
start_screenrecording() {
1818
filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
1919

20-
if lspci | grep -Eqi 'nvidia|intel.*graphics'; then
20+
if lspci | grep -qi 'nvidia'; then
2121
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" &
2222
else
2323
wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" &

archlinux/install/hyprland/bin/omarchy-cmd-screensaver

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/bin/bash
22

33
function exit_screensaver {
4+
hyprctl keyword cursor:invisible false
45
pkill -x tte 2>/dev/null
56
pkill -f "alacritty --class Screensaver" 2>/dev/null
67
exit 0
78
}
89

910
trap exit_screensaver SIGINT SIGTERM SIGHUP SIGQUIT
1011

12+
hyprctl keyword cursor:invisible true
13+
1114
while true; do
1215
effect=$(tte 2>&1 | grep -oP '{\K[^}]+' | tr ',' ' ' | tr ' ' '\n' | sed -n '/^beams$/,$p' | sort -u | shuf -n1)
1316
tte -i ~/.config/logo.txt \

archlinux/install/hyprland/bin/omarchy-cmd-screenshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [[ ! -d "$OUTPUT_DIR" ]]; then
88
exit 1
99
fi
1010

11-
pkill slurp || hyprshot -m ${1:-region} --raw --freeze |
11+
pkill slurp || hyprshot -m ${1:-region} --raw |
1212
satty --filename - \
1313
--output-filename "$OUTPUT_DIR/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png" \
1414
--early-exit \
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
if (($# == 0)); then
4+
echo "Usage: omarchy-launch-or-focus [window-pattern] [launch-command]"
5+
exit 1
6+
fi
7+
8+
WINDOW_PATTERN="$1"
9+
LAUNCH_COMMAND="${2:-"uwsm app -- $WINDOW_PATTERN"}"
10+
WINDOW_ADDRESS=$(hyprctl clients -j | jq -r --arg p "$WINDOW_PATTERN" '.[]|select((.class+" "+.title)|test($p;"i"))|.address' | head -n1)
11+
12+
if [[ -n $WINDOW_ADDRESS ]]; then
13+
hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
14+
else
15+
eval exec $LAUNCH_COMMAND
16+
fi
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
if (($# == 0)); then
4+
echo "Usage: omarchy-launch-or-focus-webapp [window-pattern] [url]"
5+
exit 1
6+
fi
7+
8+
exec omarchy-launch-or-focus "$1" "omarchy-launch-webapp '$2'"

archlinux/install/hyprland/config/hypr/base/bindings/tiling.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ bindd = ALT SHIFT, Tab, Cycle to prev window, cyclenext, prev
5555
bindd = ALT, Tab, Reveal active window on top, bringactivetotop
5656
bindd = ALT SHIFT, Tab, Reveal active window on top, bringactivetotop
5757

58+
# Tab between workspaces
59+
bindd = SUPER, TAB, Next workspace, workspace, e+1
60+
bindd = SUPER SHIFT, TAB, Previous workspace, workspace, e-1
61+
bindd = SUPER CTRL, TAB, Former workspace, workspace, previous
62+
5863
# Resize active window
5964
bindd = SUPER, code:20, Expand window left, resizeactive, -100 0 # - key
6065
bindd = SUPER, code:21, Shrink window left, resizeactive, 100 0 # = key

archlinux/install/hyprland/config/hypr/base/bindings/utilities.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ bindd = SUPER, K, Show key bindings, exec, omarchy-menu-keybindings
1010
bindd = SUPER SHIFT, SPACE, Toggle top bar, exec, pkill -SIGUSR1 waybar
1111
bindd = SUPER CTRL, SPACE, Next background in theme, exec, random-bg
1212
bindd = SUPER SHIFT CTRL, SPACE, Pick new theme, exec, omarchy-menu theme
13+
bindd = SUPER, BACKSPACE, Toggle window transparency, exec, hyprctl dispatch setprop "address:$(hyprctl activewindow -j | jq -r '.address')" opaque toggle
1314

1415
# Notifications
1516
bindd = SUPER, COMMA, Dismiss last notification, exec, makoctl dismiss
@@ -21,7 +22,7 @@ bindd = SUPER CTRL, I, Toggle locking on idle, exec, omarchy-toggle-idle
2122

2223
# Screenshots
2324
bindd = , PRINT, Screenshot of region, exec, omarchy-menu capture
24-
bindd = ALT SHIFT, code:13, Screen record a region, exec, omarchy-menu capture
25+
bindd = ALT SHIFT, code:13, Capture menu, exec, omarchy-menu capture
2526

2627
# Color picker
2728
bindd = SUPER, PRINT, Color picker, exec, pkill hyprpicker || hyprpicker -a

archlinux/install/hyprland/config/hypr/bindings.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ bindd = SUPER, D, Docker, exec, $terminal -e lazydocker
1111

1212
# If your web app url contains #, type it as ## to prevent hyperland treat it as comments
1313
bindd = SUPER, C, Web LLM, exec, omarchy-menu-ai
14-
bindd = SUPER SHIFT, G, WhatsApp, exec, omarchy-launch-webapp "https://web.whatsapp.com/"
15-
bindd = SUPER ALT, G, Google Messages, exec, omarchy-launch-webapp "https://messages.google.com/web/conversations"
14+
bindd = SUPER SHIFT, G, WhatsApp, exec, omarchy-launch-or-focus-webapp WhatsApp "https://web.whatsapp.com/"
15+
bindd = SUPER ALT, G, Google Messages, exec, omarchy-launch-or-focus-webapp "Google Messages" "https://messages.google.com/web/conversations"
1616

1717
# Overwrite existing bindings, like putting Omarchy Menu on Super + Space
1818
# unbind = SUPER, Space

archlinux/install/hyprland/config/waybar/config.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"clock": {
4949
"format": "{:%H:%M}",
5050
"tooltip": true,
51-
"on-click": "omarchy-launch-webapp 'https://calendar.google.com/'",
51+
"on-click": "omarchy-launch-or-focus-webapp 'calendar' 'https://calendar.google.com/'",
5252
"tooltip-format": "{:L%A %d %B W%V %Y}"
5353
},
5454
"network": {

0 commit comments

Comments
 (0)