-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddLineToSxhkd_bonus_script.py
83 lines (73 loc) · 2.75 KB
/
addLineToSxhkd_bonus_script.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import os
a = input("Hotkey: ")
x = input("Command: ")
c = input("Comment: ")
b = input(r"Add to (select 0, 1, 2, ...): ")
output = "\n\n" + c + "\n" + a + "\n" + "\t" + x
if b == "01":
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "a+") as f:
f.write(output)
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "r") as g:
fl = g.readline()
if fl == '# SX_0\n':
with open(r'/home/ari/.config/sxhkd/sx_1', "a+") as z:
z.write(output)
if fl == '# SX_1\n':
with open(r'/home/ari/.config/sxhkd/sx_0', "a+") as d:
d.write(output)
if b == "0":
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "r") as g:
fl = g.readline()
if fl == '# SX_0\n':
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "a+") as z:
z.write(output)
if fl == '# SX_1\n':
with open(r'/home/ari/.config/sxhkd/sx_0', "a+") as z:
z.write(output)
if b == "1":
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "r") as g:
fl = g.readline()
if fl == '# SX_1\n':
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "a+") as z:
z.write(output)
if fl == '# SX_0\n':
with open(r'/home/ari/.config/sxhkd/sx_1', "a+") as z:
z.write(output)
if b == "012":
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "a+") as f:
f.write(output)
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "r") as g:
fl = g.readline()
if fl == '# SX_0\n':
with open(r'/home/ari/.config/sxhkd/sx_1', "a+") as zd:
zd.write(output)
with open(r'/home/ari/.config/sxhkd/sx_2', "a+") as d:
d.write(output)
if fl == '# SX_1\n':
with open(r'/home/ari/.config/sxhkd/sx_0', "a+") as d:
d.write(output)
with open(r'/home/ari/.config/sxhkd/sx_2', "a+") as zd:
zd.write(output)
if fl == '# SX_2\n':
with open(r'/home/ari/.config/sxhkd/sx_0', "a+") as d:
d.write(output)
with open(r'/home/ari/.config/sxhkd/sx_1', "a+") as zd:
zd.write(output)
if b == "12":
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "r") as g:
fl = g.readline()
if fl == '# SX_2\n':
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "a+") as f:
f.write(output)
with open(r'/home/ari/.config/sxhkd/sx_1', "a+") as z:
z.write(output)
if fl == '# SX_1\n':
with open(r'/home/ari/.config/sxhkd/sxhkdrc', "a+") as d:
d.write(output)
with open(r'/home/ari/.config/sxhkd/sx_2', "a+") as z:
z.write(output)
if fl == '# SX_0\n':
with open(r'/home/ari/.config/sxhkd/sx_1', "a+") as z:
z.write(output)
with open(r'/home/ari/.config/sxhkd/sx_2', "a+") as z:
z.write(output)