changes for macos
This commit is contained in:
parent
3684d968e8
commit
e5f4f93713
3 changed files with 40 additions and 9 deletions
|
@ -24,6 +24,10 @@ brew install htop
|
|||
brew install btop
|
||||
brew install asciiquarium
|
||||
brew install lolcat
|
||||
brew install python
|
||||
brew install python-tk@3.11
|
||||
brew install python-gdbm@3.11
|
||||
pip install pyobjc
|
||||
~~~
|
||||
|
||||
## Install Password Manager
|
||||
|
|
|
@ -16,19 +16,18 @@ yabai -m space 7 --label media
|
|||
yabai -m space 8 --label games
|
||||
|
||||
# window rules
|
||||
yabai -m rule --add app="^WezTerm$" space=code
|
||||
yabai -m rule --add app="^(Safari|Firefox)$" space=web
|
||||
yabai -m rule --add app="^Mail$" space=mail
|
||||
yabai -m rule --add app="^Safari$" space=web
|
||||
yabai -m rule --add app="^Notes$" space=notes
|
||||
yabai -m rule --add app="^ida64$" space=re
|
||||
yabai -m rule --add app="^Transmission$" space=media
|
||||
yabai -m rule --add app="^Spotify$" space=media
|
||||
yabai -m rule --add app="^Element$" space=chat
|
||||
yabai -m rule --add app="^Discord$" space=social grid=1:1:0:0:1:1 manage=off
|
||||
yabai -m rule --add app="^(Notes|Joplin)$" space=notes
|
||||
yabai -m rule --add app="^(Spotify|Fineamp|Musik)$" space=media
|
||||
yabai -m rule --add app="^Steam$" space=games manage=off
|
||||
yabai -m rule --add app="^(Calculator|System Preferences|Archive Utility)$" manage=off
|
||||
yabai -m rule --add app="^mpv$" manage=off border=off sticky=on layer=above opacity=1.0 grid=8:8:6:0:2:2
|
||||
|
||||
# float system preferences
|
||||
yabai -m rule --add app="^System Preferences$" manage=off
|
||||
# Advanced Window rules
|
||||
yabai -m rule --add app="^(Calculator|Rechner|System Preferences|Systemeinstellungen|Einstellungen|System Settings|Preferences|Aktivitätsanzeige|Archive Utility)$" manage=off
|
||||
yabai -m rule --add app="^mpv$" manage=off border=off sticky=on layer=above opacity=1.0 grid=8:8:6:0:2:2
|
||||
yabai -m rule --add app="^choose$" manage=off
|
||||
|
||||
# show digital colour meter topmost and on all spaces
|
||||
|
|
28
scripts/executable_get_current-window.py
Normal file
28
scripts/executable_get_current-window.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python
|
||||
# Prints list of windows in the current workspace.
|
||||
|
||||
import sys
|
||||
if sys.platform == "darwin":
|
||||
from AppKit import NSWorkspace
|
||||
from Quartz import (
|
||||
CGWindowListCopyWindowInfo,
|
||||
kCGWindowListOptionOnScreenOnly,
|
||||
kCGNullWindowID
|
||||
)
|
||||
|
||||
if sys.platform == "darwin":
|
||||
curr_app = NSWorkspace.sharedWorkspace().frontmostApplication()
|
||||
curr_pid = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationProcessIdentifier']
|
||||
curr_app_name = curr_app.localizedName()
|
||||
options = kCGWindowListOptionOnScreenOnly
|
||||
windowList = CGWindowListCopyWindowInfo(options, kCGNullWindowID)
|
||||
for window in windowList:
|
||||
pid = window['kCGWindowOwnerPID']
|
||||
windowNumber = window['kCGWindowNumber']
|
||||
ownerName = window['kCGWindowOwnerName']
|
||||
geometry = window['kCGWindowBounds']
|
||||
windowTitle = window.get('kCGWindowName', u'Unknown')
|
||||
if curr_pid == pid:
|
||||
print("%s - %s (PID: %d, WID: %d): %s" % (ownerName, windowTitle.encode('ascii','ignore'), pid, windowNumber, geometry))
|
||||
elif sys.platform == "win32":
|
||||
(active_app_name, windowTitle) = _getActiveInfo_Win32()
|
Loading…
Reference in a new issue