From affc30e13aa0e2053d70386663e5e0d5520e504a Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 27 Jul 2024 17:18:11 +0200 Subject: clean up and refactor setup --- .aliases | 31 - .extras | 28 - .hammerspoon/hyper.lua | 80 --- .hammerspoon/init.lua | 42 -- .iterm/com.googlecode.iterm2.plist | 1321 ------------------------------------ .local/share/yadm/archive | Bin 614 -> 0 bytes .path | 30 - .zshrc | 6 +- Brewfile | 324 +++++---- aliases.zsh | 31 + extras.zsh | 28 + path.zsh | 12 + weekly-jobs.sh | 7 - 13 files changed, 231 insertions(+), 1709 deletions(-) delete mode 100644 .aliases delete mode 100755 .extras delete mode 100644 .hammerspoon/hyper.lua delete mode 100644 .hammerspoon/init.lua delete mode 100644 .iterm/com.googlecode.iterm2.plist delete mode 100644 .local/share/yadm/archive delete mode 100644 .path create mode 100644 aliases.zsh create mode 100755 extras.zsh create mode 100644 path.zsh delete mode 100755 weekly-jobs.sh diff --git a/.aliases b/.aliases deleted file mode 100644 index ebda55c..0000000 --- a/.aliases +++ /dev/null @@ -1,31 +0,0 @@ -# Git aliases -alias git-unpushed='git log --branches --not --remotes --no-walk --decorate --oneline' -alias gb='git checkout -b' -alias gfr='git fetch upstream && git rebase upstream/main' -alias git-undo='git reset --soft HEAD~1' -alias git-clean-branches="git for-each-ref --format '%(refname:short)' refs/heads | grep -v 'master\|main' | xargs git branch -D" -alias :q='exit' -alias ls='ls --color' - -# Generic / Random / Utility -alias rg="rg --hidden --glob '!.git' --glob '!node_modules'" -alias r='cd $REPOS/github.com/' -alias c='clear' -alias afk='pmset displaysleepnow' -alias dl="cd ~/Downloads" -alias l='ls -l' -alias todo='nt' -alias tasks="open 'obsidian://open?file=-%20Oppgaver'" -alias todos="mt ~/ghq/github.com/simenandre/notes/" -# alias docker-compose=podman-compose -alias today="open 'obsidian://advanced-uri?daily=true'" -alias tre="tree -I '.git|node_modules'" -alias timeliste="open 'https://tripletex.no/execute/updateHourlist?contextId=11208568'" -alias t="open 'https://tripletex.no/execute/updateHourlist?contextId=11208568'" -alias fork-cleaner="fork-cleaner --token $(cat ~/.secrets/github-token)" -alias vi="nvim" -alias vim="nvim" -alias v="nvim" - -alias dump-issues="getBjerkIssues > ~/Downloads/issues-$(date -I).json" - diff --git a/.extras b/.extras deleted file mode 100755 index 0647ca0..0000000 --- a/.extras +++ /dev/null @@ -1,28 +0,0 @@ -NOTES_DIR=$HOME/ghq/github.com/simenandre/notes/ -function note() { - if [ $1 ]; then - FILE=$NOTES_DIR/$(date +%Y-%m-%d).md - - if [ $2 ]; then - FILE=$2 - fi - - echo $1 >> $FILE - fi -} - -function nt() { - if [ $1 ]; then - CONTENT="- [ ] $1" - note $CONTENT $2 - fi -} - -function getBjerkIssues() { - gh issue list --repo bjerkio/internal \ - --search "-label:backlog -label:kind/system" \ - --json title,body,url,createdAt,assignees,number,labels,comments \ - --jq 'map({url, createdAt, title, labels: [.labels[].name], assignees: [.assignees[].login], body, number: "#\(.number)", comments: .comments | map({ body: .body, createdAt: .createdAt })})' -} - - diff --git a/.hammerspoon/hyper.lua b/.hammerspoon/hyper.lua deleted file mode 100644 index e5380f9..0000000 --- a/.hammerspoon/hyper.lua +++ /dev/null @@ -1,80 +0,0 @@ -local This = {} - ------------------------------------------------------------------------------------ --- File: hyper.lua --- Author: J.H. Kuperus --- Source: https://github.com/jhkuperus/dotfiles/blob/master/hammerspoon/hyper.lua --- "License": Feel free to use this file any way you like. Issues or improvements --- are welcome on the GitHub repository. No warranties whatsoever. ------------------------------------------------------------------------------------ - --- To use Hyper in your init.lua script, import it and adapt this example to --- your needs: --- --- local hyper = require('hyper') --- hyper.install('F18') --- hyper.bindkey('r', hs.reload) --- --- The above three lines initialize Hyper to respond to F18 key-events and binds --- Hyper+r to Hammerspoon Reload (easy way to refresh Hammerspoon's config) - --- Hyper mode needs to be bound to a key. Here we are binding --- it to F17, because this is yet another key that's unused. --- Why not F18? We will use key-events from F18 to turn hyper --- mode on and off. Using F17 as the modal and source of key --- events, will result in a very jittery Hyper mode. - -This.hyperMode = hs.hotkey.modal.new({}, "F17") - --- Enter Hyper Mode when F18 (Hyper) is pressed -function enterHyperMode() - This.hyperMode:enter() -end - --- Leave Hyper Mode when F18 (Hyper) is pressed -function exitHyperMode() - This.hyperMode:exit() -end - --- Utility to bind handler to Hyper+key -function This.bindKey(key, handler) - This.hyperMode:bind({}, key, handler) -end - --- Utility to bind handler to Hyper+Shift+key -function This.bindShiftKey(key, handler) - This.hyperMode:bind({ "shift" }, key, handler) -end - --- Utility to bind handler to Hyper+Command+Shift+key -function This.bindCommandShiftKey(key, handler) - This.hyperMode:bind({ "command", "shift" }, key, handler) -end - --- Utility to bind handler to Hyper+modifiers+key -function This.bindKeyWithModifiers(key, mods, handler) - This.hyperMode:bind(mods, key, handler) -end - --- Binds the enter/exit functions of the Hyper modal to all combinations of modifiers -function This.install(hotKey) - hs.hotkey.bind({}, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "ctrl" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "ctrl", "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "cmd" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "cmd", "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "cmd", "ctrl" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "cmd", "ctrl", "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "ctrl" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "ctrl", "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "cmd" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "cmd", "shift" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "cmd", "ctrl" }, hotKey, enterHyperMode, exitHyperMode) - hs.hotkey.bind({ "alt", "cmd", "shift", "ctrl" }, hotKey, enterHyperMode, exitHyperMode) -end - -return This - diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua deleted file mode 100644 index 234f316..0000000 --- a/.hammerspoon/init.lua +++ /dev/null @@ -1,42 +0,0 @@ -local hyper = require("hyper") -hyper.install("F18") - -hyper.bindKey("a", function() - hs.application.launchOrFocus("Arc") -end) - -hyper.bindKey("w", function() - hs.application.launchOrFocus("Warp") -end) - -hyper.bindKey("e", function() - hs.application.launchOrFocus("iTerm") -end) - -hyper.bindKey("s", function() - hs.application.launchOrFocus("Slack") -end) - -hyper.bindKey("1", function() - hs.application.launchOrFocus("1Password") -end) - -hyper.bindKey("r", function() - hs.application.launchOrFocus("Rize") -end) - -hyper.bindKey("d", function() - hs.application.launchOrFocus("Obsidian") -end) - -hyper.bindKey("c", function() - hs.application.launchOrFocus("Google Chrome") -end) - -hyper.bindKey("t", function() - hs.application.launchOrFocus("Notification Center") -end) - -hyper.bindKey("m", function() - hs.application.launchOrFocus("Messages") -end) diff --git a/.iterm/com.googlecode.iterm2.plist b/.iterm/com.googlecode.iterm2.plist deleted file mode 100644 index e1af3e3..0000000 --- a/.iterm/com.googlecode.iterm2.plist +++ /dev/null @@ -1,1321 +0,0 @@ - - - - - AlternateMouseScroll - - Custom Color Presets - - Clovis-iTerm2-Color-Scheme - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.0 - Red Component - 0.0 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.25651749968528748 - Color Space - sRGB - Green Component - 0.30058383941650391 - Red Component - 1 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.32322630286216736 - Color Space - sRGB - Green Component - 0.94854736328125 - Red Component - 0.86427199840545654 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.54596829414367676 - Color Space - sRGB - Green Component - 0.96540826559066772 - Red Component - 1 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.86619287729263306 - Red Component - 0.4686119556427002 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.72279053926467896 - Color Space - sRGB - Green Component - 0.70750737190246582 - Red Component - 1 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 0.83529412746429443 - Color Space - sRGB - Green Component - 0.91372549533843994 - Red Component - 0.63921570777893066 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.39330101013183594 - Color Space - sRGB - Green Component - 0.82634866237640381 - Red Component - 0.76874715089797974 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.34589937329292297 - Color Space - sRGB - Green Component - 0.80673152208328247 - Red Component - 0.92684400081634521 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.88060396909713745 - Color Space - sRGB - Green Component - 0.7008507251739502 - Red Component - 0.25234001874923706 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.54336923360824585 - Color Space - sRGB - Green Component - 0.53200650215148926 - Red Component - 0.96095067262649536 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.83428877592086792 - Color Space - sRGB - Green Component - 0.91446685791015625 - Red Component - 0.64103472232818604 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.25586915016174316 - Color Space - sRGB - Green Component - 0.25587284564971924 - Red Component - 0.25586599111557007 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.47006773948669434 - Color Space - sRGB - Green Component - 0.48961412906646729 - Red Component - 1 - - Background Color - - Alpha Component - 1 - Blue Component - 0.12941177189350128 - Color Space - sRGB - Green Component - 0.10196078568696976 - Red Component - 0.070588238537311554 - - Badge Color - - Alpha Component - 0.5 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.1491314172744751 - Red Component - 1 - - Bold Color - - Alpha Component - 1 - Blue Component - 0.84702622890472412 - Color Space - sRGB - Green Component - 0.90398252010345459 - Red Component - 0.92175871133804321 - - Cursor Color - - Alpha Component - 1 - Blue Component - 0.32156863808631897 - Color Space - sRGB - Green Component - 0.94901961088180542 - Red Component - 0.86274510622024536 - - Cursor Guide Color - - Alpha Component - 0.050000000000000003 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.92549020051956177 - Red Component - 0.70196080207824707 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.84702622890472412 - Color Space - sRGB - Green Component - 0.90398252010345459 - Red Component - 0.92175871133804321 - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.81176471710205078 - Color Space - sRGB - Green Component - 0.88235294818878174 - Red Component - 0.90196079015731812 - - Link Color - - Alpha Component - 1 - Blue Component - 0.73423302173614502 - Color Space - sRGB - Green Component - 0.35916060209274292 - Red Component - 0.0 - - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.84702622890472412 - Color Space - sRGB - Green Component - 0.90398252010345459 - Red Component - 0.92175871133804321 - - Selection Color - - Alpha Component - 1 - Blue Component - 0.31934511661529541 - Color Space - sRGB - Green Component - 0.26156574487686157 - Red Component - 0.19109529256820679 - - Tab Color - - Alpha Component - 1 - Blue Component - 0.12941177189350128 - Color Space - sRGB - Green Component - 0.10196078568696976 - Red Component - 0.070588238537311554 - - Underline Color - - Alpha Component - 1 - Blue Component - 0.12941177189350128 - Color Space - sRGB - Green Component - 0.10196078568696976 - Red Component - 0.070588238537311554 - - - - Default Bookmark Guid - EF4F87C6-2E1D-4A11-91CD-870D115A4AA6 - HapticFeedbackForEsc - - HotkeyMigratedFromSingleToMulti - - New Bookmarks - - - ASCII Anti Aliased - - Ambiguous Double Width - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.0 - Red Component - 0.0 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.25651749968528748 - Color Space - sRGB - Green Component - 0.30058383941650391 - Red Component - 1 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.32322630286216736 - Color Space - sRGB - Green Component - 0.94854736328125 - Red Component - 0.86427199840545654 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.54596829414367676 - Color Space - sRGB - Green Component - 0.96540826559066772 - Red Component - 1 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.86619287729263306 - Red Component - 0.4686119556427002 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.72279053926467896 - Color Space - sRGB - Green Component - 0.70750737190246582 - Red Component - 1 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 0.83529412746429443 - Color Space - sRGB - Green Component - 0.91372549533843994 - Red Component - 0.63921570777893066 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.39330101013183594 - Color Space - sRGB - Green Component - 0.82634866237640381 - Red Component - 0.76874715089797974 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.34589937329292297 - Color Space - sRGB - Green Component - 0.80673152208328247 - Red Component - 0.92684400081634521 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.88060396909713745 - Color Space - sRGB - Green Component - 0.7008507251739502 - Red Component - 0.25234001874923706 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.54336923360824585 - Color Space - sRGB - Green Component - 0.53200650215148926 - Red Component - 0.96095067262649536 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.83428877592086792 - Color Space - sRGB - Green Component - 0.91446685791015625 - Red Component - 0.64103472232818604 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 1 - Color Space - sRGB - Green Component - 1 - Red Component - 0.99999600648880005 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.25586915016174316 - Color Space - sRGB - Green Component - 0.25587284564971924 - Red Component - 0.25586599111557007 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.47006773948669434 - Color Space - sRGB - Green Component - 0.48961412906646729 - Red Component - 1 - - BM Growl - - Background Color - - Alpha Component - 1 - Blue Component - 0.12941177189350128 - Color Space - sRGB - Green Component - 0.10196078568696976 - Red Component - 0.070588238537311554 - - Background Image Location - - Badge Color - - Alpha Component - 0.5 - Blue Component - 0.0 - Color Space - sRGB - Green Component - 0.1491314172744751 - Red Component - 1 - - Blinking Cursor - - Blur - - Blur Radius - 5.0877062182741106 - Bold Color - - Alpha Component - 1 - Blue Component - 0.84702622890472412 - Color Space - sRGB - Green Component - 0.90398252010345459 - Red Component - 0.92175871133804321 - - Character Encoding - 4 - Close Sessions On End - - Columns - 80 - Command - - Cursor Color - - Alpha Component - 1 - Blue Component - 0.32156863808631897 - Color Space - sRGB - Green Component - 0.94901961088180542 - Red Component - 0.86274510622024536 - - Cursor Guide Color - - Alpha Component - 0.050000000000000003 - Blue Component - 1 - Color Space - sRGB - Green Component - 0.92549020051956177 - Red Component - 0.70196080207824707 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.84702622890472412 - Color Space - sRGB - Green Component - 0.90398252010345459 - Red Component - 0.92175871133804321 - - Custom Command - No - Custom Directory - No - Default Bookmark - No - Description - Default - Disable Window Resizing - - Flashing Bell - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.81176471710205078 - Color Space - sRGB - Green Component - 0.88235294818878174 - Red Component - 0.90196079015731812 - - Guid - EF4F87C6-2E1D-4A11-91CD-870D115A4AA6 - Horizontal Spacing - 1 - Idle Code - 0 - Jobs to Ignore - - rlogin - ssh - slogin - telnet - - Keyboard Map - - 0x2a-0x200000 - - Action - 12 - Text - * - - 0x2b-0x200000 - - Action - 12 - Text - + - - 0x2d-0x200000 - - Action - 12 - Text - - - - 0x2d-0x40000 - - Action - 11 - Text - 0x1f - - 0x2e-0x200000 - - Action - 12 - Text - . - - 0x2f-0x200000 - - Action - 12 - Text - / - - 0x3-0x200000 - - Action - 11 - Text - 0xd - - 0x30-0x200000 - - Action - 12 - Text - 0 - - 0x31-0x200000 - - Action - 12 - Text - 1 - - 0x32-0x200000 - - Action - 12 - Text - 2 - - 0x32-0x40000 - - Action - 11 - Text - 0x00 - - 0x33-0x200000 - - Action - 12 - Text - 3 - - 0x33-0x40000 - - Action - 11 - Text - 0x1b - - 0x34-0x200000 - - Action - 12 - Text - 4 - - 0x34-0x40000 - - Action - 11 - Text - 0x1c - - 0x35-0x200000 - - Action - 12 - Text - 5 - - 0x35-0x40000 - - Action - 11 - Text - 0x1d - - 0x36-0x200000 - - Action - 12 - Text - 6 - - 0x36-0x40000 - - Action - 11 - Text - 0x1e - - 0x37-0x200000 - - Action - 12 - Text - 7 - - 0x37-0x40000 - - Action - 11 - Text - 0x1f - - 0x38-0x200000 - - Action - 12 - Text - 8 - - 0x38-0x40000 - - Action - 11 - Text - 0x7f - - 0x39-0x200000 - - Action - 12 - Text - 9 - - 0x7f-0x100000 - - Action - 11 - Text - 0x15 - - 0x7f-0x80000 - - Action - 11 - Text - 0x1b 0x7f - - 0xf700-0x220000 - - Action - 10 - Text - [1;2A - - 0xf700-0x240000 - - Action - 10 - Text - [1;5A - - 0xf700-0x260000 - - Action - 10 - Text - [1;6A - - 0xf701-0x220000 - - Action - 10 - Text - [1;2B - - 0xf701-0x240000 - - Action - 10 - Text - [1;5B - - 0xf701-0x260000 - - Action - 10 - Text - [1;6B - - 0xf702-0x220000 - - Action - 10 - Text - [1;2D - - 0xf702-0x240000 - - Action - 10 - Text - [1;5D - - 0xf702-0x260000 - - Action - 10 - Text - [1;6D - - 0xf702-0x280000 - - Action - 10 - Text - b - - 0xf703-0x220000 - - Action - 10 - Text - [1;2C - - 0xf703-0x240000 - - Action - 10 - Text - [1;5C - - 0xf703-0x260000 - - Action - 10 - Text - [1;6C - - 0xf703-0x280000 - - Action - 10 - Text - f - - 0xf704-0x20000 - - Action - 10 - Text - [1;2P - - 0xf705-0x20000 - - Action - 10 - Text - [1;2Q - - 0xf706-0x20000 - - Action - 10 - Text - [1;2R - - 0xf707-0x20000 - - Action - 10 - Text - [1;2S - - 0xf708-0x20000 - - Action - 10 - Text - [15;2~ - - 0xf709-0x20000 - - Action - 10 - Text - [17;2~ - - 0xf70a-0x20000 - - Action - 10 - Text - [18;2~ - - 0xf70b-0x20000 - - Action - 10 - Text - [19;2~ - - 0xf70c-0x20000 - - Action - 10 - Text - [20;2~ - - 0xf70d-0x20000 - - Action - 10 - Text - [21;2~ - - 0xf70e-0x20000 - - Action - 10 - Text - [23;2~ - - 0xf70f-0x20000 - - Action - 10 - Text - [24;2~ - - 0xf728-0x0 - - Action - 11 - Text - 0x4 - - 0xf728-0x80000 - - Action - 10 - Text - d - - 0xf729-0x20000 - - Action - 10 - Text - [1;2H - - 0xf729-0x40000 - - Action - 10 - Text - [1;5H - - 0xf72b-0x20000 - - Action - 10 - Text - [1;2F - - 0xf72b-0x40000 - - Action - 10 - Text - [1;5F - - 0xf739-0x0 - - Action - 13 - Text - - - - Link Color - - Alpha Component - 1 - Blue Component - 0.73423302173614502 - Color Space - sRGB - Green Component - 0.35916060209274292 - Red Component - 0.0 - - Mouse Reporting - - Name - Default - Non Ascii Font - Monaco 12 - Non-ASCII Anti Aliased - - Normal Font - Menlo-Regular 15 - Only The Default BG Color Uses Transparency - - Open Toolbelt - - Option Key Sends - 0 - Prompt Before Closing 2 - - Right Option Key Sends - 0 - Rows - 20 - Screen - -1 - Scrollback Lines - 1000 - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.84702622890472412 - Color Space - sRGB - Green Component - 0.90398252010345459 - Red Component - 0.92175871133804321 - - Selection Color - - Alpha Component - 1 - Blue Component - 0.31934511661529541 - Color Space - sRGB - Green Component - 0.26156574487686157 - Red Component - 0.19109529256820679 - - Send Code When Idle - - Shortcut - - Silence Bell - - Sync Title - - Tab Color - - Alpha Component - 1 - Blue Component - 0.12941177189350128 - Color Space - sRGB - Green Component - 0.10196078568696976 - Red Component - 0.070588238537311554 - - Tags - - Terminal Type - xterm-256color - Transparency - 0.068527918781725899 - Underline Color - - Alpha Component - 1 - Blue Component - 0.12941177189350128 - Color Space - sRGB - Green Component - 0.10196078568696976 - Red Component - 0.070588238537311554 - - Unlimited Scrollback - - Use Bold Font - - Use Bright Bold - - Use Italic Font - - Use Non-ASCII Font - - Vertical Spacing - 1 - Visual Bell - - Window Type - 0 - Working Directory - /Users/cobraz - - - PointerActions - - Button,1,1,, - - Action - kContextMenuPointerAction - - Button,2,1,, - - Action - kPasteFromClipboardPointerAction - - Gesture,ThreeFingerSwipeDown,, - - Action - kPrevWindowPointerAction - - Gesture,ThreeFingerSwipeLeft,, - - Action - kPrevTabPointerAction - - Gesture,ThreeFingerSwipeRight,, - - Action - kNextTabPointerAction - - Gesture,ThreeFingerSwipeUp,, - - Action - kNextWindowPointerAction - - - SoundForEsc - - TabStyleWithAutomaticOption - 5 - VisualIndicatorForEsc - - WordCharacters - /-+\~_. - findMode_iTerm - 0 - kCPKSelectionViewPreferredModeKey - 0 - kCPKSelectionViewShowHSBTextFieldsKey - - - diff --git a/.local/share/yadm/archive b/.local/share/yadm/archive deleted file mode 100644 index 4f4b882..0000000 Binary files a/.local/share/yadm/archive and /dev/null differ diff --git a/.path b/.path deleted file mode 100644 index e5f68db..0000000 --- a/.path +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -export PATH="/usr/local/sbin:$PATH" -export GOPATH=~/go - -export REPOS=~/ghq - -# Add pyenv to PATH -export PYENV_ROOT="$HOME/.pyenv" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" - -# Add yarn packages to PATH -export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - -source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" -source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" - -# NPM Utilities -export PATH="$PATH:$HOME/.utilities/node_modules/.bin" - -# Golang -export PATH="$GOPATH/bin:$PATH" - -# Volta -export VOLTA_HOME="$HOME/.volta" -export PATH="$VOLTA_HOME/bin:$PATH" - -export PATH="$HOME/scripts/bin:$PATH" -export PATH="$HOME/scripts:$PATH" diff --git a/.zshrc b/.zshrc index 6282e9f..5d8da06 100644 --- a/.zshrc +++ b/.zshrc @@ -1,11 +1,13 @@ -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH # Download Znap, if it's not there yet. [[ -r ~/.zsh_repos/znap/znap.zsh ]] || git clone --depth 1 -- \ https://github.com/marlonrichert/zsh-snap.git ~/.zsh_repos/znap source ~/.zsh_repos/znap/znap.zsh # Start Znap + +export GOPATH=~/go +export REPOS=~/ghq + znap eval starship 'starship init zsh --print-full-init' znap prompt diff --git a/Brewfile b/Brewfile index 9b46b3b..340fcec 100644 --- a/Brewfile +++ b/Brewfile @@ -1,170 +1,158 @@ -brew "mas" - -brew "ghq" -brew "moreutils" -brew "yadm" -brew "zsh" - -# GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. -brew "findutils" - -# GNU `sed`, overwriting the built-in `sed`. -brew "gnu-sed" - -# Modern version of Bash. -brew "bash" -brew "bash-completion" -brew "bash-completion@2", link: false # Not sure if this is needed - -# `wget` with IRI support. -brew "wget" - -# GnuPG to enable PGP-signing commits. -brew "gnupg" - -# Libraries -brew "lz4" -brew "zlib" -brew "zstd" -brew "libffi" - -# more recent versions of some macOS tools. -brew "grep" -brew "openssh" -brew "screen" -brew "gmp" - -# Font tools -tap "bramstein/webfonttools" -tap "homebrew/cask-drivers" -brew "sfnt2woff" -brew "sfnt2woff-zopfli" -brew "woff2" -cask "font-symbols-only-nerd-font" -cask "font-jetbrains-mono" - -# Programming languages -brew "golang" -brew "python@3.10" -brew "rust" -brew "zig" - -# Restish -brew "danielgtaylor/restish/restish" - -# Other useful binaries -brew "ripgrep" -brew "ack" -brew "git" -brew "git-lfs" -brew "gs" -brew "lua" -brew "p7zip" -brew "pigz" -brew "pv" -brew "rename" -brew "rlwrap" -brew "ssh-copy-id" -brew "tree" -brew "vbindiff" -brew "zopfli" -brew "kubectl" -brew "nmap" -brew "whalebrew" -brew "gh" -brew "microplane" -brew "jq" -brew "fzf" -brew "rclone" -brew "asciinema" -brew "goreleaser" -brew "caddy" -brew "git-secret" -brew "tmate" -brew "doctl" -brew "act" -cask "karabiner-elements" -brew "dasel" -brew "tldr" -brew "pkl" -brew "lazygit" -brew "yq" -tap "danielgtaylor/restish" -brew "restish" - -# Javascript Runtimes and tools -tap "oven-sh/bun" -brew "bun" -brew "pnpm" -brew "volta" -brew "corepack" -brew "deno" - -# IaC / Cloud -tap "pulumi/tap" -brew "pulumi" -brew "crd2pulumi" -brew "kube2pulumi" -brew "pulumictl" -brew "tf2pulumi" -brew "esc" -brew "helm" -brew "cilium-cli" -brew "azure-cli" - -# Container-related tools -cask "docker" -brew "podman" -brew "podman-compose" -cask "podman-desktop" - -# Taskfile -tap "go-task/tap" -brew "go-task" - -# Google stuff -cask "google-chrome" -cask "google-drive-file-stream" -cask "google-drive" -cask "google-cloud-sdk" - -# Turso -tap "tursodatabase/tap" -brew "turso" - -# Video meetings -cask "microsoft-teams" -cask "zoom" - -# Actively used applications -cask "visual-studio-code" -cask "spotify" -brew "neovim" -cask "slack" -cask "sonos" -brew "tmux" -cask "figma" -cask "discord" -cask "grammarly" -cask "microsoft-remote-desktop" -cask "postico" -cask "cyberduck" -cask "adobe-creative-cloud" -cask "1password" -cask "openvpn-connect" -cask "raycast" -cask "wezterm" -cask "rectangle" - -# Obsidian stuff -cask "obsidian" -tap "yakitrak/yakitrak" +# Taps +tap "bramstein/webfonttools" # Tools for working with web fonts +tap "homebrew/cask-drivers" # Tap for cask drivers +tap "danielgtaylor/restish" # REST API client +tap "oven-sh/bun" # Bun JavaScript runtime +tap "pulumi/tap" # Pulumi infrastructure as code tools +tap "go-task/tap" # Task runner for Go +tap "tursodatabase/tap" # Turso database tools +tap "yakitrak/yakitrak" # Tap for yakitrak tools +tap "simenandre/tools" # Tap for Simen Andre's tools + +# Mas +brew "mas" # Mac App Store command-line interface +mas "Outline", id: 1356178125 # Note-taking application +mas "Remote Desktop", id: 409907375 # Microsoft Remote Desktop application + +# Shells and Shell Utilities +brew "zsh" # Z shell +brew "bash" # Modern version of Bash +brew "bash-completion" # Bash completion +brew "yadm" # Yet Another Dotfiles Manager +brew "ghq" # Manage remote repository clones +brew "moreutils" # Collection of additional Unix utilities + +# GNU Tools +brew "findutils" # GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. +brew "gnu-sed" # GNU `sed`, overwriting the built-in `sed`. +brew "grep" # More recent version of macOS `grep` + +# Networking Tools +brew "wget" # `wget` with IRI support. +brew "openssh" # OpenSSH utilities +brew "nmap" # Network mapper + +# Security and Encryption +brew "gnupg" # GnuPG to enable PGP-signing commits. +brew "git-secret" # Bash tool to store encrypted secrets in a Git repository +brew "ssh-copy-id" # Add SSH key to a server's authorized_keys + +# Compression Libraries and Tools +brew "lz4" # Compression library +brew "zlib" # Compression library +brew "zstd" # Compression library +brew "libffi" # Foreign Function Interface library +brew "p7zip" # File archiver with high compression ratio +brew "pigz" # Parallel implementation of gzip +brew "zopfli" # Compression tool + +# Programming Languages and Runtimes +brew "golang" # Go programming language +brew "python@3.10" # Python 3.10 +brew "rust" # Rust programming language +brew "zig" # Zig programming language + +# Font Tools +brew "sfnt2woff" # Convert TTF to WOFF +brew "sfnt2woff-zopfli" # Convert TTF to WOFF (with Zopfli compression) +brew "woff2" # Convert TTF to WOFF2 +cask "font-symbols-only-nerd-font" # Symbols Only Nerd Font +cask "font-jetbrains-mono" # JetBrains Mono font + +# JavaScript Runtimes and Package Managers +brew "bun" # Bun JavaScript runtime +brew "pnpm" # Fast, disk space efficient package manager +brew "volta" # JavaScript tool manager +brew "corepack" # Yarn and pnpm binary manager +brew "deno" # Secure JavaScript and TypeScript runtime + +# REST API Clients +brew "danielgtaylor/restish/restish" # REST API client + +# Version Control +brew "git" # Distributed version control system +brew "git-lfs" # Git extension for versioning large files +brew "lazygit" # Simple terminal UI for git commands +brew "microplane" # Tool for mass refactoring + +# Search Tools +brew "ripgrep" # Line-oriented search tool +brew "ack" # Search tool like grep, optimized for programmers +brew "fzf" # Command-line fuzzy finder + +# JSON/YAML Processing Tools +brew "jq" # Command-line JSON processor +brew "yq" # Command-line YAML processor + +# Cloud and IaC Tools +brew "pulumi" # Infrastructure as code tool +brew "crd2pulumi" # Generate Pulumi code from Kubernetes CRDs +brew "kube2pulumi" # Generate Pulumi code from Kubernetes YAML +brew "pulumictl" # Pulumi command-line tool +brew "tf2pulumi" # Convert Terraform code to Pulumi +brew "azure-cli" # Microsoft Azure command-line tool +brew "kubectl" # Kubernetes command-line tool +brew "helm" # Kubernetes package manager +brew "cilium-cli" # CLI to install, manage & troubleshoot Kubernetes clusters + +# Container Tools +brew "podman" # Manage pods, containers, and container images +brew "podman-compose" # Docker Compose replacement for Podman +cask "docker" # Docker desktop +cask "podman-desktop" # Podman desktop + +# Task Runners and Automation +brew "go-task" # Task runner for Go +brew "act" # Run GitHub Actions locally + +# Databases +brew "turso" # Turso database command-line tool + +# Video Meeting Applications +cask "microsoft-teams" # Microsoft Teams +cask "zoom" # Zoom video conferencing + +# Applications +cask "visual-studio-code" # Visual Studio Code editor +cask "spotify" # Spotify music streaming +brew "neovim" # Hyperextensible Vim-based text editor +cask "slack" # Slack messaging app +cask "sonos" # Sonos controller app +brew "tmux" # Terminal multiplexer +cask "figma" # Figma design tool +cask "discord" # Discord chat and voice app +cask "grammarly" # Grammarly writing assistant +cask "microsoft-remote-desktop" # Microsoft Remote Desktop app +cask "postico" # PostgreSQL GUI client +cask "cyberduck" # FTP and cloud storage browser +cask "adobe-creative-cloud" # Adobe Creative Cloud +cask "1password" # 1Password password manager +cask "openvpn-connect" # OpenVPN client +cask "raycast" # Command launcher +cask "wezterm" # Terminal emulator +cask "rectangle" # Window management app + +# Terminal Tools +brew "pv" # Pipe viewer +brew "rename" # Perl-powered file rename script +brew "rlwrap" # Readline wrapper +brew "tree" # Display directories as trees +brew "vbindiff" # Visual binary diff +brew "tmate" # Instant terminal sharing +brew "asciinema" # Record and share terminal sessions +brew "dasel" # Query and update data structures from the command line +brew "tldr" # Simplified and community-driven man pages + +# HTTP and Web Servers +brew "caddy" # Fast, multi-platform web server with automatic HTTPS +brew "goreleaser" # Deliver Go binaries as fast and easily as possible + +# Specific Toolsets +brew "whalebrew" # Dockerized CLI applications + +# Obsidian +cask "obsidian" # Obsidian note-taking app # My tools -tap "simenandre/tools" -brew "trippl-timely" -brew "xlsx-mxlookup" - -# App Store applications -mas "Outline", id: 1356178125 -mas "Remote Desktop", id: 409907375 +brew "trippl-timely" # Not clear, could be a custom tool +brew "xlsx-mxlookup" # Not clear, could be a custom tool diff --git a/aliases.zsh b/aliases.zsh new file mode 100644 index 0000000..ebda55c --- /dev/null +++ b/aliases.zsh @@ -0,0 +1,31 @@ +# Git aliases +alias git-unpushed='git log --branches --not --remotes --no-walk --decorate --oneline' +alias gb='git checkout -b' +alias gfr='git fetch upstream && git rebase upstream/main' +alias git-undo='git reset --soft HEAD~1' +alias git-clean-branches="git for-each-ref --format '%(refname:short)' refs/heads | grep -v 'master\|main' | xargs git branch -D" +alias :q='exit' +alias ls='ls --color' + +# Generic / Random / Utility +alias rg="rg --hidden --glob '!.git' --glob '!node_modules'" +alias r='cd $REPOS/github.com/' +alias c='clear' +alias afk='pmset displaysleepnow' +alias dl="cd ~/Downloads" +alias l='ls -l' +alias todo='nt' +alias tasks="open 'obsidian://open?file=-%20Oppgaver'" +alias todos="mt ~/ghq/github.com/simenandre/notes/" +# alias docker-compose=podman-compose +alias today="open 'obsidian://advanced-uri?daily=true'" +alias tre="tree -I '.git|node_modules'" +alias timeliste="open 'https://tripletex.no/execute/updateHourlist?contextId=11208568'" +alias t="open 'https://tripletex.no/execute/updateHourlist?contextId=11208568'" +alias fork-cleaner="fork-cleaner --token $(cat ~/.secrets/github-token)" +alias vi="nvim" +alias vim="nvim" +alias v="nvim" + +alias dump-issues="getBjerkIssues > ~/Downloads/issues-$(date -I).json" + diff --git a/extras.zsh b/extras.zsh new file mode 100755 index 0000000..0647ca0 --- /dev/null +++ b/extras.zsh @@ -0,0 +1,28 @@ +NOTES_DIR=$HOME/ghq/github.com/simenandre/notes/ +function note() { + if [ $1 ]; then + FILE=$NOTES_DIR/$(date +%Y-%m-%d).md + + if [ $2 ]; then + FILE=$2 + fi + + echo $1 >> $FILE + fi +} + +function nt() { + if [ $1 ]; then + CONTENT="- [ ] $1" + note $CONTENT $2 + fi +} + +function getBjerkIssues() { + gh issue list --repo bjerkio/internal \ + --search "-label:backlog -label:kind/system" \ + --json title,body,url,createdAt,assignees,number,labels,comments \ + --jq 'map({url, createdAt, title, labels: [.labels[].name], assignees: [.assignees[].login], body, number: "#\(.number)", comments: .comments | map({ body: .body, createdAt: .createdAt })})' +} + + diff --git a/path.zsh b/path.zsh new file mode 100644 index 0000000..febb59e --- /dev/null +++ b/path.zsh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Add directories to the PATH and prevent to add the same directory multiple times upon shell reload. +add_to_path() { + if [[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]]; then + export PATH="$1:$PATH" + fi +} + +# Add ghq to PATH +add_to_path "$GOPATH/bin" + diff --git a/weekly-jobs.sh b/weekly-jobs.sh deleted file mode 100755 index f71f198..0000000 --- a/weekly-jobs.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# This script runs every week at noon on Mondays -# It is used to schedule tasks on my computer - -# Save secrets locally -sh ~/ghq/github.com/simenandre/secrets/save-secrets-locally.sh \ No newline at end of file -- cgit v1.2.3