diff --git a/.Xresources.dark b/.Xresources.dark index 2614cbe1..c4226248 100644 --- a/.Xresources.dark +++ b/.Xresources.dark @@ -21,3 +21,4 @@ rofi.color-normal: #1c1c1c, #d8d8d8, #1c1c1c, #af8700, #ffffff rofi.color-active: #1c1c1c, #d8d8d8, #1c1c1c, #af8700, #ffffff rofi.color-urgent: #1c1c1c, #d8d8d8, #1c1c1c, #af8700, #ffffff rofi.color-window: #1c1c1c, #d8d8d8 +rify.font: Iosevka Nerd Font 12 diff --git a/.config/i3/config.base b/.config/i3/config.base index b1de47d4..81238777 100644 --- a/.config/i3/config.base +++ b/.config/i3/config.base @@ -1,10 +1,12 @@ font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -font pango:Monaco 1 +font pango:Monaco 12 + +for_window [class="^.*"] title_format "%title" -gaps inner 2 -#gaps outer 2 smart_gaps on -hide_edge_borders both +hide_edge_borders smart_no_gaps + +gaps inner 10 new_window 1pixel @@ -64,6 +66,7 @@ bindcode $alt+Shift+40 move container to workspace d bindsym $alt+t split horizontal bindsym $alt+b split vertical +bindsym $win+k layout stacked bindsym $alt+Ctrl+r mode "resize" mode "resize" { @@ -110,6 +113,13 @@ for_window [class="Skype"] floating enable for_window [class="Upwork"] floating enable for_window [class=".*"] border pixel 1 -client.focused #D22B2B #D22B2B #D22B2B #D22B2B -client.focused_inactive #424242 #424242 #424242 #424242 -client.unfocused #424242 #424242 #424242 #424242 +#client.focused #D22B2B #D22B2B #D22B2B #D22B2B +#client.focused_inactive #424242 #424242 #424242 #424242 +#client.unfocused #424242 #424242 #424242 #424242 +client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 +client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A +client.unfocused #424242 #424242 #BFBFBF #424242 #424242 +client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 +client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 + +client.background #F8F8F2 diff --git a/.xinitrc b/.xinitrc index cdc137a6..ea6014be 100755 --- a/.xinitrc +++ b/.xinitrc @@ -19,7 +19,4 @@ systemctl --user import-environment GOPATH #eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) #export SSH_AUTH_SOCK -echo "i3 started" - exec i3 -#exec leftwm diff --git a/.zshrc b/.zshrc index 0be2c761..aac05153 100644 --- a/.zshrc +++ b/.zshrc @@ -1641,3 +1641,5 @@ if [[ "$HISTFILE_OVERRIDE" ]]; then fi setopt share_history + +source /usr/share/nvm/init-nvm.sh diff --git a/bin/brb b/bin/brb index 5cd8897b..401244bb 100755 --- a/bin/brb +++ b/bin/brb @@ -1,3 +1,4 @@ #!/bin/bash -exec discord-status idle "brb lunch" "🍕" +text="${1:-lunch}" +exec discord-status idle "brb $text" "🍕" diff --git a/bin/chrome-todoist b/bin/chrome-kiosk similarity index 60% rename from bin/chrome-todoist rename to bin/chrome-kiosk index b19cbc64..b16de22d 100755 --- a/bin/chrome-todoist +++ b/bin/chrome-kiosk @@ -1,7 +1,9 @@ #!/bin/bash -xd_class="en.todoist.com" -ws=d +name="${1}" +window_class="${2}" +url="${3}" +ws="${4}" :current() { i3-msg -t get_workspaces \ @@ -13,26 +15,27 @@ current=$(:current) cache=/var/run/user/$UID/alttab.todoist -window=$(xdotool search --classname "$xd_class") +window=$(xdotool search --classname "$window_class") if [[ ! "$window" ]]; then if [[ "$current" != "$ws" ]]; then i3-msg "workspace $ws" echo -n "$current" > $cache fi - chromium --user-data-dir ~/.config/chrome-todoist --kiosk --app=https://en.todoist.com/ & - echo $! > $pidfile + chromium --kiosk --app="${url}" & + #pid=$! + #echo "$pid" > "$pidfile" exit 0 fi if [[ "$current" == "$ws" ]]; then - if [[ -f $cache ]]; then - prev=$(cat $cache) + if [[ -f "$cache" ]]; then + prev=$(cat "$cache") i3-msg "workspace $prev" fi else echo -n "$current" > $cache i3-msg "workspace $ws" - xdotool search --onlyvisible --classname "$xd_class" windowfocus + xdotool search --onlyvisible --classname "$window_class" windowfocus fi diff --git a/bin/datename b/bin/datename index 014aeb22..20880c69 100755 --- a/bin/datename +++ b/bin/datename @@ -1,6 +1,6 @@ #!/bin/bash if [[ "$1" == "-d" ]]; then - exec date +'%d-%m-%Y' + exec date +'%Y-%m-%d' fi -exec date +'%d-%m-%Y_%T' +exec date +'%Y-%m-%dT%TZ' diff --git a/bin/environment-variables b/bin/environment-variables index 29380669..6abf772e 100755 --- a/bin/environment-variables +++ b/bin/environment-variables @@ -59,5 +59,9 @@ export PATH=${BIN//$'\n'/:} systemctl --user import-environment PATH systemctl --user import-environment GOPATH +#for env in ~/.guts/env/*; do +# source "$env" +#done + unset BIN unset SUDO_COMMAND diff --git a/bin/putsc b/bin/putsc new file mode 100755 index 00000000..d5d25241 --- /dev/null +++ b/bin/putsc @@ -0,0 +1,3 @@ +#!/bin/bash + +cp -v $(readlink -f ~/s.png) "$1" diff --git a/bin/quickaction b/bin/quickaction index 5af5e032..185d3dbb 100755 --- a/bin/quickaction +++ b/bin/quickaction @@ -1,7 +1,5 @@ #!/bin/bash -set -euo pipefail - :modal() { modal-template --no-description -- -lines 5 } @@ -17,6 +15,7 @@ set -euo pipefail fi command="$(jq -r . < "$db_file" | :modal)" + echo "$command" eval "$command" exit 0 } diff --git a/bin/wg-ui b/bin/wg-ui new file mode 100755 index 00000000..05617468 --- /dev/null +++ b/bin/wg-ui @@ -0,0 +1,29 @@ +#!/bin/bash + +:peers() { + sudo wg show all peers | awk '{print $1}' +} + +:join() { + local glue="$1" + shift + + cat | paste -sd "@" - | sed "s#@#$glue#g" +} + +:main() { + local mode="$1" + if [[ "$1" == "status" ]]; then + peers="$(:peers)" + if [[ ! "$peers" ]]; then + echo " insecure" + else + echo " $(:join ' ' <<< "$peers")" + fi + else + shift + :ui "${@}" + fi +} + +:main "${@}" diff --git a/vim.d/01-plugins.vim b/vim.d/01-plugins.vim index 3dfe3b52..beed99d7 100644 --- a/vim.d/01-plugins.vim +++ b/vim.d/01-plugins.vim @@ -143,6 +143,7 @@ Plug 'mfussenegger/nvim-dap' Plug 'sonph/onehalf', { 'rtp': 'vim' } Plug 'sebdah/vim-delve' +Plug 'towolf/vim-helm' call plug#end() diff --git a/vim.d/11-fzf.vim b/vim.d/11-fzf.vim index 17381f9e..b7b723de 100644 --- a/vim.d/11-fzf.vim +++ b/vim.d/11-fzf.vim @@ -29,7 +29,15 @@ func! _select_buffer() call fzf#vim#buffers({'options': '--sort --no-exact --tiebreak=index'}) endfunc! +func! _select_window() + call _snippets_stop() + call fzf#vim#windows({'options': '--sort --no-exact --tiebreak=index'}) +endfunc! + nnoremap :call _select_file() +"nnoremap :call _select_buffer() +nnoremap :call _select_window() + nnoremap :call _select_file_cwd() let g:grep_last_query = "" diff --git a/vim.d/62-langs-javascript.vim b/vim.d/62-langs-javascript.vim index 11e4d5f1..ada3fa86 100644 --- a/vim.d/62-langs-javascript.vim +++ b/vim.d/62-langs-javascript.vim @@ -2,11 +2,17 @@ let g:_python_plugins = expand(':p:h') . '/pythonx/' augroup _code_typescript au! - au BufRead,BufNewFile *.ts,*.tsx,*.jsx call _setup_local_js() + au BufRead,BufNewFile *.ts,*.tsx,*.jsx call _setup_local_ts() + au BufRead,BufNewFile *.js call _setup_local_js() au BufNewFile,BufRead *.json set filetype=json augroup end func! _setup_local_js() + nnoremap :w:call _save_typescript():w + nnoremap :call CocAction('diagnosticFirst', ['warning', 'error']) +endfunc! + +func! _setup_local_ts() nnoremap @l :call _search_wrappable()l:ArgWrap nnoremap :call _format_typescript() nnoremap :w:call _save_typescript():w diff --git a/vim.d/63-langs-go.vim b/vim.d/63-langs-go.vim index cfe17edb..1b184a34 100644 --- a/vim.d/63-langs-go.vim +++ b/vim.d/63-langs-go.vim @@ -29,7 +29,6 @@ func! _setup_local_go() nnoremap @h :call _chain_wrap(1) nmap :call _goto_prev_func() - nmap nmap :w nmap :silent call synta#go#build() nmap :call synta#quickfix#next()