This repository was archived by the owner on Jun 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +54
-3
lines changed Expand file tree Collapse file tree 3 files changed +54
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ An unofficial async python wrapper for Hyprland's IPC supposed to somewhat work
9
9
- [x] event listeners
10
10
- [x] keybinds
11
11
- [ ] windowrules
12
- - [ ] hyprland info
12
+ - [x ] hyprland info
13
13
- [x] misc hyprland commands(change workspace, move active window etc...)* (dispatchers)*
14
14
- [ ] a nice way to handle colors
15
15
- [ ] build ` settings.py ` file based on current hl version
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ async def split_ratio(x:float):
76
76
77
77
async def toggle_opaque ():
78
78
await async_command_send ('/dispatch toggleopaque' )
79
-
79
+ ###
80
80
async def move_cursor_to_corner (c ):
81
81
await async_command_send (f'/dispatch movecursortocorner { c } ' )
82
82
@@ -104,5 +104,17 @@ async def bring_active_to_top():
104
104
async def toggles_pecial_workspace (sw = None ):
105
105
await async_command_send (f'/dispatch togglespecialworkspace { sw if sw else "" } ' )
106
106
107
+ ### end of the actual dispatch commands
108
+ ### and henceforth are the commands that are not
109
+
107
110
async def reload_config ():
108
- await async_command_send ('/reload' )
111
+ await async_command_send ('reload' )
112
+
113
+ async def kill_mode ():
114
+ await async_command_send ('kill' )
115
+
116
+ async def cursor_theme (theme ,size ):
117
+ await async_command_send (f'cursor { theme } { size } ' )
118
+
119
+ async def switch_xkb_layout (device ,cmd ):
120
+ await async_command_send (f'switchxkblayout { device } { cmd } ' )
Original file line number Diff line number Diff line change
1
+ from .sockets import async_command_send
2
+ import json
3
+
4
+
5
+ class Info :
6
+ async def version ():
7
+ return json .loads (await async_command_send ('version -j' ))
8
+
9
+ async def monitors ():
10
+ return json .loads (await async_command_send ('monitors -j' ))
11
+
12
+ async def workspaces ():
13
+ return json .loads (await async_command_send ('workspaces -j' ))
14
+
15
+ async def clients ():
16
+ return json .loads (await async_command_send ('clients -j' ))
17
+
18
+ async def devices ():
19
+ return json .loads (await async_command_send ('devices -j' ))
20
+
21
+ async def active_window ():
22
+ return json .loads (await async_command_send ('activewindow -j' ))
23
+
24
+ async def layers ():
25
+ return json .loads (await async_command_send ('layers -j' ))
26
+
27
+ async def splash ():
28
+ return json .loads (await async_command_send ('splash' ))
29
+
30
+ async def get_option (opt ):
31
+ return await async_command_send (f'getoption { opt } ' )
32
+
33
+ async def cursor_pos ():
34
+ return json .loads (await async_command_send ('cursorpos -j' ))
35
+
36
+
37
+
38
+
39
+
You can’t perform that action at this time.
0 commit comments