mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 03:33:03 +03:00
Upd
This commit is contained in:
parent
44f15a73a3
commit
ab4aadffa7
8 changed files with 71 additions and 69 deletions
6
bin/i3blocks/ip
Executable file
6
bin/i3blocks/ip
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
|
||||
if [[ -z $ip || $ip == *"timed out"* ]]; then
|
||||
exit
|
||||
fi
|
||||
echo $ip
|
||||
9
bin/i3blocks/ipstack
Executable file
9
bin/i3blocks/ipstack
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
ip=$(dig +short +timeout=1 myip.opendns.com @resolver1.opendns.com)
|
||||
if [[ -z $ip || $ip == *"timed out"* ]]; then
|
||||
echo '??'
|
||||
exit
|
||||
fi
|
||||
ip_info=$(curl -s http://api.ipstack.com/${ip}?access_key=${API_KEY})
|
||||
emoji=$(echo $ip_info | jq -r '.location.country_flag_emoji')
|
||||
echo "$emoji $ip"
|
||||
|
|
@ -1,8 +1,18 @@
|
|||
shopt -s autocd
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
export PATH="$HOME/bin/scripts:$PATH"
|
||||
fi
|
||||
|
||||
source /usr/share/fzf/completion.bash
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
|
||||
export HISTCONTROL=ignoredups:erasedups
|
||||
shopt -s histappend
|
||||
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
||||
HISTSIZE=
|
||||
HISTFILESIZE=
|
||||
|
||||
export MANPATH="/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH"
|
||||
export INFOPATH="/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH"
|
||||
export PATH="/usr/local/texlive/2020/bin/x86_64-linux:$PATH"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<string>sans-serif</string>
|
||||
</test>
|
||||
<edit binding="strong" name="family" mode="assign">
|
||||
<string>Ubuntu</string>
|
||||
<string>DejaVu Sans</string>
|
||||
</edit>
|
||||
</match>
|
||||
<!--alias>
|
||||
|
|
@ -67,7 +67,7 @@ set $w1 "1 🚀"
|
|||
set $w2 "2 🌍"
|
||||
set $w3 "3 💬"
|
||||
set $w4 "4 ⚙️"
|
||||
set $w7 "7 📞"
|
||||
set $w7 "7 🛰️"
|
||||
set $w8 "8 📝"
|
||||
set $w9 "9 🎵"
|
||||
set $w10 "Z 📦"
|
||||
|
|
@ -102,6 +102,7 @@ bindsym $mod+period workspace next
|
|||
assign [class="qutebrowser"] $w2
|
||||
assign [class="VK"] $w3
|
||||
assign [class="Slack"] $w3
|
||||
assign [class="TelegramDesktop"] $w3
|
||||
assign [class="Postman"] $w4
|
||||
assign [class="Chromium-browse"] $w4
|
||||
assign [class="chromium"] $w4
|
||||
|
|
@ -225,6 +226,7 @@ bindsym $mod+x mode "dmenu"
|
|||
mode "dmenu" {
|
||||
bindsym d exec i3-dmenu-desktop --dmenu="dmenu -l 10"; mode default
|
||||
bindsym p exec dmenu_run -l 10; mode default
|
||||
bindsym m exec dmenu-man; mode default
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
|
|
@ -237,6 +239,7 @@ mode "apps" {
|
|||
bindsym v exec vk-messenger; mode default
|
||||
bindsym s exec slack; mode default;
|
||||
bindsym m exec "i3-sensible-terminal -e ncmpcpp"; mode default
|
||||
bindsym e exec mailspring; mode default
|
||||
}
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ color=#c3e88d
|
|||
label=
|
||||
UNIT=KB
|
||||
PRINTF_COMMAND=printf "%.0f/%.0f\n", rx, wx;
|
||||
separator=false
|
||||
|
||||
[ipstack]
|
||||
API_KEY=8948d12cd68a3b7ac60d405ed4118b43
|
||||
interval=1200
|
||||
|
||||
[weather]
|
||||
LOCATION="Saint-Petersburg"
|
||||
|
|
|
|||
|
|
@ -9,12 +9,16 @@ config.bind('gT', 'tab-prev')
|
|||
config.bind('gN', 'tab-close')
|
||||
config.bind('gn', 'tab-clone')
|
||||
|
||||
c.fonts.default_size = '10pt'
|
||||
c.fonts.default_family = 'monospace'
|
||||
c.fonts.web.size.default_fixed = 13
|
||||
|
||||
# config.unbind('T', mode='normal')
|
||||
# config.bind('T', 'set-cmd-text -s :buffer')
|
||||
|
||||
config.bind('\\t', 'set-cmd-text -s :buffer')
|
||||
config.bind('\\b', 'set-cmd-text -s :bookmark-load')
|
||||
config.bind('\\ww', ':open http://localhost:9000')
|
||||
config.bind('\\ww', ':open file:///home/pavel/MEGAsync/Sync/vimwiki-html/index.html')
|
||||
|
||||
# config.unbind('<Escape>', mode='insert')
|
||||
config.bind('<Shift-Escape>', 'fake-key <Escape>', mode='insert')
|
||||
|
|
|
|||
|
|
@ -77,16 +77,12 @@ fileviewer *.pdf pdftotext -nopgbrk %c -
|
|||
" PostScript
|
||||
filextype *.ps,*.eps,*.ps.gz
|
||||
\ {View in zathura}
|
||||
\ zathura %f,
|
||||
\ {View in gv}
|
||||
\ gv %c %i &,
|
||||
\ zathura %f
|
||||
|
||||
" Djvu
|
||||
filextype *.djvu
|
||||
\ {View in zathura}
|
||||
\ zathura %f,
|
||||
\ {View in apvlv}
|
||||
\ apvlv %f,
|
||||
\ zathura %f
|
||||
|
||||
" Audio
|
||||
filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus
|
||||
|
|
@ -107,6 +103,7 @@ filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|||
\ dragon %f:p,
|
||||
\ {View using mplayer}
|
||||
\ mplayer %f,
|
||||
|
||||
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||
\*.as[fx]
|
||||
|
|
@ -114,12 +111,10 @@ fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|||
|
||||
" Web
|
||||
filextype *.html,*.htm
|
||||
\ {Open with dwb}
|
||||
\ dwb %f %i &,
|
||||
\ {Open with firefox}
|
||||
\ firefox %f &,
|
||||
\ {Open with uzbl}
|
||||
\ uzbl-browser %f %i &,
|
||||
\ {Open with qutebrowser}
|
||||
\ qutebrowser %f %i &,
|
||||
\ {Open with chromium}
|
||||
\ chromium %f &
|
||||
filetype *.html,*.htm links, lynx
|
||||
|
||||
" Object
|
||||
|
|
@ -131,24 +126,18 @@ fileviewer *.[1-8] man ./%c | col -b
|
|||
|
||||
" Images
|
||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||
\ {View in sxiv}
|
||||
\ sxiv %f,
|
||||
\ {View in gpicview}
|
||||
\ gpicview %c,
|
||||
\ {View in shotwell}
|
||||
\ shotwell,
|
||||
\ {View in feh}
|
||||
\ feh %f,
|
||||
\ {View in viewnior}
|
||||
\ viewnior %c,
|
||||
|
||||
fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
||||
\ identify %f
|
||||
|
||||
" OpenRaster
|
||||
filextype *.ora
|
||||
\ {Edit in MyPaint}
|
||||
\ mypaint %f,
|
||||
|
||||
" Mindmap
|
||||
filextype *.vym
|
||||
\ {Open with VYM}
|
||||
\ vym %f &,
|
||||
" CSV
|
||||
filetype *.csv
|
||||
\ {Open with SC-IM}
|
||||
\ sc-im %f
|
||||
|
||||
" MD5
|
||||
filetype *.md5
|
||||
|
|
@ -176,8 +165,15 @@ filetype *.asc
|
|||
\ !!gpg --verify %c,
|
||||
|
||||
" Torrent
|
||||
filetype *.torrent ktorrent %f &
|
||||
fileviewer *.torrent dumptorrent -v %c
|
||||
filextype *.torrent qbittorrent %f &
|
||||
|
||||
" View archives with dtrx
|
||||
fileviewer *.7z,*.tgz,*.tar.gz,*.tar.bz2,*.tbz2,*.tar.txz,*.txz,*.tar,*zip dtrx -t %f
|
||||
filetype *.7z,*.tgz,*.tar.gz,*.tar.bz2,*.tbz2,*.tar.txz,*.txz,*.tar,*zip
|
||||
\ {View contents with dtrx}
|
||||
\ dtrx --table %f | less,
|
||||
\ {Extract with dtrx}
|
||||
\ dtrx %f
|
||||
|
||||
" FuseZipMount
|
||||
filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
|
||||
|
|
@ -187,51 +183,26 @@ filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg
|
|||
\ zip -sf %c | less,
|
||||
\ {Extract here}
|
||||
\ tar -xf %c,
|
||||
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
|
||||
|
||||
" ArchiveMount
|
||||
filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz
|
||||
\ {Mount with archivemount}
|
||||
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
||||
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
||||
fileviewer *.tar.txz,*.txz xz --list %c
|
||||
fileviewer *.tar tar -tf %c
|
||||
|
||||
" Rar2FsMount and rar archives
|
||||
filetype *.rar
|
||||
\ {Mount with rar2fs}
|
||||
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.rar unrar v %c
|
||||
|
||||
" IsoMount
|
||||
filetype *.iso
|
||||
\ {Mount with fuseiso}
|
||||
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
||||
|
||||
" SshMount
|
||||
filetype *.ssh
|
||||
\ {Mount with sshfs}
|
||||
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||
|
||||
" FtpMount
|
||||
filetype *.ftp
|
||||
\ {Mount with curlftpfs}
|
||||
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||
|
||||
" Fuse7z and 7z archives
|
||||
filetype *.7z
|
||||
\ {Mount with fuse-7z}
|
||||
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
||||
fileviewer *.7z 7z l %c
|
||||
|
||||
" Office files
|
||||
filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f &
|
||||
fileviewer *.doc catdoc %c
|
||||
fileviewer *.docx docx2txt.pl %f -
|
||||
|
||||
" TuDu files
|
||||
filetype *.tudu tudu -f %c
|
||||
|
||||
" Qt projects
|
||||
filextype *.pro qtcreator %f &
|
||||
|
|
@ -244,6 +215,11 @@ filextype */
|
|||
" Syntax highlighting in preview
|
||||
fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
||||
|
||||
filetype *
|
||||
\ {Open with xdg-open} xdg-open %f,
|
||||
\ {Open with neovim} nvim %f,
|
||||
\ {Open with vim} vim %f
|
||||
|
||||
" Displaying pictures in terminal
|
||||
" fileviewer *.jpg,*.png shellpic %c
|
||||
|
||||
|
|
@ -265,11 +241,6 @@ nnoremap S :sort<cr>
|
|||
nnoremap w :view<cr>
|
||||
vnoremap w :view<cr>gv
|
||||
|
||||
nnoremap o :!xdg-open %c<CR>&
|
||||
|
||||
" Open file in the background using its default program
|
||||
nnoremap gb :file &<cr>l
|
||||
|
||||
" Tabs
|
||||
nnoremap gn :tabnew<CR>
|
||||
nnoremap gN :tabclose<CR>
|
||||
|
|
@ -322,13 +293,7 @@ nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
|||
nnoremap ,w :set wrap!<cr>
|
||||
nnoremap Md :mkdir<space>
|
||||
|
||||
" Example of standard two-panel file managers mappings
|
||||
nnoremap <f3> :!less %f<cr>
|
||||
nnoremap <f4> :edit<cr>
|
||||
nnoremap <f5> :copy<cr>
|
||||
nnoremap <f6> :move<cr>
|
||||
nnoremap <f7> :mkdir<space>
|
||||
nnoremap <f8> :delete<cr>
|
||||
nnoremap o :file<CR>
|
||||
|
||||
source ~/.config/vifm/vifm_devicons/SETUP
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue