blob: 68d390c8090bdc1eeff43cee16245aaf739dbebd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/env bash
# Detect kanshi config
CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/kanshi/config"
# Extract profile names (lines starting with 'profile NAME {')
profiles=$(grep -oP '^profile\s+\K[^ ]+' "$CONFIG")
# Let the user pick a profile via fzf (terminal UI)
choice=$(printf "%s\n" $profiles | fzf --prompt="Select kanshi profile: ")
[ -z "$choice" ] && exit 0
# Reload kanshi with selected profile
notify-send "Kanshi" "Switching to profile: $choice"
kanshictl switch $choice
|