aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/chooseprofile
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-11-04 14:44:21 +0300
committerawy <awy@awy.one>2025-11-04 14:44:21 +0300
commitf1f0012b16d00e23d6199ce03bfba9b9b04538b7 (patch)
tree12a639750c9c64a9e37a7e0b449d46d807622768 /.local/bin/chooseprofile
parent0043a1d87a144764dcfc83a7d1834a47709ef6f0 (diff)
downloadhyprdots-f1f0012b16d00e23d6199ce03bfba9b9b04538b7.tar.gz
chooseprofile script
fast way to launch icecat with certain profile
Diffstat (limited to '.local/bin/chooseprofile')
-rwxr-xr-x.local/bin/chooseprofile12
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/chooseprofile b/.local/bin/chooseprofile
new file mode 100755
index 0000000..083c263
--- /dev/null
+++ b/.local/bin/chooseprofile
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+profiles=$(awk -F= '/^\[Profile/ {profile=$1} /Name/ && !/default/ {print $2}' ~/.mozilla/icecat/profiles.ini)
+
+profile=$(echo "$profiles" | mew -p "Select IceCat Profile" -l 10)
+
+if [ -z "$profile" ] || ! echo "$profiles" | rg -q "^$profile$"; then
+ echo "Invalid selection or no profile selected. Exiting."
+ exit 1
+fi
+
+hyprctl dispatch exec "icecat -P $profile"