5 from subprocess
import Popen
, PIPE
7 remmina_dir
= os
.path
.expanduser("~/.local/share/remmina")
11 for f
in os
.listdir(remmina_dir
):
12 fp
= os
.path
.join(remmina_dir
, f
)
13 c
= ConfigParser
.ConfigParser()
15 n
= c
.get('remmina', 'name')
18 lines
= max(min(15, len(fdict
)), 1);
19 width
= len(max(fdict
.keys(), key
=len))
20 rofi
= Popen(["rofi", "-i", "-dmenu", \
21 "-l", str(lines
), "-width", str(width
), \
22 "-p", "connection"], stdout
=PIPE
, stdin
=PIPE
)
23 selected
= rofi
.communicate("\n" \
25 .encode("utf-8"))[0] \
30 r
= Popen(["remmina", "-c", fdict
[selected
]])