Last active
November 28, 2015 23:00
-
-
Save riccardobl/14cf9d143d1ca2a6e043 to your computer and use it in GitHub Desktop.
Per-activity firefox profile under kde.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'qdbus org.kde.kactivitymanagerd /ActivityManager/Activities CurrentActivity'>/usr/bin/echo_current_activity | |
chmod +x /usr/bin/echo_current_activity | |
echo "Activity for default profile: " | |
read default_activity | |
echo ' | |
#!/bin/bash | |
'>/usr/bin/firefox-kde | |
echo " | |
default_activity='$default_activity' | |
">>/usr/bin/firefox-kde | |
echo ' | |
firefox="/usr/lib/firefox/firefox.sh" | |
activity=`/usr/bin/echo_current_activity` | |
if [ "$activity" = "$default_activity" ] | |
then | |
echo "Default profile" | |
$firefox -P default $@ | |
else | |
echo "$activity profile" | |
if [ ! -f "$HOME/.mozilla/tmp/$activity" ]; | |
then | |
mkdir -p $HOME/.mozilla/tmp | |
$firefox -CreateProfile $activity -P $activity | |
echo "1">"$HOME/.mozilla/tmp/$activity" | |
fi | |
$firefox -P $activity $@ | |
fi | |
'>>/usr/bin/firefox-kde | |
chmod +x /usr/bin/firefox-kde |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment