summaryrefslogtreecommitdiffstats
path: root/powerline/commands/daemon.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:40:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:40:16 +0000
commit3f25952c13d5847d510c0cae22a8ba876638d570 (patch)
tree02f505f016ed5a1029277dcae520d5e2a75906fb /powerline/commands/daemon.py
parentInitial commit. (diff)
downloadpowerline-3f25952c13d5847d510c0cae22a8ba876638d570.tar.xz
powerline-3f25952c13d5847d510c0cae22a8ba876638d570.zip
Adding upstream version 2.8.3.upstream/2.8.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'powerline/commands/daemon.py')
-rw-r--r--powerline/commands/daemon.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/powerline/commands/daemon.py b/powerline/commands/daemon.py
new file mode 100644
index 0000000..7e8c8ab
--- /dev/null
+++ b/powerline/commands/daemon.py
@@ -0,0 +1,24 @@
+# vim:fileencoding=utf-8:noet
+from __future__ import (division, absolute_import, print_function)
+
+import argparse
+
+
+def get_argparser(ArgumentParser=argparse.ArgumentParser):
+ parser = ArgumentParser(description='Daemon that improves powerline performance.')
+ parser.add_argument(
+ '--quiet', '-q', action='store_true',
+ help='Without other options: do not complain about already running '
+ 'powerline-daemon instance. '
+ 'Will still exit with 1. '
+ 'With `--kill\' and `--replace\': do not show any messages. '
+ 'With `--foreground\': ignored. '
+ 'Does not silence exceptions in any case.'
+ )
+ parser.add_argument('--socket', '-s', help='Specify socket which will be used for connecting to daemon.')
+ exclusive_group = parser.add_mutually_exclusive_group()
+ exclusive_group.add_argument('--kill', '-k', action='store_true', help='Kill an already running instance.')
+ replace_group = exclusive_group.add_argument_group()
+ replace_group.add_argument('--foreground', '-f', action='store_true', help='Run in the foreground (don’t daemonize).')
+ replace_group.add_argument('--replace', '-r', action='store_true', help='Replace an already running instance.')
+ return parser