diff options
| -rw-r--r-- | .config/aerospace/aerospace.toml | 8 | ||||
| -rw-r--r-- | .config/kitty/kitty.conf | 10 | ||||
| -rw-r--r-- | .config/kitty/themes/penelope.conf | 24 | ||||
| -rw-r--r-- | .gnupg/gpg-agent.conf | 13 | ||||
| -rwxr-xr-x | .local/bin/:k9s | 2 | ||||
| -rwxr-xr-x | .local/bin/macos.d/focus.sh | 75 | ||||
| -rwxr-xr-x | .local/bin/macos.d/routetable | 14 |
7 files changed, 129 insertions, 17 deletions
diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml index a9b3533..0441bd7 100644 --- a/.config/aerospace/aerospace.toml +++ b/.config/aerospace/aerospace.toml @@ -94,12 +94,12 @@ automatically-unhide-macos-hidden-apps = true cmd-d = 'exec-and-forget source /etc/profile; PATH="$HOME/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" /Applications/dmenu-mac.app/Contents/MacOS/dmenu-mac' cmd-enter = ['''exec-and-forget osascript -e ' tell application "System Events" - if exists application process "Ghostty" then - tell application process "Ghostty" - click menu item "New Window" of menu "File" of menu bar 1 + if exists application process "Kitty" then + tell application process "Kitty" + click menu item "New Window" of menu "Shell" of menu bar 1 end tell else - tell application "Ghostty" to activate + tell application "Kitty" to activate end if end tell' '''] diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..1fb4b07 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,10 @@ +include themes/penelope.conf +font_size 13.0 +font_family family="JetBrainsMono Nerd Font Mono" +bold_font auto +italic_font auto +bold_italic_font auto +allow_remote_control yes +clear_all_shortcuts yes +map alt+c copy_to_clipboard +map alt+v paste_from_clipboard diff --git a/.config/kitty/themes/penelope.conf b/.config/kitty/themes/penelope.conf new file mode 100644 index 0000000..6f58b4f --- /dev/null +++ b/.config/kitty/themes/penelope.conf @@ -0,0 +1,24 @@ +foreground #e4e4e4 +background #181818 +cursor #ffdd33 +cursor_text_color #ffffff +selection_background #ffffff +selection_foreground #52494e + +color0 #181818 +color1 #f43841 +color2 #73d936 +color3 #ffdd33 +color4 #96a6c8 +color5 #9e95c7 +color6 #95a99f +color7 #e4e4e4 + +color8 #52494e +color9 #ff4f58 +color10 #73d936 +color11 #ffdd33 +color12 #96a6c8 +color13 #afafd7 +color14 #95a99f +color15 #f5f5f5 diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf deleted file mode 100644 index f30e893..0000000 --- a/.gnupg/gpg-agent.conf +++ /dev/null @@ -1,13 +0,0 @@ -# https://github.com/drduh/config/blob/master/gpg-agent.conf -# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html -#pinentry-program /usr/bin/pinentry-gnome3 -#pinentry-program /usr/bin/pinentry-tty -#pinentry-program /usr/bin/pinentry-x11 -#pinentry-program /usr/local/bin/pinentry-curses -#pinentry-program /usr/local/bin/pinentry-mac -#pinentry-program /opt/homebrew/bin/pinentry-mac -pinentry-program /usr/bin/pinentry-dmenu -enable-ssh-support -ttyname $GPG_TTY -default-cache-ttl 60 -max-cache-ttl 120 diff --git a/.local/bin/:k9s b/.local/bin/:k9s new file mode 100755 index 0000000..1b44b70 --- /dev/null +++ b/.local/bin/:k9s @@ -0,0 +1,2 @@ +#!/bin/sh +EDITOR=:edit-wait k9s diff --git a/.local/bin/macos.d/focus.sh b/.local/bin/macos.d/focus.sh new file mode 100755 index 0000000..fdb0e90 --- /dev/null +++ b/.local/bin/macos.d/focus.sh @@ -0,0 +1,75 @@ +#!/bin/bash +include=' +on listWindows(appName) +tell application "System Events" + if exists (processes where name is appName) then + tell process appName + set windowTitles to {} + repeat with w in windows + set end of windowTitles to name of w + end repeat + set AppleScript'"'"'s text item delimiters to linefeed + return windowTitles + end tell + else + error "A grievous condition hath occurred." number 1 + end if +end tell +end listWindows + +on focusWindow(args) + -- Replace this with your desired client identifier + set appName to item 1 of args + set sessionId to item 2 of args + set clientId to item 3 of args + set clientTitle to (clientId & "@[" & sessionId & "]") + tell application "System Events" + if exists (processes where name is appName) then + tell process appName + repeat with w in windows + set winName to name of w + if winName contains clientTitle and winName contains "Kakoune" then + -- Bring App to the front + tell application appName to activate + + -- Set focus to the matching window + set frontmost to true + set value of attribute "AXMain" of w to true + + return "Activated window: " & winName + end if + end repeat + return "No matching window found." + end tell + else + return "App is not running." + end if + end tell +end focusWindow +' + +listwindows() { + osascript -e "$include"' +on run args +if class of args is list then -- arguments passed come in as a list + set result to listWindows(item 1 of args) + set AppleScript'"'"'s text item delimiters to linefeed + return result as string +end if +end run +' -- "$@" +} +focuswindow() { + osascript -e "$include"' +on run args +if class of args is list then -- arguments passed come in as a list + set result to focusWindow(args) + set AppleScript'"'"'s text item delimiters to linefeed + return result as string +end if +end run +' -- "$@" +} +# listwindows "App" +# echo "$KAKOUNE_CLIENT@[$KAKOUNE_SESSION]" +focuswindow "$@" diff --git a/.local/bin/macos.d/routetable b/.local/bin/macos.d/routetable new file mode 100755 index 0000000..e4589d1 --- /dev/null +++ b/.local/bin/macos.d/routetable @@ -0,0 +1,14 @@ +#!/bin/sh +ECHO_LINE=y +netstat -rn 2>&1 | +while read -r line +do + case "$line" in + "Internet6"*) unset ECHO_LINE ;; + "Routing tables"*|"Internet"*) : ;; + *[![:space:]]*) if [ "${ECHO_LINE}" ] + then echo "$line" + fi + ;; + esac +done |
