konsoleprofile 1.35 KB
Newer Older
1
#!/bin/sh
2 3
#
#  This file is in the public domain.
4

5
#  A command-line tool to change the current tab's profile options.
6 7 8
#
#  Usage: konsoleprofile option=value
#
9 10
#  Example: 'konsoleprofile ColorScheme=WhiteOnBlack' will change the
#  colorscheme used in current tab into WhiteOnBlack on the fly.
11
#
12 13 14
#  NOTE: This script MUST run within a konsole tab to take effect. The change
#  is applied only to current tab. Other tabs using the same profile will not
#  be influenced.  Any changes won't be saved to to disk.
15
#
16 17 18 19 20 21
#  For the full list of supported options and values:
#   1. konsole --list-profile-properties
#   2. refer to konsole/src/Profile.h
#   3. visit the online reference:
#       http://api.kde.org/4.7-api/kde-baseapps-apidocs/konsole/html/namespaceKonsole.html
#       http://api.kde.org/4.7-api/kde-baseapps-apidocs/konsole/html/classKonsole_1_1Profile.html
22
#
23 24 25 26 27 28 29 30 31 32 33 34 35 36
#  All of the logic is in konsole. This script is provided for convenience.

if [ ! $# -eq 1 ]
    then
    echo ""
    echo "Usage: $0 option=value"
    echo ""
    echo "For more documentation view this file $0"
    echo ""
    echo "The complete list of profile options can be displayed using:"
    echo " konsole --list-profile-properties"
    echo ""
    exit 0
fi
37

38 39
# Use printf since echo is not portable
# http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html
40
printf "\033]50;%s\a" "$1"