--ignore-screen (-i) flag added.
This commit is contained in:
parent
a742c12cd8
commit
0930a86ce7
@ -511,6 +511,7 @@ fenrir [OPTIONS]
|
||||
- `-e, --emulated-pty` - Use PTY emulation with escape sequences for input (enables desktop/X/Wayland usage)
|
||||
- `-E, --emulated-evdev` - Use PTY emulation with evdev for input (single instance)
|
||||
- `-F, --force-all-screens` - Force Fenrir to respond on all screens, ignoring ignoreScreen setting
|
||||
- `-i, -I, --ignore-screen SCREEN` - Ignore specific screen(s). Can be used multiple times. Combines with existing ignore settings.
|
||||
|
||||
### Examples:
|
||||
```bash
|
||||
@ -525,6 +526,10 @@ sudo fenrir -o "speech#rate=0.8;sound#volume=0.5"
|
||||
|
||||
# Force Fenrir to work on all screens (ignore ignoreScreen setting)
|
||||
sudo fenrir -F
|
||||
|
||||
# Ignore specific screens
|
||||
sudo fenrir --ignore-screen 1
|
||||
sudo fenrir -i 1 -i 2 # Ignore screens 1 and 2
|
||||
```
|
||||
|
||||
## Localization
|
||||
|
@ -65,6 +65,10 @@ Use PTY emulation with evdev for input (single instance mode).
|
||||
.BR \-F ", " \-\-force-all-screens
|
||||
Force Fenrir to respond on all screens, ignoring the ignoreScreen setting. This temporarily overrides screen filtering for the current session.
|
||||
|
||||
.TP
|
||||
.BR \-i ", " \-I ", " \-\-ignore-screen " \fISCREEN\fR"
|
||||
Ignore specific screen(s). Can be used multiple times to ignore multiple screens. This is equivalent to setting ignoreScreen in the configuration file and will be combined with any existing ignore settings.
|
||||
|
||||
.SH KEY CONCEPTS
|
||||
|
||||
.SS Fenrir Key
|
||||
|
@ -1240,6 +1240,9 @@ Use PTY emulation with evdev for input (single instance mode).
|
||||
`+-F, --force-all-screens+`::
|
||||
Force Fenrir to respond on all screens, ignoring the ignoreScreen setting. This temporarily overrides screen filtering for the current session.
|
||||
|
||||
`+-i, -I, --ignore-screen <SCREEN>+`::
|
||||
Ignore specific screen(s). Can be used multiple times to ignore multiple screens. This is equivalent to setting ignoreScreen in the configuration file and will be combined with any existing ignore settings.
|
||||
|
||||
==== Set settings options
|
||||
|
||||
You can specify options that overwrite the setting.conf. This is done
|
||||
|
@ -297,6 +297,7 @@ fenrir [OPTIONS]
|
||||
- `-e, --emulated-pty` - PTY emulation for desktop use
|
||||
- `-E, --emulated-evdev` - PTY + evdev emulation
|
||||
- `-F, --force-all-screens` - Ignore ignoreScreen setting
|
||||
- `-i, -I, --ignore-screen SCREEN` - Ignore specific screen(s), can be used multiple times
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
@ -72,6 +72,12 @@ def create_argument_parser():
|
||||
action='store_true',
|
||||
help='Force Fenrir to respond on all screens, ignoring ignoreScreen setting'
|
||||
)
|
||||
argumentParser.add_argument(
|
||||
'-i', '-I', '--ignore-screen',
|
||||
metavar='SCREEN',
|
||||
action='append',
|
||||
help='Ignore specific screen(s). Can be used multiple times. Same as ignoreScreen setting.'
|
||||
)
|
||||
return argumentParser
|
||||
|
||||
def validate_arguments(cliArgs):
|
||||
|
@ -321,6 +321,14 @@ class settingsManager():
|
||||
if cliArgs.force_all_screens:
|
||||
environment['runtime']['force_all_screens'] = True
|
||||
|
||||
if cliArgs.ignore_screen:
|
||||
currentIgnoreScreen = self.getSetting('screen', 'ignoreScreen')
|
||||
if currentIgnoreScreen:
|
||||
ignoreScreens = currentIgnoreScreen.split(',') + cliArgs.ignore_screen
|
||||
else:
|
||||
ignoreScreens = cliArgs.ignore_screen
|
||||
self.setSetting('screen', 'ignoreScreen', ','.join(ignoreScreens))
|
||||
|
||||
if not os.path.exists(self.getSetting('sound','theme') + '/soundicons.conf'):
|
||||
if os.path.exists(soundRoot + self.getSetting('sound','theme')):
|
||||
self.setSetting('sound', 'theme', soundRoot + self.getSetting('sound','theme'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user