Migrate from .stow-rename to --dotfiles

This commit is contained in:
Danielle McLean 2023-10-23 15:15:37 +11:00
parent 2cd7ee3bf7
commit f309f3a7a6
Signed by: 00dani
GPG key ID: 52C059C3B22A753E
20 changed files with 0 additions and 2 deletions

3
dot-config/git/config.os Normal file
View file

@ -0,0 +1,3 @@
# vim: ft=gitconfig
[include]
path = tools/ksdiff

View file

@ -0,0 +1,14 @@
# vim: ft=gitconfig
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustexitcode = true
[merge]
tool = Kaleidoscope
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool]
prompt = false
[mergetool]
prompt = false
[diff]
tool = Kaleidoscope

155
dot-config/skhd/skhdrc Normal file
View file

@ -0,0 +1,155 @@
# open terminal
rctrl - return : ~/.local/bin/kit new-window --window-type os
# focus window
rctrl - j : yabai -m window --focus next || yabai -m window --focus first
rctrl - k : yabai -m window --focus prev || yabai -m window --focus last
cmd - tab : yabai -m window --focus next || yabai -m window --focus first
cmd + shift - tab : yabai -m window --focus prev || yabai -m window --focus last
# focus stacked window
rctrl - n : yabai -m window --focus stack.next || yabai -m window --focus stack.first
rctrl - p : yabai -m window --focus stack.prev || yabai -m window --focus stack.last
# swap window
rctrl + shift - j : yabai -m window --swap next || yabai -m window --swap first
rctrl + shift - k : yabai -m window --swap prev || yabai -m window --swap last
# balance size of windows (mod =)
rctrl - 0x18 : yabai -m space --balance
# make floating window fill screen
# shift + alt - up : yabai -m window --grid 1:1:0:0:1:1
# make floating window fill left-half of screen
# shift + alt - left : yabai -m window --grid 1:2:0:0:1:1
# make floating window fill right-half of screen
# shift + alt - right : yabai -m window --grid 1:2:1:0:1:1
# create desktop, move window and follow focus - uses jq for parsing json (brew install jq)
rctrl + cmd - n : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
yabai -m window --space "${index}" && \
yabai -m space --focus "${index}"
# create desktop and follow focus - uses jq for parsing json (brew install jq)
cmd + alt - n : yabai -m space --create && \
index="$(yabai -m query --spaces --display | jq 'map(select(."native-fullscreen" == 0))[-1].index')" && \
yabai -m space --focus "${index}"
# destroy desktop
cmd + alt - w : yabai -m space --destroy
# fast focus desktop
rctrl - x : yabai -m space --focus recent
rctrl - z : yabai -m space --focus prev
rctrl - c : yabai -m space --focus next
rctrl - 1 : yabai -m space --focus 1
rctrl - 2 : yabai -m space --focus 2
rctrl - 3 : yabai -m space --focus 3
rctrl - 4 : yabai -m space --focus 4
rctrl - 5 : yabai -m space --focus 5
rctrl - 6 : yabai -m space --focus 6
rctrl - 7 : yabai -m space --focus 7
rctrl - 8 : yabai -m space --focus 8
rctrl - 9 : yabai -m space --focus 9
rctrl - 0 : yabai -m space --focus 10
# send window to desktop
shift + cmd - x : yabai -m window --space recent
shift + cmd - z : yabai -m window --space prev
shift + cmd - c : yabai -m window --space next
shift + rctrl - 1 : yabai -m window --space 1
shift + rctrl - 2 : yabai -m window --space 2
shift + rctrl - 3 : yabai -m window --space 3
shift + rctrl - 4 : yabai -m window --space 4
shift + rctrl - 5 : yabai -m window --space 5
shift + rctrl - 6 : yabai -m window --space 6
shift + rctrl - 7 : yabai -m window --space 7
shift + rctrl - 8 : yabai -m window --space 8
shift + rctrl - 9 : yabai -m window --space 9
shift + rctrl - 0 : yabai -m window --space 10
# focus monitor
rctrl - w : yabai -m display --focus 1
rctrl - e : yabai -m display --focus 2
rctrl - r : yabai -m display --focus 3
# send window to monitor
rctrl + shift - w : yabai -m window --display 1
rctrl + shift - e : yabai -m window --display 2
rctrl + shift - r : yabai -m window --display 3
# move window
shift + ctrl - a : yabai -m window --move rel:-20:0
shift + ctrl - s : yabai -m window --move rel:0:20
shift + ctrl - w : yabai -m window --move rel:0:-20
shift + ctrl - d : yabai -m window --move rel:20:0
# increase window size
shift + alt - a : yabai -m window --resize left:-20:0
shift + alt - s : yabai -m window --resize bottom:0:20
shift + alt - w : yabai -m window --resize top:0:-20
shift + alt - d : yabai -m window --resize right:20:0
# decrease window size
shift + cmd - a : yabai -m window --resize left:20:0
shift + cmd - s : yabai -m window --resize bottom:0:-20
shift + cmd - w : yabai -m window --resize top:0:20
shift + cmd - d : yabai -m window --resize right:-20:0
# set insertion point in focused container
ctrl + alt - h : yabai -m window --insert west
ctrl + alt - j : yabai -m window --insert south
ctrl + alt - k : yabai -m window --insert north
ctrl + alt - l : yabai -m window --insert east
# rotate tree
alt - r : yabai -m space --rotate 90
# mirror tree y-axis
alt - y : yabai -m space --mirror y-axis
# mirror tree x-axis
alt - x : yabai -m space --mirror x-axis
# toggle desktop offset
# alt - a : yabai -m space --toggle padding; yabai -m space --toggle gap
# toggle window parent zoom
alt - d : yabai -m window --toggle zoom-parent
# toggle window fullscreen zoom
alt - f : yabai -m window --toggle zoom-fullscreen
# toggle window native fullscreen
shift + alt - f : yabai -m window --toggle native-fullscreen
# toggle window border
shift + alt - b : yabai -m window --toggle border
# toggle window split type
# alt - e : yabai -m window --toggle split
# float / unfloat window and center on screen
alt - t : yabai -m window --toggle float;\
yabai -m window --grid 4:4:1:1:2:2
# toggle sticky
alt - s : yabai -m window --toggle sticky
# toggle sticky, float and resize to picture-in-picture size
# alt - p : yabai -m window --toggle sticky;\
# yabai -m window --grid 5:5:4:0:1:1
# change layout of desktop
rctrl - a : yabai -m space --layout bsp
rctrl - s : yabai -m space --layout stack
rctrl - d : yabai -m space --layout float
play : mpc toggle
rewind : mpc cdprev
fast : mpc next
rctrl - b : /usr/local/bin/hs -c 'stackline.config:toggle("appearance.showIcons")'

1
dot-config/swiftbar/bin/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.repository.json

View file

@ -0,0 +1,48 @@
#!/bin/zsh
path+=(/usr/local/bin)
mpc==mpc
print -n ♫
state=$(mpc status | sed '/^[^\[]/d; s/^\[\(.*\)\].*$/\1/')
i=$(mpc current -f %position%)
if [[ $state == playing ]]; then
icon=' ▶ '
menu=("Ⅱ Pause | terminal=false bash=$mpc param1=pause")
else
icon=' Ⅱ '
menu=("▶ Play | terminal=false bash=$mpc param1=play")
fi
if [[ -n $state ]]; then
print -n $icon
menu=(
"⏪ Previous | terminal=false bash=$mpc param1=prev"
$menu
"⏩ Next | terminal=false bash=$mpc param1=next"
"⏹ Stop | terminal=false bash=$mpc param1=stop"
)
else
i=0
print
fi
menu=(--- $menu "🔀 Shuffle | terminal=false bash=$mpc param1=shuffle" ---)
format=()
for field in position title artist; format+=($field %$field%)
songs=( ${(f)"$(mpc playlist -f ${(j-::-)format})"} )
typeset -A song
for s in $songs; do
song=(${(s/::/)s})
song[menu]="$song[title] - $song[artist] | length=50"
if (( $song[position] == $i )); then
print "$song[title] | length=30"
else
song[menu]+=" terminal=false bash=$mpc param1=play param2=$song[position]"
fi
menu+=($song[menu])
done
print -l -- $menu

View file

@ -0,0 +1,9 @@
#!/usr/bin/python
import sys
from os.path import abspath, dirname, join
LIB = join(dirname(dirname(abspath(sys.argv[0]))), 'lib')
sys.path.insert(0, LIB)
import taskpaper
taskpaper.count('~/Dropbox/Tasks/eCoach.taskpaper', icon='ecoach')

View file

@ -0,0 +1,9 @@
#!/usr/bin/python
import sys
from os.path import abspath, dirname, join
LIB = join(dirname(dirname(abspath(sys.argv[0]))), 'lib')
sys.path.insert(0, LIB)
import taskpaper
taskpaper.count('~/Dropbox/Tasks/Personal.taskpaper')

View file

@ -0,0 +1,32 @@
#!/bin/zsh
# <bitbar.title>yabai mode</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Danielle McLean</bitbar.author>
# <bitbar.author.github>00dani</bitbar.author.github>
# <bitbar.desc>Display current desktop ID and layout from yabai.</bitbar.desc>
# <bitbar.dependencies>brew,yabai</bitbar.dependencies>
# For info about yabai, see: https://github.com/koekeishiya/yabai
path=(/usr/local/bin $path)
yabai==yabai
modes=(
bsp 🌳
stack 📚
float ⛵
)
typeset -A icons
icons=($modes)
yabai -m query --spaces | jq -r 'map(select(.focused == 1))[-1] | (.index | tostring) + " " + .type' | read id mode
print -l "$icons[$mode] $id" "---"
for m i in $modes; do
if [[ $mode = $m ]]; then
print $i $m
else
print "$i $m | terminal=false bash=$yabai param1=-m param2=space param3=--layout param4=$m"
fi
done

View file

@ -0,0 +1,29 @@
import base64
import inspect
import os.path as p
import sys
PATH = p.dirname(p.abspath(inspect.getfile(inspect.currentframe())))
def count(file, icon='default'):
project = ''
items = []
with open(p.expanduser(file)) as f:
for line in f:
if project.lower() == 'archive': break
line = line.strip()
if line.endswith(':'):
project = line[:-1]
elif line.startswith('- ') and '@done' not in line:
items.append('%s (%s)' % (line[2:], project))
if not items: return
with open(p.join(PATH, icon + '.png')) as img:
icon = base64.b64encode(img.read())
print("%d | templateImage='%s'" % (len(items), icon))
print('---')
print("%s | terminal=false bash=/usr/bin/open param1='%s'" % (file, p.expanduser(file)))
print('---')
for item in items: print(item)

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

35
dot-config/yabai/yabairc Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env sh
sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
# global settings
yabai -m config mouse_follows_focus on
yabai -m config focus_follows_mouse autofocus
yabai -m config window_placement second_child
yabai -m config window_topmost on
yabai -m config window_opacity off
yabai -m config window_opacity_duration 0.0
yabai -m config window_shadow on
yabai -m config active_window_opacity 1.0
yabai -m config normal_window_opacity 0.90
yabai -m config split_ratio 0.50
yabai -m config auto_balance off
yabai -m config mouse_modifier fn
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
# border settings
yabai -m config window_border on
yabai -m config window_border_width 2
yabai -m config active_window_border_color 0xff775759
yabai -m config normal_window_border_color 0xff505050
# general space settings
yabai -m config layout bsp
yabai -m config top_padding 0
yabai -m config bottom_padding 0
yabai -m config left_padding 0
yabai -m config right_padding 0
yabai -m config window_gap 0
echo "yabai configuration loaded.."

View file

@ -0,0 +1,2 @@
#! zsh
alias drop='open -a Dropshelf'