@sebastienrousseau/dotfiles 0.2.440 → 0.2.452
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.
- package/COPYRIGHT +5 -0
- package/LICENSE +1260 -2
- package/Makefile +79 -0
- package/README.md +328 -71
- package/bin/dotfiles.sh +150 -0
- package/index.js +24 -0
- package/package.json +99 -25
- package/pnpm-lock.yaml +178 -0
- package/pnpm-workspace.yaml +2 -0
- package/shell/README.md +3 -0
- package/shell/aliases/README.md +327 -0
- package/{Icon/r → shell/aliases/default/README.md} +0 -0
- package/shell/aliases/default/default.aliases.sh +199 -0
- package/shell/aliases/gcloud/README.md +117 -0
- package/shell/aliases/gcloud/gcloud.aliases.sh +121 -0
- package/shell/aliases/git/README.md +279 -0
- package/shell/aliases/git/git.aliases.wip +586 -0
- package/shell/aliases/heroku/README.md +457 -0
- package/shell/aliases/heroku/heroku.aliases.sh +1031 -0
- package/shell/aliases/jekyll/README.md +32 -0
- package/shell/aliases/jekyll/jekyll.aliases.sh +50 -0
- package/shell/aliases/pnpm/README.md +3 -0
- package/shell/aliases/pnpm/pnpm.aliases.sh +42 -0
- package/shell/aliases/subversion/README.md +54 -0
- package/shell/aliases/subversion/subversion.aliases.sh +123 -0
- package/shell/aliases/tmux/README.md +0 -0
- package/shell/aliases/tmux/tmux.aliases.sh +14 -0
- package/shell/aliases.sh +12 -0
- package/shell/configurations/README.md +3 -0
- package/shell/configurations/bash/bashrc +36 -0
- package/shell/configurations/curl/cacert.pem +3460 -0
- package/shell/configurations/curl/curlrc +55 -0
- package/shell/configurations/default/color.sh +17 -0
- package/shell/configurations/default/editor.sh +16 -0
- package/shell/configurations/default/prompt.sh +37 -0
- package/shell/configurations/inputrc/inputrc +22 -0
- package/shell/configurations/jshint/jshintrc +37 -0
- package/shell/configurations/profile/profile +36 -0
- package/shell/configurations/tmux/tmux +95 -0
- package/shell/configurations/vim/vimrc +73 -0
- package/{.wgetrc → shell/configurations/wget/wgetrc} +4 -0
- package/shell/configurations/zsh/zshrc +40 -0
- package/shell/configurations.sh +10 -0
- package/shell/exit.sh +9 -0
- package/shell/functions/README.md +3 -0
- package/shell/functions/cdls.sh +19 -0
- package/shell/functions/changediskpwd.sh +19 -0
- package/shell/functions/code.sh +18 -0
- package/shell/functions/countdown.sh +33 -0
- package/shell/functions/curlheader.sh +20 -0
- package/shell/functions/curltime.sh +31 -0
- package/shell/functions/encode64.sh +25 -0
- package/shell/functions/environment.sh +37 -0
- package/shell/functions/extract.sh +32 -0
- package/shell/functions/filehead.sh +4 -0
- package/{zsh/zsh/functions/genpwd.zsh → shell/functions/genpwd.sh} +8 -3
- package/shell/functions/goto.sh +14 -0
- package/shell/functions/headers.sh +4 -0
- package/{zsh/zsh/functions/hidehiddenfiles.zsh → shell/functions/hidehiddenfiles.sh} +7 -2
- package/shell/functions/history-all.sh +7 -0
- package/shell/functions/hostinfo.sh +25 -0
- package/{zsh/zsh/functions/hstats.zsh → shell/functions/hstats.sh} +6 -1
- package/shell/functions/httpdebug.sh +7 -0
- package/shell/functions/keygen.sh +23 -0
- package/shell/functions/last.sh +9 -0
- package/shell/functions/logout.sh +10 -0
- package/shell/functions/lowercase.sh +28 -0
- package/shell/functions/macos.sh +47 -0
- package/shell/functions/matrix.sh +9 -0
- package/shell/functions/mcd.sh +18 -0
- package/shell/functions/mount_read_only.sh +9 -0
- package/shell/functions/myproc.sh +7 -0
- package/shell/functions/prependpath.sh +19 -0
- package/shell/functions/print.sh +13 -0
- package/shell/functions/ql.sh +7 -0
- package/shell/functions/rd.sh +15 -0
- package/shell/functions/remove_disk.sh +9 -0
- package/shell/functions/ren.sh +11 -0
- package/shell/functions/rm.sh +13 -0
- package/shell/functions/rps.sh +103 -0
- package/{zsh/zsh/functions/showhiddenfiles.zsh → shell/functions/showhiddenfiles.sh} +7 -2
- package/{zsh/zsh/functions/size.zsh → shell/functions/size.sh} +6 -1
- package/shell/functions/stopwatch.sh +13 -0
- package/shell/functions/trash.sh +13 -0
- package/shell/functions/tree.sh +13 -0
- package/shell/functions/uppercase.sh +28 -0
- package/shell/functions/uuidgen.sh +27 -0
- package/shell/functions/view-source.sh +8 -0
- package/shell/functions/vscode.sh +31 -0
- package/shell/functions/whoisport.sh +12 -0
- package/shell/functions/zipf.sh +14 -0
- package/shell/functions.sh +10 -0
- package/shell/history.sh +110 -0
- package/shell/paths/ant/ant.paths.sh +15 -0
- package/shell/paths/default/default.paths.sh +17 -0
- package/shell/paths/homebrew/homebrew.paths.sh +22 -0
- package/shell/paths/java/java.paths.sh +16 -0
- package/shell/paths/maven/maven.paths.sh +16 -0
- package/shell/paths/node/node.paths.sh +13 -0
- package/shell/paths/nvm/nvm.paths.sh +21 -0
- package/shell/paths/pnpm/pnpm.paths.sh +13 -0
- package/shell/paths/ruby/ruby.paths.sh +23 -0
- package/shell/paths/tmux/tmux.paths.sh +15 -0
- package/shell/paths.sh +12 -0
- package/.curlrc +0 -17
- package/.eslintrc +0 -44
- package/.jshintrc +0 -22
- package/.travis.yml +0 -21
- package/CODE_OF_CONDUCT.md +0 -46
- package/CONTRIBUTING.md +0 -60
- package/Dotfiles.png +0 -0
- package/ISSUE_TEMPLATE.md +0 -43
- package/bash/.bash_aliases +0 -409
- package/bash/.bash_exit +0 -25
- package/bash/.bash_functions +0 -312
- package/bash/.bash_load_completion +0 -62
- package/bash/.bash_profile +0 -295
- package/bash/.bashrc +0 -47
- package/homebrew/brew-cask.sh +0 -165
- package/homebrew/brew-package.sh +0 -256
- package/homebrew/brew-tap.sh +0 -35
- package/homebrew/install.sh +0 -29
- package/zsh/.zshrc +0 -64
- package/zsh/aliases.zsh +0 -427
- package/zsh/configurations.zsh +0 -19
- package/zsh/exit.zsh +0 -21
- package/zsh/functions.zsh +0 -42
- package/zsh/history.zsh +0 -53
- package/zsh/profile.zsh +0 -17
- package/zsh/zsh/configurations/color.zsh +0 -21
- package/zsh/zsh/configurations/editor.zsh +0 -21
- package/zsh/zsh/configurations/history.zsh +0 -53
- package/zsh/zsh/configurations/path.zsh +0 -123
- package/zsh/zsh/configurations/prompt.zsh +0 -24
- package/zsh/zsh/functions/cd.zsh +0 -51
- package/zsh/zsh/functions/cdls.zsh +0 -11
- package/zsh/zsh/functions/changediskpwd.zsh +0 -4
- package/zsh/zsh/functions/code.zsh +0 -2
- package/zsh/zsh/functions/countdown.zsh +0 -33
- package/zsh/zsh/functions/curlheader.zsh +0 -12
- package/zsh/zsh/functions/curltime.zsh +0 -12
- package/zsh/zsh/functions/extract.zsh +0 -27
- package/zsh/zsh/functions/goto.zsh +0 -8
- package/zsh/zsh/functions/history-all.zsh +0 -2
- package/zsh/zsh/functions/hostinfo.zsh +0 -19
- package/zsh/zsh/functions/httpdebug.zsh +0 -2
- package/zsh/zsh/functions/keygen.zsh +0 -18
- package/zsh/zsh/functions/logout.zsh +0 -5
- package/zsh/zsh/functions/lowercase.zsh +0 -23
- package/zsh/zsh/functions/matrix.zsh +0 -4
- package/zsh/zsh/functions/mcd.zsh +0 -11
- package/zsh/zsh/functions/mount_read_only.zsh +0 -4
- package/zsh/zsh/functions/myproc.zsh +0 -2
- package/zsh/zsh/functions/print.zsh +0 -8
- package/zsh/zsh/functions/ql.zsh +0 -2
- package/zsh/zsh/functions/rd.zsh +0 -8
- package/zsh/zsh/functions/remove_disk.zsh +0 -4
- package/zsh/zsh/functions/rm.zsh +0 -10
- package/zsh/zsh/functions/stopwatch.zsh +0 -8
- package/zsh/zsh/functions/trash.zsh +0 -8
- package/zsh/zsh/functions/tree.zsh +0 -8
- package/zsh/zsh/functions/uppercase.zsh +0 -23
- package/zsh/zsh/functions/zipf.zsh +0 -9
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
2
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
3
|
+
# License: MIT
|
|
4
|
+
|
|
5
|
+
# 🅲🆄🆁🅻 🅲🅾🅽🅵🅸🅶 - cURL configuration options.
|
|
6
|
+
|
|
7
|
+
# Automatically add newline at end of curl response body.
|
|
8
|
+
-w "\n"
|
|
9
|
+
|
|
10
|
+
# Determine authentication method and use the most secure one.
|
|
11
|
+
--anyauth
|
|
12
|
+
|
|
13
|
+
# Attempt to resume broken downloads
|
|
14
|
+
--continue-at -
|
|
15
|
+
|
|
16
|
+
# Wait 60 seconds before timing out.
|
|
17
|
+
--connect-timeout 60
|
|
18
|
+
|
|
19
|
+
# (HTTP) Request a compressed response using one of the algorithms curl supports, and save the uncompressed document.
|
|
20
|
+
--compressed
|
|
21
|
+
|
|
22
|
+
# Include HTTP headers in the output.
|
|
23
|
+
--include
|
|
24
|
+
|
|
25
|
+
# Resolve names to IPV4 addresses only.
|
|
26
|
+
--ipv4
|
|
27
|
+
|
|
28
|
+
# Follow HTTP redirects.
|
|
29
|
+
--location
|
|
30
|
+
|
|
31
|
+
# Display progress as a simple progress bar.
|
|
32
|
+
--progress-bar
|
|
33
|
+
|
|
34
|
+
# When used, this will make curl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp.
|
|
35
|
+
--remote-time
|
|
36
|
+
|
|
37
|
+
# When following a redirect, automatically set the previous URL as referer.
|
|
38
|
+
--referer ";auto"
|
|
39
|
+
|
|
40
|
+
# Show error messages.
|
|
41
|
+
--show-error
|
|
42
|
+
|
|
43
|
+
# Require SSL/TLS for the connection. Terminates the connection if the server doesn't support SSL/TLS.
|
|
44
|
+
--ssl-reqd
|
|
45
|
+
|
|
46
|
+
#trace the time taken. more info here https://everything.curl.dev/usingcurl/verbose/trace
|
|
47
|
+
--trace-time
|
|
48
|
+
|
|
49
|
+
# Send a fake UA string for the HTTP servers that sniff it.
|
|
50
|
+
--user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/105.0.1343.53"
|
|
51
|
+
|
|
52
|
+
# Some servers don't like requests that are made without a user-agent field, so we provide one.
|
|
53
|
+
-H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
|
|
54
|
+
-H "Upgrade-Insecure-Requests: 1"
|
|
55
|
+
-H "Accept-Language: en-US,en;q=0.8"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
## 🅲🅾🅻🅾🆁🆂
|
|
7
|
+
export colorflag='-G' # Enable color output
|
|
8
|
+
|
|
9
|
+
# Enable colored output from ls, etc. on FreeBSD-based systems
|
|
10
|
+
unset LSCOLORS
|
|
11
|
+
export CLICOLOR=1
|
|
12
|
+
export CLICOLOR_FORCE=1
|
|
13
|
+
|
|
14
|
+
export LSCOLORS='GxFxCxDxBxegedabagaced'
|
|
15
|
+
|
|
16
|
+
# Tell grep to highlight matches
|
|
17
|
+
export GREP_OPTIONS='--color=auto'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
cmd_vim=$(command -v vim)
|
|
7
|
+
if [[ -z ${cmd_vim} ]]; then
|
|
8
|
+
export VISUAL="vi"
|
|
9
|
+
else
|
|
10
|
+
export VISUAL="vim"
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
export EDITOR=${VISUAL}
|
|
14
|
+
export GIT_EDITOR=${VISUAL}
|
|
15
|
+
export SVN_EDITOR=${VISUAL}
|
|
16
|
+
export SUDO_EDITOR=${VISUAL}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
## 🆂🅷🅴🅻🅻
|
|
7
|
+
|
|
8
|
+
# Non-interactive shells don't have a prompt, exit early.
|
|
9
|
+
[[ $- =~ i ]] || return 0
|
|
10
|
+
|
|
11
|
+
# Set a simple prompt for non-256color, non-alacritty and non-kitty terminals.
|
|
12
|
+
if [[ ${TERM} != *-256color ]] && [[ ${TERM} != alacritty* ]] && [[ ${TERM} != *-kitty ]]; then
|
|
13
|
+
PS1='\h \w > '
|
|
14
|
+
return 0
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
if [[ -n "${BASH_VERSION}" ]]; then
|
|
18
|
+
cyan='\[\033[1;36m\]'
|
|
19
|
+
green='\[\033[1;32m\]'
|
|
20
|
+
pink='\[\033[1;35m\]'
|
|
21
|
+
reset='\[\033[0m\]'
|
|
22
|
+
|
|
23
|
+
if [[ "${OSTYPE}" == "darwin"* ]]; then
|
|
24
|
+
PS1=" $(uname)${pink} ❭${reset} ${green} \w ${reset} ${cyan}$ ${reset}"
|
|
25
|
+
else
|
|
26
|
+
PS1=" 🐧 $(uname)${pink} ❭${reset} ${green} \w ${reset} ${cyan}$ ${reset}"
|
|
27
|
+
fi
|
|
28
|
+
export PS1
|
|
29
|
+
elif [[ -n "${ZSH_VERSION}" ]]; then
|
|
30
|
+
if [[ "${OSTYPE}" == "darwin"* ]]; then
|
|
31
|
+
PROMPT=' %F{magenta} ❭%f %F{green}%~%f %F{cyan}$ %f'
|
|
32
|
+
else
|
|
33
|
+
PROMPT=' 🐧 %F{magenta} ❭%f %F{green}%~%f %F{cyan}$ %f'
|
|
34
|
+
fi
|
|
35
|
+
export PROMPT
|
|
36
|
+
export RPROMPT='%F{cyan}%t%f'
|
|
37
|
+
fi
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
2
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
3
|
+
# License: MIT
|
|
4
|
+
|
|
5
|
+
# 🅸🅽🅿🆄🆃🆁🅲 - Completion options.
|
|
6
|
+
set colored-completion-prefix On # Color the common prefix
|
|
7
|
+
set colored-stats On # Color the completion stats
|
|
8
|
+
set completion-ignore-case on # Ignore case when completing
|
|
9
|
+
set completion-prefix-display-length 1 # Show the first character of the common prefix
|
|
10
|
+
set completion-query-items 200 # Show all completions
|
|
11
|
+
set expand-tilde On # Expand ~ to $HOME
|
|
12
|
+
set horizontal-scroll-mode Off # Disable horizontal scrolling
|
|
13
|
+
set mark-directories on # Mark directories with a slash
|
|
14
|
+
set mark-modified-lines on # Mark modified lines with a *
|
|
15
|
+
set mark-symlinked-directories On # Mark symlinked directories
|
|
16
|
+
set mark-symlinked-directories on # Mark symlinks with a @
|
|
17
|
+
set menu-complete-display-prefix On # Color the common prefix in menu-complete
|
|
18
|
+
set page-completions on # Show completions in a pager
|
|
19
|
+
set show-all-if-ambiguous on # Reduce tab completion key presses and show suggestions
|
|
20
|
+
set show-all-if-ambiguous on # Show all completions if ambiguous
|
|
21
|
+
set show-all-if-unmodified on # Show all completions if unmodified
|
|
22
|
+
set visible-stats On # Append char to indicate type
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"asi": false,
|
|
3
|
+
"bitwise": true,
|
|
4
|
+
"boss": true,
|
|
5
|
+
"camelcase": true,
|
|
6
|
+
"curly": true,
|
|
7
|
+
"eqeqeq": true,
|
|
8
|
+
"esnext": true,
|
|
9
|
+
"esversion": 8,
|
|
10
|
+
"forin": true,
|
|
11
|
+
"freeze": true,
|
|
12
|
+
"immed": true,
|
|
13
|
+
"indent": 2,
|
|
14
|
+
"iterator":true,
|
|
15
|
+
"lastsemic": true,
|
|
16
|
+
"latedef": true,
|
|
17
|
+
"maxcomplexity": 5,
|
|
18
|
+
"maxdepth": 2,
|
|
19
|
+
"maxlen": 140,
|
|
20
|
+
"maxstatements": 25,
|
|
21
|
+
"mocha": true,
|
|
22
|
+
"newcap": false,
|
|
23
|
+
"noarg": true,
|
|
24
|
+
"node": true,
|
|
25
|
+
"noempty": true,
|
|
26
|
+
"nonbsp": true,
|
|
27
|
+
"nonew": true,
|
|
28
|
+
"onecase": true,
|
|
29
|
+
"quotmark": true,
|
|
30
|
+
"regexp": true,
|
|
31
|
+
"smarttabs": true,
|
|
32
|
+
"strict": true,
|
|
33
|
+
"trailing": true,
|
|
34
|
+
"undef": true,
|
|
35
|
+
"unused": true,
|
|
36
|
+
"white": true
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
2
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
3
|
+
# License: MIT
|
|
4
|
+
|
|
5
|
+
# ~/.profile: executed by the command interpreter for login shells.
|
|
6
|
+
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
|
7
|
+
# exists.
|
|
8
|
+
# see /usr/share/doc/bash/examples/startup-files for examples.
|
|
9
|
+
# the files are located in the bash-doc package.
|
|
10
|
+
|
|
11
|
+
# the default umask is set in /etc/profile; for setting the umask
|
|
12
|
+
# for ssh logins, install and configure the libpam-umask package.
|
|
13
|
+
#umask 022
|
|
14
|
+
|
|
15
|
+
# if running bash
|
|
16
|
+
# shellcheck disable=SC2292
|
|
17
|
+
if [ -n "${BASH_VERSION}" ]; then
|
|
18
|
+
# include .bashrc if it exists
|
|
19
|
+
# shellcheck disable=SC2292
|
|
20
|
+
if [ -f "${HOME}/.bashrc" ]; then
|
|
21
|
+
# shellcheck source=/dev/null
|
|
22
|
+
. "${HOME}/.bashrc"
|
|
23
|
+
fi
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# set PATH so it includes user's private bin if it exists
|
|
27
|
+
if [ -d "${HOME}"/bin ]; then
|
|
28
|
+
PATH="${HOME}/bin:${PATH}"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# set PATH so it includes user's private bin if it exists
|
|
32
|
+
if [ -d "${HOME}"/.local/bin ]; then
|
|
33
|
+
PATH="${HOME}/.local/bin:${PATH}"
|
|
34
|
+
fi
|
|
35
|
+
# shellcheck source=/dev/null
|
|
36
|
+
. "${HOME}"/.cargo/env
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
2
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
3
|
+
# License: MIT
|
|
4
|
+
|
|
5
|
+
set -g default-terminal "screen-256color" # use 256 colors
|
|
6
|
+
if 'infocmp -x tmux-256color > /dev/null 2>&1' 'set -g default-terminal "tmux-256color"'
|
|
7
|
+
|
|
8
|
+
## 🅶🅴🅽🅴🆁🅰🅻
|
|
9
|
+
bind C-a send-prefix -2 # GNU-Screen compatible prefix
|
|
10
|
+
bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' # reload configuration
|
|
11
|
+
set -g history-limit 5000 # boost history limit
|
|
12
|
+
set -g prefix2 C-a # GNU-Screen compatible prefix
|
|
13
|
+
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
|
|
14
|
+
set -s escape-time 10 # faster command sequences
|
|
15
|
+
set -s focus-events on # enable mouse focus events
|
|
16
|
+
set -sg repeat-time 600 # increase repeat timeout
|
|
17
|
+
setw -g xterm-keys on # enable xterm keys
|
|
18
|
+
setw -q -g utf8 on # expect UTF-8 (tmux < 2.2)
|
|
19
|
+
|
|
20
|
+
## 🅳🅸🆂🅿🅻🅰🆈
|
|
21
|
+
bind -n C-l send-keys C-l \; run 'sleep 0.2' \; clear-history # clear both screen and history
|
|
22
|
+
set -g base-index 1 # start windows numbering at 1
|
|
23
|
+
set -g display-panes-time 800 # slightly longer pane indicators display time
|
|
24
|
+
set -g display-time 1000 # slightly longer status messages display time
|
|
25
|
+
set -g monitor-activity on # monitor for activity
|
|
26
|
+
set -g renumber-windows on # renumber windows when a window is closed
|
|
27
|
+
set -g set-titles on # set terminal title
|
|
28
|
+
set -g status-interval 10 # redraw status line every 10 seconds
|
|
29
|
+
set -g visual-activity off # disable visual activity
|
|
30
|
+
set -wg allow-rename off # disable window renaming
|
|
31
|
+
set -wg automatic-rename off # disable automatic window renaming
|
|
32
|
+
set -wg mode-keys vi # vi mode
|
|
33
|
+
setw -g automatic-rename on # rename window to reflect current program
|
|
34
|
+
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
|
35
|
+
|
|
36
|
+
## 🅽🅰🆅🅸🅶🅰🆃🅸🅾🅽
|
|
37
|
+
|
|
38
|
+
bind _ split-window -h # split current window horizontally
|
|
39
|
+
bind - split-window -v # split current window vertically
|
|
40
|
+
bind -r C-h previous-window # select previous window
|
|
41
|
+
bind -r C-l next-window # select next window
|
|
42
|
+
bind -r h select-pane -L # move left
|
|
43
|
+
bind -r j select-pane -D # move down
|
|
44
|
+
bind -r k select-pane -U # move up
|
|
45
|
+
bind -r l select-pane -R # move right
|
|
46
|
+
bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D' # maximize current pane
|
|
47
|
+
bind < swap-pane -U # swap current pane with the previous one
|
|
48
|
+
bind > swap-pane -D # swap current pane with the next one
|
|
49
|
+
bind | split-window -h -c "#{pane_current_path}" # split current window horizontally
|
|
50
|
+
bind a last -t : # move to last active window
|
|
51
|
+
bind BTab switch-client -l # move to last session
|
|
52
|
+
bind C-c new-session # create session
|
|
53
|
+
bind C-f command-prompt -p find-session 'switch-client -t %%' # find session
|
|
54
|
+
bind e neww -n tmux-config "\${EDITOR:-vim} ~/.tmux.conf" # edit configuration
|
|
55
|
+
bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse" # toggle mouse
|
|
56
|
+
bind N new-window # create window
|
|
57
|
+
bind r source ~/.tmux.conf\; display "bmux config sourced" # reload configuration
|
|
58
|
+
bind Tab last-window # move to last active window
|
|
59
|
+
bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}" # urlview
|
|
60
|
+
unbind n # unbind default next-window
|
|
61
|
+
unbind p # unbind default previous-window
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## 🆃🅷🅴🅼🅴
|
|
65
|
+
if 'uname -s | grep -q Darwin' 'set -g status-left "#[bg=#D0D3D5] macOS ❐ #S "' # macOS version
|
|
66
|
+
if 'uname -s | grep -q Linux' 'set -g status-left "#[bg=#D0D3D5] 🐧 Linux ❐ #S "' # Linux version
|
|
67
|
+
set -g history-limit 102400 # increase history limit
|
|
68
|
+
set -g message-style "bg=#14222A, fg=#D0D3D5" # Mirage blue and Iron grey
|
|
69
|
+
set -g set-clipboard on # copy to system clipboard
|
|
70
|
+
set -g status-left-length 400 # status left length
|
|
71
|
+
set -g status-right "#[bg=#027bff] #(whoami)@#h #[bg=red] %Y-%m-%d %I:%M%p " # status right
|
|
72
|
+
set -g status-right-length 600 # status right length
|
|
73
|
+
set -g status-style "bg=#14222A, fg=#D0D3D5" # mirage blue and iron grey
|
|
74
|
+
set -wg pane-active-border-style "fg=#14222A" # mirage blue
|
|
75
|
+
set -wg pane-border-style "fg=#D0D3D5" # iron grey
|
|
76
|
+
set -wg window-status-current-format " #I #W " # current window status format
|
|
77
|
+
set -wg window-status-current-style "bg=red" # red
|
|
78
|
+
set -wg window-status-format " #I #W " # window status format
|
|
79
|
+
set -wg window-status-last-style "fg=#D0D3D5" # iron grey
|
|
80
|
+
set -wg window-status-separator "" # window status separator
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## 🅻🅸🅽🆄🆇 🅾🅽🅻🆈
|
|
84
|
+
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M # scroll up
|
|
85
|
+
bind -n WheelDownPane select-pane -t= \; send-keys -M # scroll down
|
|
86
|
+
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'" # scroll up
|
|
87
|
+
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down # scroll down half page
|
|
88
|
+
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up # scroll up half page
|
|
89
|
+
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down # scroll down half page
|
|
90
|
+
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up # scroll up half page
|
|
91
|
+
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c" # copy to system clipboard
|
|
92
|
+
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" # copy to system clipboard
|
|
93
|
+
set -g mouse on # enable mouse
|
|
94
|
+
setw -g mode-keys vi # vi mode
|
|
95
|
+
unbind -T copy-mode-vi Enter # unbind default Enter
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
" 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
2
|
+
" Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
3
|
+
" License: MIT
|
|
4
|
+
|
|
5
|
+
set autoindent " autoindent
|
|
6
|
+
set autoread " auto-read
|
|
7
|
+
set background=dark " background color (dark)
|
|
8
|
+
set backspace=indent,eol,start " backspace behavior (indent, eol, start)
|
|
9
|
+
set backupdir=~/.vim/backups " backup directory (~/.vim/backups)
|
|
10
|
+
set cc=80 " column count (80)
|
|
11
|
+
set clipboard=unnamedplus " clipboard support (unnamedplus)
|
|
12
|
+
set cmdheight=1 " command line height (1)
|
|
13
|
+
set confirm " confirm before exiting
|
|
14
|
+
set cursorline " cursorline support
|
|
15
|
+
set encoding=utf-8 " encoding support (utf-8)
|
|
16
|
+
set expandtab " expandtab support
|
|
17
|
+
set foldmethod=indent " foldmethod support
|
|
18
|
+
set foldnestmax=3 " foldnestmax support (3)
|
|
19
|
+
set gcr=a:blinkon0 " disable blinking cursor (a:blinkon0)
|
|
20
|
+
set hidden " hidden support
|
|
21
|
+
set history=10000 " history support (10000)
|
|
22
|
+
set hlsearch " highlight search
|
|
23
|
+
set ignorecase " ignorecase support
|
|
24
|
+
set incsearch " incremental search
|
|
25
|
+
set laststatus=2 " laststatus support (2)
|
|
26
|
+
set lazyredraw " lazyredraw support
|
|
27
|
+
set linebreak " linebreak support
|
|
28
|
+
set modelines=0 " modelines support (0)
|
|
29
|
+
set mouse=a " mouse support (all)
|
|
30
|
+
set nobackup " nobackup support
|
|
31
|
+
set nocompatible " nocompatible support
|
|
32
|
+
set nocp " nocp support"
|
|
33
|
+
set nofoldenable " nofoldenable support
|
|
34
|
+
set nomodeline " nomodeline support
|
|
35
|
+
set noswapfile " noswapfile support
|
|
36
|
+
set nowb " nowb support"
|
|
37
|
+
set nowrap " nowrap support
|
|
38
|
+
set number " number support
|
|
39
|
+
set ruler " ruler support"
|
|
40
|
+
set scrolloff=3 " scrolloff support (3)
|
|
41
|
+
set shiftwidth=2 " shiftwidth support (2)
|
|
42
|
+
set showcmd " showcmd support
|
|
43
|
+
set showmatch " showmatch support
|
|
44
|
+
set showmode " showmode support"
|
|
45
|
+
set showtabline=2 " showtabline support (2)
|
|
46
|
+
set sidescroll=1 " sidescroll support (1)
|
|
47
|
+
set sidescrolloff=15 " sidescrolloff support (15)
|
|
48
|
+
set smartcase " smartcase support
|
|
49
|
+
set smartindent " smartindent support
|
|
50
|
+
set smarttab " smarttab support
|
|
51
|
+
set softtabstop=2 " softtabstop support (2)
|
|
52
|
+
set spell " spell support
|
|
53
|
+
set spelllang=en " spelllang support (en)
|
|
54
|
+
set switchbuf=useopen " switchbuf support (useopen)
|
|
55
|
+
set t_Co=256 " t_Co support (256)
|
|
56
|
+
set tabstop=2 " tabstop support (2)
|
|
57
|
+
set textwidth=79 " textwidth support (79)
|
|
58
|
+
set title " title support
|
|
59
|
+
set ttyfast " ttyfast support
|
|
60
|
+
set visualbell " visualbell support
|
|
61
|
+
set wildignore+=*.png,*.jpg,*.gif " wildignore support (png, jpg, gif)
|
|
62
|
+
set wildignore+=*DS_Store* " wildignore support (DS_Store)
|
|
63
|
+
set wildignore+=*sass-cache* " wildignore support (sass-cache)
|
|
64
|
+
set wildignore+=*vim/backups* " wildignore support (vim/backups)
|
|
65
|
+
set wildignore+=log/** " wildignore support (log)
|
|
66
|
+
set wildignore+=tmp/** " wildignore support (tmp)
|
|
67
|
+
set wildignore+=vendor/cache/** " wildignore support (vendor/cache)
|
|
68
|
+
set wildmenu " wildmenu support
|
|
69
|
+
set wildmode=longest,list " wildmode support (longest,list)
|
|
70
|
+
set winwidth=79 " winwidth support (79)
|
|
71
|
+
set wrap " wrap support
|
|
72
|
+
syntax enable " syntax support (enable)
|
|
73
|
+
syntax on " syntax support (on)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
## 🆅🅰🆁🅸🅰🅱🅻🅴🆂 - Set variables.
|
|
7
|
+
HOSTNAME=$(hostname -f) # hostname of the machine.
|
|
8
|
+
INPUTRC=${HOME}/.inputrc # set INPUTRC (so that .inputrc is respected)
|
|
9
|
+
OS_ARCH=$(uname -m) # machine hardware name.
|
|
10
|
+
OS_NAME=$(uname) # operating system name.
|
|
11
|
+
OS_VERSION=$(uname -r) # operating system version number.
|
|
12
|
+
SSL_CERT_FILE=${HOME}/cacert.pem # set the SSL_CERT_FILE environment variable.
|
|
13
|
+
USER_LANGUAGE="en_GB.UTF-8" # default language.
|
|
14
|
+
USER=$(whoami) # current user name.
|
|
15
|
+
|
|
16
|
+
## 🅴🆇🅿🅾🆁🆃🆂 - Export the variables.
|
|
17
|
+
export ARCHFLAGS="-arch ${OS_ARCH}" # archflags for the current machine.
|
|
18
|
+
export DOTFILES_VERSION='0.2.452' # version of the dotfiles.
|
|
19
|
+
export DOTFILES="${HOME}"/.dotfiles/shell # path to the cross plaform dotfiles.
|
|
20
|
+
export HOSTNAME=${HOSTNAME} # hostname of the machine.
|
|
21
|
+
export INPUTRC=${INPUTRC} # set INPUTRC (so that .inputrc is respected)
|
|
22
|
+
export LANG=${USER_LANGUAGE} # default language.
|
|
23
|
+
export LANGUAGE=${USER_LANGUAGE} # default language.
|
|
24
|
+
export LC_ALL=${USER_LANGUAGE} # default language.
|
|
25
|
+
export OS_ARCH # machine hardware name.
|
|
26
|
+
export OS_NAME # operating system name.
|
|
27
|
+
export OS_VERSION # operating system version number.
|
|
28
|
+
export SSL_CERT_FILE=${SSL_CERT_FILE} # set the SSL_CERT_FILE environment variable.
|
|
29
|
+
export TERM=xterm-256color # default terminal color.
|
|
30
|
+
export USER # current user name.
|
|
31
|
+
|
|
32
|
+
## 🅻🅾🅰🅳🅴🆁🆂 - Load the dotfiles.
|
|
33
|
+
for loaders in "${DOTFILES}"/*.sh; do
|
|
34
|
+
# shellcheck source=/dev/null
|
|
35
|
+
. "${loaders}"
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
# Remove duplicates in zsh $PATH
|
|
39
|
+
# shellcheck disable=SC2034
|
|
40
|
+
typeset -aU path
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
## 🅲🅾🅽🅵🅸🅶🆄🆁🅰🆃🅸🅾🅽🆂
|
|
7
|
+
for config in "${HOME}"/.dotfiles/shell/configurations/[!.#]*/*.sh; do
|
|
8
|
+
# shellcheck source=/dev/null
|
|
9
|
+
source "${config}"
|
|
10
|
+
done
|
package/shell/exit.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# When leaving the console clear the screen to increase privacy
|
|
7
|
+
if [[ "${SHLVL}" = 1 ]]; then
|
|
8
|
+
clear && printf '\e[3J'
|
|
9
|
+
fi
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# Function to combine cd and ls.
|
|
7
|
+
# cdls: Function to combine cd and ls.
|
|
8
|
+
cdls() {
|
|
9
|
+
# Add \ because cd loops with alias
|
|
10
|
+
if [[ "$#" != 1 ]]; then
|
|
11
|
+
echo "[ERROR] Please add one argument" >&2
|
|
12
|
+
return 1
|
|
13
|
+
fi
|
|
14
|
+
echo "[INFO] The operation completed successfully, directory listing of $1:"
|
|
15
|
+
\cd "$1" || exit
|
|
16
|
+
ls -lh
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
alias cdl='cdls' # alias for cdls
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# https://dotfiles.io
|
|
8
|
+
#
|
|
9
|
+
# Description: Mac OS X Dotfiles - Simply designed to fit your shell life.
|
|
10
|
+
#
|
|
11
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
12
|
+
# Licensed under the MIT license
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# changediskpwd: Function to change the password on an encrypted disk image
|
|
17
|
+
# changediskpwd() {
|
|
18
|
+
# hdiutil chpass "$1"
|
|
19
|
+
# }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# https://dotfiles.io
|
|
8
|
+
#
|
|
9
|
+
# Description: Mac OS X Dotfiles - Simply designed to fit your shell life.
|
|
10
|
+
#
|
|
11
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
12
|
+
# Licensed under the MIT license
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# TODO: Fix code function
|
|
17
|
+
# Add Visual Studio Code (code)
|
|
18
|
+
# code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $"*" ;}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# countdown: Function for countdown
|
|
7
|
+
|
|
8
|
+
# TODO: Fix countdown function
|
|
9
|
+
# countdown() {
|
|
10
|
+
|
|
11
|
+
# if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
|
|
12
|
+
# echo "usage:
|
|
13
|
+
# countdown [SECONDS]
|
|
14
|
+
# countdown"
|
|
15
|
+
# exit 0
|
|
16
|
+
# fi
|
|
17
|
+
# if [ -z "$1" ]; then
|
|
18
|
+
# read -rp "Enter a number of seconds to countdown from: " seconds
|
|
19
|
+
# else
|
|
20
|
+
# seconds=$1
|
|
21
|
+
# fi
|
|
22
|
+
# : "${x=60}"
|
|
23
|
+
# for ((c = 1; c <= seconds; c++)); do
|
|
24
|
+
# sleep 1
|
|
25
|
+
# seconds_remaining=$((seconds - c))
|
|
26
|
+
# echo -ne "\033[2k\rCountdown: $seconds_remaining seconds"
|
|
27
|
+
# done
|
|
28
|
+
# echo -ne "\033[2k\r"
|
|
29
|
+
# echo "Countdown finished on $(date)"
|
|
30
|
+
# }
|
|
31
|
+
|
|
32
|
+
# alias cntd='countdown' # Alias for countdown
|
|
33
|
+
# alias ctd='countdown' # Alias for countdown
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
## curlheader: Function to return only a specific response header or all response headers for a given URL.
|
|
7
|
+
## usage: curlheader $header $url
|
|
8
|
+
## usage: curlheader $url
|
|
9
|
+
curlheader() {
|
|
10
|
+
if [[ -z "$2" ]]; then
|
|
11
|
+
echo "curl -k -s -D - $1 -o /dev/null"
|
|
12
|
+
curl -k -s -D - "$1" -o /dev/null:
|
|
13
|
+
else
|
|
14
|
+
echo "curl -k -s -D - $2 -o /dev/null | grep $1:"
|
|
15
|
+
curl -k -s -D - "$2" -o /dev/null | grep "$1":
|
|
16
|
+
fi
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
alias clh='curlheader' # Alias for curlheader
|
|
20
|
+
alias crlhd='curlheader' # Alias for curlheader
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# https://dotfiles.io
|
|
7
|
+
#
|
|
8
|
+
# Description: Mac OS X Dotfiles - Simply designed to fit your shell life.
|
|
9
|
+
#
|
|
10
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
11
|
+
# Licensed under the MIT license
|
|
12
|
+
#
|
|
13
|
+
|
|
14
|
+
# Curl Time: Function to return the time it took to get a response from a given URL.
|
|
15
|
+
## get the timings for a curl to a URL
|
|
16
|
+
## usage: curltime $url
|
|
17
|
+
curltime() {
|
|
18
|
+
curl -w "\n\
|
|
19
|
+
┌──────────────────────────────┐\n\
|
|
20
|
+
│Time appconnect: %{time_appconnect}s │\n\
|
|
21
|
+
│Time connect: %{time_connect}s │\n\
|
|
22
|
+
│Time namelookup: %{time_namelookup}s │\n\
|
|
23
|
+
│Time pretransfer: %{time_pretransfer}s │\n\
|
|
24
|
+
│Time redirect: %{time_redirect}s │\n\
|
|
25
|
+
│Time starttransfer: %{time_starttransfer}s │\n\
|
|
26
|
+
└──────────────────────────────┘\n\
|
|
27
|
+
Time total: %{time_total}s\n\n" -o /dev/null -s "$1"
|
|
28
|
+
}
|
|
29
|
+
alias clh='curlheader' # Alias for curlheader
|
|
30
|
+
alias crlhd='curlheader' # Alias for curlheader
|
|
31
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.452) - https://dotfiles.io
|
|
3
|
+
# Copyright (c) Sebastien Rousseau 2022. All rights reserved
|
|
4
|
+
# License: MIT
|
|
5
|
+
|
|
6
|
+
# encode64: Function to encode a string to base64.
|
|
7
|
+
encode64() {
|
|
8
|
+
if [[ $# -eq 0 ]]; then
|
|
9
|
+
cat | base64
|
|
10
|
+
else
|
|
11
|
+
printf '%s' "$1" | base64 | base64
|
|
12
|
+
fi
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# decode64: Function to decode a base64 string.
|
|
16
|
+
decode64() {
|
|
17
|
+
if [[ $# -eq 0 ]]; then
|
|
18
|
+
cat | base64 --decode
|
|
19
|
+
else
|
|
20
|
+
printf '%s\n' "$1" | base64 | base64 --decode
|
|
21
|
+
fi
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
alias e64=encode64 # Encode to base64.
|
|
25
|
+
alias d64=decode64 # Decode from base64.
|