diff options
| -rw-r--r-- | .config/aerospace/aerospace.toml | 24 | ||||
| -rw-r--r-- | .config/bash/local.bashrc | 1 | ||||
| -rw-r--r-- | .config/kak/kakrc | 2 | ||||
| -rw-r--r-- | .config/kitty/kitty.conf | 3 | ||||
| -rw-r--r-- | .config/shell/aliasrc | 2 | ||||
| -rw-r--r-- | .config/shell/profile | 10 | ||||
| -rwxr-xr-x | .local/bin/kx | 8 | ||||
| -rwxr-xr-x | .local/bin/macos.d/dmenu | 2 | ||||
| -rwxr-xr-x | .local/bin/macos.d/ls | 2 | ||||
| -rwxr-xr-x | .local/bin/macos.d/notify-send | 5 |
10 files changed, 40 insertions, 19 deletions
diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml index 0441bd7..30784ea 100644 --- a/.config/aerospace/aerospace.toml +++ b/.config/aerospace/aerospace.toml @@ -92,17 +92,19 @@ automatically-unhide-macos-hidden-apps = true cmd-shift-d = 'exec-and-forget source /etc/profile; PATH="$HOME/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" passmenu' cmd-f = 'fullscreen' 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 "Kitty" then - tell application process "Kitty" - click menu item "New Window" of menu "Shell" of menu bar 1 - end tell - else - tell application "Kitty" to activate - end if - end tell' - '''] + # cmd-enter = ['''exec-and-forget osascript -e ' + # tell application "System Events" + # 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 "Kitty" to activate + # end if + # end tell' + # '''] + cmd-enter = ['''exec-and-forget kitty --single-instance --detach --working-directory "$HOME"'''] + cmd-n = ['''exec-and-forget kitty --single-instance --detach --working-directory "$HOME" sh --login -c 'exec kn''''] cmd-w = '''exec-and-forget osascript -e ' tell application "System Events" diff --git a/.config/bash/local.bashrc b/.config/bash/local.bashrc deleted file mode 100644 index c6f4e61..0000000 --- a/.config/bash/local.bashrc +++ /dev/null @@ -1 +0,0 @@ -. /usr/share/bash-completion/completions/pass-otp diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 84c5ec0..527bcd8 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -35,6 +35,8 @@ hook -once global KakBegin .* %{ alias global repl-send-text dtach-send-text } +require-module x11 +set-option global windowing_modules 'x11' set-option global toolsclient t set-option global jumpclient j set-option global docsclient d diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 1fb4b07..cd77009 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -5,6 +5,9 @@ bold_font auto italic_font auto bold_italic_font auto allow_remote_control yes +enable_audio_bell no +hide_window_decorations yes clear_all_shortcuts yes +macos_option_as_alt yes map alt+c copy_to_clipboard map alt+v paste_from_clipboard diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 1d63966..3110687 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -21,7 +21,9 @@ alias \ # Colorize commands when possible. alias \ ls="ls -h --color=auto --group-directories-first" \ + l.="ls -ah --color=auto --group-directories-first .?*" \ ll="ls -hl --color=auto --group-directories-first" \ + ll.="ls -ahl --color=auto --group-directories-first .?*" \ grep="grep --color=auto" \ diff="diff --color=auto" \ ccat="highlight --out-format=ansi" \ diff --git a/.config/shell/profile b/.config/shell/profile index bc0dc39..441d5b2 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -1,4 +1,9 @@ export PATH="$HOME/.local/bin:$PATH" +if [ "$(uname -s)" = "Darwin" ]; then + export PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH" + export PATH="$HOME/.local/bin/macos.d:$PATH" +fi + export XDG_CONFIG_HOME=$HOME/.config export XDG_CACHE_HOME=$HOME/.cache export XDG_DATA_HOME=$HOME/.local/share @@ -18,9 +23,4 @@ export GIT_EDITOR="kak" export BROWSER="firefox" export PATH="$PATH:$HOME/go/bin:/usr/local/go/bin" -if [ "$(uname -s)" = "Darwin" ]; then - export PATH="$HOME/.local/bin/macos.d:$PATH" - export PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH" -fi - [ ! -f "$XDG_CONFIG_HOME/shell/shortcutrc" ] && setsid -f shortcuts >/dev/null 2>&1 diff --git a/.local/bin/kx b/.local/bin/kx index 1390396..93538ab 100755 --- a/.local/bin/kx +++ b/.local/bin/kx @@ -3,6 +3,10 @@ state_dir="${XDG_STATE_HOME:-$HOME/.local/state}" contexts_dir="$state_dir/contexts" mkdir -p "$contexts_dir" +link() { + ln -nsf "${1:?}" "${2:?}" +} + new_context() { echo new_context 1>&2 : "${1:?I require a context name}" @@ -11,7 +15,7 @@ new_context() { then notify-send "ctx" "${dir} already exists!" else mkdir -p "${dir}" echo "$1" > "${dir}/name" - ln -nsf "${dir}" "${state_dir}/context" + link "${dir}" "${state_dir}/context" fi } set_context() { @@ -19,7 +23,7 @@ set_context() { : "${1:?I require a context name}" dir="${contexts_dir}/${1}" if [ -d "${dir}" ] - then ln -nsf "${dir}" "${state_dir}/context" + then link "${dir}" "${state_dir}/context" else notify-send "ctx" "${dir} does not exists!" fi } diff --git a/.local/bin/macos.d/dmenu b/.local/bin/macos.d/dmenu new file mode 100755 index 0000000..fdcf9bf --- /dev/null +++ b/.local/bin/macos.d/dmenu @@ -0,0 +1,2 @@ +#!/bin/sh +exec vis-menu "$@" diff --git a/.local/bin/macos.d/ls b/.local/bin/macos.d/ls new file mode 100755 index 0000000..35500ef --- /dev/null +++ b/.local/bin/macos.d/ls @@ -0,0 +1,2 @@ +#!/bin/sh +exec gls "$@" diff --git a/.local/bin/macos.d/notify-send b/.local/bin/macos.d/notify-send new file mode 100755 index 0000000..6189bed --- /dev/null +++ b/.local/bin/macos.d/notify-send @@ -0,0 +1,5 @@ +#!/bin/sh +if [ "$2" ] +then osascript -e 'display notification "'"${2:?require message body}"'" with title "'"$1"'"' +else osascript -e 'display notification "'"${1:?require message body}"'"' +fi |
