Skip to content

Commit 5d8b291

Browse files
committed
feat: improve empty trash command
1 parent 95382d3 commit 5d8b291

File tree

4 files changed

+59
-22
lines changed

4 files changed

+59
-22
lines changed

editors/cursor/keybindings.json

+21
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,26 @@
133133
"key": "cmd+g",
134134
"command": "aipopup.action.modal.generate",
135135
"when": "editorFocus && !composerBarIsVisible"
136+
},
137+
{
138+
"key": "alt+b",
139+
"command": "-simply-blame.simplyBlame"
140+
},
141+
{
142+
"key": "shift+cmd+1",
143+
"command": "simply-blame.simplyBlame"
144+
},
145+
{
146+
"key": "shift+cmd+a",
147+
"command": "workbench.action.showCommands"
148+
},
149+
{
150+
"key": "ctrl+m",
151+
"command": "editor.action.jumpToBracket",
152+
"when": "editorTextFocus"
153+
},
154+
{
155+
"key": "cmd+b",
156+
"command": "-workbench.action.toggleSidebarVisibility"
136157
}
137158
]

editors/cursor/settings.json

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"github.copilot.inlineSuggest.enable": true,
3-
"editor.fontSize": 22,
3+
"editor.fontSize": 20,
44
"editor.suggestSelection": "first",
55
"editor.minimap.enabled": false,
66
"editor.dragAndDrop": false,
77
"editor.fontFamily": "DankMono Nerd font Mono",
88
"terminal.integrated.fontFamily": "DankMono Nerd font Mono",
99
"terminal.integrated.fontSize": 20,
10-
"editor.lineHeight": 3,
10+
"editor.lineHeight": 2.7,
11+
"editor.cursorStyle": "line",
12+
"editor.cursorBlinking": "smooth",
1113
"editor.rulers": [
1214
100
1315
],
@@ -33,11 +35,9 @@
3335
"workbench.sideBar.location": "left",
3436
"workbench.tree.indent": 20,
3537
"workbench.list.smoothScrolling": true,
36-
"workbench.productIconTheme": "fluent-icons",
37-
"workbench.iconTheme": "symbols",
3838
"breadcrumbs.symbolPath": "off",
3939
"workbench.startupEditor": "none",
40-
"editor.hover.enabled": true,
40+
"editor.hover.enabled": false,
4141
"typescript.updateImportsOnFileMove.enabled": "always",
4242
"git.autofetch": true,
4343
"gitlens.hovers.currentLine.over": "line",
@@ -53,8 +53,18 @@
5353
"editor.inlineSuggest.enabled": true,
5454
"aws.telemetry": false,
5555
"symbols.hidesExplorerArrows": false,
56-
"window.zoomLevel": 0,
56+
"window.zoomLevel": 1,
5757
"security.workspace.trust.untrustedFiles": "open",
58-
"workbench.colorTheme": "Default Dark Modern",
59-
"editor.stickyScroll.enabled": false
58+
"editor.stickyScroll.enabled": false,
59+
"editor.accessibilitySupport": "off",
60+
"editor.codeActionsOnSave": {
61+
"source.fixAll.eslint": "explicit"
62+
},
63+
"eslint.validate": [
64+
"javascript",
65+
"javascriptreact",
66+
"typescript",
67+
"typescriptreact"
68+
],
69+
"workbench.iconTheme": "vscode-jetbrains-icon-theme-2023-auto"
6070
}

nix/flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
environment.systemPackages = import ./_packages.nix { inherit pkgs; };
2626
homebrew = import ./_homebrew.nix;
2727

28-
home-manager.backupFileExtension = "bkp";
28+
home-manager.backupFileExtension = "bkp_" + builtins.toString builtins.currentTime;
2929

3030
# https://daiderd.com/nix-darwin/manual/index.html#:~:text=system/version.nix%3E-,system.defaults,-.%22.GlobalPreferences%22.%22com.apple
3131
system.defaults = import ./_macos-defaults.nix;

scripts/system/empty_trash

+19-13
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ free_space_in_home() {
1717

1818
free_space_before_empty=$(free_space_in_home)
1919

20-
ls /Volumes | grep -v GoogleDrive | xargs -I_ sudo rm -rfv /Volumes/_/.Trashes
21-
sudo rm -rfv ~/.Trash/*
22-
echo '🗑 All trashes empty'
20+
rm -rf ~/Library/Caches/* 2>/dev/null || true
21+
echo '📦 All caches cleared'
2322

2423
sudo rm -rfv /private/var/log/asl/*.asl
2524
sudo rm -rfv /var/log/asl/*.asl
@@ -33,23 +32,25 @@ echo '🎬 Final Cut rendered media cleared'
3332

3433
brew cleanup
3534
brew cleanup --prune-prefix
36-
rm -rf ~/Library/Caches/Homebrew
3735
echo '🍺 Brew cache cleared'
3836

39-
rm -rf ~/Library/Caches/com.tinyspeck.slackmacgap
40-
rm -rf ~/Library/Caches/com.tinyspeck.slackmacgap.ShipIt
4137
rm -rf ~/Library/Application Support/Slack/Cache
4238
rm -rf "$HOME/Library/Application Support/Slack/Service Worker/CacheStorage"
4339
echo '💬 Slack cache cleared'
4440

45-
rm -rf ~/Library/Caches/com.spotify.client/Data
46-
echo '🎶 Spotify cache cleared'
41+
rm -rf .npm/_cacache/
42+
rm -rf .npm/_npx/
43+
echo '💪 NPM cache cleared'
44+
45+
find "$HOME/Code" -type d -path "*/.next/cache" -exec rm -rf {} \; -prune
46+
echo '💪 Next.js cache cleared'
4747

48-
rm -rf ~/Library/Caches/JetBrains
49-
echo '🅸 JetBrains cache cleared'
48+
rm -rf "$HOME/Library/Application Support/com.turborepo.turborepo/logs"
49+
find "$HOME/Code" -type d -path "*/.turbo/cache" -exec rm -rf {} \; -prune
50+
echo '💨 Turborepo logs & cache cleared'
5051

51-
rm -rf ~/Library/Caches/Yarn/
52-
echo '💪 Yarn cache cleared'
52+
find "$HOME/Code" -type d -path "*/node_modules" -exec rm -rf {} \; -prune
53+
echo '💪 node_modules cleared'
5354

5455
rm -rf ~/.gradle/wrapper/dists/
5556
rm -rf ~/.gradle/caches/
@@ -58,11 +59,16 @@ echo '🐘 Gradle cache cleared'
5859
rm -rf ~/.composer/cache/
5960
echo '👨‍🎤 Composer cache cleared'
6061

61-
rm -rf ~/Library/Caches/Google/Chrome || true
6262
rm -rf "$HOME/Library/Application Support/Google/Chrome/"*"/Service Worker/CacheStorage" || true
6363
rm -rf "$HOME/Library/Application Support/Google/Chrome/"*"/Application Cache/Cache" || true
6464
echo '🟡 Chrome cache cleared'
6565

66+
rm -rf Library/Application\ Support/stremio-server/stremio-cache/
67+
echo '📺 Stremio cache cleared'
68+
69+
osascript -e 'tell app "Finder" to empty' 2>/dev/null || true
70+
echo '🗑 All trashes empty'
71+
6672
free_space_after_empty=$(free_space_in_home)
6773

6874
echo "Done! Free space before: $free_space_before_empty, free space now: $free_space_after_empty"

0 commit comments

Comments
 (0)