Це стара версія документу!
If you use 2 desktops in KDE, you can use different default browsers in these desktops. I like having Firefox as default browser for Personal desktop and Google Chrome for Work.
Create a shell script with logic for choosing
Let's put it into $HOME/scripts/smart-browser.sh:
#!/usr/bin/env bash LOGFILE=/home/diz/temp/smartbrowser.log current_desktop=$(qdbus org.kde.KWin /KWin currentDesktop) printf '%s ' "$(date +'%Y-%m-%d %H:%M:%S')" >> "$LOGFILE" echo "Current desktop is $current_desktop, Args: $@" >> "$LOGFILE" if [[ "$current_desktop" == "1" ]]; then google-chrome "$@" >> "$LOGFILE" 2>&1 elif [[ "$current_desktop" == "2" ]]; then firefox "$@" >> "$LOGFILE" 2>&1 else firefox "$@" >> "$LOGFILE" 2>&1 fi