1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
# In this file you can find some functions used in FVWM-Crystal to launch
# applications. They are provided here for easier global change (you don't
# need to edit, for example, every entry in ApplicationDatabase to change
# a terminal type). You can use those commands in FvwmConsole window (by
# default in the bottom-left corner of the screen, accesible by pressing
# Alt+;).
# Near the functions you can find commented out entries, from which you can
# choosed a preffered command.
# Functions:
# A
# Launches a terminal with optional program as an argument. Terminal settings
# should be set using ~/.Xresources file or (in Eterm) theme file.
# AA
# A special version of the 'A' function. It just opens a terminal without
# additional application launched in it. It exists because certain terminal
# emulators (xterm, Eterm, something else?) won't run with '-e' argument being
# null.
# AT
# As 'A' function, but give a Title to the window terminal.
# C
# Launches a the fvwm console terminal with optional program as an argument.
# Terminal settings should be set using ~/.Xresources file or (in Eterm) theme file.
# X
# Launches a command in the background. Typically this function is used to
# launch some X application without additional terminal window.
# S
# Launch a command using 'sudo'. You need to have provileges in /etc/sudoers
# file to execute choosen command - consult your administrator or man sudo,
# man sudoers, man visudo. Usually 'sudo' asks for a password, so it's a good
# choice to launch it in a terminal window (otherwise you should use
# a specialized program for password verification).
# SX
# It does the same thing as 'S', but instead of opening a terminal with sudo
# it uses graphical client called 'gksudo' to execute a command. Unfortunately
# this variant is only usable with graphical applications.
SetEnv DefaultTerminal NO_DEFAULT_TERMINAL_FOUND
#FindCommand DefaultTerminal urxvt aterm xterm
CheckPreferences DefaultTerminal "SavePreferences DefaultTerminal 'FindCommand DefaultTerminal urxvt aterm xterm x-terminal-emulator'"
LoadPreferences DefaultTerminal
# Usage: A [command] [command options]
DestroyFunc A
AddToFunc A
+ I SetEnv DefaultTerminal $[infostore.DefaultTerminal]
+ I Window-SetPlacementPolicy
+ I Test (!EnvMatch DefaultTerminal gnome-terminal, !EnvMatch DefaultTerminal multi-gnome-terminal, !EnvMatch DefaultTerminal terminator, !EnvMatch DefaultTerminal x-terminal-emulator, !EnvMatch DefaultTerminal xfce4-terminal) Exec exec $[infostore.DefaultTerminal] -e $* $[infostore.SILENT]
+ I TestRc (NoMatch) Exec exec $[infostore.DefaultTerminal] -e "$*" $[infostore.SILENT]
+ I UnsetEnv DefaultTerminal
DestroyFunc AA
AddToFunc AA
+ I Window-SetPlacementPolicy
+ I Exec exec $[infostore.DefaultTerminal] $[infostore.SILENT]
# Usage: AT [title] [command] (Use quotes if you want command options or title with spaces)
DestroyFunc AT
AddToFunc AT
+ I SetEnv DefaultTerminal $[infostore.DefaultTerminal]
+ I Window-SetPlacementPolicy
+ I Test (!EnvMatch DefaultTerminal gnome-terminal, !EnvMatch DefaultTerminal multi-gnome-terminal, !EnvMatch DefaultTerminal terminator, !EnvMatch DefaultTerminal x-terminal-emulator, !EnvMatch DefaultTerminal xfce4-terminal) Exec exec $[infostore.DefaultTerminal] -title "$0" -e $1 $[infostore.SILENT]
+ I TestRc (NoMatch) Exec exec $[infostore.DefaultTerminal] --title "$0" -e "$1" $[infostore.SILENT]
+ I UnsetEnv DefaultTerminal
# Usage: C [command] [command options]
DestroyFunc C
AddToFunc C
+ I Window-SetPlacementPolicy
+ I Exec exec $[infostore.FvwmConsoleTerminal] -e $* $[infostore.SILENT]
# Usage: X [command] [command options]
DestroyFunc X
AddToFunc X
+ I Window-SetPlacementPolicy
+ I Exec exec $* $[infostore.SILENT]
# Usage: S [command] [command options]
DestroyFunc S
AddToFunc S
+ I C sudo $* $[infostore.SILENT]
# Usage: SX [command]
DestroyFunc SX
AddToFunc SX
+ I X gksudo $* $[infostore.SILENT]
# Dummy function created to avoid the error messages.
# If the real function is used, this does nothing.
AddToFunc Window-SetPlacementPolicy I Nop
# vim:ft=fvwm
|