mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-03 11:37:36 +00:00
feat(cli): add omarchy-launch-browser and projects-sync scripts, update cycle launcher and monitor handling
This commit is contained in:
1 parent
aa1dc10f93
commit
cf1c0e2e3e
4 files changed
+73
-10
No files matched your search
@@ -15,28 +15,33 @@ set -uo pipefail
|
||||
# web apps) from piling up duplicates. The scrolling layout gives each
|
||||
# resident its own column, in the order they appear.
|
||||
#
|
||||
# HOME_MONITOR is a connector name or an EDID description (the latter, as in
|
||||
# the workspace rules, survives a different DP connector after re-docking).
|
||||
# When it is empty or that monitor is absent, the workspace opens on the
|
||||
# focused one.
|
||||
# HOME_MONITOR lists connector names or EDID descriptions, separated by |;
|
||||
# the first one connected wins (descriptions, as in the workspace rules,
|
||||
# survive a different DP connector after re-docking). When it is empty or
|
||||
# none is connected, the workspace opens on the focused monitor. EXTERNAL is
|
||||
# the main external display: the Studio Display, else the Samsung ultrawide
|
||||
# (same order as hypr/monitors.lua).
|
||||
EXTERNAL="Apple Computer Inc StudioDisplay 0x984262A7|Samsung Electric Company S34CG50 HNTY501103"
|
||||
HOME_MONITOR=""
|
||||
case ${1:-scratchpad} in
|
||||
scratchpad)
|
||||
NAME="scratchpad"
|
||||
HOME_MONITOR="Apple Computer Inc StudioDisplay 0x984262A7"
|
||||
HOME_MONITOR=$EXTERNAL
|
||||
MEMBERS=("so.stencil.tern|tern")
|
||||
;;
|
||||
claude)
|
||||
NAME="claude"
|
||||
HOME_MONITOR="Apple Computer Inc StudioDisplay 0x984262A7"
|
||||
HOME_MONITOR=$EXTERNAL
|
||||
MEMBERS=("com.anthropic.Claude|claude-desktop")
|
||||
;;
|
||||
fastmail)
|
||||
NAME="fastmail"
|
||||
HOME_MONITOR="eDP-1"
|
||||
MEMBERS=("com.fastmail.Fastmail|gtk-launch com.fastmail.Fastmail")
|
||||
;;
|
||||
beeper)
|
||||
NAME="beeper"
|
||||
HOME_MONITOR="eDP-1"
|
||||
MEMBERS=("Beeper|gtk-launch beeper")
|
||||
;;
|
||||
home)
|
||||
@@ -87,10 +92,13 @@ toggle_on() {
|
||||
hyprctl dispatch togglespecialworkspace "$NAME" >/dev/null
|
||||
}
|
||||
|
||||
# The profile's home monitor when connected, else whatever is focused.
|
||||
# The first connected home monitor, else whatever is focused.
|
||||
target_monitor() {
|
||||
hyprctl monitors -j | jq -r --arg m "$HOME_MONITOR" \
|
||||
'first(.[] | select(.name == $m or .description == $m)) // first(.[] | select(.focused)) | .name'
|
||||
hyprctl monitors -j | jq -r --arg m "$HOME_MONITOR" '
|
||||
. as $monitors
|
||||
| first(($m | split("|"))[] as $want | $monitors[] | select(.name == $want or .description == $want))
|
||||
// first($monitors[] | select(.focused))
|
||||
| .name'
|
||||
}
|
||||
|
||||
# Showing: just hide, even if a member is gone. Missing members come back on
|
||||
|
||||
Reference in new issue
Block a user