Skip to content

Commit

Permalink
some lazy changes
Browse files Browse the repository at this point in the history
Signed-off-by: Egor Kovetskiy <[email protected]>
  • Loading branch information
kovetskiy committed Oct 23, 2022
1 parent 6066d29 commit 708ae7d
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 25 deletions.
1 change: 1 addition & 0 deletions .Xresources.dark
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 17 additions & 7 deletions .config/i3/config.base
Original file line number Diff line number Diff line change
@@ -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 "<span font='Iosevka 11' color='white'>%title</span>"

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

Expand Down Expand Up @@ -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" {
Expand Down Expand Up @@ -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
3 changes: 0 additions & 3 deletions .xinitrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -1641,3 +1641,5 @@ if [[ "$HISTFILE_OVERRIDE" ]]; then
fi

setopt share_history

source /usr/share/nvm/init-nvm.sh
3 changes: 2 additions & 1 deletion bin/brb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

exec discord-status idle "brb lunch" "🍕"
text="${1:-lunch}"
exec discord-status idle "brb $text" "🍕"
19 changes: 11 additions & 8 deletions bin/chrome-todoist → bin/chrome-kiosk
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
4 changes: 2 additions & 2 deletions bin/datename
Original file line number Diff line number Diff line change
@@ -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'
4 changes: 4 additions & 0 deletions bin/environment-variables
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions bin/putsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

cp -v $(readlink -f ~/s.png) "$1"
3 changes: 1 addition & 2 deletions bin/quickaction
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

:modal() {
modal-template --no-description -- -lines 5
}
Expand All @@ -17,6 +15,7 @@ set -euo pipefail
fi

command="$(jq -r . < "$db_file" | :modal)"
echo "$command"
eval "$command"
exit 0
}
Expand Down
29 changes: 29 additions & 0 deletions bin/wg-ui
Original file line number Diff line number Diff line change
@@ -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 "${@}"
1 change: 1 addition & 0 deletions vim.d/01-plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Plug 'mfussenegger/nvim-dap'
Plug 'sonph/onehalf', { 'rtp': 'vim' }

Plug 'sebdah/vim-delve'
Plug 'towolf/vim-helm'


call plug#end()
8 changes: 8 additions & 0 deletions vim.d/11-fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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 <silent> <c-t> :call _select_file()<CR>
"nnoremap <silent> <c-b> :call _select_buffer()<CR>
nnoremap <silent> <c-b> :call _select_window()<CR>
nnoremap <silent> <c-e><c-t> :call _select_file_cwd()<CR>
let g:grep_last_query = ""
Expand Down
8 changes: 7 additions & 1 deletion vim.d/62-langs-javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ let g:_python_plugins = expand('<sfile>: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 <silent><buffer> <c-s> :w<CR>:call _save_typescript()<CR>:w<CR>
nnoremap <silent><buffer> <c-p> :call CocAction('diagnosticFirst', ['warning', 'error'])<cr>
endfunc!

func! _setup_local_ts()
nnoremap <buffer> <silent> @l :call _search_wrappable()<CR>l:ArgWrap<CR>
nnoremap <silent><buffer> <c-p> :call _format_typescript()<CR>
nnoremap <silent><buffer> <c-s> :w<CR>:call _save_typescript()<CR>:w<CR>
Expand Down
1 change: 0 additions & 1 deletion vim.d/63-langs-go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func! _setup_local_go()
nnoremap <buffer><silent> @h :call _chain_wrap(1)<CR>
nmap <buffer><silent> <C-Q> :call _goto_prev_func()<CR>
nmap <silent><buffer> <c-b> <ESC>
nmap <silent><buffer> <c-s> :w<CR>
nmap <silent><buffer> <c-p> :silent call synta#go#build()<CR>
nmap <silent><buffer> <leader><c-p> :call synta#quickfix#next()<CR>
Expand Down

0 comments on commit 708ae7d

Please sign in to comment.