mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-05 20:28:25 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
089d2cef9b | ||
|
|
13b7aaae1d |
+11
-1
@@ -93,11 +93,12 @@ show_learn_menu() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
show_trigger_menu() {
|
show_trigger_menu() {
|
||||||
case $(menu "Trigger" " Capture\n Transcode\n Share\n Toggle\n Hardware") in
|
case $(menu "Trigger" " Capture\n Transcode\n Share\n Toggle\n Workspace\n Hardware") in
|
||||||
*Capture*) show_capture_menu ;;
|
*Capture*) show_capture_menu ;;
|
||||||
*Transcode*) show_transcode_menu ;;
|
*Transcode*) show_transcode_menu ;;
|
||||||
*Share*) show_share_menu ;;
|
*Share*) show_share_menu ;;
|
||||||
*Toggle*) show_toggle_menu ;;
|
*Toggle*) show_toggle_menu ;;
|
||||||
|
*Workspace*) show_workspace_menu ;;
|
||||||
*Hardware*) show_hardware_menu ;;
|
*Hardware*) show_hardware_menu ;;
|
||||||
*) show_main_menu ;;
|
*) show_main_menu ;;
|
||||||
esac
|
esac
|
||||||
@@ -175,6 +176,14 @@ show_transcode_menu() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show_workspace_menu() {
|
||||||
|
case $(menu "Workspace" " Restore\n Save") in
|
||||||
|
*Restore*) omarchy-workspace-restore ;;
|
||||||
|
*Save*) omarchy-workspace-save ;;
|
||||||
|
*) back_to show_trigger_menu ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
show_toggle_menu() {
|
show_toggle_menu() {
|
||||||
local options=" Screensaver\n Nightlight\n Idle Lock\n Notifications\n Top Bar\n Workspace Layout\n Window Gaps\n 1-Window Ratio\n Monitor Scaling\n Direct Boot\n Passwordless Sudo"
|
local options=" Screensaver\n Nightlight\n Idle Lock\n Notifications\n Top Bar\n Workspace Layout\n Window Gaps\n 1-Window Ratio\n Monitor Scaling\n Direct Boot\n Passwordless Sudo"
|
||||||
|
|
||||||
@@ -680,6 +689,7 @@ go_to_menu() {
|
|||||||
*trigger*) show_trigger_menu ;;
|
*trigger*) show_trigger_menu ;;
|
||||||
*toggle*) show_toggle_menu ;;
|
*toggle*) show_toggle_menu ;;
|
||||||
*hardware*) show_hardware_menu ;;
|
*hardware*) show_hardware_menu ;;
|
||||||
|
*workspace*) show_workspace_menu ;;
|
||||||
*share*) show_share_menu ;;
|
*share*) show_share_menu ;;
|
||||||
*transcode*) show_transcode_menu ;;
|
*transcode*) show_transcode_menu ;;
|
||||||
*background*) show_background_menu ;;
|
*background*) show_background_menu ;;
|
||||||
|
|||||||
@@ -5,4 +5,5 @@
|
|||||||
|
|
||||||
omarchy-refresh-config waybar/config.jsonc
|
omarchy-refresh-config waybar/config.jsonc
|
||||||
omarchy-refresh-config waybar/style.css
|
omarchy-refresh-config waybar/style.css
|
||||||
|
echo "top" >"$HOME/.config/waybar/.style"
|
||||||
omarchy-restart-waybar
|
omarchy-restart-waybar
|
||||||
|
|||||||
Executable
+58
@@ -0,0 +1,58 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# omarchy:summary=Set Waybar style
|
||||||
|
# omarchy:args=<top|pill|float|toggle|list>
|
||||||
|
# omarchy:examples=omarchy waybar set pill | omarchy waybar set float | omarchy waybar set toggle
|
||||||
|
|
||||||
|
OMARCHY_PATH=${OMARCHY_PATH:-$HOME/.local/share/omarchy}
|
||||||
|
STYLE_DIR="$OMARCHY_PATH/config/waybar/styles"
|
||||||
|
CONFIG_DIR="$OMARCHY_PATH/config/waybar/configs"
|
||||||
|
CURRENT_STYLE_FILE="$HOME/.config/waybar/.style"
|
||||||
|
STYLE=${1:-toggle}
|
||||||
|
|
||||||
|
list_styles() {
|
||||||
|
for style in "$STYLE_DIR"/*.css; do
|
||||||
|
[[ -e $style ]] || continue
|
||||||
|
basename "$style" .css
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
current_style() {
|
||||||
|
if [[ -f $CURRENT_STYLE_FILE ]]; then
|
||||||
|
read -r current <"$CURRENT_STYLE_FILE"
|
||||||
|
[[ -n $current ]] && printf '%s\n' "$current" && return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "top"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $STYLE == "list" ]]; then
|
||||||
|
list_styles
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $STYLE == "default" ]]; then
|
||||||
|
STYLE="top"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $STYLE == "toggle" ]]; then
|
||||||
|
if [[ $(current_style) == "pill" ]]; then
|
||||||
|
STYLE="top"
|
||||||
|
else
|
||||||
|
STYLE="pill"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f $STYLE_DIR/$STYLE.css || ! -f $CONFIG_DIR/$STYLE.jsonc ]]; then
|
||||||
|
echo "Unknown Waybar style '$STYLE'"
|
||||||
|
echo "Available styles:"
|
||||||
|
list_styles
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$HOME/.config/waybar"
|
||||||
|
cp "$CONFIG_DIR/$STYLE.jsonc" "$HOME/.config/waybar/config.jsonc"
|
||||||
|
cp "$STYLE_DIR/$STYLE.css" "$HOME/.config/waybar/style.css"
|
||||||
|
echo "$STYLE" >"$CURRENT_STYLE_FILE"
|
||||||
|
|
||||||
|
omarchy-restart-waybar
|
||||||
Executable
+395
@@ -0,0 +1,395 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# omarchy:summary=Restore the saved layout for the current Hyprland workspace
|
||||||
|
# omarchy:args=
|
||||||
|
# omarchy:examples=omarchy workspace restore
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
monitor=$(omarchy-hyprland-monitor-focused)
|
||||||
|
workspace=$(hyprctl monitors -j | jq -r --arg monitor "$monitor" '.[] | select(.name == $monitor) | .activeWorkspace.id')
|
||||||
|
file="$HOME/.config/hypr/workspaces/$monitor-$workspace.tsv"
|
||||||
|
|
||||||
|
if [[ ! -f $file ]]; then
|
||||||
|
notify-send -u low " No saved workspace $workspace for $monitor" "$file" -t 3000
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
restore_data=$(grep -v '^#' "$file" || true)
|
||||||
|
|
||||||
|
if [[ -z $restore_data ]]; then
|
||||||
|
notify-send -u low " No windows saved for workspace $workspace" "$file" -t 3000
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
restore_map=$(mktemp)
|
||||||
|
assigned_addresses=$(mktemp)
|
||||||
|
trap 'rm -f "$restore_map" "$assigned_addresses"' EXIT
|
||||||
|
|
||||||
|
declare -a classes commands xs ys ws hs focuseds addresses launched
|
||||||
|
count=0
|
||||||
|
|
||||||
|
while IFS=$'\t' read -r _ saved_workspace mode class command x y w h focused; do
|
||||||
|
[[ -n $class ]] || continue
|
||||||
|
|
||||||
|
workspace=$saved_workspace
|
||||||
|
classes[count]=$class
|
||||||
|
commands[count]=$command
|
||||||
|
xs[count]=$x
|
||||||
|
ys[count]=$y
|
||||||
|
ws[count]=$w
|
||||||
|
hs[count]=$h
|
||||||
|
focuseds[count]=${focused:-false}
|
||||||
|
addresses[count]=""
|
||||||
|
launched[count]=false
|
||||||
|
(( count += 1 ))
|
||||||
|
done <<< "$restore_data"
|
||||||
|
|
||||||
|
hyprctl dispatch workspace "$workspace" >/dev/null
|
||||||
|
|
||||||
|
for (( i = 0; i < count; i++ )); do
|
||||||
|
class=${classes[i]}
|
||||||
|
hyprctl keyword windowrulev2 "workspace $workspace silent,class:^($class)$" >/dev/null
|
||||||
|
|
||||||
|
if [[ ${mode:-tiled} == "floating" ]]; then
|
||||||
|
hyprctl keyword windowrulev2 "float,class:^($class)$" >/dev/null
|
||||||
|
else
|
||||||
|
hyprctl keyword windowrulev2 "tile,class:^($class)$" >/dev/null
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
existing_unassigned_json() {
|
||||||
|
local class=$1
|
||||||
|
|
||||||
|
{
|
||||||
|
hyprctl clients -j | jq -r --arg class "$class" '.[] | select(.class == $class or .initialClass == $class) | .address' |
|
||||||
|
grep -Fvx -f "$assigned_addresses" || true
|
||||||
|
} | jq -R -s -c 'split("\n")[:-1]'
|
||||||
|
}
|
||||||
|
|
||||||
|
wait_for_address() {
|
||||||
|
local class=$1
|
||||||
|
local existing=${2:-[]}
|
||||||
|
local tries=0
|
||||||
|
local address=""
|
||||||
|
|
||||||
|
while [[ -z $address ]]; do
|
||||||
|
address=$(hyprctl clients -j | jq -r --arg class "$class" --argjson existing "$existing" \
|
||||||
|
'.[] | select((.class == $class or .initialClass == $class) and (.address as $address | $existing | index($address) | not)) | .address' | head -n1)
|
||||||
|
|
||||||
|
if [[ -n $address ]]; then
|
||||||
|
printf '%s\n' "$address"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 0.2
|
||||||
|
(( tries += 1 ))
|
||||||
|
|
||||||
|
# Single-instance apps may focus/reuse an existing window instead of creating a new one.
|
||||||
|
if (( tries >= 25 )) && [[ $existing != "[]" ]]; then
|
||||||
|
jq -r '.[0]' <<< "$existing"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( tries >= 75 )); then
|
||||||
|
echo "Timed out waiting for $class" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
ensure_window() {
|
||||||
|
local id=$1
|
||||||
|
local class=${classes[id]}
|
||||||
|
local command=${commands[id]}
|
||||||
|
local existing address
|
||||||
|
|
||||||
|
if [[ ${launched[id]} == "true" ]]; then
|
||||||
|
last_address=${addresses[id]}
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
existing=$(existing_unassigned_json "$class")
|
||||||
|
|
||||||
|
if [[ $existing != "[]" && ( $class == chrome-* || $class == chromium* ) ]]; then
|
||||||
|
address=$(jq -r '.[0]' <<< "$existing")
|
||||||
|
else
|
||||||
|
hyprctl dispatch exec "[workspace $workspace silent] $command" >/dev/null
|
||||||
|
address=$(wait_for_address "$class" "$existing") || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
hyprctl dispatch movetoworkspacesilent "$workspace,address:$address" >/dev/null || true
|
||||||
|
|
||||||
|
if [[ ${mode:-tiled} == "floating" ]]; then
|
||||||
|
hyprctl dispatch setfloating "address:$address" >/dev/null || true
|
||||||
|
hyprctl dispatch resizewindowpixel exact "${ws[id]}" "${hs[id]}",address:"$address" >/dev/null || true
|
||||||
|
hyprctl dispatch movewindowpixel exact "${xs[id]}" "${ys[id]}",address:"$address" >/dev/null || true
|
||||||
|
else
|
||||||
|
hyprctl dispatch settiled "address:$address" >/dev/null || true
|
||||||
|
hyprctl dispatch focuswindow "address:$address" >/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
addresses[id]=$address
|
||||||
|
launched[id]=true
|
||||||
|
printf '%s\n' "$address" >>"$assigned_addresses"
|
||||||
|
printf '%s\t%s\t%s\t%s\t%s\t%s\n' "$address" "$id" "${xs[id]}" "${ys[id]}" "${ws[id]}" "${hs[id]}" >>"$restore_map"
|
||||||
|
|
||||||
|
if [[ ${focuseds[id]} == "true" ]]; then
|
||||||
|
focused_address=$address
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 0.4
|
||||||
|
last_address=$address
|
||||||
|
}
|
||||||
|
|
||||||
|
choose_rep() {
|
||||||
|
local best=""
|
||||||
|
local best_area=-1
|
||||||
|
local id area
|
||||||
|
|
||||||
|
for id in "$@"; do
|
||||||
|
area=$(( ws[id] * hs[id] ))
|
||||||
|
if (( area > best_area )); then
|
||||||
|
best=$id
|
||||||
|
best_area=$area
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
printf '%s\n' "$best"
|
||||||
|
}
|
||||||
|
|
||||||
|
find_launched_address() {
|
||||||
|
local id
|
||||||
|
|
||||||
|
for id in "$@"; do
|
||||||
|
if [[ ${launched[id]} == "true" ]]; then
|
||||||
|
printf '%s\n' "${addresses[id]}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
opposite_direction() {
|
||||||
|
case $1 in
|
||||||
|
l) echo r ;;
|
||||||
|
r) echo l ;;
|
||||||
|
u) echo d ;;
|
||||||
|
d) echo u ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
abs() {
|
||||||
|
local value=$1
|
||||||
|
if (( value < 0 )); then
|
||||||
|
echo $(( -value ))
|
||||||
|
else
|
||||||
|
echo "$value"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
find_partition() {
|
||||||
|
local ids=("$@")
|
||||||
|
local best_score=9223372036854775807
|
||||||
|
local best_a=""
|
||||||
|
local best_b=""
|
||||||
|
local best_dir=""
|
||||||
|
local orientation i j id edge start cut gap right bottom area_a area_b score valid a b
|
||||||
|
|
||||||
|
for orientation in v h; do
|
||||||
|
for i in "${ids[@]}"; do
|
||||||
|
for j in "${ids[@]}"; do
|
||||||
|
if [[ $orientation == "v" ]]; then
|
||||||
|
edge=$(( xs[i] + ws[i] ))
|
||||||
|
start=${xs[j]}
|
||||||
|
[[ $edge -lt $start ]] || continue
|
||||||
|
else
|
||||||
|
edge=$(( ys[i] + hs[i] ))
|
||||||
|
start=${ys[j]}
|
||||||
|
[[ $edge -lt $start ]] || continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
cut=$(( (edge + start) / 2 ))
|
||||||
|
gap=$(( start - edge ))
|
||||||
|
valid=true
|
||||||
|
a=""
|
||||||
|
b=""
|
||||||
|
area_a=0
|
||||||
|
area_b=0
|
||||||
|
|
||||||
|
for id in "${ids[@]}"; do
|
||||||
|
if [[ $orientation == "v" ]]; then
|
||||||
|
right=$(( xs[id] + ws[id] ))
|
||||||
|
if (( right <= cut )); then
|
||||||
|
a="$a $id"
|
||||||
|
area_a=$(( area_a + ws[id] * hs[id] ))
|
||||||
|
elif (( xs[id] >= cut )); then
|
||||||
|
b="$b $id"
|
||||||
|
area_b=$(( area_b + ws[id] * hs[id] ))
|
||||||
|
else
|
||||||
|
valid=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
bottom=$(( ys[id] + hs[id] ))
|
||||||
|
if (( bottom <= cut )); then
|
||||||
|
a="$a $id"
|
||||||
|
area_a=$(( area_a + ws[id] * hs[id] ))
|
||||||
|
elif (( ys[id] >= cut )); then
|
||||||
|
b="$b $id"
|
||||||
|
area_b=$(( area_b + ws[id] * hs[id] ))
|
||||||
|
else
|
||||||
|
valid=false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ $valid == "true" && -n $a && -n $b ]] || continue
|
||||||
|
|
||||||
|
score=$(abs $(( area_a - area_b )))
|
||||||
|
score=$(( score * 1000 - gap ))
|
||||||
|
|
||||||
|
if (( score < best_score )); then
|
||||||
|
best_score=$score
|
||||||
|
best_a=${a# }
|
||||||
|
best_b=${b# }
|
||||||
|
if [[ $orientation == "v" ]]; then
|
||||||
|
best_dir=r
|
||||||
|
else
|
||||||
|
best_dir=d
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z $best_a || -z $best_b ]]; then
|
||||||
|
fallback_partition "${ids[@]}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -r -a part_a <<< "$best_a"
|
||||||
|
read -r -a part_b <<< "$best_b"
|
||||||
|
part_dir=$best_dir
|
||||||
|
}
|
||||||
|
|
||||||
|
fallback_partition() {
|
||||||
|
local ids=("$@")
|
||||||
|
local sorted=()
|
||||||
|
local line id bbox_min_x=999999 bbox_min_y=999999 bbox_max_x=0 bbox_max_y=0 bbox_w bbox_h key index
|
||||||
|
|
||||||
|
for id in "${ids[@]}"; do
|
||||||
|
(( xs[id] < bbox_min_x )) && bbox_min_x=${xs[id]}
|
||||||
|
(( ys[id] < bbox_min_y )) && bbox_min_y=${ys[id]}
|
||||||
|
(( xs[id] + ws[id] > bbox_max_x )) && bbox_max_x=$(( xs[id] + ws[id] ))
|
||||||
|
(( ys[id] + hs[id] > bbox_max_y )) && bbox_max_y=$(( ys[id] + hs[id] ))
|
||||||
|
done
|
||||||
|
|
||||||
|
bbox_w=$(( bbox_max_x - bbox_min_x ))
|
||||||
|
bbox_h=$(( bbox_max_y - bbox_min_y ))
|
||||||
|
|
||||||
|
while read -r line; do
|
||||||
|
sorted+=("${line#* }")
|
||||||
|
done < <(
|
||||||
|
for id in "${ids[@]}"; do
|
||||||
|
if (( bbox_w >= bbox_h )); then
|
||||||
|
key=${xs[id]}
|
||||||
|
else
|
||||||
|
key=${ys[id]}
|
||||||
|
fi
|
||||||
|
printf '%s %s\n' "$key" "$id"
|
||||||
|
done | sort -n
|
||||||
|
)
|
||||||
|
|
||||||
|
part_a=()
|
||||||
|
part_b=()
|
||||||
|
for index in "${!sorted[@]}"; do
|
||||||
|
if (( index < ${#sorted[@]} / 2 )); then
|
||||||
|
part_a+=("${sorted[index]}")
|
||||||
|
else
|
||||||
|
part_b+=("${sorted[index]}")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if (( bbox_w >= bbox_h )); then
|
||||||
|
part_dir=r
|
||||||
|
else
|
||||||
|
part_dir=d
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
materialize_group() {
|
||||||
|
local ids=("$@")
|
||||||
|
local rep_a rep_b addr_a addr_b dir opposite
|
||||||
|
|
||||||
|
if (( ${#ids[@]} == 0 )); then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( ${#ids[@]} == 1 )); then
|
||||||
|
ensure_window "${ids[0]}" >/dev/null || true
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
find_partition "${ids[@]}"
|
||||||
|
dir=$part_dir
|
||||||
|
opposite=$(opposite_direction "$dir")
|
||||||
|
|
||||||
|
addr_a=$(find_launched_address "${part_a[@]}" || true)
|
||||||
|
addr_b=$(find_launched_address "${part_b[@]}" || true)
|
||||||
|
|
||||||
|
if [[ -z $addr_a && -z $addr_b ]]; then
|
||||||
|
rep_a=$(choose_rep "${part_a[@]}")
|
||||||
|
ensure_window "$rep_a" || return 0
|
||||||
|
addr_a=$last_address
|
||||||
|
hyprctl dispatch focuswindow "address:$addr_a" >/dev/null || true
|
||||||
|
hyprctl dispatch layoutmsg preselect "$dir" >/dev/null || true
|
||||||
|
rep_b=$(choose_rep "${part_b[@]}")
|
||||||
|
ensure_window "$rep_b" || true
|
||||||
|
addr_b=${last_address:-}
|
||||||
|
elif [[ -n $addr_a && -z $addr_b ]]; then
|
||||||
|
hyprctl dispatch focuswindow "address:$addr_a" >/dev/null || true
|
||||||
|
hyprctl dispatch layoutmsg preselect "$dir" >/dev/null || true
|
||||||
|
rep_b=$(choose_rep "${part_b[@]}")
|
||||||
|
ensure_window "$rep_b" || true
|
||||||
|
addr_b=${last_address:-}
|
||||||
|
elif [[ -z $addr_a && -n $addr_b ]]; then
|
||||||
|
hyprctl dispatch focuswindow "address:$addr_b" >/dev/null || true
|
||||||
|
hyprctl dispatch layoutmsg preselect "$opposite" >/dev/null || true
|
||||||
|
rep_a=$(choose_rep "${part_a[@]}")
|
||||||
|
ensure_window "$rep_a" || true
|
||||||
|
addr_a=${last_address:-}
|
||||||
|
fi
|
||||||
|
|
||||||
|
materialize_group "${part_a[@]}"
|
||||||
|
materialize_group "${part_b[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
ids=()
|
||||||
|
for (( i = 0; i < count; i++ )); do
|
||||||
|
ids+=("$i")
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ ${mode:-tiled} == "floating" ]]; then
|
||||||
|
for id in "${ids[@]}"; do
|
||||||
|
ensure_window "$id" >/dev/null || true
|
||||||
|
done
|
||||||
|
else
|
||||||
|
materialize_group "${ids[@]}"
|
||||||
|
|
||||||
|
for _ in 1 2 3 4; do
|
||||||
|
while IFS=$'\t' read -r address _ _ _ w h; do
|
||||||
|
hyprctl dispatch resizewindowpixel exact "$w" "$h",address:"$address" >/dev/null || true
|
||||||
|
done < <(sort -t $'\t' -k3,3n -k4,4n "$restore_map")
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${focused_address:-} ]]; then
|
||||||
|
hyprctl dispatch focuswindow "address:$focused_address" >/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify-send -u low " Restored workspace $workspace for $monitor" -t 3000
|
||||||
|
hyprctl dispatch workspace "$workspace" >/dev/null
|
||||||
Executable
+74
@@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# omarchy:summary=Save the current Hyprland workspace app layout to ~/.config/hypr/workspaces/<monitor-name>-<workspace-id>.tsv
|
||||||
|
# omarchy:args=
|
||||||
|
# omarchy:examples=omarchy workspace save
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
monitor=$(omarchy-hyprland-monitor-focused)
|
||||||
|
workspace=$(hyprctl monitors -j | jq -r --arg monitor "$monitor" '.[] | select(.name == $monitor) | .activeWorkspace.id')
|
||||||
|
|
||||||
|
mkdir -p ~/.config/hypr/workspaces
|
||||||
|
file="$HOME/.config/hypr/workspaces/$monitor-$workspace.tsv"
|
||||||
|
clients=$(hyprctl clients -j)
|
||||||
|
active_address=$(hyprctl activewindow -j | jq -r '.address // ""')
|
||||||
|
|
||||||
|
webapp_command() {
|
||||||
|
local class=$1
|
||||||
|
local initial_title=$2
|
||||||
|
local encoded host path
|
||||||
|
|
||||||
|
[[ $class == chrome-* ]] || return 1
|
||||||
|
|
||||||
|
if [[ $initial_title == http://* || $initial_title == https://* ]]; then
|
||||||
|
printf 'omarchy-launch-webapp %s\n' "${initial_title//_/\/}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
encoded=${class#chrome-}
|
||||||
|
encoded=${encoded%-Default}
|
||||||
|
|
||||||
|
if [[ $encoded == *__* ]]; then
|
||||||
|
host=${encoded%%__*}
|
||||||
|
path=${encoded#*__}
|
||||||
|
printf 'omarchy-launch-webapp https://%s/%s\n' "$host" "${path//_/\/}"
|
||||||
|
else
|
||||||
|
printf 'omarchy-launch-webapp https://%s\n' "${encoded//_/\/}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
launch_command() {
|
||||||
|
local class=$1
|
||||||
|
local initial_title=$2
|
||||||
|
local pid=$3
|
||||||
|
|
||||||
|
if webapp_command "$class" "$initial_title"; then
|
||||||
|
return 0
|
||||||
|
elif [[ -r /proc/$pid/cmdline ]]; then
|
||||||
|
tr '\0' ' ' <"/proc/$pid/cmdline" | sed 's/[[:space:]]*$//'
|
||||||
|
else
|
||||||
|
echo "$class"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
printf '# monitor\tworkspace\tmode\tclass\tcommand\tx\ty\tw\th\tfocused\n'
|
||||||
|
|
||||||
|
jq -r --argjson workspace "$workspace" '
|
||||||
|
[.[] | select(.workspace.id == $workspace)]
|
||||||
|
| sort_by(.at[0], .at[1])
|
||||||
|
| .[]
|
||||||
|
| [(.initialClass // .class), .initialTitle, .pid, .at[0], .at[1], .size[0], .size[1], .address]
|
||||||
|
| @tsv
|
||||||
|
' <<< "$clients" | while IFS=$'\t' read -r class initial_title pid x y w h address; do
|
||||||
|
command=$(launch_command "$class" "$initial_title" "$pid")
|
||||||
|
focused=false
|
||||||
|
if [[ $address == "$active_address" ]]; then
|
||||||
|
focused=true
|
||||||
|
fi
|
||||||
|
printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n' "$monitor" "$workspace" "tiled" "$class" "$command" "$x" "$y" "$w" "$h" "$focused"
|
||||||
|
done
|
||||||
|
} >"$file"
|
||||||
|
|
||||||
|
notify-send -u low " Saved workspace $workspace for $monitor" -t 3000
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
{
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"spacing": 0,
|
||||||
|
"height": 26,
|
||||||
|
"margin-top": 10,
|
||||||
|
"margin-left": 10,
|
||||||
|
"margin-right": 10,
|
||||||
|
"modules-left": ["custom/omarchy", "hyprland/workspaces", "hyprland/window"],
|
||||||
|
"modules-center": ["clock", "custom/update", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator"],
|
||||||
|
"modules-right": [
|
||||||
|
"mpris",
|
||||||
|
"group/tray-expander",
|
||||||
|
"backlight",
|
||||||
|
"network",
|
||||||
|
"bluetooth",
|
||||||
|
"pulseaudio",
|
||||||
|
"cpu",
|
||||||
|
"battery"
|
||||||
|
],
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"on-click": "activate",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"default": "",
|
||||||
|
"1": "1",
|
||||||
|
"2": "2",
|
||||||
|
"3": "3",
|
||||||
|
"4": "4",
|
||||||
|
"5": "5",
|
||||||
|
"6": "6",
|
||||||
|
"7": "7",
|
||||||
|
"8": "8",
|
||||||
|
"9": "9",
|
||||||
|
"10": "0",
|
||||||
|
"active": ""
|
||||||
|
},
|
||||||
|
"persistent-workspaces": {
|
||||||
|
"1": [],
|
||||||
|
"2": [],
|
||||||
|
"3": [],
|
||||||
|
"4": [],
|
||||||
|
"5": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/omarchy": {
|
||||||
|
"format": "<span font='omarchy'>\ue900</span>",
|
||||||
|
"on-click": "omarchy-menu",
|
||||||
|
"on-click-right": "xdg-terminal-exec",
|
||||||
|
"tooltip-format": "Omarchy Menu\n\nSuper + Alt + Space"
|
||||||
|
},
|
||||||
|
"custom/update": {
|
||||||
|
"format": "",
|
||||||
|
"exec": "omarchy-update-available",
|
||||||
|
"on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update",
|
||||||
|
"tooltip-format": "Omarchy update available",
|
||||||
|
"signal": 7,
|
||||||
|
"interval": 21600
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"interval": 5,
|
||||||
|
"format": "",
|
||||||
|
"on-click": "omarchy-launch-or-focus-tui btop",
|
||||||
|
"on-click-right": "alacritty"
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%I:%M %p}",
|
||||||
|
"format-alt": "{:%A %d/%m/%Y}",
|
||||||
|
"tooltip-format": "<span>{calendar}</span>",
|
||||||
|
"on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format-icons": ["", "", "", "", ""],
|
||||||
|
"format": "{icon} {essid}",
|
||||||
|
"format-wifi": "{icon} {essid}",
|
||||||
|
"format-ethernet": "",
|
||||||
|
"format-disconnected": "",
|
||||||
|
"tooltip-format-wifi": "{essid} ({frequency} GHz)\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||||
|
"tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||||
|
"tooltip-format-disconnected": "Disconnected",
|
||||||
|
"interval": 3,
|
||||||
|
"spacing": 1,
|
||||||
|
"on-click": "omarchy-launch-wifi"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
"format-discharging": "{icon}",
|
||||||
|
"format-charging": "{icon}",
|
||||||
|
"format-plugged": "",
|
||||||
|
"format-icons": {
|
||||||
|
"charging": ["", "", "", "", "", "", "", "", "", ""],
|
||||||
|
"default": ["", "", "", "", "", "", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"format-full": "",
|
||||||
|
"tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%",
|
||||||
|
"tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%",
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "omarchy-menu power",
|
||||||
|
"on-click-right": "notify-send -u low \"$(omarchy-battery-status)\"",
|
||||||
|
"states": {
|
||||||
|
"warning": 20,
|
||||||
|
"critical": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bluetooth": {
|
||||||
|
"format": "",
|
||||||
|
"format-off": "",
|
||||||
|
"format-disabled": "",
|
||||||
|
"format-connected": "",
|
||||||
|
"format-no-controller": "",
|
||||||
|
"tooltip-format": "Devices connected: {num_connections}",
|
||||||
|
"on-click": "omarchy-launch-bluetooth"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "omarchy-launch-audio",
|
||||||
|
"on-click-right": "pamixer -t",
|
||||||
|
"tooltip-format": "Playing at {volume}%",
|
||||||
|
"scroll-step": 5,
|
||||||
|
"format-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"headset": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"group/tray-expander": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 600,
|
||||||
|
"children-class": "tray-group-item"
|
||||||
|
},
|
||||||
|
"modules": ["custom/expand-icon", "tray", "memory", "custom/weather"]
|
||||||
|
},
|
||||||
|
"custom/expand-icon": {
|
||||||
|
"format": " ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"custom/screenrecording-indicator": {
|
||||||
|
"on-click": "omarchy-capture-screenrecording",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
|
||||||
|
"signal": 8,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/idle-indicator": {
|
||||||
|
"on-click": "omarchy-toggle-idle",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/idle.sh",
|
||||||
|
"signal": 9,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/notification-silencing-indicator": {
|
||||||
|
"on-click": "omarchy-toggle-notification-silencing",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/notification-silencing.sh",
|
||||||
|
"signal": 10,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 12,
|
||||||
|
"spacing": 12
|
||||||
|
},
|
||||||
|
"backlight": {
|
||||||
|
"format": "{percent}% {icon}",
|
||||||
|
"format-icons": ["🌑", "🌘", "🌗", "🌖", "🌕"]
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {used:0.1f}gb",
|
||||||
|
"interval": 2,
|
||||||
|
"on-click": "omarchy-launch-or-focus-tui btop"
|
||||||
|
},
|
||||||
|
"custom/weather": {
|
||||||
|
"format": "{}°",
|
||||||
|
"tooltip": true,
|
||||||
|
"interval": 600,
|
||||||
|
"exec": "omarchy-cmd-present wttrbar && wttrbar || true",
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"mpris": {
|
||||||
|
"format": "{player_icon} {artist} - {title}",
|
||||||
|
"format-paused": "{status_icon} <i>{artist} - {title}</i>",
|
||||||
|
"player-icons": {
|
||||||
|
"default": "🎵",
|
||||||
|
"mpv": "🎵"
|
||||||
|
},
|
||||||
|
"status-icons": {
|
||||||
|
"paused": "⏸"
|
||||||
|
},
|
||||||
|
"max-length": 50
|
||||||
|
},
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{}"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
{
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"spacing": 0,
|
||||||
|
"height": 26,
|
||||||
|
"modules-left": ["custom/omarchy", "hyprland/workspaces", "hyprland/window"],
|
||||||
|
"modules-center": ["clock", "custom/update", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator"],
|
||||||
|
"modules-right": [
|
||||||
|
"mpris",
|
||||||
|
"group/tray-expander",
|
||||||
|
"backlight",
|
||||||
|
"network",
|
||||||
|
"bluetooth",
|
||||||
|
"pulseaudio",
|
||||||
|
"cpu",
|
||||||
|
"battery"
|
||||||
|
],
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"on-click": "activate",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"default": "",
|
||||||
|
"1": "",
|
||||||
|
"2": "",
|
||||||
|
"3": "",
|
||||||
|
"4": "",
|
||||||
|
"5": "",
|
||||||
|
"6": "",
|
||||||
|
"7": "",
|
||||||
|
"8": "",
|
||||||
|
"9": "",
|
||||||
|
"10": "",
|
||||||
|
"active": ""
|
||||||
|
},
|
||||||
|
"persistent-workspaces": {
|
||||||
|
"1": [],
|
||||||
|
"2": [],
|
||||||
|
"3": [],
|
||||||
|
"4": [],
|
||||||
|
"5": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/omarchy": {
|
||||||
|
"format": "<span font='omarchy'>\ue900</span>",
|
||||||
|
"on-click": "omarchy-menu",
|
||||||
|
"on-click-right": "xdg-terminal-exec",
|
||||||
|
"tooltip-format": "Omarchy Menu\n\nSuper + Alt + Space"
|
||||||
|
},
|
||||||
|
"custom/update": {
|
||||||
|
"format": "",
|
||||||
|
"exec": "omarchy-update-available",
|
||||||
|
"on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update",
|
||||||
|
"tooltip-format": "Omarchy update available",
|
||||||
|
"signal": 7,
|
||||||
|
"interval": 21600
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"interval": 5,
|
||||||
|
"format": "",
|
||||||
|
"on-click": "omarchy-launch-or-focus-tui btop",
|
||||||
|
"on-click-right": "alacritty"
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%I:%M %p}",
|
||||||
|
"format-alt": "{:%A %d/%m/%Y}",
|
||||||
|
"tooltip-format": "<span>{calendar}</span>",
|
||||||
|
"on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format-icons": ["", "", "", "", ""],
|
||||||
|
"format": "{icon} {essid}",
|
||||||
|
"format-wifi": "{icon} {essid}",
|
||||||
|
"format-ethernet": "",
|
||||||
|
"format-disconnected": "",
|
||||||
|
"tooltip-format-wifi": "{essid} ({frequency} GHz)\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||||
|
"tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
||||||
|
"tooltip-format-disconnected": "Disconnected",
|
||||||
|
"interval": 3,
|
||||||
|
"spacing": 1,
|
||||||
|
"on-click": "omarchy-launch-wifi"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
"format-discharging": "{capacity}% {icon}",
|
||||||
|
"format-charging": "{capacity}% {icon}",
|
||||||
|
"format-plugged": "",
|
||||||
|
"format-icons": {
|
||||||
|
"charging": ["", "", "", "", "", "", "", "", "", ""],
|
||||||
|
"default": ["", "", "", "", "", "", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"format-full": "",
|
||||||
|
"tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%",
|
||||||
|
"tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%",
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "omarchy-menu power",
|
||||||
|
"on-click-right": "notify-send -u low \"$(omarchy-battery-status)\"",
|
||||||
|
"states": {
|
||||||
|
"warning": 20,
|
||||||
|
"critical": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bluetooth": {
|
||||||
|
"format": "",
|
||||||
|
"format-off": "",
|
||||||
|
"format-disabled": "",
|
||||||
|
"format-connected": "",
|
||||||
|
"format-no-controller": "",
|
||||||
|
"tooltip-format": "Devices connected: {num_connections}",
|
||||||
|
"on-click": "omarchy-launch-bluetooth"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "omarchy-launch-audio",
|
||||||
|
"on-click-right": "pamixer -t",
|
||||||
|
"tooltip-format": "Playing at {volume}%",
|
||||||
|
"scroll-step": 5,
|
||||||
|
"format-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"headset": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"group/tray-expander": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 600,
|
||||||
|
"children-class": "tray-group-item"
|
||||||
|
},
|
||||||
|
"modules": ["custom/expand-icon", "tray", "memory", "custom/weather"]
|
||||||
|
},
|
||||||
|
"custom/expand-icon": {
|
||||||
|
"format": " ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"custom/screenrecording-indicator": {
|
||||||
|
"on-click": "omarchy-capture-screenrecording",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
|
||||||
|
"signal": 8,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/idle-indicator": {
|
||||||
|
"on-click": "omarchy-toggle-idle",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/idle.sh",
|
||||||
|
"signal": 9,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/notification-silencing-indicator": {
|
||||||
|
"on-click": "omarchy-toggle-notification-silencing",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/notification-silencing.sh",
|
||||||
|
"signal": 10,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 12,
|
||||||
|
"spacing": 12
|
||||||
|
},
|
||||||
|
"backlight": {
|
||||||
|
"format": "{percent}% {icon}",
|
||||||
|
"format-icons": ["🌑", "🌘", "🌗", "🌖", "🌕"]
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {used:0.1f}gb",
|
||||||
|
"interval": 2,
|
||||||
|
"on-click": "omarchy-launch-or-focus-tui btop"
|
||||||
|
},
|
||||||
|
"custom/weather": {
|
||||||
|
"format": "{}°",
|
||||||
|
"tooltip": true,
|
||||||
|
"interval": 600,
|
||||||
|
"exec": "omarchy-cmd-present wttrbar && wttrbar || true",
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"mpris": {
|
||||||
|
"format": "{player_icon} {artist} - {title}",
|
||||||
|
"format-paused": "{status_icon} <i>{artist} - {title}</i>",
|
||||||
|
"player-icons": {
|
||||||
|
"default": "🎵",
|
||||||
|
"mpv": "🎵"
|
||||||
|
},
|
||||||
|
"status-icons": {
|
||||||
|
"paused": "⏸"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{}"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
{
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"spacing": 0,
|
||||||
|
"height": 26,
|
||||||
|
"modules-left": ["custom/omarchy", "hyprland/workspaces"],
|
||||||
|
"modules-center": ["clock", "custom/update", "custom/voxtype", "custom/screenrecording-indicator", "custom/idle-indicator", "custom/notification-silencing-indicator"],
|
||||||
|
"modules-right": [
|
||||||
|
"group/tray-expander",
|
||||||
|
"bluetooth",
|
||||||
|
"network",
|
||||||
|
"pulseaudio",
|
||||||
|
"cpu",
|
||||||
|
"battery"
|
||||||
|
],
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"on-click": "activate",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"default": "",
|
||||||
|
"1": "1",
|
||||||
|
"2": "2",
|
||||||
|
"3": "3",
|
||||||
|
"4": "4",
|
||||||
|
"5": "5",
|
||||||
|
"6": "6",
|
||||||
|
"7": "7",
|
||||||
|
"8": "8",
|
||||||
|
"9": "9",
|
||||||
|
"10": "0",
|
||||||
|
"active": ""
|
||||||
|
},
|
||||||
|
"persistent-workspaces": {
|
||||||
|
"1": [],
|
||||||
|
"2": [],
|
||||||
|
"3": [],
|
||||||
|
"4": [],
|
||||||
|
"5": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/omarchy": {
|
||||||
|
"format": "<span font='omarchy'>\ue900</span>",
|
||||||
|
"on-click": "omarchy-menu",
|
||||||
|
"on-click-right": "xdg-terminal-exec",
|
||||||
|
"tooltip-format": "Omarchy Menu\n\nSuper + Alt + Space"
|
||||||
|
},
|
||||||
|
"custom/update": {
|
||||||
|
"format": "",
|
||||||
|
"exec": "omarchy-update-available",
|
||||||
|
"on-click": "omarchy-launch-floating-terminal-with-presentation omarchy-update",
|
||||||
|
"tooltip-format": "Omarchy update available",
|
||||||
|
"signal": 7,
|
||||||
|
"interval": 21600
|
||||||
|
},
|
||||||
|
|
||||||
|
"cpu": {
|
||||||
|
"interval": 5,
|
||||||
|
"format": "",
|
||||||
|
"on-click": "omarchy-launch-or-focus-tui btop",
|
||||||
|
"on-click-right": "alacritty"
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:L%A %H:%M}",
|
||||||
|
"format-alt": "{:L%d %B W%V %Y}",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click-right": "omarchy-launch-floating-terminal-with-presentation omarchy-tz-select"
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format-icons": ["", "", "", "", ""],
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-wifi": "{icon}",
|
||||||
|
"format-ethernet": "",
|
||||||
|
"format-disconnected": "",
|
||||||
|
"tooltip-format-wifi": "{essid} ({frequency} GHz)",
|
||||||
|
"tooltip-format-ethernet": "Connected",
|
||||||
|
"tooltip-format-disconnected": "Disconnected",
|
||||||
|
"interval": 3,
|
||||||
|
"spacing": 1,
|
||||||
|
"on-click": "omarchy-launch-wifi"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"format": "{capacity}% {icon}",
|
||||||
|
"format-discharging": "{icon}",
|
||||||
|
"format-charging": "{icon}",
|
||||||
|
"format-plugged": "",
|
||||||
|
"format-icons": {
|
||||||
|
"charging": ["", "", "", "", "", "", "", "", "", ""],
|
||||||
|
"default": ["", "", "", "", "", "", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"format-full": "",
|
||||||
|
"tooltip-format-discharging": "{power:>1.0f}W↓ {capacity}%",
|
||||||
|
"tooltip-format-charging": "{power:>1.0f}W↑ {capacity}%",
|
||||||
|
"interval": 5,
|
||||||
|
"on-click": "omarchy-menu power",
|
||||||
|
"on-click-right": "notify-send -u low \"$(omarchy-battery-status)\"",
|
||||||
|
"states": {
|
||||||
|
"warning": 20,
|
||||||
|
"critical": 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bluetooth": {
|
||||||
|
"format": "",
|
||||||
|
"format-off": "",
|
||||||
|
"format-disabled": "",
|
||||||
|
"format-connected": "",
|
||||||
|
"format-no-controller": "",
|
||||||
|
"tooltip-format": "Devices connected: {num_connections}",
|
||||||
|
"on-click": "omarchy-launch-bluetooth"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "omarchy-launch-audio",
|
||||||
|
"on-click-right": "pamixer -t",
|
||||||
|
"tooltip-format": "Playing at {volume}%",
|
||||||
|
"scroll-step": 5,
|
||||||
|
"format-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"headset": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"group/tray-expander": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 600,
|
||||||
|
"children-class": "tray-group-item"
|
||||||
|
},
|
||||||
|
"modules": ["custom/expand-icon", "tray"]
|
||||||
|
},
|
||||||
|
"custom/expand-icon": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-scroll-up": "",
|
||||||
|
"on-scroll-down": "",
|
||||||
|
"on-scroll-left": "",
|
||||||
|
"on-scroll-right": ""
|
||||||
|
},
|
||||||
|
"custom/screenrecording-indicator": {
|
||||||
|
"on-click": "omarchy-capture-screenrecording",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/screen-recording.sh",
|
||||||
|
"signal": 8,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/idle-indicator": {
|
||||||
|
"on-click": "omarchy-toggle-idle",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/idle.sh",
|
||||||
|
"signal": 9,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/notification-silencing-indicator": {
|
||||||
|
"on-click": "omarchy-toggle-notification-silencing",
|
||||||
|
"exec": "$OMARCHY_PATH/default/waybar/indicators/notification-silencing.sh",
|
||||||
|
"signal": 10,
|
||||||
|
"return-type": "json"
|
||||||
|
},
|
||||||
|
"custom/voxtype": {
|
||||||
|
"exec": "omarchy-voxtype-status",
|
||||||
|
"return-type": "json",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"idle": "",
|
||||||
|
"recording": "",
|
||||||
|
"transcribing": ""
|
||||||
|
},
|
||||||
|
"tooltip": true,
|
||||||
|
"on-click-right": "omarchy-voxtype-config",
|
||||||
|
"on-click": "omarchy-voxtype-model"
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 12,
|
||||||
|
"spacing": 17
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
@import "../omarchy/current/theme/waybar.css";
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: @background;
|
||||||
|
color: @foreground;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 2px 2px;
|
||||||
|
min-height: 0;
|
||||||
|
font-family: 'JetBrainsMono Nerd Font';
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-left {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-right {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
all: initial;
|
||||||
|
padding: 0 6px;
|
||||||
|
margin: 0 1.5px;
|
||||||
|
min-width: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.empty {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight,
|
||||||
|
#custom-weather,
|
||||||
|
#memory,
|
||||||
|
#mpris,
|
||||||
|
#window,
|
||||||
|
#tray,
|
||||||
|
#cpu,
|
||||||
|
#battery,
|
||||||
|
#network,
|
||||||
|
#bluetooth,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-omarchy,
|
||||||
|
#custom-screenrecording-indicator,
|
||||||
|
#custom-idle-indicator,
|
||||||
|
#custom-notification-silencing-indicator,
|
||||||
|
#custom-update {
|
||||||
|
min-width: 12px;
|
||||||
|
margin: 0 7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-expand-icon {
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
padding: 2px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-update,
|
||||||
|
#custom-screenrecording-indicator,
|
||||||
|
#custom-idle-indicator,
|
||||||
|
#custom-notification-silencing-indicator {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-screenrecording-indicator.active,
|
||||||
|
#custom-idle-indicator.active,
|
||||||
|
#custom-notification-silencing-indicator.active {
|
||||||
|
color: #a55555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bluetooth {
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
@import "../omarchy/current/theme/waybar.css";
|
||||||
|
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
font-family: 'JetBrainsMono Nerd Font';
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-left {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-right {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: @background;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.empty #window {
|
||||||
|
background: transparent;
|
||||||
|
color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 5px;
|
||||||
|
transition: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
mpris.empty {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
all: initial;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
margin: 0 5px;
|
||||||
|
min-width: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
background: @foreground;
|
||||||
|
color: @background;
|
||||||
|
border-radius: 30px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: alpha(@foreground, .3);
|
||||||
|
border-radius: 30px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
transition: .7s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active:hover {
|
||||||
|
background: @foreground;
|
||||||
|
color: @background;
|
||||||
|
border-radius: 30px;
|
||||||
|
padding: 3px 10px 3px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.empty {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-weather,
|
||||||
|
#memory,
|
||||||
|
#mpris,
|
||||||
|
#window,
|
||||||
|
#tray-expander,
|
||||||
|
#workspaces,
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#battery,
|
||||||
|
#network,
|
||||||
|
#bluetooth,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-screenrecording-indicator,
|
||||||
|
#custom-idle-indicator,
|
||||||
|
#custom-notification-silencing-indicator,
|
||||||
|
#custom-update {
|
||||||
|
background-color: alpha(@foreground, .1);
|
||||||
|
padding: 5px 10px;
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris:hover,
|
||||||
|
#window:hover,
|
||||||
|
#clock:hover,
|
||||||
|
#backlight:hover,
|
||||||
|
#cpu:hover,
|
||||||
|
#network:hover,
|
||||||
|
#bluetooth:hover,
|
||||||
|
#pulseaudio:hover,
|
||||||
|
#custom-screenrecording-indicator:hover,
|
||||||
|
#custom-idle-indicator:hover,
|
||||||
|
#custom-notification-silencing-indicator:hover,
|
||||||
|
#custom-update:hover {
|
||||||
|
background-color: alpha(@foreground, .2);
|
||||||
|
transition: .7s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-expand-icon {
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray,
|
||||||
|
#memory,
|
||||||
|
#custom-weather {
|
||||||
|
background-color: transparent;
|
||||||
|
margin: 5px;
|
||||||
|
padding: 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-update,
|
||||||
|
#custom-screenrecording-indicator,
|
||||||
|
#custom-idle-indicator,
|
||||||
|
#custom-notification-silencing-indicator {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-screenrecording-indicator,
|
||||||
|
#custom-idle-indicator,
|
||||||
|
#custom-notification-silencing-indicator {
|
||||||
|
border-radius: 10px;
|
||||||
|
min-width: 12px;
|
||||||
|
padding: 0 11px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-screenrecording-indicator.active,
|
||||||
|
#custom-idle-indicator.active,
|
||||||
|
#custom-notification-silencing-indicator.active {
|
||||||
|
color: #a55555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-omarchy,
|
||||||
|
#battery {
|
||||||
|
background-color: @foreground;
|
||||||
|
color: @background;
|
||||||
|
min-width: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin: 5px 0 5px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces,
|
||||||
|
#mpris {
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#mpris {
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray-expander {
|
||||||
|
padding: 0 0 0 10px;
|
||||||
|
margin-left: 1px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight {
|
||||||
|
background-color: alpha(@foreground, .1);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
border-radius: 10px 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
padding: 0 15px 0 10px;
|
||||||
|
border-radius: 0 10px 10px 0;
|
||||||
|
margin-right: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
padding: 0 15px 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
border-radius: 10px;
|
||||||
|
background: @background;
|
||||||
|
border: 3px solid alpha(@foreground, .5);
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
@import "../omarchy/current/theme/waybar.css";
|
||||||
|
|
||||||
|
* {
|
||||||
|
background-color: @background;
|
||||||
|
color: @foreground;
|
||||||
|
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
font-family: 'JetBrainsMono Nerd Font';
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-left {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modules-right {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
all: initial;
|
||||||
|
padding: 0 6px;
|
||||||
|
margin: 0 1.5px;
|
||||||
|
min-width: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.empty {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu,
|
||||||
|
#battery,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-omarchy,
|
||||||
|
#custom-update {
|
||||||
|
min-width: 12px;
|
||||||
|
margin: 0 7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bluetooth {
|
||||||
|
margin-right: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
margin-right: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-expand-icon {
|
||||||
|
margin-right: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-update {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
margin-left: 8.75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-screenrecording-indicator,
|
||||||
|
#custom-idle-indicator,
|
||||||
|
#custom-notification-silencing-indicator {
|
||||||
|
min-width: 12px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
padding-bottom: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-screenrecording-indicator.active {
|
||||||
|
color: #a55555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-idle-indicator.active,
|
||||||
|
#custom-notification-silencing-indicator.active {
|
||||||
|
color: #a55555;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-voxtype {
|
||||||
|
min-width: 12px;
|
||||||
|
margin: 0 0 0 7.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-voxtype.recording {
|
||||||
|
color: #a55555;
|
||||||
|
}
|
||||||
@@ -46,6 +46,10 @@ bindd = SUPER CTRL, S, Share, exec, omarchy-menu share
|
|||||||
# Transcoding
|
# Transcoding
|
||||||
bindd = SUPER CTRL, R, Transcode, exec, omarchy-menu transcode
|
bindd = SUPER CTRL, R, Transcode, exec, omarchy-menu transcode
|
||||||
|
|
||||||
|
# Workspace layouts
|
||||||
|
bindd = SUPER CTRL, HOME, Restore workspace layout, exec, omarchy-workspace-restore
|
||||||
|
bindd = SUPER CTRL ALT, HOME, Save workspace layout, exec, omarchy-workspace-save
|
||||||
|
|
||||||
# Waybar-less information
|
# Waybar-less information
|
||||||
bindd = SUPER CTRL ALT, T, Show time, exec, notify-send -u low " $(date +"%A %H:%M · %d %B %Y · Week %V")"
|
bindd = SUPER CTRL ALT, T, Show time, exec, notify-send -u low " $(date +"%A %H:%M · %d %B %Y · Week %V")"
|
||||||
bindd = SUPER CTRL ALT, B, Show battery remaining, exec, notify-send -u low "$(omarchy-battery-status)"
|
bindd = SUPER CTRL ALT, B, Show battery remaining, exec, notify-send -u low "$(omarchy-battery-status)"
|
||||||
|
|||||||
Reference in New Issue
Block a user