diff --git a/.config/sketchybar/get_y_offset.sh b/.config/sketchybar/get_y_offset.sh index e56c6c7..eec1984 100755 --- a/.config/sketchybar/get_y_offset.sh +++ b/.config/sketchybar/get_y_offset.sh @@ -3,7 +3,7 @@ count=$(system_profiler SPDisplaysDataType | grep -c Resolution) airplay=$(system_profiler SPDisplaysDataType | grep -c AirPlay) -if [[ $count -eq 2 ]] && [[ $airplay -eq 0 ]]; then +if [[ $count -eq 3 ]] || ([[ $count -eq 2 ]] && [[ $airplay -eq 0 ]]); then echo "-24" else echo "-38" diff --git a/.config/skhd/skhdrc b/.config/skhd/skhdrc index 84f4d1b..933284c 100644 --- a/.config/skhd/skhdrc +++ b/.config/skhd/skhdrc @@ -1,4 +1,4 @@ -# focus windo +# focus window alt - h : if [ "$(yabai -m query --spaces --space | jq -r '.type')" = "stack" ]; then (yabai -m window --focus stack.prev || yabai -m window --focus stack.last); else yabai -m window --focus west; fi alt - j : yabai -m window --focus south alt - k : yabai -m window --focus north @@ -10,8 +10,10 @@ alt + shift - j : yabai -m window --warp south alt + shift - k : yabai -m window --warp north alt + shift - l : yabai -m window --warp east -# balance size of windows -alt + shift - 0 : yabai -m space --balance +# [SIP] create and destroy desktops +alt - d : yabai -m space --create && yabai -m space --focus next +alt + shift - d : yabai -m space --create && yabai -m window --space next && yabai -m space --focus next +alt - w : yabai -m space --destroy # [SIP] fast focus desktop alt - 1 : yabai -m space --focus 1 @@ -38,43 +40,45 @@ alt + shift - 8 : yabai -m window --space 8 && yabai -m space --focus 8 # alt - right : yabai -m display --focus 1 # move to prev or next space -alt - left : yabai -m space --focus prev -alt - right : yabai -m space --focus next +alt - q : yabai -m space --focus prev +alt - e : yabai -m space --focus next -# toggle window fullscreen zoom -alt - f : yabai -m window --toggle zoom-fullscreen +# toggle (tiling) window fullscreen zoom +# alt - f : yabai -m window --toggle zoom-fullscreen # toggle window native fullscreen -alt + shift - f : yabai -m window --toggle native-fullscreen +alt - f : yabai -m window --toggle native-fullscreen # toggle window split type -alt - z : yabai -m window --toggle split +# alt - z : yabai -m window --toggle split # float / unfloat window and restore position -#alt - t : yabai -m window --toggle float && /tmp/yabai-restore/$(yabai -m query --windows --window | jq -re '.id').restore 2>/dev/null || true -alt - t : yabai -m window --toggle float && yabai -m window --grid 4:4:1:1:2:2 +# alt - t : yabai -m window --toggle float && /tmp/yabai-restore/$(yabai -m query --windows --window | jq -re '.id').restore 2>/dev/null || true # [SIP] toggle picture-in-picture alt - p : yabai -m window --toggle pip # change layout of desktop -#alt - space : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end') +# alt - space : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end') # get window title, mapped to period, previously mapped to grave at 0x32 (`) alt - 0x2F : yabai -m query --windows --window | jq .app | pbcopy # text macro, mostly for Agenda (Markdown) -- WARNING release the alt key asap. Prepend "sleep 0.001 &&" for further buffer. -alt - 0x1B : osascript -e 'tell application "System Events" to keystroke "[] "' +# alt - 0x1B : osascript -e 'tell application "System Events" to keystroke "[] "' # screenshot, -[c]lipboard -[i]nteractive -[v]ideo -[V]ideo -[k]licks # alt+shift-s is used for shottr alt - s : screencapture -c -i alt - v : screencapture -V 12 -k ~/Desktop/"$(date +'%F_%H%M%S').mov" & +# restart sketchybar +alt - r : brew services restart sketchybar + # restart yabai alt - y : yabai --restart-service # Apps -cmd + shift - space : open -na 'Warp' +alt - space : open -na 'Warp' ctrl + alt - n : open -na 'Arc' --args --incognito ctrl + alt - e : open -a 'Finder' diff --git a/.config/yabai/yabairc b/.config/yabai/yabairc index c5d5b37..a50be5e 100755 --- a/.config/yabai/yabairc +++ b/.config/yabai/yabairc @@ -8,7 +8,18 @@ # [SIP] automatically load scripting addition, must manually perform visudo step to change hash after every Yabai update (maybe OS update too?) # https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition -# Also check if updating OS -> need to update yabai + +### +# sudo visudo -f /private/etc/sudoers.d/yabai +# input the line below into the file you are editing. +# replace with the path to the yabai binary (output of: which yabai). +# replace with your username (output of: whoami). +# replace with the sha256 hash of the yabai binary (output of: shasum -a 256 $(which yabai)). +# this hash must be updated manually after running brew upgrade. +# +# ALL=(root) NOPASSWD: sha256: --load-sa +### + yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" sudo yabai --load-sa diff --git a/.config/yadm/dotfiles.png b/.config/yadm/dotfiles.png new file mode 100644 index 0000000..4e6a819 Binary files /dev/null and b/.config/yadm/dotfiles.png differ diff --git a/.config/yadm/mac-install.yml b/.config/yadm/mac-install.yml index 0869c9a..71b146e 100644 --- a/.config/yadm/mac-install.yml +++ b/.config/yadm/mac-install.yml @@ -44,6 +44,7 @@ - tty-clock - jupyterlab - mdcat + - git-lfs state: latest update_homebrew: yes @@ -80,7 +81,6 @@ - microsoft-teams - anaconda - r - - rstudio - google-drive - openinterminal - gpg-suite @@ -90,6 +90,9 @@ - mysql - mysqlworkbench - pycharm + - chromedriver + - tableau + - ferdium state: latest - name: "Cargo: Install Rust Packages" @@ -106,6 +109,7 @@ - 409183694 # Keynote - 409203825 # Numbers - 409201541 # Pages + - 1448648921 # Seashore state: latest # Mac Defaults diff --git a/.config/yadm/sysfiles/init.lua b/.config/yadm/sysfiles/init.lua index b26eda1..11a36b3 100644 --- a/.config/yadm/sysfiles/init.lua +++ b/.config/yadm/sysfiles/init.lua @@ -19,8 +19,15 @@ return { "ellisonleao/gruvbox.nvim", name = "gruvbox", config = function() - require("gruvbox").setup {} + require("gruvbox").setup({}) end, }, + { + "kylechui/nvim-surround", + tag = "main", -- Use for stability; omit to use `main` branch for the latest features + config = function() + require("nvim-surround").setup({}) + end, + } }, } diff --git a/.gitconfig b/.gitconfig index a5d44d2..ea9dd36 100644 --- a/.gitconfig +++ b/.gitconfig @@ -10,3 +10,5 @@ smudge = git-lfs smudge -- %f process = git-lfs filter-process required = true +[core] + autocrlf = input diff --git a/.ideavimrc b/.ideavimrc new file mode 100644 index 0000000..dbf4096 --- /dev/null +++ b/.ideavimrc @@ -0,0 +1 @@ +set clipboard+=unnamed diff --git a/.zshrc b/.zshrc index 965fb83..f12645c 100644 --- a/.zshrc +++ b/.zshrc @@ -28,7 +28,11 @@ alias cdexr="cd ~/Repos/Personal/EditXR/" alias cdrepos="cd ~/Repos/" alias cdwork="cd ~/Repos/Work/" alias cdschool="cd ~/Repos/School/" -alias cdmangas="cd ~/Mangas/" +alias cdpersonal="cd ~/Repos/Personal/" + +# Python alias +alias nuke="pip freeze | cut -d "@" -f1 | xargs pip uninstall -y" +alias freeze="pip list --format=freeze > requirements.txt" # SSH alias alias sshpi="ssh pi@raspberrypi" @@ -40,6 +44,22 @@ alias backmerge="currBranch=\$(git rev-parse --abbrev-ref HEAD) && git checkout alias clean="git reset --hard && git clean -dfx" alias upstream="currBranch=\$(git rev-parse --abbrev-ref HEAD) && git push --set-upstream origin \$currBranch" +# gen z alias +alias please="sudo" +alias based="cd ~/" +alias bet="git add" +alias fr="git commit" +alias yoink="git pull" +alias yeet="git push" +alias cap="-n" +alias nocap="-f" +alias yap="-v" +alias noyap="-q" +alias yikes="git clean -dfx" +alias bigyikes="git reset --hard HEAD" +alias smash="git merge" +alias ong="rm -rf" + # Custom functions timezsh() { shell=${1-$SHELL} @@ -63,7 +83,7 @@ alias upstream="currBranch=\$(git rev-parse --abbrev-ref HEAD) && git push --set rmManga() { /Users/davay/.config/yadm/rmManga.exp | osascript -e 'tell application "System Events" to keystroke "5fZfFaqnVx" using {control down, shift down}' -} +} # TODO: wtf is this, check previous commits # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! diff --git a/Library/Preferences/.GlobalPreferences.plist b/Library/Preferences/.GlobalPreferences.plist index d30b110..2e89fed 100644 Binary files a/Library/Preferences/.GlobalPreferences.plist and b/Library/Preferences/.GlobalPreferences.plist differ diff --git a/Library/Preferences/pbs.plist b/Library/Preferences/pbs.plist index e6d0751..f6dc242 100644 Binary files a/Library/Preferences/pbs.plist and b/Library/Preferences/pbs.plist differ diff --git a/README.md b/README.md index 031f2f8..30e3fdf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ # Description -A [yadm](https://yadm.io/) + [Ansible](https://docs.ansible.com/ansible/latest/user_guide/index.html#getting-started) instant setup for fresh OS installs +A [yadm](https://yadm.io/) + [Ansible](https://docs.ansible.com/ansible/latest/user_guide/index.html#getting-started) instant setup for fresh OS installs. NOTE: Main branch is brand new -- Mac only for now. Old combined Linux + Mac setup is in archive branch. Yabai, skhd, and sketchybar are all preinstalled along with configs, but manual setup is required, instructions not here. + +## Screenshot + +![Worfklow Example](/.config/yadm/dotfiles.png) + ## Installation ### 1. Install Brew