@sebastienrousseau/dotfiles 0.2.454 β†’ 0.2.455

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +9 -11
  2. package/package.json +11 -5
  3. package/dist/Makefile +0 -78
  4. package/dist/bin/compile.sh +0 -16
  5. package/dist/bin/copy.sh +0 -21
  6. package/dist/bin/dotfiles.sh +0 -185
  7. package/dist/filesizes.txt +0 -176
  8. package/dist/shell/README.md +0 -3
  9. package/dist/shell/aliases/default/default.aliases.sh +0 -199
  10. package/dist/shell/aliases/gcloud/gcloud.aliases.sh +0 -121
  11. package/dist/shell/aliases/heroku/heroku.aliases.sh +0 -1031
  12. package/dist/shell/aliases/jekyll/jekyll.aliases.sh +0 -50
  13. package/dist/shell/aliases/pnpm/pnpm.aliases.sh +0 -42
  14. package/dist/shell/aliases/subversion/subversion.aliases.sh +0 -123
  15. package/dist/shell/aliases/tmux/tmux.aliases.sh +0 -14
  16. package/dist/shell/aliases.sh +0 -12
  17. package/dist/shell/configurations/README.md +0 -3
  18. package/dist/shell/configurations/bash/bashrc +0 -36
  19. package/dist/shell/configurations/curl/cacert.pem +0 -3460
  20. package/dist/shell/configurations/curl/curlrc +0 -55
  21. package/dist/shell/configurations/default/color.sh +0 -17
  22. package/dist/shell/configurations/default/editor.sh +0 -16
  23. package/dist/shell/configurations/default/prompt.sh +0 -37
  24. package/dist/shell/configurations/inputrc/inputrc +0 -22
  25. package/dist/shell/configurations/jshint/jshintrc +0 -37
  26. package/dist/shell/configurations/profile/profile +0 -36
  27. package/dist/shell/configurations/tmux/tmux +0 -95
  28. package/dist/shell/configurations/vim/vimrc +0 -73
  29. package/dist/shell/configurations/wget/wgetrc +0 -39
  30. package/dist/shell/configurations/zsh/zshrc +0 -50
  31. package/dist/shell/configurations.sh +0 -10
  32. package/dist/shell/exit.sh +0 -9
  33. package/dist/shell/functions/README.md +0 -3
  34. package/dist/shell/functions/cdls.sh +0 -19
  35. package/dist/shell/functions/curlheader.sh +0 -20
  36. package/dist/shell/functions/curltime.sh +0 -31
  37. package/dist/shell/functions/encode64.sh +0 -25
  38. package/dist/shell/functions/environment.sh +0 -37
  39. package/dist/shell/functions/extract.sh +0 -32
  40. package/dist/shell/functions/filehead.sh +0 -4
  41. package/dist/shell/functions/genpwd.sh +0 -14
  42. package/dist/shell/functions/goto.sh +0 -14
  43. package/dist/shell/functions/hidehiddenfiles.sh +0 -12
  44. package/dist/shell/functions/hostinfo.sh +0 -25
  45. package/dist/shell/functions/hstats.sh +0 -9
  46. package/dist/shell/functions/httpdebug.sh +0 -7
  47. package/dist/shell/functions/keygen.sh +0 -23
  48. package/dist/shell/functions/last.sh +0 -9
  49. package/dist/shell/functions/logout.sh +0 -10
  50. package/dist/shell/functions/lowercase.sh +0 -28
  51. package/dist/shell/functions/macos.sh +0 -47
  52. package/dist/shell/functions/matrix.sh +0 -9
  53. package/dist/shell/functions/mcd.sh +0 -18
  54. package/dist/shell/functions/mount_read_only.sh +0 -9
  55. package/dist/shell/functions/myproc.sh +0 -7
  56. package/dist/shell/functions/prependpath.sh +0 -19
  57. package/dist/shell/functions/ql.sh +0 -7
  58. package/dist/shell/functions/rd.sh +0 -15
  59. package/dist/shell/functions/remove_disk.sh +0 -9
  60. package/dist/shell/functions/ren.sh +0 -11
  61. package/dist/shell/functions/showhiddenfiles.sh +0 -12
  62. package/dist/shell/functions/size.sh +0 -13
  63. package/dist/shell/functions/stopwatch.sh +0 -13
  64. package/dist/shell/functions/uppercase.sh +0 -28
  65. package/dist/shell/functions/view-source.sh +0 -8
  66. package/dist/shell/functions/vscode.sh +0 -31
  67. package/dist/shell/functions/whoisport.sh +0 -12
  68. package/dist/shell/functions/zipf.sh +0 -14
  69. package/dist/shell/functions.sh +0 -10
  70. package/dist/shell/history.sh +0 -107
  71. package/dist/shell/index.d.ts +0 -2
  72. package/dist/shell/index.d.ts.map +0 -1
  73. package/dist/shell/index.js +0 -2
  74. package/dist/shell/index.js.map +0 -1
  75. package/dist/shell/paths/ant/ant.paths.sh +0 -15
  76. package/dist/shell/paths/default/default.paths.sh +0 -17
  77. package/dist/shell/paths/homebrew/homebrew.paths.sh +0 -25
  78. package/dist/shell/paths/java/java.paths.sh +0 -16
  79. package/dist/shell/paths/maven/maven.paths.sh +0 -17
  80. package/dist/shell/paths/node/node.paths.sh +0 -13
  81. package/dist/shell/paths/nvm/nvm.paths.sh +0 -21
  82. package/dist/shell/paths/pnpm/pnpm.paths.sh +0 -13
  83. package/dist/shell/paths/python/python.paths.sh +0 -29
  84. package/dist/shell/paths/ruby/ruby.paths.sh +0 -23
  85. package/dist/shell/paths/tmux/tmux.paths.sh +0 -15
  86. package/dist/shell/paths.sh +0 -12
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # extract: Function to extract most know archives with one command
7
- extract() {
8
- if [[ "$#" != 1 ]]; then
9
- echo "[ERROR] Please add one argument" >&2
10
- return 1
11
- fi
12
-
13
- if [[ -f "$1" ]]; then
14
- echo "[INFO] Extracting $1"
15
- case $1 in
16
- *.tar.bz2) tar xjf "$1" ;;
17
- *.tar.gz) tar xzf "$1" ;;
18
- *.bz2) bunzip2 "$1" ;;
19
- *.rar) unrar e "$1" ;;
20
- *.gz) gunzip "$1" ;;
21
- *.tar) tar xf "$1" ;;
22
- *.tbz2) tar xjf "$1" ;;
23
- *.tgz) tar xzf "$1" ;;
24
- *.zip) unzip "$1" ;;
25
- *.Z) uncompress "$1" ;;
26
- *.7z) 7z x "$1" ;;
27
- *) echo "[ERROR] '$1' cannot be extracted via extract()" ;;
28
- esac
29
- else
30
- echo "[ERROR] '$1' is not a valid file"
31
- fi
32
- }
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- # filehead: Function to display the first lines of a file.
4
- filehead () { /usr/bin/xxd -u -g 1 "$@" | /usr/bin/head ;}
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # genpwd: Function to generates a strong random password of 20 characters (similar to Apple)
7
- genpwd() {
8
- m=$(openssl rand -base64 32 | cut -c 1-6);
9
- a=$(openssl rand -base64 32 | cut -c 1-6);
10
- c=$(openssl rand -base64 32 | cut -c 1-6);
11
- pwd="$m-$a-$c";
12
- echo "[INFO] The password has been copied to the clipboard: $pwd"
13
- echo "$pwd"| pbcopy | pbpaste;
14
- }
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # goto: Function to change to the directory inputed
7
- goto() {
8
- if [[ -e "$1" ]]; then
9
- cd "$1" || exit
10
- l
11
- else
12
- echo "[ERROR] Please add a directory name" >&2
13
- fi
14
- }
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # Hide hidden system and dotfile files
7
- hidehiddenfiles() {
8
- defaults write com.apple.Finder AppleShowAllFiles NO
9
- osascript -e 'tell application "Finder" to quit'
10
- sleep 0.25
11
- osascript -e 'tell application "Finder" to activate'
12
- }
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # hostinfo: Function to display useful host related informaton
7
- hostinfo() {
8
- echo "You are logged on"
9
- $HOST
10
- echo "Additionnal information: "
11
- uname -a
12
- echo "Users logged on: "
13
- w -h
14
- echo "Current date : "
15
- date
16
- echo "Machine stats : "
17
- uptime
18
- echo "Current network location : "
19
- scselect
20
- echo "Public facing IP Address : "
21
- myip
22
- echo "DNS Configuration: "
23
- scutil --dns
24
- echo
25
- }
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # hstats: Function to display Ze Shell history stats informaton
7
- hstats() {
8
- history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
9
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # httpdebug: Function to download a web page and show info on what took time
7
- httpdebug() { /usr/bin/curl "$@" -o /dev/null -w "dns: %{time_namelookup} connect: %{time_connect} pretransfer: %{time_pretransfer} starttransfer: %{time_starttransfer} total: %{time_total}\\n"; }
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # keygen: Function to generates SSH key
7
- keygen() {
8
-
9
- echo "What's the name of the Key (no space please) ? "
10
- read -r name
11
-
12
- echo "What's the email associated with it? "
13
- read -r email
14
-
15
- ssh-keygen -t rsa -f ~/.ssh/id_rsa_"${name}" -C "${email}"
16
-
17
- ssh-add ~/.ssh/id_rsa_"${name}"
18
-
19
- pbcopy <~/.ssh/id_rsa_"${name}".pub
20
-
21
- echo "[INFO] SSH Key id_rsa_$(name).pub copied in your clipboard"
22
-
23
- }
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # last: List the modified files within 60 minutes.
7
- last() {
8
- find . -type f -mmin -60
9
- }
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # logout: Function to logout from OS X via the Terminal
7
- logout() {
8
- osascript -e 'tell application "System Events" to log out'
9
- builtin logout
10
- }
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # lowercase: Function to move filenames or directory names to lowercase
7
- lowercase()
8
- {
9
- if [[ "$#" != 1 ]]; then
10
- echo "[ERROR] The filename or directory name is incorrect." >&2
11
- return 1
12
- fi
13
- for file ; do
14
- filename=${file##*/}
15
- case "${filename}" in
16
- */*) [[ "dirname" = "${file%/*}" ]] ;;
17
- *) dirname=.;;
18
- esac
19
- nf=$(echo "${filename}" | tr '[:upper:]' '[:lower:]')
20
- newname="${dirname}/${nf}"
21
- if [[ "${nf}" != "${filename}" ]]; then
22
- mv "${file}" "${newname}"
23
- echo "[INFO] Renaming ${file} to lowercase: ${newname}"
24
- else
25
- echo "[ERROR] The operation is not valid, ${file} has not changed."
26
- fi
27
- done
28
- }
@@ -1,47 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # πŸ…ΌπŸ…°πŸ…²πŸ…ΎπŸ†‚ πŸ…ΏπŸ…»πŸ†„πŸ…ΆπŸ…ΈπŸ…½πŸ…Ά πŸ…°πŸ…»πŸ…ΈπŸ…°πŸ†‚πŸ…΄πŸ†‚
7
-
8
- alias clds='find . -type f -name "*.DS_Store" -ls -delete' # clds: Recursively delete .DS_Store files.
9
- alias clls='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder' # clls: Clean up LaunchServices to remove duplicates in the 'Open With' menu.
10
- alias emptytrash='rm -rf ~/.Trash/*' # Empty the Trash on all mounted volumes and the main HDD.
11
- alias finderHideHidden='defaults write com.apple.finder ShowAllFiles FALSE' # finderHideHidden: Hide hidden files in Finder.
12
- alias finderShowHidden='defaults write com.apple.finder ShowAllFiles TRUE' # finderShowHidden: Show hidden files in Finder.
13
- alias iphone='open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app' # iphone: Open the device simulators.
14
- alias noDS='defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true'
15
- alias ofd='open $PWD' # Open the current directory in a Finder window.
16
- alias purge='rm -rf ~/library/Developer/Xcode/DerivedData/*' # purge: Purging Xcode DerivedData.
17
- alias screensaverDesktop='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background' # screensaverDesktop: Run a screensaver on the Desktop.
18
- alias vp='diskutil verifyPermissions /' # vp: Verify macOS Permissions.
19
- alias vv='diskutil verifyvolume /' # vv: Verify macOS Volume.
20
- alias xcode='open -a xcode' # xcode: Launch XCode app in macOS.
21
-
22
- # πŸ…ΌπŸ…°πŸ…²πŸ…ΎπŸ†‚ πŸ…ΏπŸ…»πŸ†„πŸ…ΆπŸ…ΈπŸ…½πŸ…Ά πŸ…΅πŸ†„πŸ…½πŸ…²πŸ†ƒπŸ…ΈπŸ…ΎπŸ…½πŸ†‚
23
-
24
- # Erases purgeable disk space with 0s on the selected disk
25
- freespace(){
26
- if [[ -z "$1" ]]; then
27
- echo "Usage: $0 <disk>"
28
- echo "Example: $0 /dev/disk1s1"
29
- echo
30
- echo "Possible disks:"
31
- df -h | awk 'NR == 1 || /^\/dev\/disk/'
32
- return 1
33
- fi
34
-
35
- echo "Cleaning purgeable files from disk: $1 ...."
36
- diskutil secureErase freespace 0 "$1"
37
- }
38
-
39
- mp() {
40
- # Don't let Preview.app steal focus if the man page doesn't exist
41
- man -w "$@" > /dev/null 2>&1 || man -t "$@" | open -f -a Preview || man "$@"
42
- }
43
-
44
- ql() {
45
- (( $# > 0 )) && qlmanage -p "$*" &>/dev/null &
46
- }
47
-
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # matrix: Function to Enable Matrix Effect in the terminal
7
- matrix() {
8
- echo -e "\\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( RANDOM % COLUMNS)) $(( RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
9
- }
@@ -1,18 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # mcd: Function to combine mkdir and cd.
7
- mcd() {
8
- if [[ "$#" != 1 ]]; then
9
- echo "[ERROR] Please add one argument" >&2
10
- return 1
11
- fi
12
- echo "[INFO] Creating the folder $1"
13
- mkdir "$1"
14
- echo "[INFO] Switching to $1 folder"
15
- cd "$1" || exit
16
- }
17
-
18
- alias mkcd='mcd' # Alias for mcd
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # mount_read_only: Function to mount a read-only disk image as read-write
7
- mount_read_only() {
8
- hdiutil attach "$1" -shadow /tmp/"$1".shadow -noverify
9
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # myproc: Function to list processes owned by an user
7
- myproc() { ps "$@" -u "${USER}" -o pid,%cpu,%mem,start,time,bsdtime,command; }
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # ----------------------------------------------------------------------------
7
- # 1.0 Setting PATH environments.
8
- # ----------------------------------------------------------------------------
9
-
10
- ## ----------------------------------------------------------------------------
11
- ## 1.1 Prepend $PATH without duplicates.
12
- ## ----------------------------------------------------------------------------
13
-
14
- # prependpath: Prepend $PATH without duplicates
15
- prependpath() {
16
- if ! echo "${PATH}" | tr ":" "\n" | grep -qx "$1" ; then
17
- PATH="$1:${PATH}"
18
- fi
19
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # ql: Function to open any file in MacOS Quicklook Preview
7
- ql() { qlmanage -p "$*" >&/dev/null; }
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # rd: Function to remove a directory and its files
7
- rd() {
8
- if [[ "$#" != 1 ]]; then
9
- echo "[ERROR] Please add one argument" >&2
10
- return 1
11
- fi
12
- echo "[INFO] The operation completed successfully, directory listing of $1:"
13
- rm -rf "$1" || exit;
14
- ls -lh;
15
- }
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # remove_disk: spin down unneeded disk
7
- remove_disk () {
8
- diskutil eject "$1"
9
- }
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # ren: Function to rename files extension.
7
- ren() {
8
- for f in *."$1"; do
9
- mv "${f}" "${f%."$1"}.$2"
10
- done
11
- }
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # Show hidden system and dotfile files
7
- showhiddenfiles() {
8
- defaults write com.apple.Finder AppleShowAllFiles YES
9
- osascript -e 'tell application "Finder" to quit'
10
- sleep 0.25
11
- osascript -e 'tell application "Finder" to activate'
12
- }
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # size: Function to check a file size
7
- size() {
8
- if [[ "$#" != 1 ]]; then
9
- echo "[ERROR] Please add one argument" >&2
10
- return 1
11
- fi
12
- stat -f '[INFO] The file total size, in bytes is %z' "$1"
13
- }
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # stopwatch: Function for a stopwatch
7
- stopwatch() {
8
- date1=$(gdate +%s)
9
- while true; do
10
- echo -ne "$(gdate -u --date @$(($(date +%s) - date1)) +%H:%M:%S)\r"
11
- sleep 0.1
12
- done
13
- }
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # uppercase: Function to move filenames or directory names to uppercase
7
- uppercase()
8
- {
9
- if [[ "$#" != 1 ]]; then
10
- echo "[ERROR] The filename or directory name is incorrect." >&2
11
- return 1
12
- fi
13
- for file ; do
14
- filename=${file##*/}
15
- case "${filename}" in
16
- */*) dirname=${file%/*} ;;
17
- *) dirname=.;;
18
- esac
19
- nf=$(echo "${filename}" | tr '[:upper:]' '[:lower:]')
20
- newname="${dirname}/${nf}"
21
- if [[ "${nf}" != "${filename}" ]]; then
22
- mv "${file}" "${newname}"
23
- echo "[INFO] Renaming ${file} to uppercase: ${newname}"
24
- else
25
- echo "[ERROR] The operation is not valid, ${file} has not changed."
26
- fi
27
- done
28
- }
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # view-source: Function to view the source of a website.
7
- view-source () { /usr/bin/curl -L -k -A 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0' "$@" ; }
8
-
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # vsc: Function to open a file in Visual Studio Code.
7
-
8
- vsc() {
9
- if [[ -z "$1" ]]; then
10
- echo "Usage: vsc <file>"
11
- return 1
12
- fi
13
-
14
- if [[ -f "$1" ]]; then
15
- code "$1"
16
- else
17
- echo "File not found: $1"
18
- return 1
19
- fi
20
- }
21
-
22
- if [[ "$(uname || true)" = "Darwin" ]]; then
23
- alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
24
- elif [[ "$(uname || true)" = "Linux" ]]; then
25
- alias code="code"
26
- fi
27
-
28
- alias vs="code"
29
- alias vsc="code"
30
- alias vscode="code"
31
-
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # whoisport: Function to find what is currently using a port.
7
- whoisport() {
8
- port=$1
9
- pidInfo=$(fuser "${port}"/tcp 2>/dev/null)
10
- pid=$(echo "${pidInfo}" | cut -d':' -f2)
11
- ls -l /proc/"${pid}"/exe
12
- }
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # zipf: Function to create a ZIP archive of a folder
7
- function zipf() {
8
- if [[ "$#" != 1 ]]; then
9
- echo "[ERROR] Please add one argument" >&2
10
- return 1
11
- fi
12
- echo "[INFO] Creating the ZIP archive folder $1.zip"
13
- zip -r "$1".zip "$1";
14
- }
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- # Load custom executable functions
7
- for function in "${HOME}"/.dotfiles/shell/functions/[!.#]*.sh; do
8
- # shellcheck source=/dev/null
9
- source "${function}"
10
- done
@@ -1,107 +0,0 @@
1
- #!/usr/bin/env bash
2
- # πŸ…³πŸ…ΎπŸ†ƒπŸ…΅πŸ…ΈπŸ…»πŸ…΄πŸ†‚ (v0.2.454) - https://dotfiles.io
3
- # Copyright (c) Sebastien Rousseau 2022. All rights reserved
4
- # License: MIT
5
-
6
- ## History wrapper
7
- function dotfiles_history {
8
- local clear list
9
- zparseopts -E c=clear l=list
10
-
11
- if [[ -n "${clear}" ]]; then
12
- # if -c provided, clobber the history file
13
- echo -n >|"${HISTFILE}"
14
- echo >&2 History file deleted. Reload the session to see its effects.
15
- elif [[ -n "${list}" ]]; then
16
- # if -l provided, run as if calling `fc' directly
17
- builtin fc "$@"
18
- else
19
- # unless a number is provided, show all history events (starting from 1)
20
- if [[ "${1:-}" =~ ^[0-9]+$ ]]; then
21
- builtin fc "$@"
22
- else
23
- builtin fc -l 1
24
- fi
25
- fi
26
- }
27
-
28
- # Timestamp format
29
- case ${HIST_STAMPS-} in
30
- "mm/dd/yyyy") alias history='dotfiles_history -f' ;;
31
- "dd.mm.yyyy") alias history='dotfiles_history -E' ;;
32
- "yyyy-mm-dd") alias history='dotfiles_history -i' ;;
33
- "") alias history='dotfiles_history' ;;
34
- *) alias history='dotfiles_history -t $HIST_STAMPS' ;;
35
- esac
36
-
37
- # Command history configuration
38
- export HISTFILE=${HOME}/.zsh_history
39
-
40
- # Don't put duplicate lines or lines starting with space in the history.
41
- export HISTCONTROL=ignoreboth
42
-
43
- # Number of histories saved in memory
44
- export HISTSIZE=10000
45
-
46
- # Number of histories saved in history file
47
- export SAVEHIST=1000
48
-
49
- if [[ -n "${ZSH_VERSION}" ]]; then
50
- # echo "Running shell is zsh"
51
- # Specifying some history options
52
- setopt always_to_end # Move cursor to the end of a completed word.
53
- setopt append_history # Sessions will append their history list to the history file, rather than replace it.
54
- setopt auto_cd # cd to a directory if it's given without a command.
55
- setopt auto_list # Automatically list choices on ambiguous completion.
56
- setopt auto_menu # Show completion menu on a successive tab press.
57
- setopt auto_param_keys # Automatically complements parentheses
58
- setopt auto_param_slash # If completed parameter is a directory, add a trailing slash.
59
- setopt auto_pushd # Automatically push when cd
60
- setopt auto_resume # Resume if you execute the same command name as the suspended process
61
- setopt bang_hist # Perform textual history expansion
62
- setopt complete_in_word # Complete from both ends of a word.
63
- setopt correct # Enable command correction prompts
64
- setopt extended_history # Save each command’s beginning timestamp (in seconds since the epoch) and the duration (in seconds) to the history file.
65
- setopt hist_beep # Beep in ZLE when a widget attempts to access a history entry which isn’t there.
66
- setopt hist_expire_dups_first # Cause the oldest history event that has a duplicate to be lost before losing a unique event from the list.
67
- setopt hist_ignore_space # Remove command lines from the history list when the first character on the line is a space, or when one of the expanded aliases contains a leading space.
68
- setopt hist_no_store # Remove the history (fc -l) command from the history list when invoked.
69
- setopt hist_reduce_blanks # Remove superfluous blanks from each command line being added to the history list.
70
- setopt hist_save_no_dups # When writing out the history file, older commands that duplicate newer ones are omitted.
71
- setopt hist_verify # Whenever the user enters a line with history expansion, don’t execute the line directly; instead, perform history expansion and reload the line into the editing buffer.
72
- setopt list_packed # Display with complementary candidates packed
73
- setopt list_types # Mark the file type in the completion candidate list
74
- setopt pushd_ignore_dups # Don’t push multiple copies of the same directory onto the directory stack.
75
- setopt share_history # Imports new commands from the history file, and also causes the typed commands to be appended to the history file
76
- setopt transient_rprompt # Display the right prompt only when the cursor is on the rightmost column.
77
-
78
- elif [[ -n "${BASH_VERSION}" ]]; then
79
- # echo "Running shell is bash"
80
- # Shopt settings
81
- shopt -s autocd # autocd - automatically cd to a directory when it is the only argument to a command
82
- shopt -s cdspell # cdspell - spell check the path when changing directories.
83
- shopt -s checkhash # checkhash - check hash table for commands before running them.
84
- shopt -s checkjobs # checkjobs - check for stopped jobs after each command and report them to the user.
85
- shopt -s checkwinsize # checkwinsize - check the window size after each command and, if necessary, update the values of LINES and COLUMNS.
86
- shopt -s cmdhist # cmdhist - save multi-line commands as one entry in history.
87
- shopt -s dirspell # dirspell - spell check the path when changing directories.
88
- shopt -s dotglob # dotglob - include dotfiles in globbing.
89
- shopt -s extglob # extglob - extended globbing.
90
- shopt -s globstar # globstar - allow ** to match multiple directories.
91
- shopt -s histappend # histappend - append to the history file, don't overwrite it.
92
- shopt -s histverify # histverify - verify commands from history before executing them.
93
- shopt -s hostcomplete # hostcomplete - complete hostnames when using the ssh command.
94
- shopt -s lithist # lithist - save multi-line commands as one entry in history.
95
- shopt -s huponexit # huponexit - send SIGHUP to jobs when the shell exits.
96
- shopt -s no_empty_cmd_completion # no_empty_cmd_completion - don't complete empty commands.
97
- shopt -s nocaseglob # nocaseglob - case insensitive globbing.
98
- shopt -s nocasematch # nocasematch - case insensitive matching.
99
- shopt -s nullglob # nullglob - if no matches are found, the pattern expands to nothing.
100
- shopt -s progcomp # progcomp - programmable completion.
101
- shopt -s promptvars # promptvars - allow prompt strings to contain shell variables.
102
- shopt -s sourcepath # sourcepath - search the PATH for the directory containing a sourced script before using the current directory.
103
-
104
- else
105
- echo "Unsupported shell: ${SHELL}"
106
- exit 1
107
- fi
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../shell/index.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";var shell=require("shelljs");function main(){shell.exec("pnpm run prepare");}
2
- main();
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../shell/index.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,IAAI,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAE/B,SAAS,IAAI;IACX,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,EAAE,CAAC"}