first commit
This commit is contained in:
commit
66f1491f4e
|
@ -0,0 +1,2 @@
|
|||
/private
|
||||
.task/*.data
|
|
@ -0,0 +1,43 @@
|
|||
# Remarks
|
||||
|
||||
## Symlinks
|
||||
|
||||
`.config/*` should be copied or linked **into** `~/.config`
|
||||
|
||||
`.ssh/config` should be linked to `~/.ssh/config`
|
||||
|
||||
`.p10k.zsh` must be linked or copied to `~/.p10k.zsh`
|
||||
|
||||
`.tmux.conf` must be linked or copied to `~/.tmux.conf`
|
||||
|
||||
`.zshrc` must be linked or copied to `~/.zshrc`
|
||||
|
||||
`neofetch.conf` must be linked or copied to `/etc/neofetch.conf`
|
||||
|
||||
`.taskrc` should be linked or copied to `~/.taskrc` to work properly `.task` must be copied or linked to `~/.task`
|
||||
|
||||
## Fonts for p10k
|
||||
|
||||
`fonts` needs to be installed manually
|
||||
|
||||
## tmux
|
||||
|
||||
### Plugin and Theme Installation
|
||||
|
||||
Start `tmux` and press `<prefix>` (`ctrl+y`) followed by `I` (capital i) to install plugins and theme.
|
||||
|
||||
### Sessions
|
||||
|
||||
Sessionscripts in `tmux` might only work properly with `.ssh/config`
|
||||
|
||||
## Fixes
|
||||
|
||||
### Docker-Autocompletion
|
||||
|
||||
`docker-autocompletion` might report `compinit:501: no such file or directory: /usr/share/zsh/vendor-completions/_docker`. The file is a symlink to `/mnt/wsl/docker-desktop/cli-tools/usr/share/zsh/vendor-completions/_docker` which doesn't exist if Docker-Desktop isn't running. A workaround is to replace the symlink with an copy of the real file:
|
||||
|
||||
```
|
||||
sudo rm -rf /usr/share/zsh/vendor-completions/_docker
|
||||
sudo cp /mnt/wsl/docker-desktop/cli-tools/usr/share/zsh/vendor-completions/_docker /usr/share/zsh/vendor-completions/
|
||||
sudo chattr +i /usr/share/zsh/vendor-completions/_docker
|
||||
```
|
|
@ -0,0 +1,87 @@
|
|||
-- Conky, a system monitor https://github.com/brndnmtthws/conky
|
||||
--
|
||||
-- This configuration file is Lua code. You can write code in here, and it will
|
||||
-- execute when Conky loads. You can use it to generate your own advanced
|
||||
-- configurations.
|
||||
--
|
||||
-- Try this (remove the `--`):
|
||||
--
|
||||
-- print("Loading Conky config")
|
||||
--
|
||||
-- For more on Lua, see:
|
||||
-- https://www.lua.org/pil/contents.html
|
||||
|
||||
conky.config = {
|
||||
alignment = 'top_left',
|
||||
background = false,
|
||||
border_width = 1,
|
||||
cpu_avg_samples = 2,
|
||||
default_color = 'white',
|
||||
default_outline_color = 'white',
|
||||
default_shade_color = 'white',
|
||||
double_buffer = true,
|
||||
draw_borders = false,
|
||||
draw_graph_borders = true,
|
||||
draw_outline = false,
|
||||
draw_shades = false,
|
||||
extra_newline = false,
|
||||
font = 'DejaVu Sans Mono:size=12',
|
||||
gap_x = 30,
|
||||
gap_y = 60,
|
||||
minimum_height = 5,
|
||||
minimum_width = 5,
|
||||
net_avg_samples = 2,
|
||||
no_buffers = true,
|
||||
out_to_console = false,
|
||||
out_to_ncurses = false,
|
||||
out_to_stderr = false,
|
||||
out_to_x = true,
|
||||
own_window = true,
|
||||
own_window_class = 'Conky',
|
||||
own_window_type = 'desktop',
|
||||
show_graph_range = false,
|
||||
show_graph_scale = false,
|
||||
stippled_borders = 0,
|
||||
update_interval = 1.0,
|
||||
uppercase = false,
|
||||
use_spacer = 'none',
|
||||
use_xft = true,
|
||||
own_window_transparent = true,
|
||||
own_window_argb_visual = true
|
||||
}
|
||||
|
||||
conky.text = [[
|
||||
${color grey}Info:$color ${scroll 32 $sysname $nodename $machine}
|
||||
$hr
|
||||
${color grey}Uptime:$color $uptime
|
||||
${color grey}Frequency (in GHz):$color $freq_g
|
||||
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}$color
|
||||
$memgraph
|
||||
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
|
||||
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
|
||||
$color${cpugraph}
|
||||
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
|
||||
${color grey}Load:$color $loadavg $color
|
||||
$loadgraph
|
||||
$hr
|
||||
${color grey}Battery:$color ${acpiacadapter ACAD} ${battery_percent BAT1}% ${battery_bar BAT1}
|
||||
$hr
|
||||
${color grey}File systems:
|
||||
/ $color${fs_used /}/${fs_size /} ${fs_bar 6 /}
|
||||
${color grey}Disk IO:
|
||||
${color grey} Read:$color $diskio_read ${color grey}${goto 230}Write:$color $diskio_write
|
||||
$diskiograph
|
||||
$hr
|
||||
${color grey}Networking:
|
||||
WLAN Up:$color ${upspeed wlp57s0} ${color grey}${goto 230}Down:$color ${downspeed wlp57s0}
|
||||
${color grey}VPN Up:$color ${upspeed proton0} ${color grey}${goto 230}Down:$color ${downspeed proton0}
|
||||
${color grey}LAN Up:$color ${upspeed enx00e04cf03bf0} ${color grey}${goto 230}Down:$color ${downspeed enx00e04cf03bf0}
|
||||
$hr
|
||||
${color grey}Name PID CPU% MEM%
|
||||
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
|
||||
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
|
||||
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
|
||||
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
|
||||
${color lightgrey} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
|
||||
$hr
|
||||
]]
|
|
@ -0,0 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
rm ~/.conkyrc
|
||||
ln -s ${GIT_ROOT}/conky/conkyrc ~/.conkyrc
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
rm ~/.gitconfig
|
||||
ln -s ${GIT_ROOT}/git/gitconfig ~/.gitconfig
|
|
@ -0,0 +1,9 @@
|
|||
# This is Git's per-user configuration file.
|
||||
|
||||
[user]
|
||||
name = gpkvt
|
||||
email = git@21x9.org
|
||||
[pull]
|
||||
ff = only
|
||||
[credential]
|
||||
helper = store
|
|
@ -0,0 +1,84 @@
|
|||
#! /bin/zsh
|
||||
|
||||
tools=(
|
||||
netcat-openbsd
|
||||
aria2
|
||||
bat
|
||||
btop
|
||||
bind9-dnsutils
|
||||
debian-goodies
|
||||
gron
|
||||
htop
|
||||
hub
|
||||
icdiff
|
||||
ioping
|
||||
iotop
|
||||
keychain
|
||||
lsof
|
||||
mlocate
|
||||
mtr
|
||||
ncdu
|
||||
net-tools
|
||||
nload
|
||||
nmon
|
||||
oping
|
||||
powerline
|
||||
progress
|
||||
pv
|
||||
ranger
|
||||
reptyr
|
||||
taskwarrior
|
||||
tig
|
||||
tmux
|
||||
tmux-plugin-manager
|
||||
unp
|
||||
jq
|
||||
nethogs
|
||||
duf
|
||||
)
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
cd ${GIT_ROOT}
|
||||
|
||||
for file in $(ls -1 ./**/deploy.zsh); do
|
||||
chmod +x ${file}
|
||||
echo "Executing ${file}"
|
||||
${file}
|
||||
done
|
||||
|
||||
echo "Checking zplug installation"
|
||||
if [ $(dpkg-query -W -f='${Status}' zplug 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
echo "Installing zplug"
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install zplug -yq
|
||||
fi
|
||||
|
||||
echo "Executing zplug init script"
|
||||
# zplug - manage plugins
|
||||
source /usr/share/zplug/init.zsh
|
||||
zplug "zsh-users/zsh-syntax-highlighting"
|
||||
zplug "zsh-users/zsh-autosuggestions"
|
||||
zplug "zsh-users/zsh-completions"
|
||||
zplug "plugins/per-directory-history", from:oh-my-zsh
|
||||
zplug "plugins/history-substring-search", from:oh-my-zsh
|
||||
zplug "plugins/common-aliases", from:oh-my-zsh
|
||||
zplug "plugins/nmap", from:oh-my-zsh
|
||||
zplug "plugins/taskwarrior", from:oh-my-zsh
|
||||
zplug "romkatv/powerlevel10k", use:powerlevel10k.zsh-theme
|
||||
|
||||
echo "Installing zplug plugins"
|
||||
# zplug - install/load new plugins when zsh is started or reloaded
|
||||
if ! zplug check --verbose; then
|
||||
printf "Install? [y/N]: "
|
||||
if read -q; then
|
||||
echo; zplug install
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Installing tools"
|
||||
# Install "standard" tools
|
||||
for i in "${tools[@]}"; do
|
||||
if [ $(dpkg-query -W -f='${Status}' ${i} 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
echo "Installing ${i}"
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install ${i} -yq
|
||||
fi
|
||||
done
|
|
@ -0,0 +1,8 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
# cp instead of ln -s because the files may get changed by mc when using it
|
||||
cp ${GIT_ROOT}/mc/ini ~/.config/mc/
|
||||
cp ${GIT_ROOT}/mc/panels.ini ~/.config/mc/
|
||||
cp ${GIT_ROOT}/mc/solarized.ini ~/.config/mc/
|
|
@ -0,0 +1,152 @@
|
|||
[Midnight-Commander]
|
||||
verbose=true
|
||||
shell_patterns=true
|
||||
auto_save_setup=true
|
||||
preallocate_space=false
|
||||
auto_menu=false
|
||||
use_internal_view=true
|
||||
use_internal_edit=true
|
||||
clear_before_exec=true
|
||||
confirm_delete=true
|
||||
confirm_overwrite=true
|
||||
confirm_execute=false
|
||||
confirm_history_cleanup=true
|
||||
confirm_exit=false
|
||||
confirm_directory_hotlist_delete=false
|
||||
confirm_view_dir=false
|
||||
safe_delete=false
|
||||
safe_overwrite=false
|
||||
use_8th_bit_as_meta=false
|
||||
mouse_move_pages_viewer=true
|
||||
mouse_close_dialog=false
|
||||
fast_refresh=false
|
||||
drop_menus=false
|
||||
wrap_mode=true
|
||||
old_esc_mode=true
|
||||
cd_symlinks=true
|
||||
show_all_if_ambiguous=false
|
||||
use_file_to_guess_type=true
|
||||
alternate_plus_minus=false
|
||||
only_leading_plus_minus=true
|
||||
show_output_starts_shell=false
|
||||
xtree_mode=false
|
||||
file_op_compute_totals=true
|
||||
classic_progressbar=true
|
||||
use_netrc=true
|
||||
ftpfs_always_use_proxy=false
|
||||
ftpfs_use_passive_connections=true
|
||||
ftpfs_use_passive_connections_over_proxy=false
|
||||
ftpfs_use_unix_list_options=true
|
||||
ftpfs_first_cd_then_ls=true
|
||||
ignore_ftp_chattr_errors=true
|
||||
editor_fill_tabs_with_spaces=false
|
||||
editor_return_does_auto_indent=false
|
||||
editor_backspace_through_tabs=false
|
||||
editor_fake_half_tabs=true
|
||||
editor_option_save_position=true
|
||||
editor_option_auto_para_formatting=false
|
||||
editor_option_typewriter_wrap=false
|
||||
editor_edit_confirm_save=true
|
||||
editor_syntax_highlighting=true
|
||||
editor_persistent_selections=true
|
||||
editor_drop_selection_on_copy=true
|
||||
editor_cursor_beyond_eol=false
|
||||
editor_cursor_after_inserted_block=false
|
||||
editor_visible_tabs=true
|
||||
editor_visible_spaces=true
|
||||
editor_line_state=false
|
||||
editor_simple_statusbar=false
|
||||
editor_check_new_line=false
|
||||
editor_show_right_margin=false
|
||||
editor_group_undo=true
|
||||
editor_state_full_filename=true
|
||||
editor_ask_filename_before_edit=false
|
||||
nice_rotating_dash=true
|
||||
shadows=true
|
||||
mcview_remember_file_position=false
|
||||
auto_fill_mkdir_name=true
|
||||
copymove_persistent_attr=true
|
||||
pause_after_run=1
|
||||
mouse_repeat_rate=100
|
||||
double_click_speed=250
|
||||
old_esc_mode_timeout=1000000
|
||||
max_dirt_limit=10
|
||||
num_history_items_recorded=60
|
||||
vfs_timeout=60
|
||||
ftpfs_directory_timeout=900
|
||||
ftpfs_retry_seconds=30
|
||||
fish_directory_timeout=900
|
||||
editor_tab_spacing=8
|
||||
editor_word_wrap_line_length=72
|
||||
editor_option_save_mode=0
|
||||
editor_backup_extension=~
|
||||
editor_filesize_threshold=64M
|
||||
editor_stop_format_chars=-+*\\,.;:&>
|
||||
mcview_eof=
|
||||
skin=/home/gpkvt/.config/mc/solarized.ini
|
||||
|
||||
filepos_max_saved_entries=1024
|
||||
|
||||
[Layout]
|
||||
output_lines=0
|
||||
left_panel_size=140
|
||||
top_panel_size=0
|
||||
message_visible=true
|
||||
keybar_visible=true
|
||||
xterm_title=true
|
||||
command_prompt=true
|
||||
menubar_visible=true
|
||||
free_space=true
|
||||
horizontal_split=false
|
||||
vertical_equal=true
|
||||
horizontal_equal=false
|
||||
|
||||
[Misc]
|
||||
timeformat_recent=%b %e %H:%M
|
||||
timeformat_old=%b %e %Y
|
||||
ftp_proxy_host=gate
|
||||
ftpfs_password=anonymous@
|
||||
display_codepage=UTF-8
|
||||
source_codepage=Other_8_bit
|
||||
autodetect_codeset=
|
||||
spell_language=en
|
||||
clipboard_store=
|
||||
clipboard_paste=
|
||||
|
||||
[Colors]
|
||||
base_color=
|
||||
screen=
|
||||
color_terminals=
|
||||
|
||||
xterm-256color=
|
||||
|
||||
linux=
|
||||
|
||||
tmux-256color=
|
||||
|
||||
[Panels]
|
||||
show_mini_info=true
|
||||
kilobyte_si=false
|
||||
mix_all_files=false
|
||||
show_backups=true
|
||||
show_dot_files=true
|
||||
fast_reload=false
|
||||
fast_reload_msg_shown=false
|
||||
mark_moves_down=true
|
||||
reverse_files_only=true
|
||||
auto_save_setup_panels=false
|
||||
navigate_with_arrows=false
|
||||
panel_scroll_pages=true
|
||||
panel_scroll_center=false
|
||||
mouse_move_pages=true
|
||||
filetype_mode=true
|
||||
permission_mode=false
|
||||
torben_fj_mode=false
|
||||
quick_search_mode=2
|
||||
select_flags=6
|
||||
|
||||
[Panelize]
|
||||
Find *.orig after patching=find . -name \\*.orig -print
|
||||
Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm /011 \\) -o \\( -perm -02000 -a -perm /01 \\) \\) -print
|
||||
Find rejects after patching=find . -name \\*.rej -print
|
||||
Modified git files=git ls-files --modified
|
|
@ -0,0 +1,152 @@
|
|||
[skin]
|
||||
description = Solarized (mostly) dark skin for Midnight Commander.
|
||||
|
||||
[Lines]
|
||||
# TODO: Description.
|
||||
horiz = ─
|
||||
vert = │
|
||||
lefttop = ┌
|
||||
righttop = ┐
|
||||
leftbottom = └
|
||||
rightbottom = ┘
|
||||
topmiddle = ─
|
||||
bottommiddle = ─
|
||||
leftmiddle = ├
|
||||
rightmiddle = ┤
|
||||
cross = ┼
|
||||
dhoriz = ═
|
||||
dvert = ║
|
||||
dlefttop = ╔
|
||||
drighttop = ╗
|
||||
dleftbottom = ╚
|
||||
drightbottom = ╝
|
||||
dtopmiddle = ╤
|
||||
dbottommiddle = ╧
|
||||
dleftmiddle = ╟
|
||||
drightmiddle = ╢
|
||||
|
||||
[core]
|
||||
# Panes.
|
||||
_default_ = lightgray;black ;; Default file colors/background.
|
||||
selected = white;cyan ;; Color while hovering above a file/directory.
|
||||
marked = white;brightmagenta ;; Marked line (using select - insert, ctrl-t, etc...)
|
||||
markselect = red;cyan ;; Marked and selected.
|
||||
header = white ;; Pane header (name,size,date titles).
|
||||
reverse = white;brightmagenta ;; The direcotry PWD above the header, in focused pane.
|
||||
|
||||
# Input fields.
|
||||
inputunchanged = lightgray;black ;; Input fields colors.
|
||||
input = white;black ;; Input fields, modified.
|
||||
inputhistory = red;lightgray ;; Input history controller.
|
||||
inputmark = black;brightred ;; Input field marked text, if any.
|
||||
disabled = brightcyan;lightgray ;; Disabled input fields in dialog boxes.
|
||||
gauge = magenta;blue ;; Progress bars (while copying etc). TODO: What the text stands for?!
|
||||
|
||||
# Command line.
|
||||
# TODO: Command prompt line colors. What are they?!
|
||||
commandlinemark = black;brightred ;; Commandline marked text, if any.
|
||||
commandhistory = red;brightblack ;; Command prompt history controller.
|
||||
|
||||
# TODO: What these stand for?
|
||||
errors = black;green
|
||||
statusbar = black;green
|
||||
|
||||
[popup]
|
||||
# TODO: Probably user menu, screenlist, encoding, etc...
|
||||
pmenunormal = black;green
|
||||
pmenusel = black;green
|
||||
pmenutitle = black;green
|
||||
|
||||
[dialog]
|
||||
_default_ = black;lightgray ;; Default colors of dialogs (e.g. copy dialog).
|
||||
dfocus = black;green ;; Controller colors (checkboxes, actions) in focus.
|
||||
dhotnormal = red ;; Controllers hotkey color.
|
||||
dhotfocus = red;green ;; Controllers hotkey color in focus.
|
||||
dtitle = white;brightmagenta ;; Dialog title.
|
||||
|
||||
[error]
|
||||
_default_ = black;lightgray ;; Default colors of error dialogs (e.g. overwrite permission).
|
||||
errdfocus = black;green ;; Controller colors (checkboxes, actions) in focus.
|
||||
errdhotnormal = red ;; Controllers hotkey color.
|
||||
errdhotfocus = red;green ;; Controllers hotkey color in focus.
|
||||
errdtitle = white;red ;; Error dialog title.
|
||||
|
||||
[filehighlight]
|
||||
# View filehighlight.ini as reference.
|
||||
directory = cyan;black ;; Directories.
|
||||
executable = brightred;black ;; Executable files.
|
||||
symlink = magenta;black ;; Symbolic links.
|
||||
stalelink = lightgray;black ;; Broken links.
|
||||
device = red;blueblack ;; An interface for a device driver.
|
||||
special = black;blueblack ;; Pipes (FIFOs), sockets, block files, character files etc...
|
||||
core = brightcyan;black ;; Core dump files, etc?...
|
||||
temp = brightgreen;black ;; Bak, Temp, ~, etc...
|
||||
archive = brightmagenta;black ;; Archives.
|
||||
source = green;black ;; Source files.
|
||||
media = brown;black ;; Interactive media.
|
||||
graph = blue;black ;; Images, in other words.
|
||||
database = brightgreen;black ;; DataBases, duh.
|
||||
doc = red;black ;; Documents, duh.
|
||||
|
||||
[menu]
|
||||
_default_ = black;lightgray ;; Default colors for menu while active.
|
||||
menuinactive = black;lightgray ;; Colors for menu while inactive.
|
||||
menuhot = red ;; Menu item hotkey.
|
||||
menusel = black;green ;; Selected menu item.
|
||||
menuhotsel = red;green ;; Selected menu item hotkey.
|
||||
|
||||
[help]
|
||||
_default_ = black;lightgray ;; Default help tooltip text color/background.
|
||||
helpitalic = brightmagenta ;; Help when italic.
|
||||
helpbold = red ;; Help when bold.
|
||||
helplink = cyan ;; Links insde help tooltip.
|
||||
helpslink = green ;; Links insde help tooltip focused.
|
||||
helptitle = white;brightmagenta ;; Help title.
|
||||
|
||||
[buttonbar]
|
||||
#Bottom button bar (copy,move, etc...)
|
||||
hotkey = red;brightblack ;; Hotkey colors (1-10).
|
||||
button = white;brightblack ;; Button colors (text itself).
|
||||
|
||||
[editor]
|
||||
# TODO: These.
|
||||
_default_ = lightgray;black
|
||||
editbold = green;blue
|
||||
editmarked = lightgray;green
|
||||
editwhitespace = brightblue;blue
|
||||
editlinestate = brightmagenta
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
editbg = lightgray;black
|
||||
editframe = lightgray;black
|
||||
editframeactive = lightgray;black
|
||||
editframedrag = lightgray;black
|
||||
|
||||
[viewer]
|
||||
# TODO: These.
|
||||
viewunderline = brighmagenta;black
|
||||
viewbold = brighmagenta;black
|
||||
viewselected = brighmagenta;black
|
||||
|
||||
[widget-common]
|
||||
# TODO: These.
|
||||
sort-sign-up = ↓
|
||||
sort-sign-down = ↑
|
||||
|
||||
[widget-panel]
|
||||
# TODO: These.
|
||||
hiddenfiles-sign-show = ⋅
|
||||
hiddenfiles-sign-hide = •
|
||||
history-prev-item-sign = «
|
||||
history-next-item-sign = »
|
||||
history-show-list-sign = ^
|
||||
|
||||
[widget-scollbar]
|
||||
# TODO: These.
|
||||
first-vert-char = ↑
|
||||
last-vert-char = ↓
|
||||
first-horiz-char = «
|
||||
last-horiz-char = »
|
||||
current-char = ■
|
||||
background-char = ▒
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
sudo rm /etc/neofetch.conf
|
||||
sudo ln -s ${GIT_ROOT}/neofetch/neofetch.conf /etc/neofetch.conf
|
|
@ -0,0 +1,52 @@
|
|||
print_info () {
|
||||
|
||||
prin
|
||||
prin "------------------------------------------------------------"
|
||||
info title
|
||||
#info underline
|
||||
prin "------------------------------------------------------------"
|
||||
|
||||
#info "Host" model
|
||||
info "OS" distro
|
||||
info "Kernel" kernel
|
||||
info "Uptime" uptime
|
||||
#info "Packages" packages
|
||||
#prin "Updates" $(apt-get -q -y --ignore-hold --allow-change-held-packages --allow-unauthenticated -s dist-upgrade | /bin/grep ^Inst | wc -l)
|
||||
info "Shell" shell
|
||||
|
||||
#info "Resolution" resolution
|
||||
#info "DE" de
|
||||
#info "WM" wm
|
||||
#info "WM Theme" wm_theme
|
||||
#info "Theme" theme
|
||||
#info "Icons" icons
|
||||
#info "Terminal" term
|
||||
#info "Terminal Font" term_font
|
||||
prin "------------------------------------------------------------"
|
||||
#prin
|
||||
|
||||
info "CPU" cpu
|
||||
#info "GPU" gpu
|
||||
#info "CPUsage" cpu_usage
|
||||
info "Memory" memory
|
||||
info "Disk" disk
|
||||
info "Battery" battery
|
||||
|
||||
# The lines below with a '#' in front are additional info functions
|
||||
# that are disabled by default. Removing the '#' enables them and adding
|
||||
# a '#' to the start disables them again. You can add a '#' to any of the
|
||||
# lines in this function to disable their output.
|
||||
|
||||
#info "Font" font
|
||||
#info "Song" song
|
||||
info "LAN IP" local_ip
|
||||
info "WAN IP" public_ip
|
||||
#info "Users" users
|
||||
#info "Birthday" birthday
|
||||
|
||||
#prin
|
||||
prin "------------------------------------------------------------"
|
||||
#prin "Weather" "$(curl wttr.in/?0?q?T | awk '/°(C|F)/ {printf $(NF-1) $(NF) " ("a")"} /,/ {a=$0}')"
|
||||
|
||||
#info cols
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
rm ~/.p10k.zsh
|
||||
ln -s ${GIT_ROOT}/powerline/p10k.zsh ~/.p10k.zsh
|
||||
|
||||
rm -rf ~/.config/powerline/themes/tmux
|
||||
ln -s ${GIT_ROOT}/powerline/themes/tmux ~/.config/powerline/themes/tmux
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"segments": {
|
||||
"right": [
|
||||
{
|
||||
"function": "powerline.segments.common.net.external_ip"
|
||||
},
|
||||
{
|
||||
"function": "powerline.segments.common.net.network_load"
|
||||
},
|
||||
{
|
||||
"function": "powerline.segments.common.time.date"
|
||||
},
|
||||
{
|
||||
"function": "powerline.segments.common.time.date",
|
||||
"name": "time",
|
||||
"args": {
|
||||
"format": "%H:%M",
|
||||
"istime": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"function": "powerline.segments.common.net.hostname"
|
||||
},
|
||||
{
|
||||
"function": "powerline.segments.tmux.attached_clients"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# set scrolling speed
|
||||
/usr/bin/xinput set-prop 13 "libinput Scrolling Pixel Distance" 25
|
||||
|
||||
# connect vpn
|
||||
vpn=$(nmcli c | grep "Proton VPN" | awk -F" " '{print $1}')
|
||||
echo ${vpn}
|
||||
|
||||
if [ ! -z "${vpn}" ]; then
|
||||
/usr/bin/nmcli c down "${vpn}"
|
||||
fi
|
||||
|
||||
/usr/bin/protonvpn-cli config --dns custom --ip 9.9.9.11 149.112.112.10
|
||||
/usr/bin/protonvpn-cli c -f
|
||||
|
||||
if [ ! -z "${vpn}" ]; then
|
||||
/usr/bin/nmcli c up "${vpn}"
|
||||
fi
|
||||
|
||||
#sudo wg-quick up wg0
|
||||
|
||||
/usr/bin/protonvpn
|
|
@ -0,0 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
rm ~/.taskrc
|
||||
ln -s ${GIT_ROOT}/task/taskrc ~/.taskrc
|
|
@ -0,0 +1,35 @@
|
|||
# [Created by task 2.5.3 6/4/2022 22:30:58]
|
||||
# Taskwarrior program configuration file.
|
||||
# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color',
|
||||
# 'man task-sync' or 'man taskrc'
|
||||
|
||||
# Here is an example of entries that use the default, override and blank values
|
||||
# variable=foo -- By specifying a value, this overrides the default
|
||||
# variable= -- By specifying no value, this means no default
|
||||
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
|
||||
|
||||
# Use the command 'task show' to see all defaults and overrides
|
||||
|
||||
# Files
|
||||
data.location=~/.task
|
||||
|
||||
# Color theme (uncomment one to use)
|
||||
#include /usr/share/taskwarrior/light-16.theme
|
||||
#include /usr/share/taskwarrior/light-256.theme
|
||||
#include /usr/share/taskwarrior/dark-16.theme
|
||||
#include /usr/share/taskwarrior/dark-256.theme
|
||||
#include /usr/share/taskwarrior/dark-red-256.theme
|
||||
#include /usr/share/taskwarrior/dark-green-256.theme
|
||||
#include /usr/share/taskwarrior/dark-blue-256.theme
|
||||
#include /usr/share/taskwarrior/dark-violets-256.theme
|
||||
#include /usr/share/taskwarrior/dark-yellow-green.theme
|
||||
include /usr/share/taskwarrior/dark-gray-256.theme
|
||||
#include /usr/share/taskwarrior/dark-gray-blue-256.theme
|
||||
#include /usr/share/taskwarrior/solarized-dark-256.theme
|
||||
#include /usr/share/taskwarrior/solarized-light-256.theme
|
||||
#include /usr/share/taskwarrior/no-color.theme
|
||||
|
||||
taskd.trust=ignore hostname
|
||||
news.version=2.6.0
|
||||
|
||||
include ~/.taskrc-credentials
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
session="checkmail"
|
||||
|
||||
tmux new-session -d -s ${session}
|
||||
|
||||
window=1
|
||||
tmux rename-window -t ${session}:${window} 'maillog'
|
||||
tmux select-window -t ${session}:${window}
|
||||
|
||||
tmux send-keys 'clear;ssh proxy1 "clear;tail /var/log/mail.log -f"' C-m
|
||||
tmux select-pane -T 'mail.log 1'
|
||||
tmux split-window -v
|
||||
tmux select-pane -T 'mail.log 2'
|
||||
tmux send-keys 'clear;ssh proxy2 "clear;tail /var/log/mail.log -f"' C-m
|
||||
|
||||
window=2
|
||||
tmux new-window -t ${session}:${window}
|
||||
tmux select-window -t ${session}:${window}
|
||||
tmux rename-window -t ${session}:${window} 'mailq'
|
||||
|
||||
tmux send-keys 'clear;ssh proxy1' C-m 'clear;mailq' C-m
|
||||
tmux select-pane -T 'proxy1'
|
||||
tmux split-window -v
|
||||
tmux select-pane -T 'proxy2'
|
||||
tmux send-keys 'clear;ssh proxy2' C-m 'clear;mailq' C-m
|
||||
|
||||
window=3
|
||||
tmux new-window -t ${session}:${window}
|
||||
tmux select-window -t ${session}:${window}
|
||||
tmux rename-window -t ${session}:${window} 'salt'
|
||||
tmux send-keys 'clear;ssh salt' C-m
|
||||
tmux select-pane -T 'salt'
|
||||
|
||||
tmux select-window -t ${session}:2
|
||||
tmux attach-session -t ${session}
|
|
@ -0,0 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
rm ~/.tmux.conf
|
||||
ln -s ${GIT_ROOT}/tmux/tmux.conf ~/.tmux.conf
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Use 'tmux -S /tmp/tmux_shared new-session -s shared' to start a new shared session."
|
||||
echo "Change group ownership: 'chgrp tmuxshared /tmp/tmux_shared'"
|
||||
echo "Execute 'tmux -S /tmp/shared attach -t shared' to join in, use '-r' for read-only mode."
|
|
@ -0,0 +1,43 @@
|
|||
# Install plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
# set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
# set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
set -g @plugin 'tmux-plugins/tmux-mighty-scroll'
|
||||
set -g @plugin 'tmux-plugins/tmux-logging'
|
||||
set -g @plugin 'jaclu/tmux-menus'
|
||||
|
||||
# Activate continuum restore
|
||||
# set -g @continuum-restore 'on'
|
||||
|
||||
# Activate menu plugin
|
||||
set -g @menus_trigger 'F9'
|
||||
set -g @menus_without_prefix 1
|
||||
|
||||
# Defaults
|
||||
set -s default-terminal 'tmux-256color'
|
||||
set -g mouse on
|
||||
|
||||
# Show pane status
|
||||
set -g pane-border-status top
|
||||
|
||||
# Start index from 1 not 0
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
# remap prefix from 'C-b' to 'C-y'
|
||||
unbind C-b
|
||||
set-option -g prefix C-y
|
||||
bind-key C-y send-prefix
|
||||
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# exit session on C-x (use 'bind -n' to use it without prefix)
|
||||
bind C-x confirm-before -p "kill-session #S? (y/n)" "kill-session"
|
||||
|
||||
run '/usr/share/tmux-plugin-manager/tpm'
|
||||
run-shell "powerline-config tmux setup"
|
|
@ -0,0 +1,9 @@
|
|||
# Aliases
|
||||
alias ls='ls --color=never'
|
||||
alias ll='ls -lah --color=never'
|
||||
alias grep='grep --color=auto'
|
||||
alias a='tmux attach'
|
||||
alias bat='batcat'
|
||||
alias rep='reptyr'
|
||||
alias tools="echo \"${tools}\""
|
||||
unalias duf 2> /dev/null
|
|
@ -0,0 +1,6 @@
|
|||
# Use modern completion system
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
zstyle ':completion:*' menu select
|
||||
|
||||
fpath=(~/dotfiles/zsh/zsh-completions $fpath)
|
|
@ -0,0 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
rm ~/.zshrc
|
||||
ln -s ${GIT_ROOT}/zsh/zshrc ~/.zshrc
|
|
@ -0,0 +1,6 @@
|
|||
export LANGUAGE=en_US.UTF-8
|
||||
export LANG=en_US.UTF-8
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export PATH=$PATH:/usr/local/sbin:~/dotfiles/tmux:~/dotfiles/bin
|
||||
export EDITOR=mcedit
|
||||
export TPM2_PKCS11_LOG_LEVEL=0
|
|
@ -0,0 +1,5 @@
|
|||
# Keep 5000 lines of history within the shell and save it to ~/.zsh_history:
|
||||
setopt histignorealldups sharehistory
|
||||
HISTSIZE=5000
|
||||
SAVEHIST=5000
|
||||
HISTFILE=~/.zsh_history
|
|
@ -0,0 +1,63 @@
|
|||
# Use vi keybindings
|
||||
bindkey -e
|
||||
|
||||
function detect-clipboard() {
|
||||
emulate -L zsh
|
||||
|
||||
if [[ "${OSTYPE}" == darwin* ]] && (( ${+commands[pbcopy]} )) && (( ${+commands[pbpaste]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | pbcopy; }
|
||||
function clippaste() { pbpaste; }
|
||||
elif [[ "${OSTYPE}" == (cygwin|msys)* ]]; then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" > /dev/clipboard; }
|
||||
function clippaste() { cat /dev/clipboard; }
|
||||
elif (( $+commands[clip.exe] )) && (( $+commands[powershell.exe] )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | clip.exe; }
|
||||
function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
|
||||
elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | wl-copy &>/dev/null &|; }
|
||||
function clippaste() { wl-paste; }
|
||||
elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xsel]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | xsel --clipboard --input; }
|
||||
function clippaste() { xsel --clipboard --output; }
|
||||
elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xclip]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | xclip -selection clipboard -in &>/dev/null &|; }
|
||||
function clippaste() { xclip -out -selection clipboard; }
|
||||
elif (( ${+commands[lemonade]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | lemonade copy; }
|
||||
function clippaste() { lemonade paste; }
|
||||
elif (( ${+commands[doitclient]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | doitclient wclip; }
|
||||
function clippaste() { doitclient wclip -r; }
|
||||
elif (( ${+commands[win32yank]} )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | win32yank -i; }
|
||||
function clippaste() { win32yank -o; }
|
||||
elif [[ $OSTYPE == linux-android* ]] && (( $+commands[termux-clipboard-set] )); then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" | termux-clipboard-set; }
|
||||
function clippaste() { termux-clipboard-get; }
|
||||
elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then
|
||||
function clipcopy() { tmux load-buffer "${1:--}"; }
|
||||
function clippaste() { tmux save-buffer -; }
|
||||
else
|
||||
function _retry_clipboard_detection_or_fail() {
|
||||
local clipcmd="${1}"; shift
|
||||
if detect-clipboard; then
|
||||
"${clipcmd}" "$@"
|
||||
else
|
||||
print "${clipcmd}: Platform $OSTYPE not supported or xclip/xsel not installed" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
function clipcopy() { _retry_clipboard_detection_or_fail clipcopy "$@"; }
|
||||
function clippaste() { _retry_clipboard_detection_or_fail clippaste "$@"; }
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
detect-clipboard || true
|
||||
|
||||
copybuffer () {
|
||||
echo $BUFFER | clipcopy
|
||||
}
|
||||
|
||||
zle -N copybuffer
|
||||
bindkey "^O" copybuffer
|
|
@ -0,0 +1 @@
|
|||
neofetch --config /etc/neofetch.conf
|
|
@ -0,0 +1,10 @@
|
|||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=on
|
|
@ -0,0 +1,5 @@
|
|||
if [ -z ${TMUX} ]; then
|
||||
# Add SSH keys to keychain
|
||||
find ~/.ssh -type f -regextype egrep -regex '.*/id_[^.]+$' | xargs /usr/bin/keychain --nogui
|
||||
source ~/.keychain/$(hostname)-sh
|
||||
fi
|
|
@ -0,0 +1,5 @@
|
|||
# Show tasks
|
||||
if nc -zw1 192.168.42.100 53589; then
|
||||
/usr/bin/task sync
|
||||
fi
|
||||
/usr/bin/task list
|
|
@ -0,0 +1,2 @@
|
|||
# Start tmux
|
||||
# if [ -z ${TMUX} ]; then tmux; fi
|
|
@ -0,0 +1,2 @@
|
|||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#555555"
|
||||
HISTORY_START_WITH_GLOBAL=true
|
|
@ -0,0 +1,23 @@
|
|||
# zplug - manage plugins
|
||||
source /usr/share/zplug/init.zsh
|
||||
zplug "zsh-users/zsh-syntax-highlighting"
|
||||
zplug "zsh-users/zsh-autosuggestions"
|
||||
zplug "zsh-users/zsh-completions"
|
||||
zplug "plugins/per-directory-history", from:oh-my-zsh
|
||||
zplug "plugins/history-substring-search", from:oh-my-zsh
|
||||
zplug "plugins/common-aliases", from:oh-my-zsh
|
||||
zplug "plugins/nmap", from:oh-my-zsh
|
||||
zplug "plugins/taskwarrior", from:oh-my-zsh
|
||||
|
||||
HISTORY_START_WITH_GLOBAL=true
|
||||
|
||||
zplug "romkatv/powerlevel10k", use:powerlevel10k.zsh-theme
|
||||
|
||||
# zplug - install/load new plugins when zsh is started or reloaded
|
||||
if ! zplug check --verbose; then
|
||||
printf "Install? [y/N]: "
|
||||
if read -q; then
|
||||
echo; zplug install
|
||||
fi
|
||||
fi
|
||||
zplug load
|
|
@ -0,0 +1,429 @@
|
|||
#compdef _bw bw
|
||||
|
||||
function _bw {
|
||||
local -a commands
|
||||
|
||||
_arguments -C \
|
||||
'--pretty[Format output. JSON is tabbed with two spaces.]' \
|
||||
'--raw[Return raw output instead of a descriptive message.]' \
|
||||
'--response[Return a JSON formatted version of response output.]' \
|
||||
'--cleanexit[Exit with a success exit code (0) unless an error is thrown.]' \
|
||||
'--quiet[Don'"'"'t return anything to stdout.]' \
|
||||
'--nointeraction[Do not prompt for interactive user input.]' \
|
||||
'--session[Pass session key instead of reading from env.]' \
|
||||
'(-v --version)'{-v,--version}'[output the version number]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"1: :->cmnds" \
|
||||
"*::arg:->args"
|
||||
|
||||
case $state in
|
||||
cmnds)
|
||||
commands=(
|
||||
"login:Log into a user account."
|
||||
"logout:Log out of the current user account."
|
||||
"lock:Lock the vault and destroy active session keys."
|
||||
"unlock:Unlock the vault and return a new session key."
|
||||
"sync:Pull the latest vault data from server."
|
||||
"generate:Generate a password/passphrase."
|
||||
"encode:Base 64 encode stdin."
|
||||
"config:Configure CLI settings."
|
||||
"update:Check for updates."
|
||||
"completion:Generate shell completions."
|
||||
"status:Show server, last sync, user information, and vault status."
|
||||
"serve:Start a RESTful API webserver."
|
||||
"list:List an array of objects from the vault."
|
||||
"get:Get an object from the vault."
|
||||
"create:Create an object in the vault."
|
||||
"edit:Edit an object from the vault."
|
||||
"delete:Delete an object from the vault."
|
||||
"restore:Restores an object from the trash."
|
||||
"move:Move an item to an organization."
|
||||
"confirm:Confirm an object to the organization."
|
||||
"import:Import vault data from a file."
|
||||
"export:Export vault data to a CSV or JSON file."
|
||||
"share:--DEPRECATED-- Move an item to an organization."
|
||||
"send:Work with Bitwarden sends. A Send can be quickly created using this command or subcommands can be used to fine-tune the Send"
|
||||
"receive:Access a Bitwarden Send from a url"
|
||||
)
|
||||
_describe "command" commands
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$words[1]" in
|
||||
login)
|
||||
_bw_login
|
||||
;;
|
||||
logout)
|
||||
_bw_logout
|
||||
;;
|
||||
lock)
|
||||
_bw_lock
|
||||
;;
|
||||
unlock)
|
||||
_bw_unlock
|
||||
;;
|
||||
sync)
|
||||
_bw_sync
|
||||
;;
|
||||
generate)
|
||||
_bw_generate
|
||||
;;
|
||||
encode)
|
||||
_bw_encode
|
||||
;;
|
||||
config)
|
||||
_bw_config
|
||||
;;
|
||||
update)
|
||||
_bw_update
|
||||
;;
|
||||
completion)
|
||||
_bw_completion
|
||||
;;
|
||||
status)
|
||||
_bw_status
|
||||
;;
|
||||
serve)
|
||||
_bw_serve
|
||||
;;
|
||||
list)
|
||||
_bw_list
|
||||
;;
|
||||
get)
|
||||
_bw_get
|
||||
;;
|
||||
create)
|
||||
_bw_create
|
||||
;;
|
||||
edit)
|
||||
_bw_edit
|
||||
;;
|
||||
delete)
|
||||
_bw_delete
|
||||
;;
|
||||
restore)
|
||||
_bw_restore
|
||||
;;
|
||||
move)
|
||||
_bw_move
|
||||
;;
|
||||
confirm)
|
||||
_bw_confirm
|
||||
;;
|
||||
import)
|
||||
_bw_import
|
||||
;;
|
||||
export)
|
||||
_bw_export
|
||||
;;
|
||||
share)
|
||||
_bw_share
|
||||
;;
|
||||
send)
|
||||
_bw_send
|
||||
;;
|
||||
receive)
|
||||
_bw_receive
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function _bw_login {
|
||||
_arguments -C \
|
||||
'--method[Two-step login method.]' \
|
||||
'--code[Two-step login code.]' \
|
||||
'--sso[Log in with Single-Sign On.]' \
|
||||
'--apikey[Log in with an Api Key.]' \
|
||||
'--passwordenv[Environment variable storing your password]' \
|
||||
'--passwordfile[Path to a file containing your password as its first line]' \
|
||||
'--check[Check login status.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_logout {
|
||||
|
||||
}
|
||||
|
||||
function _bw_lock {
|
||||
|
||||
}
|
||||
|
||||
function _bw_unlock {
|
||||
_arguments -C \
|
||||
'--check[Check lock status.]' \
|
||||
'--passwordenv[Environment variable storing your password]' \
|
||||
'--passwordfile[Path to a file containing your password as its first line]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_sync {
|
||||
_arguments -C \
|
||||
'(-f --force)'{-f,--force}'[Force a full sync.]' \
|
||||
'--last[Get the last sync date.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_generate {
|
||||
_arguments -C \
|
||||
'(-u --uppercase)'{-u,--uppercase}'[Include uppercase characters.]' \
|
||||
'(-l --lowercase)'{-l,--lowercase}'[Include lowercase characters.]' \
|
||||
'(-n --number)'{-n,--number}'[Include numeric characters.]' \
|
||||
'(-s --special)'{-s,--special}'[Include special characters.]' \
|
||||
'(-p --passphrase)'{-p,--passphrase}'[Generate a passphrase.]' \
|
||||
'--length[Length of the password.]' \
|
||||
'--words[Number of words.]' \
|
||||
'--separator[Word separator.]' \
|
||||
'(-c --capitalize)'{-c,--capitalize}'[Title case passphrase.]' \
|
||||
'--includeNumber[Passphrase includes number.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_encode {
|
||||
|
||||
}
|
||||
|
||||
function _bw_config {
|
||||
_arguments -C \
|
||||
'--web-vault[Provides a custom web vault URL that differs from the base URL.]' \
|
||||
'--api[Provides a custom API URL that differs from the base URL.]' \
|
||||
'--identity[Provides a custom identity URL that differs from the base URL.]' \
|
||||
'--icons[Provides a custom icons service URL that differs from the base URL.]' \
|
||||
'--notifications[Provides a custom notifications URL that differs from the base URL.]' \
|
||||
'--events[Provides a custom events URL that differs from the base URL.]' \
|
||||
'--key-connector[Provides the URL for your Key Connector server.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_update {
|
||||
|
||||
}
|
||||
|
||||
function _bw_completion {
|
||||
_arguments -C \
|
||||
'--shell[Shell to generate completions for.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_status {
|
||||
|
||||
}
|
||||
|
||||
function _bw_serve {
|
||||
_arguments -C \
|
||||
'--hostname[The hostname to bind your API webserver to.]' \
|
||||
'--port[The port to run your API webserver on.]' \
|
||||
'--disable-origin-protection[If set, allows requests with origin header. Warning, this option exists for backwards compatibility reasons and exposes your environment to known CSRF attacks.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_list {
|
||||
_arguments -C \
|
||||
'--search[Perform a search on the listed objects.]' \
|
||||
'--url[Filter items of type login with a url-match search.]' \
|
||||
'--folderid[Filter items by folder id.]' \
|
||||
'--collectionid[Filter items by collection id.]' \
|
||||
'--organizationid[Filter items or collections by organization id.]' \
|
||||
'--trash[Filter items that are deleted and in the trash.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_get {
|
||||
_arguments -C \
|
||||
'--itemid[Attachment'"'"'s item id.]' \
|
||||
'--output[Output directory or filename for attachment.]' \
|
||||
'--organizationid[Organization id for an organization object.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_create {
|
||||
_arguments -C \
|
||||
'--file[Path to file for attachment.]' \
|
||||
'--itemid[Attachment'"'"'s item id.]' \
|
||||
'--organizationid[Organization id for an organization object.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_edit {
|
||||
_arguments -C \
|
||||
'--organizationid[Organization id for an organization object.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_delete {
|
||||
_arguments -C \
|
||||
'--itemid[Attachment'"'"'s item id.]' \
|
||||
'--organizationid[Organization id for an organization object.]' \
|
||||
'(-p --permanent)'{-p,--permanent}'[Permanently deletes the item instead of soft-deleting it (item only).]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_restore {
|
||||
|
||||
}
|
||||
|
||||
function _bw_move {
|
||||
|
||||
}
|
||||
|
||||
function _bw_confirm {
|
||||
_arguments -C \
|
||||
'--organizationid[Organization id for an organization object.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_import {
|
||||
_arguments -C \
|
||||
'--formats[List formats]' \
|
||||
'--organizationid[ID of the organization to import to.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_export {
|
||||
_arguments -C \
|
||||
'--output[Output directory or filename.]' \
|
||||
'--format[Export file format.]' \
|
||||
'--password[Use password to encrypt instead of your Bitwarden account encryption key. Only applies to the encrypted_json format.]' \
|
||||
'--organizationid[Organization id for an organization.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_share {
|
||||
|
||||
}
|
||||
|
||||
function _bw_send {
|
||||
local -a commands
|
||||
|
||||
_arguments -C \
|
||||
'(-f --file)'{-f,--file}'[Specifies that <data> is a filepath]' \
|
||||
'(-d --deleteInDays)'{-d,--deleteInDays}'[The number of days in the future to set deletion date, defaults to 7]' \
|
||||
'(-a --maxAccessCount)'{-a,--maxAccessCount}'[The amount of max possible accesses.]' \
|
||||
'--hidden[Hide <data> in web by default. Valid only if --file is not set.]' \
|
||||
'(-n --name)'{-n,--name}'[The name of the Send. Defaults to a guid for text Sends and the filename for files.]' \
|
||||
'--notes[Notes to add to the Send.]' \
|
||||
'--fullObject[Specifies that the full Send object should be returned rather than just the access url.]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"1: :->cmnds" \
|
||||
"*::arg:->args"
|
||||
|
||||
case $state in
|
||||
cmnds)
|
||||
commands=(
|
||||
"list:List all the Sends owned by you"
|
||||
"template:Get json templates for send objects"
|
||||
"get:Get Sends owned by you."
|
||||
"receive:Access a Bitwarden Send from a url"
|
||||
"create:create a Send"
|
||||
"edit:edit a Send"
|
||||
"remove-password:removes the saved password from a Send."
|
||||
"delete:delete a Send"
|
||||
)
|
||||
_describe "command" commands
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$words[1]" in
|
||||
list)
|
||||
_bw_send_list
|
||||
;;
|
||||
template)
|
||||
_bw_send_template
|
||||
;;
|
||||
get)
|
||||
_bw_send_get
|
||||
;;
|
||||
receive)
|
||||
_bw_send_receive
|
||||
;;
|
||||
create)
|
||||
_bw_send_create
|
||||
;;
|
||||
edit)
|
||||
_bw_send_edit
|
||||
;;
|
||||
remove-password)
|
||||
_bw_send_remove-password
|
||||
;;
|
||||
delete)
|
||||
_bw_send_delete
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function _bw_send_list {
|
||||
|
||||
}
|
||||
|
||||
function _bw_send_template {
|
||||
|
||||
}
|
||||
|
||||
function _bw_send_get {
|
||||
_arguments -C \
|
||||
'--output[Output directory or filename for attachment.]' \
|
||||
'--text[Specifies to return the text content of a Send]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_send_receive {
|
||||
_arguments -C \
|
||||
'--password[Password needed to access the Send.]' \
|
||||
'--passwordenv[Environment variable storing the Send'"'"'s password]' \
|
||||
'--passwordfile[Path to a file containing the Sends password as its first line]' \
|
||||
'--obj[Return the Send'"'"'s json object rather than the Send's content]' \
|
||||
'--output[Specify a file path to save a File-type Send to]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_send_create {
|
||||
_arguments -C \
|
||||
'--file[file to Send. Can also be specified in parent'"'"'s JSON.]' \
|
||||
'--text[text to Send. Can also be specified in parent'"'"'s JSON.]' \
|
||||
'--hidden[text hidden flag. Valid only with the --text option.]' \
|
||||
'--password[optional password to access this Send. Can also be specified in JSON]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_send_edit {
|
||||
_arguments -C \
|
||||
'--itemid[Overrides the itemId provided in [encodedJson]]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
||||
|
||||
function _bw_send_remove-password {
|
||||
|
||||
}
|
||||
|
||||
function _bw_send_delete {
|
||||
|
||||
}
|
||||
|
||||
function _bw_receive {
|
||||
_arguments -C \
|
||||
'--password[Password needed to access the Send.]' \
|
||||
'--passwordenv[Environment variable storing the Send'"'"'s password]' \
|
||||
'--passwordfile[Path to a file containing the Sends password as its first line]' \
|
||||
'--obj[Return the Send'"'"'s json object rather than the Send's content]' \
|
||||
'--output[Specify a file path to save a File-type Send to]' \
|
||||
'(-h --help)'{-h,--help}'[output usage information]' \
|
||||
"*::arg:->args"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
# Exit if mc is active
|
||||
[[ -v MC_SID ]] && return
|
||||
|
||||
# source settings
|
||||
source ~/dotfiles/zsh/exports.zsh
|
||||
source ~/dotfiles/zsh/variables.zsh
|
||||
source ~/dotfiles/zsh/keybindings.zsh
|
||||
source ~/dotfiles/zsh/history.zsh
|
||||
source ~/dotfiles/zsh/aliases.zsh
|
||||
source ~/dotfiles/zsh/completions.zsh
|
||||
source ~/dotfiles/zsh/zplug.zsh
|
||||
source ~/dotfiles/zsh/neofetch.zsh
|
||||
source ~/dotfiles/zsh/ssh.zsh
|
||||
source ~/dotfiles/zsh/tasks.zsh
|
||||
source ~/dotfiles/zsh/tmux.zsh
|
||||
|
||||
# always execute powerlevel last to avoid problems with instant prompt
|
||||
source ~/dotfiles/zsh/powerlevel.zsh
|
Loading…
Reference in New Issue