From 4661ad04b5bf3cba63e72801ee2d3c3848973a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 16 Jul 2023 23:39:36 +0200 Subject: [PATCH] new cli tools aliases for fish --- ...nelTabs_new_302085663057248267.config.json | 11 +- .../VSCodium/User/globalStorage/state.vscdb | Bin 765952 -> 765952 bytes .../VSCodium/User/globalStorage/storage.json | 77 +++-- .config/fish/conf.d/to.fish | 3 - .config/fish/config.fish | 12 +- .config/fish/functions/to.fish | 290 ------------------ .tofish/fish | 1 - .tofish/hypr | 1 - 8 files changed, 57 insertions(+), 338 deletions(-) delete mode 100644 .config/fish/conf.d/to.fish delete mode 100644 .config/fish/functions/to.fish delete mode 120000 .tofish/fish delete mode 120000 .tofish/hypr diff --git a/.config/BetterDiscord/plugins/ChannelTabs_new_302085663057248267.config.json b/.config/BetterDiscord/plugins/ChannelTabs_new_302085663057248267.config.json index 3f42b084..2358f1db 100644 --- a/.config/BetterDiscord/plugins/ChannelTabs_new_302085663057248267.config.json +++ b/.config/BetterDiscord/plugins/ChannelTabs_new_302085663057248267.config.json @@ -6,7 +6,7 @@ "url": "/channels/674984102860161025/1007802241035538452", "selected": true, "currentStatus": "none", - "iconUrl": "https://cdn.discordapp.com/icons/674984102860161025/a4c5c84a118b923dfe68dccd886d1d87.webp?size=44", + "iconUrl": "https://cdn.discordapp.com/icons/674984102860161025/a4c5c84a118b923dfe68dccd886d1d87.webp?size=40", "channelId": "1007802241035538452" }, { @@ -26,11 +26,12 @@ "channelId": "635625917623828520" }, { - "name": "Friends", - "url": "/channels/@me", + "name": "@Sergio Laín", + "url": "/channels/@me/1107960185529581679", "selected": false, - "currentStatus": "none", - "iconUrl": "https://cdn.discordapp.com/embed/avatars/0.png" + "currentStatus": "offline", + "iconUrl": "https://cdn.discordapp.com/avatars/1087642197685452850/b61c2b287c9f9e3e31a5a9741884a33d.webp?size=40", + "channelId": "1107960185529581679" } ], "favs": [], diff --git a/.config/VSCodium/User/globalStorage/state.vscdb b/.config/VSCodium/User/globalStorage/state.vscdb index fd6376217de69566a9fc6dd43745a30b56c414ee..158688c39989be761ed82fccd2c35c16f728533f 100644 GIT binary patch delta 1092 zcmZXSTTEO<7{||iGqbygv&%UYTWeU#?$YIA3LegG$+ESQLIjrvy0qL4VNon>Qd=a8 z51O@mFiN5^U^dOvCdM|^7UON{0#kj$RFjI3QXyWWflA`Td9bbe;HALuzH?0m~yr$JCOtEQoU-6(+fwC#(pj%SzC%Lb_%uubh^*g{YznR2 zBr>M3=lrlIUGl!s5vc;=$ z5+dZOL}z>;G2{yyMkts}nnz8mi!_hLS+op1Y~dz(J3nZMs?|m)*?To%TAif(j+foO zM@smIE2Pz#7yVCXKvJ)%FG4_S5=x7KW$J*UCN@_Go$Pu8JjhZy*tn}6W--6p04|w! zJ#1PLc90QWGpfQyARI6}jm>Q}ru7(0ic>bsh8^@);2>=5D%^gw*C+l(9s`6-1x=}71#uJfkPnkjhUR+o}^z?;yy@6&Xx1G zb}PSNy6VM^C|z5-E3Mbs`IKAPjnEDDX`wPqzbVD7u>B?`-joZYU-OBHoWrDDvK@bu61+6?7RTlgH1(l{tvj6}9 delta 1094 zcmZXSZAe>J7{~8<&N(JG*W_Mt>spLWa(!o=#Jp${x2Ebeh-hQ0>kAaMt8dWROd@n_ zZn?r{85Ha?b~-^;Tc(cDHa5{?2P<~etx(4-6!vN0R-qs6hqZ&jUf8;m!9MMr^W%Z@ ze>nV~KPR!eW~(S3!}Q*8qf|-Z6-hxqNsccZ@7o{PW#y?7wf$=Q81BGq z)_LinA{#E_mP*>EEKJcMe$XEZH253p8$zLA(C@3?r;m>gk0d(>#)n784hDuH zWsYtl^ZRk)Q*mVM6ni}Z6)Z7_%XrreUQwrU3Knq+YtS~#`j3&yyw=Ev5-=xhUBVgE z&OA-9i^YLjx!w;yitB#j=J){orE2zqw!dP&dhohN-jZD0qwOf{}nX;;(bZI(x!~>A}$$d(EZnVGB_x%B%i{NHCmN{f6np zhpU*&rIfHfmty7HjJT^89uv)B7cXNpFX4C4Je(B?r4cm_8RpCEst$KmUmzIp2kSzU zC#FDr8+QL5`BqMx9vB@<4xUZ24>!s4wi9bf!)zwUo_N^fQmEwD%AmUtbuMfZZB>JQ z1;zM43A}<(8((um3>TN#r7;OhjZ#6cbwm`g#cVZf9)q7KoAi;e@sRS61&Tp_ug@^| zlh*SJ`*SZid2WM5v512NM3bLztWm2s+pL|#^2HJHze)FUQQpQgJkvrC?^`5pq;Z_0 z#EWER&Cnn!X8SX=1+DX`4Al@_s=%GVmUVE$#2t2XnSMsTF2ye~PnJH*-@HNF5n5v# zS=wBvim3iuY&}Qa^cxRu1$O*<;$%HJdYWlDszaYTy_2JY0)a(f707%iXFLBYy9DLbm__ diff --git a/.config/VSCodium/User/globalStorage/storage.json b/.config/VSCodium/User/globalStorage/storage.json index 1ef181fa..ed1f7e8e 100644 --- a/.config/VSCodium/User/globalStorage/storage.json +++ b/.config/VSCodium/User/globalStorage/storage.json @@ -44,6 +44,17 @@ { "id": "vscode.menubar.separator" }, + { + "id": "openRecentFolder", + "uri": { + "$mid": 1, + "external": "file:///home/matt/.config/kitty", + "path": "/home/matt/.config/kitty", + "scheme": "file" + }, + "enabled": true, + "label": "~/.config/kitty" + }, { "id": "openRecentFolder", "uri": { @@ -143,17 +154,6 @@ "enabled": true, "label": "~/.config/pipewire" }, - { - "id": "openRecentFolder", - "uri": { - "$mid": 1, - "external": "file:///usr/lib/librewolf/browser", - "path": "/usr/lib/librewolf/browser", - "scheme": "file" - }, - "enabled": true, - "label": "/usr/lib/librewolf/browser" - }, { "id": "vscode.menubar.separator" }, @@ -666,11 +666,13 @@ }, { "id": "workbench.action.toggleZenMode", - "label": "Zen Mode" + "label": "Zen Mode", + "checked": true }, { "id": "workbench.action.toggleCenteredLayout", - "label": "&&Centered Layout" + "label": "&&Centered Layout", + "checked": true }, { "id": "vscode.menubar.separator" @@ -1003,45 +1005,54 @@ }, { "id": "workbench.action.focusThirdEditorGroup", - "label": "Group &&3" + "label": "Group &&3", + "enabled": false }, { "id": "workbench.action.focusFourthEditorGroup", - "label": "Group &&4" + "label": "Group &&4", + "enabled": false }, { "id": "workbench.action.focusFifthEditorGroup", - "label": "Group &&5" + "label": "Group &&5", + "enabled": false }, { "id": "vscode.menubar.separator" }, { "id": "workbench.action.focusNextGroup", - "label": "&&Next Group" + "label": "&&Next Group", + "enabled": false }, { "id": "workbench.action.focusPreviousGroup", - "label": "&&Previous Group" + "label": "&&Previous Group", + "enabled": false }, { "id": "vscode.menubar.separator" }, { "id": "workbench.action.focusLeftGroup", - "label": "Group &&Left" + "label": "Group &&Left", + "enabled": false }, { "id": "workbench.action.focusRightGroup", - "label": "Group &&Right" + "label": "Group &&Right", + "enabled": false }, { "id": "workbench.action.focusAboveGroup", - "label": "Group &&Above" + "label": "Group &&Above", + "enabled": false }, { "id": "workbench.action.focusBelowGroup", - "label": "Group &&Below" + "label": "Group &&Below", + "enabled": false } ] } @@ -1241,7 +1252,8 @@ }, { "id": "workbench.action.terminal.split", - "label": "&&Split Terminal" + "label": "&&Split Terminal", + "enabled": false }, { "id": "vscode.menubar.separator" @@ -1792,7 +1804,7 @@ "sideBarSide": "left", "editorPartMinWidth": 220, "titleBarHeight": 0, - "activityBarWidth": 48, + "activityBarWidth": 0, "sideBarWidth": 0, "statusBarHeight": 0, "windowBorder": false @@ -1800,13 +1812,13 @@ }, "windowsState": { "lastActiveWindow": { - "folder": "file:///home/matt/.config", - "backupPath": "/home/matt/.config/VSCodium/Backups/375730732710406c4b825f9cde716ece", + "folder": "file:///home/matt/.config/kitty", + "backupPath": "/home/matt/.config/VSCodium/Backups/f862d78a22ff70d122e141cd428aace5", "uiState": { "mode": 1, - "x": 21, + "x": 1234, "y": 1109, - "width": 2404, + "width": 1191, "height": 934 } }, @@ -1822,10 +1834,7 @@ "folderUri": "file:///home/matt/.config/awesome" }, { - "folderUri": "file:///home/matt/.oh-my-zsh" - }, - { - "folderUri": "file:///home/matt/.config" + "folderUri": "file:///home/matt/.config/kitty" } ], "emptyWindows": [] @@ -1869,7 +1878,6 @@ "file:///home/matt/Repos/Non-Personal/Community%20Dotfiles/Dots/AwesomeWM/awesomeCrylia": "__default__profile__", "file:///home/matt/Repos/Personal/Dotfiles": "__default__profile__", "file:///home/matt/.zhs": "__default__profile__", - "file:///home/matt/.config/kitty": "__default__profile__", "file:///home/matt/Repos/Non-Personal/Community%20Dotfiles/Dots/Hyprland/dotfiles-hyprland": "__default__profile__", "file:///home/matt/Repos/Non-Personal/Community%20Dotfiles/Dots/Hyprland/.dotfiles": "__default__profile__", "file:///home/matt/Repos/Clase/2%C2%BADAM/PSP": "__default__profile__", @@ -1885,7 +1893,8 @@ "file:///home/matt/.config/lazygit": "__default__profile__", "file:///home/matt/.oh-my-zsh/themes": "__default__profile__", "file:///home/matt/.oh-my-zsh": "__default__profile__", - "file:///home/matt/.config": "__default__profile__" + "file:///home/matt/.config": "__default__profile__", + "file:///home/matt/.config/kitty": "__default__profile__" }, "emptyWindows": {} }, diff --git a/.config/fish/conf.d/to.fish b/.config/fish/conf.d/to.fish deleted file mode 100644 index e569196d..00000000 --- a/.config/fish/conf.d/to.fish +++ /dev/null @@ -1,3 +0,0 @@ -if test -z "$TO_DIR" - set -U TO_DIR ~/.tofish -end diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 3b08c4bd..cfdc69db 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,6 +1,7 @@ if status is-interactive # Commands to run in interactive sessions can go here neofetch + zoxide init fish | source end alias code='vscodium' @@ -11,15 +12,18 @@ alias matrix='unimatrix' alias q='exit' alias install='sudo pacman -S ' alias uninstall='sudo pacman -R ' -alias yayinstall='yay -S ' -alias yayuninstall='yay -R ' +alias yinstall='yay -S ' +alias yuninstall='yay -R ' alias update='sudo pacman -Syu' -alias yayupdate='yay -Syu' +alias yupdate='yay -Syu' alias search='pacseek' alias gpt='tgpt' alias clock='tty-clock -sbc' -alias l='xplr' +alias files='xplr' alias sysproc='sysz' alias cat='bat' alias dots='yadm enter lazygit' alias audiorestart='systemctl --user restart wireplumber pipewire pipewire-pulse' +alias info='tldr' +alias cd='z' +alias disks='duf' diff --git a/.config/fish/functions/to.fish b/.config/fish/functions/to.fish deleted file mode 100644 index 9ce75693..00000000 --- a/.config/fish/functions/to.fish +++ /dev/null @@ -1,290 +0,0 @@ -# Display general usage -function __to_usage - echo 'Usage:' - echo ' to (BOOKMARK|DIR) Go to BOOKMARK or DIR' - echo ' to add [BOOKMARK] [DEST] Create a BOOKMARK for DEST' - echo ' Default BOOKMARK: name of current directory' - echo ' Default DEST: path to current directory' - echo ' to add DEST Create a bookmark for DEST if it is a directory' - echo ' to ls List all bookmarks' - echo ' to mv OLD NEW Change the name of a bookmark from OLD to NEW' - echo ' to rm BOOKMARK Remove BOOKMARK' - echo ' to clean Remove bookmarks that have a missing destination' - echo ' to resolve BOOKMARK Print the destination of a bookmark' - echo ' to help Show this message' - echo - echo "Bookmarks are stored in: $TO_DIR" - echo 'To change, run: set -U TO_DIR ' - return 1 -end - -# https://github.com/fish-shell/fish-shell/issues/6173#issuecomment-1067114363 -function is_empty_dir - test -d "$argv" - or return 1 # not a directory, so not an empty directory - # count counts how many arguments it received - # if this glob doesn't match, it won't get arguments - # and so it will return 1 - # because we *want* an empty directory, turn that around. - # the `{.*,*}` ensures it matches hidden files as well. - not count $argv/{.*,*} >/dev/null -end - -function __to_dir - if test -n "$TO_DIR" - echo $TO_DIR - return - end - - set -l dir - - if test -d "$HOME/.tofish" && not is_empty_dir $HOME/.tofish - set dir $HOME/.tofish - else if test -n "$XDG_DATA_HOME" - set dir $XDG_DATA_HOME/to-fish - else - set dir $HOME/.local/share/to-fish - end - - set -U TO_DIR $dir - echo $TO_DIR -end - -function __to_bm_path - echo (__to_dir)/$argv -end - -function __to_resolve - readlink (__to_bm_path $argv) 2>/dev/null -end - -function __to_print - __to_resolve $argv | string replace -r "^$HOME" "~" | string replace -r '^~$' $HOME -end - -function __to_ls - for l in (__to_dir)/* - basename $l - end -end - -function __to_rm - command rm -v (__to_bm_path $argv[1]); or return $status - __to_update_bookmark_completions -end - -function __to_add -a bm dest - # if there are no arguments - if test -z "$bm" - # use the current directory - set dest (pwd) - set bm (basename $dest) - else - # if there are two arguments - if test -n "$dest" - # use them as bookmark name and destination - set dest (realpath $dest) - - # if there is only one argument - else - - # if the argument is a directory - if string match -q '*/*' $bm && test -d "$bm" - # use it as the destination - set dest (realpath $bm) - set bm (basename $dest) - else - # if not a directory - # use it as the bookmark name - set dest (pwd) - end - end - end - - if __to_resolve $bm > /dev/null - echo "ERROR: Bookmark exists: $bm -> "(__to_print $bm) >&2 - return 1 - end - - if not test -d "$dest" - echo "ERROR: Destination does not exist: $dest" >&2 - return 1 - end - - if string match -q '*/*' $bm - echo "ERROR: Bookmark name cannot contain '/': $bm" >&2 - return 1 - end - - switch (uname) - case Darwin - command ln -s $dest (__to_bm_path $bm); or return $status - case '*' - command ln -sT $dest (__to_bm_path $bm); or return $status - end - - echo $bm "->" (__to_print $bm) - - __to_update_bookmark_completions -end - -function __to_complete_directories - set -l cl (commandline -ct | string split -m 1 /) - set -l bm $cl[1] - set -l bmdir (__to_resolve $bm) - if test -z "$bmdir" - __fish_complete_directories - else - set -e cl[1] - if test -z "$cl" - __fish_complete_directories $bmdir/ | string replace -r 'Directory$' $bm - else - __fish_complete_directories $bmdir/$cl | string replace -r 'Directory$' $bm - end - end -end - -function __to_update_bookmark_completions - complete -e -c to - complete -c to -k -x -s h -l help -d 'Show help' - - # Subcommands - complete -c to -k -n '__fish_use_subcommand' -f -a 'help' -d 'Show help' - complete -c to -k -n '__fish_use_subcommand' -x -a 'resolve' -d 'Print bookmark destination' - complete -c to -k -n '__fish_use_subcommand' -x -a 'clean' -d 'Remove bad bookmarks' - complete -c to -k -n '__fish_use_subcommand' -x -a 'mv' -d 'Rename bookmark' - complete -c to -k -n '__fish_use_subcommand' -x -a 'rm' -d 'Remove bookmark' - complete -c to -k -n '__fish_use_subcommand' -f -a 'ls' -d 'List bookmarks' - complete -c to -k -n '__fish_use_subcommand' -x -a 'add' -d 'Create bookmark' - - # Directories - complete -c to -k -n '__fish_use_subcommand' -r -a '(__to_complete_directories)' - - # Bookmarks - for bm in (__to_ls | sort -r) - complete -c to -k -n '__fish_use_subcommand; or __fish_seen_subcommand_from rm mv resolve' -r -a (echo $bm | string escape) -d (__to_print $bm) - end -end - -function to -d 'Bookmarking tool' - set -l dir (__to_dir) - - # Create tofish directory - if not test -d "$dir" - if command mkdir $dir - echo "Created bookmark directory: $dir" - else - echo "Failed to Create bookmark directory: $dir" - return 1 - end - end - - # Catch usage errors - set -l cmd $argv[1] - set -l numargs (count $argv) - switch $cmd - # subcommands that don't take an argument - case ls help clean - if not test $numargs -eq 1 - echo "Usage: to $cmd" - return 1 - end - - # subcommands that require an argument - case rm resolve - if not test $numargs -eq 2 - echo "Usage: to $cmd BOOKMARK" - return 1 - end - - # add has 2 optional arguments - case add - if not test $numargs -ge 1 -a $numargs -le 3 - echo 'Usage: to add [BOOKMARK] [DEST]' - echo ' to add DEST' - return 1 - end - - # subcommands that require 2 arguments - case mv - if not test $numargs -eq 3 - echo 'Usage: to mv OLD NEW' - return 1 - end - end - - switch $cmd - # Add a bookmark - case add - __to_add $argv[2..-1] - return $status - - # Remove a bookmark - case rm - __to_rm $argv[2] - return $status - - # List all bookmarks - case ls - for bm in (__to_ls) - echo "$bm -> "(__to_print $bm) - end - return 0 - - # Rename a bookmark - case mv - set -l old $argv[2] - if not __to_resolve $old > /dev/null - echo "ERROR: Bookmark not found: $old" - return 1 - end - - set -l new $argv[3] - __to_add $new (__to_resolve $old); or return $status - __to_rm $old; or return $status - - return 0 - - # Clean - case clean - for bm in (__to_ls) - if not test -d (__to_resolve $bm) - __to_rm $bm - end - end - return 0 - - # Resolve - case resolve - __to_resolve $argv[2] - return $status - - # Help - case -h --help help - __to_usage - return 0 - - # Default - case '*' - set -l name $argv[1] - if test -z "$name" - __to_usage - return 1 - end - - set -l dest (__to_resolve $name) - if test -z "$dest" - if test -d "$name" - echo "cd \"$name\"" | source - - else - echo "to: No such bookmark “$name”" >&2 - return 1 - end - else if test -d "$dest" - echo "cd \"$dest\"" | source - - else - echo "to: Destination for bookmark “$name” does not exist: $dest" >&2 - return 1 - end - end -end diff --git a/.tofish/fish b/.tofish/fish deleted file mode 120000 index e7cff908..00000000 --- a/.tofish/fish +++ /dev/null @@ -1 +0,0 @@ -/home/matt/.config/fish \ No newline at end of file diff --git a/.tofish/hypr b/.tofish/hypr deleted file mode 120000 index df834c9e..00000000 --- a/.tofish/hypr +++ /dev/null @@ -1 +0,0 @@ -/home/matt/.config/hypr \ No newline at end of file