xsel fixes
# -*- coding: utf-8 -*-
-import time
-import os
"""
Display X selection.
@@ -8,10 +6,10 @@ Configuration parameters:
cache_timeout: refresh interval for this module (default 0.5)
command: the clipboard command to run (default 'xsel --output')
format: display format for this module (default '{selection}')
+ log_file: specify the clipboard log to use (default None)
max_size: strip the selection to this value (default 15)
symmetric: show beginning and end of the selection string
with respect to configured max_size. (default True)
- log_file: specify the clipboard log to use (default None)
Format placeholders:
{selection} output from clipboard command
@@ -35,6 +33,10 @@ SAMPLE OUTPUT
"""
+import time
+import os.path
+
+
class Py3status:
"""
"""
@@ -42,12 +44,13 @@ class Py3status:
cache_timeout = 0.5
command = 'xsel --output'
format = '{selection}'
+ log_file = None
max_size = 15
symmetric = True
- log_file = None
def post_config_hook(self):
self.selection_cache = None
+ if self.log_file:
self.log_file = os.path.expanduser(self.log_file)
def xsel(self):
