reformat file
This commit is contained in:
parent
96a3650663
commit
8d5af2f340
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
def rofi(prompt, options, rofi_args=[], fuzzy=True):
|
def rofi(prompt, options, rofi_args=[], fuzzy=True):
|
||||||
optionstr = '\n'.join(option.replace('\n', ' ') for option in options)
|
optionstr = '\n'.join(option.replace('\n', ' ') for option in options)
|
||||||
args = ['rofi', '-sort', '-no-levenshtein-sort']
|
args = ['rofi', '-sort', '-no-levenshtein-sort']
|
||||||
|
@ -9,7 +10,6 @@ def rofi(prompt, options, rofi_args=[], fuzzy=True):
|
||||||
args += rofi_args
|
args += rofi_args
|
||||||
args = [str(arg) for arg in args]
|
args = [str(arg) for arg in args]
|
||||||
|
|
||||||
|
|
||||||
result = subprocess.run(args, input=optionstr, stdout=subprocess.PIPE, universal_newlines=True)
|
result = subprocess.run(args, input=optionstr, stdout=subprocess.PIPE, universal_newlines=True)
|
||||||
returncode = result.returncode
|
returncode = result.returncode
|
||||||
stdout = result.stdout.strip()
|
stdout = result.stdout.strip()
|
||||||
|
|
Loading…
Reference in a new issue