Skip to content

Commit

Permalink
Update settings
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 28, 2025
1 parent 8c93c90 commit 1b54cbc
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 60 deletions.
8 changes: 3 additions & 5 deletions home/.zshenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,16 @@ unset BROWSER
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_AUTO_UPDATE_SECS='2592000'
export HOMEBREW_NO_ENV_HINTS=1
export MSHOULD_QUIET=1
export MSHOULD_FAST=1
export GPG_TTY=$(tty) # For git commit signing
gitssh="$HOME/.ssh/git"
if [[ -f $gitssh ]]; then
export GIT_SSH_COMMAND="ssh -i $gitssh -F /dev/null"
fi
unset gitssh


if (( $+commands[zed] )); then
export EDITOR=$commands[zed]
export VISUAL=$commands[zed]
elif (( $+commands[code] )); then
if (( $+commands[code] )); then
export EDITOR=$commands[code]
export VISUAL=$commands[code]
else
Expand Down
55 changes: 24 additions & 31 deletions home/.zshrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,20 @@ alias cl='clear'
# Git short-cuts.
alias g='git'
alias ga='git add'
alias gr='git rm'
alias gf='git fetch'
alias gu='git pull'
alias gp='git push'
alias gs='git status --short'
alias gd='git diff'
alias gdisc='git discard'
alias gds='git diff --staged'
alias gcl='git clone'
alias gch='git checkout'
alias gbr='git branch'
alias gbrcl='git checkout --orphan'
alias gbrd='git branch -D'
alias gback='git reset HEAD~1'
alias gdisc='git reset --hard HEAD'
alias glast='g show'

function gc() {
args=$@
Expand All @@ -72,6 +80,11 @@ function gcam() {
ndate=$(date -u +%Y-%m-%dT%H:%M:%S%z)
GIT_AUTHOR_DATE=$ndate GIT_COMMITTER_DATE=$ndate git commit --amend -m "$args"
}
function grmtag() {
tag=$1
git tag -d $tag
git push origin ":refs/tags/${tag}"
}

function cherry() {
is_range=''
Expand Down Expand Up @@ -99,23 +112,19 @@ function cherry() {
done
}

alias gp='git push'

function gcp() {
title="$@"
git commit -am $title && git push -u origin
ndate=$(date -u +%Y-%m-%dT%H:%M:%S%z)
GIT_AUTHOR_DATE=$ndate GIT_COMMITTER_DATE=$ndate git commit -am $title && git push -u origin
}
alias gcl='git clone'
alias gch='git checkout'
alias gbr='git branch'
alias gbrcl='git checkout --orphan'
alias gbrd='git branch -D'
function gl() {
count=$1
[[ -z "$1" ]] && count=10
git --no-pager log --graph --no-merges --max-count=$count
}


# ===============
# Dev short-cuts.
# ===============
Expand All @@ -125,30 +134,14 @@ alias ni='npm install'
alias nr='npm run'
alias nt='npm test'
alias nrb='npm run build'
alias nrl='npm run lint'
alias pack='npm pack --dry-run'
function npm-init() {
local dir="$1"
if [ -z "$dir" ]; then
echo "First argument - dir name"
return 0
fi
mkdir $dir
cd $dir
npm init -y
touch a.mjs
}
# if (( $+commands[pnpm] )); then
# alias npm=pnpm
# fi
alias nrf='npm run format'
alias npm-dry='npm pack --dry-run'
alias jsr-dry='jsr publish --dry-run'

alias serve='python3 -m http.server'
alias serve='python3 -m http.server --bind 127.0.0.1'
alias server='serve'

alias bex='bundle exec' # Ruby
alias stats='sort | uniq -c | sort -r'
alias git-stats='git log --no-merges --pretty=format:"%ae" | stats'
# Lists the ten most used commands.
alias git-emails='git log --no-merges --pretty=format:"%ae" | stats'
alias history-stats="history 0 | awk '{print \$2}' | stats | head"
# Checks whether connection is up.
alias net="ping google.com | grep -E --only-match --color=never '[0-9\.]+ ms'"
Expand Down Expand Up @@ -266,7 +259,7 @@ function rams() {
else
echo -en "No active processes matching pattern '${fg[blue]}${app}${reset_color}'\r"
fi
sleep 1
sleep 0.1
done
}

Expand Down
63 changes: 39 additions & 24 deletions vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,45 @@
{
"editor.fontSize": 14,
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08', 'calt', 'dlig'",
"debug.console.fontSize": 16,
"terminal.integrated.fontSize": 14,
"editor.fontFamily": "Comic Mono, Fantasque Sans Mono, Monaco, 'Courier New', monospace",
"editor.fontFamily": "'Monaspace Xenon', 'Courier New', monospace",
"editor.tabSize": 2,

"editor.bracketPairColorization.enabled": true,
"editor.minimap.enabled": false,

// Trim whitespace
"files.trimTrailingWhitespace": true,

// Wrap lines at 100 characters
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 100,
"html.format.wrapLineLength": 100,

// Prettier formatter: single quotes, 100 chars
"prettier.singleQuote": true,
"prettier.printWidth": 100,

// git
"git.confirmSync": false,
"git.autorefresh": false,
"diffEditor.renderSideBySide": false,

// Do not show files
"files.exclude": {
"**/lib": true,
"**/node_modules": true,
"**/package-lock.json": true
},

// F-off telemetry
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"telemetry.telemetryLevel": "off",
"update.mode": "none",
"extensions.autoUpdate": false,
"update.showReleaseNotes": false,
"extensions.autoCheckUpdates": false,
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.enableExperiments": false,
"extensions.ignoreRecommendations": true,

"explorer.openEditors.visible": 10,
"explorer.confirmDelete": false,
"javascript.implicitProjectConfig.checkJs": true,
"editor.renderWhitespace": "selection",
"editor.renderControlCharacters": false,
"window.openFilesInNewWindow": "default",
"[javascript]": {
// "editor.defaultFormatter": "vscode.typescript-language-features"
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
Expand All @@ -61,18 +48,46 @@
"editor.defaultFormatter": "vscode.json-language-features"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"workbench.editor.untitled.hint": "hidden",
"workbench.startupEditor": "none",
"workbench.editor.languageDetection": false,
"workbench.preferredDarkColorTheme": "Ayu Dark",
"workbench.preferredDarkColorTheme": "Monokai Pro (Filter Spectrum)",
"window.autoDetectColorScheme": true,
"editor.unicodeHighlight.nonBasicASCII": false,
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"breadcrumbs.enabled": false,
"workbench.preferredLightColorTheme": "Iceberg Light",
"workbench.iconTheme": "Monokai Pro (Filter Machine) Monochrome Icons",
"git.enabled": false,
"workbench.colorTheme": "Iceberg Light"
}
"workbench.colorTheme": "Iceberg Light",
"editor.lineNumbers": "off",
"editor.folding": false,
"editor.glyphMargin": false,
"editor.guides.indentation": false,
"prettier.enable": false,
"editor.rulers": [],
"markdown.preview.fontSize": 18,
"files.trimTrailingWhitespace": true,
"git.openRepositoryInParentFolders": "always",
"workbench.editorAssociations": {
"*.epub": "default"
},
"typescript.inlayHints.parameterTypes.enabled": true,
"zig.zls.enabled": true,
"workbench.editor.empty.hint": "hidden",
"editor.inlayHints.enabled": "off",
"print.colourScheme": "A11 Y",
"markdown.preview.fontFamily": "SF Mono, SFMono, -apple-system, sans-serif",
"print.fontSize": "8pt",
"window.commandCenter": false,
"js/ts.implicitProjectConfig.checkJs": true,
"haskell.serverEnvironment": {
"PATH": "${HOME}/.ghcup/bin:$PATH"
},
"haskell.manageHLS": "GHCup",
"editor.maxTokenizationLineLength": 50000,
"workbench.settings.applyToAllProfiles": [
"editor.maxTokenizationLineLength"
],
"github.gitAuthentication": false,
"print.editorTitleMenuButton": false
}

0 comments on commit 1b54cbc

Please sign in to comment.