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