mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-10-11 01:12:43 +02:00
Librewolf: add private window in profile selector
This commit is contained in:
1 parent
9b3b0cd165
commit
7d8aa54bbb
1 file changed
+8
-4
@@ -12,7 +12,7 @@ writeShellApplication {
|
|||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
# List of profiles
|
# List of profiles
|
||||||
profiles=("work" "other")
|
profiles=("work" "other" "private window")
|
||||||
|
|
||||||
# Use fzf to select
|
# Use fzf to select
|
||||||
selected=$(printf "%s\n" "''${profiles[@]}" | fzf --height 6 --reverse --prompt="Select LibreWolf profile:")
|
selected=$(printf "%s\n" "''${profiles[@]}" | fzf --height 6 --reverse --prompt="Select LibreWolf profile:")
|
||||||
@@ -21,9 +21,13 @@ writeShellApplication {
|
|||||||
[[ -z "$selected" ]] && exit 0
|
[[ -z "$selected" ]] && exit 0
|
||||||
|
|
||||||
# Launch LibreWolf detached, keeping environment
|
# Launch LibreWolf detached, keeping environment
|
||||||
setsid librewolf -P "$selected" --no-remote >/dev/null 2>&1 &
|
if [[ "$selected" == "private window" ]]; then
|
||||||
pkill -f "kitty.*Select LibreWolf profile"
|
setsid librewolf --private-window --no-remote >/dev/null 2>&1 &
|
||||||
|
pkill -f "kitty.*Select LibreWolf profile"
|
||||||
|
else
|
||||||
|
setsid librewolf -P "$selected" --no-remote >/dev/null 2>&1 &
|
||||||
|
pkill -f "kitty.*Select LibreWolf profile"
|
||||||
|
fi
|
||||||
|
|
||||||
# Exit the kitty terminal after selection
|
# Exit the kitty terminal after selection
|
||||||
exit
|
exit
|
||||||
|
|||||||
Reference in new issue
Block a user