-
Notifications
You must be signed in to change notification settings - Fork 10
/
functions.py
85 lines (61 loc) · 2.17 KB
/
functions.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
83
84
85
from libqtile.lazy import lazy
# from libqtile.command_client import InteractiveCommandClient
class Functions:
##### MOVE WINDOW IN GROUPS #####
@staticmethod
def window_to_prev_group():
@lazy.function
def __inner(qtile):
i = qtile.groups.index(qtile.current_group)
if qtile.current_window and i != 0:
group = qtile.groups[i - 1].name
qtile.current_window.togroup(group, switch_group=True)
return __inner
@staticmethod
def window_to_next_group():
@lazy.function
def __inner(qtile):
i = qtile.groups.index(qtile.current_group)
if qtile.current_window and i != len(qtile.groups):
group = qtile.groups[i + 1].name
qtile.current_window.togroup(group, switch_group=True)
return __inner
##### KILL ALL WINDOWS #####
@staticmethod
def kill_all_windows():
@lazy.function
def __inner(qtile):
for window in qtile.current_group.windows:
window.kill()
return __inner
@staticmethod
def kill_all_windows_minus_current():
@lazy.function
def __inner(qtile):
for window in qtile.current_group.windows:
if window != qtile.current_window:
window.kill()
return __inner
class PWA:
def __init__(self):
pass
@staticmethod
def notion():
return "brave --profile-directory=Default --app=https://notion.so"
@staticmethod
def music():
return "brave --profile-directory=Default --app=https://music.youtube.com/"
@staticmethod
def spotify():
return "brave --profile-directory=Default --app=https://open.spotify.com/"
@staticmethod
def youtube():
return "brave --user-data-dir=Default --app=https://www.youtube.com"
@staticmethod
def calendar():
return "brave --profile-directory=Default --app=https://calendar.google.com/calendar/"
@staticmethod
def habitica():
return "brave --profile-directory=Default --app=https://habitica.com/"
if __name__ == "__main__":
print("This is an utilities module")