From ebc7031a3d298900ebb542d0dd3be013f2111415 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Sat, 31 Jul 2021 16:14:03 -0300 Subject: [PATCH] feat(Browser): Include incognito window option --- browser.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/browser.sh b/browser.sh index 5207ea6..44c0600 100755 --- a/browser.sh +++ b/browser.sh @@ -1,7 +1,15 @@ -#!/bin/sh +#!/bin/bash activity=`kactivities-cli --current-activity | cut -d" " -f3` -[[ $activity == "OXO" ]] && /bin/brave "$1" -[[ $activity == "Development" ]] && /home/bruno/Apps/firefox/firefox-bin "$1" -[[ $activity == "Main" ]] && /bin/firefox "$1" -[[ $activity == "Videos" ]] && /bin/firefox "$1" +if [[ $1 =~ .*\&incognitottt$ ]]; then + url="${1/\&incognitottt/}" + [[ $activity == "OXO" ]] && /bin/brave --incognito "$url" 2>%1 1>/dev/null & + [[ $activity == "Development" ]] && /home/bruno/Apps/firefox/firefox-bin --private-window "$url" 2>%1 1>/dev/null & + [[ $activity == "Main" ]] && /bin/firefox --private-window "$url" 2>%1 1>/dev/null & + [[ $activity == "Videos" ]] && /bin/firefox --private-window "$url" 2>%1 1>/dev/null & +else + [[ $activity == "OXO" ]] && /bin/brave "$1" 2>%1 1>/dev/null & + [[ $activity == "Development" ]] && /home/bruno/Apps/firefox/firefox-bin "$1" 2>%1 1>/dev/null & + [[ $activity == "Main" ]] && /bin/firefox "$1" 2>%1 1>/dev/null & + [[ $activity == "Videos" ]] && /bin/firefox "$1" 2>%1 1>/dev/null & +fi