diff --git a/.chezmoitemplates/zprofile_darwin.tmpl b/.chezmoitemplates/zprofile_darwin.tmpl index d4a4acc..5f95b9d 100644 --- a/.chezmoitemplates/zprofile_darwin.tmpl +++ b/.chezmoitemplates/zprofile_darwin.tmpl @@ -1,6 +1,6 @@ export LC_ALL=en_US.UTF-8 -export PATH=/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/3.0.0/bin:/opt/homebrew/opt/python@3.11/libexec/bin:$PATH +export PATH=/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/3.0.0/bin:/usr/local/bin:$PATH # Added by Toolbox App export PATH="$PATH:/Users/{{ .chezmoi.username }}/Library/Application Support/JetBrains/Toolbox/scripts" diff --git a/dot_config/skhd/skhdrc b/dot_config/skhd/skhdrc index 01db2b9..d76c1b4 100644 --- a/dot_config/skhd/skhdrc +++ b/dot_config/skhd/skhdrc @@ -296,3 +296,4 @@ ctrl + alt - s : yabai -m space --layout $(yabai -m query --spaces --space | jq cmd + shift - y : ~/.config/choose/choose-pass.sh cmd - y : ~/.config/choose/choose-clip.sh +cmd + shift - q : kill $(~/scripts/get_current-window.py pid) diff --git a/dot_config/yabai/executable_yabairc b/dot_config/yabai/executable_yabairc index d218b8a..367d785 100644 --- a/dot_config/yabai/executable_yabairc +++ b/dot_config/yabai/executable_yabairc @@ -23,11 +23,12 @@ 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="^Steam Helper$" space=games 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="^(JetBrains Toolbox|PyCharm)$" manage=off yabai -m rule --add app="^choose$" manage=off # show digital colour meter topmost and on all spaces diff --git a/scripts/executable_get_current-window.py b/scripts/executable_get_current-window.py index 41d6b5b..d376a5c 100644 --- a/scripts/executable_get_current-window.py +++ b/scripts/executable_get_current-window.py @@ -11,6 +11,7 @@ if sys.platform == "darwin": ) if sys.platform == "darwin": + get_this = sys.argv[1] curr_app = NSWorkspace.sharedWorkspace().frontmostApplication() curr_pid = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationProcessIdentifier'] curr_app_name = curr_app.localizedName() @@ -23,6 +24,13 @@ if sys.platform == "darwin": 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)) + if get_this == "all": + print("%s - %s (PID: %d, WID: %d): %s" % ( + ownerName, windowTitle.encode('ascii', 'ignore'), pid, windowNumber, geometry)) + elif get_this == "pid": + print(pid) + elif get_this == "title": + print(ownerName) elif sys.platform == "win32": (active_app_name, windowTitle) = _getActiveInfo_Win32() +