dgy
/
hexagons
Archived
1
0
Fork 0

whid para esconder las ventanas, que raro que no lo habia agregado. mantenimiento de cosas varias

This commit is contained in:
deadguy 2020-03-11 16:16:16 -03:00
parent 5895b69bae
commit 0ec882fa3c
Signed by: dgy
GPG Key ID: 37CA55B52CF63730
18 changed files with 332 additions and 260 deletions

View File

@ -1,6 +1,7 @@
{
"coc.preferences.currentFunctionSymbolAutoUpdate": true,
"coc.preferences.extensionUpdateCheck": "never",
"coc.preferences.colorSupport": true,
"diagnostic.displayByAle": true,
"diagnostic.refreshOnInsertMode": true,
"diagnostic.refreshAfterSave": true,

View File

@ -1,3 +1,5 @@
setlocal colorcolumn=79
augroup pystuff
autocmd!
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton

View File

@ -31,7 +31,6 @@ set clipboard^=unnamedplus " system clipboard (requires +clipboard)
set fileencoding=utf-8 " The encoding written to file.
set shell=/bin/zsh " Setting shell to zsh
set number " Line numbers on
set relativenumber " For easier line jumps
set noshowmode " Always hide mode
set showtabline=2 " Always Show tabline
set pumheight=12 " Completion window max size
@ -525,6 +524,12 @@ nnoremap <leader>pu :PlugUpdate<CR>
nnoremap ñ ;
nnoremap Ñ ,
" Rearrange Splits
nnoremap <silent> <leader> <Left> <C-W>H
nnoremap <silent> <leader> <Right> <C-w>L
nnoremap <silent> <leader> <Up> <C-W>K
nnoremap <silent> <leader> <Down> <C-W>J
" Resize splits
nnoremap <silent> <Left> :vertical resize -2<CR>
nnoremap <silent> <Right> :vertical resize +2<CR>
@ -555,8 +560,11 @@ nnoremap <silent> <leader>Q :qa!<CR>
cnoremap jk <C-c>
" Fast beginning and end of document
nnoremap ¿ G
nnoremap <Bar> gg
nnoremap ¿ G
" Fast message checking
nnoremap <silent> <leader>m :messsages<CR>
" Splits
nnoremap <silent> <leader>T :call LaunchTerminal()<CR>

View File

@ -3,234 +3,237 @@
# These glyphs, and the mapping of file extensions to glyphs
# has been copied from the vimscript code that is present in
# https://github.com/ryanoasis/vim-devicons
import re;
import os;
import os
import re
# all those glyphs will show as weird squares if you don't have the correct patched font
# all those glyphs will show as weird squares
# if you don't have the correct patched font
# My advice is to use NerdFonts which can be found here:
# https://github.com/ryanoasis/nerd-fonts
file_node_extensions = {
'7z' : '',
'ai' : '',
'apk' : '',
'avi' : '',
'bat' : '',
'bmp' : '',
'bz2' : '',
'c' : '',
'c++' : '',
'cab' : '',
'cbr' : '',
'cbz' : '',
'cc' : '',
'clj' : '',
'cljc' : '',
'cljs' : '',
'coffee' : '',
'conf' : '',
'cp' : '',
'cpio' : '',
'cpp' : '',
'css' : '',
'cxx' : '',
'd' : '',
'dart' : '',
'db' : '',
'deb' : '',
'diff' : '',
'dump' : '',
'edn' : '',
'ejs' : '',
'epub' : '',
'erl' : '',
'exe' : '',
'f#' : '',
'fish' : '',
'flac' : '',
'flv' : '',
'fs' : '',
'fsi' : '',
'fsscript' : '',
'fsx' : '',
'gem' : '',
'gif' : '',
'go' : '',
'gz' : '',
'gzip' : '',
'hbs' : '',
'hrl' : '',
'hs' : '',
'htm' : '',
'html' : '',
'ico' : '',
'ini' : '',
'java' : '',
'jl' : '',
'jpeg' : '',
'jpg' : '',
'js' : '',
'json' : '',
'jsx' : '',
'less' : '',
'lha' : '',
'lhs' : '',
'log' : '',
'lua' : '',
'lzh' : '',
'lzma' : '',
'm4a' : '',
'markdown' : '',
'md' : '',
'mkv' : '',
'ml' : 'λ',
'mli' : 'λ',
'mov' : '',
'mp3' : '',
'mp4' : '',
'mpeg' : '',
'mpg' : '',
'mustache' : '',
'ogg' : '',
'pdf' : '',
'php' : '',
'pl' : '',
'pm' : '',
'png' : '',
'psb' : '',
'psd' : '',
'py' : '',
'pyc' : '',
'pyd' : '',
'pyo' : '',
'rar' : '',
'rb' : '',
'rc' : '',
'rlib' : '',
'rpm' : '',
'rs' : '',
'rss' : '',
'scala' : '',
'scss' : '',
'sh' : '',
'slim' : '',
'sln' : '',
'sql' : '',
'styl' : '',
'suo' : '',
't' : '',
'tar' : '',
'tgz' : '',
'ts' : '',
'twig' : '',
'vim' : '',
'vimrc' : '',
'wav' : '',
'webm' : '',
'xml' : '',
'xul' : '',
'xz' : '',
'yml' : '',
'zip' : '',
'zsh' : '',
'xcf' : '',
'tex' : '',
'txt' : '',
'lock' : '',
'h' : '',
'o' : '',
'blend' : '',
'1' : '',
'jar' : '',
'desktop' : '',
'mk' : '',
'torrent' : '',
'added' : '',
'pem' : '',
'svg' : '',
'scd' : '',
'theme' : '',
'iso' : '',
'mid' : '',
'url' : '',
'part' : '',
'nfo' : '',
'pd' : '',
'ttf' : '',
'otf' : '',
'bdf' : '',
'pcf' : '',
'7z': '',
'ai': '',
'apk': '',
'avi': '',
'bat': '',
'bmp': '',
'bz2': '',
'c': '',
'c++': '',
'cab': '',
'cbr': '',
'cbz': '',
'cc': '',
'clj': '',
'cljc': '',
'cljs': '',
'coffee': '',
'conf': '',
'cp': '',
'cpio': '',
'cpp': '',
'css': '',
'cxx': '',
'd': '',
'dart': '',
'db': '',
'deb': '',
'diff': '',
'dump': '',
'edn': '',
'ejs': '',
'epub': '',
'erl': '',
'exe': '',
'f#': '',
'fish': '',
'flac': '',
'flv': '',
'fs': '',
'fsi': '',
'fsscript': '',
'fsx': '',
'gem': '',
'gif': '',
'go': '',
'gz': '',
'gzip': '',
'hbs': '',
'hrl': '',
'hs': '',
'htm': '',
'html': '',
'ico': '',
'ini': '',
'java': '',
'jl': '',
'jpeg': '',
'jpg': '',
'js': '',
'json': '',
'jsx': '',
'less': '',
'lha': '',
'lhs': '',
'log': '',
'lua': '',
'lzh': '',
'lzma': '',
'm4a': '',
'markdown': '',
'md': '',
'mkv': '',
'ml': 'λ',
'mli': 'λ',
'mov': '',
'mp3': '',
'mp4': '',
'mpeg': '',
'mpg': '',
'mustache': '',
'ogg': '',
'pdf': '',
'php': '',
'pl': '',
'pm': '',
'png': '',
'psb': '',
'psd': '',
'py': '',
'pyc': '',
'pyd': '',
'pyo': '',
'rar': '',
'rb': '',
'rc': '',
'rlib': '',
'rpm': '',
'rs': '',
'rss': '',
'scala': '',
'scss': '',
'sh': '',
'slim': '',
'sln': '',
'sql': '',
'styl': '',
'suo': '',
't': '',
'tar': '',
'tgz': '',
'ts': '',
'twig': '',
'vim': '',
'vimrc': '',
'wav': '',
'webm': '',
'xml': '',
'xul': '',
'xz': '',
'yml': '',
'zip': '',
'zsh': '',
'xcf': '',
'tex': '',
'txt': '',
'lock': '',
'h': '',
'o': '',
'blend': '',
'1': '',
'jar': '',
'desktop': '',
'mk': '',
'torrent': '',
'added': '',
'pem': '',
'svg': '',
'scd': '',
'theme': '',
'iso': '',
'mid': '',
'url': '',
'part': '',
'nfo': '',
'pd': '',
'ttf': '',
'otf': '',
'bdf': '',
'pcf': '',
}
dir_node_exact_matches = {
# English
'.git' : '',
'Desktop' : '',
'Documents' : '',
'Downloads' : '',
'Music' : '',
'Pictures' : '',
'Public' : '',
'Templates' : '',
'Videos' : '',
'mail' : '',
'.mail' : '',
'.cache' : '',
'.config' : '',
'trash' : '',
'Trash' : '',
'bin' : '',
'hexagons' : '',
# English
'.git': '',
'Desktop': '',
'Documents': '',
'Downloads': '',
'Music': '',
'Pictures': '',
'Public': '',
'Templates': '',
'Videos': '',
'mail': '',
'.mail': '',
'.cache': '',
'.config': '',
'trash': '',
'Trash': '',
'bin': '',
'hexagons': '',
}
file_node_exact_matches = {
'.Xdefaults' : '',
'.Xresources' : '',
'.bashprofile' : '',
'.zprofile' : '',
'.bashrc' : '',
'.zshrc' : '',
'.zshenv' : '',
'.dmrc' : '',
'.ds_store' : '',
'.fasd' : '',
'.gitconfig' : '',
'.gitignore' : '',
'.jack-settings' : '',
'.mime.types' : '',
'.nvidia-settings-rc' : '',
'.pam_environment' : '',
'.profile' : '',
'.recently-used' : '',
'.selected_editor' : '',
'.vimrc' : '',
'.xinputrc' : '',
'.xserverrc' : '',
'config' : '',
'dropbox' : '',
'exact-match-case-sensitive-1.txt' : 'X1',
'exact-match-case-sensitive-2' : 'X2',
'favicon.ico' : '',
'gruntfile.coffee' : '',
'gruntfile.js' : '',
'gruntfile.ls' : '',
'gulpfile.coffee' : '',
'gulpfile.js' : '',
'gulpfile.ls' : '',
'ini' : '',
'ledger' : '',
'license' : '',
'mimeapps.list' : '',
'node_modules' : '',
'procfile' : '',
'react.jsx' : '',
'user-dirs.dirs' : '',
'Makefile' : '',
'TODO' : '',
'LICENSE' : '',
'COPYING' : '',
'.Xdefaults': '',
'.Xresources': '',
'.bashprofile': '',
'.zprofile': '',
'.bashrc': '',
'.zshrc': '',
'.zshenv': '',
'.dmrc': '',
'.ds_store': '',
'.fasd': '',
'.gitconfig': '',
'.gitignore': '',
'.jack-settings': '',
'.mime.types': '',
'.nvidia-settings-rc': '',
'.pam_environment': '',
'.profile': '',
'.recently-used': '',
'.selected_editor': '',
'.vimrc': '',
'.xinputrc': '',
'.xserverrc': '',
'config': '',
'dropbox': '',
'exact-match-case-sensitive-1.txt': 'X1',
'exact-match-case-sensitive-2': 'X2',
'favicon.ico': '',
'gruntfile.coffee': '',
'gruntfile.js': '',
'gruntfile.ls': '',
'gulpfile.coffee': '',
'gulpfile.js': '',
'gulpfile.ls': '',
'ini': '',
'ledger': '',
'license': '',
'mimeapps.list': '',
'node_modules': '',
'procfile': '',
'react.jsx': '',
'user-dirs.dirs': '',
'Makefile': '',
'TODO': '',
'LICENSE': '',
'COPYING': '',
}
def devicon(file):
if file.is_directory: return dir_node_exact_matches.get(file.relative_path, '')
return file_node_exact_matches.get(file.relative_path, file_node_extensions.get(file.extension, ''))
if file.is_directory:
return dir_node_exact_matches.get(file.relative_path, '')
return file_node_exact_matches.get(
file.relative_path, file_node_extensions.get(file.extension, ''))

View File

@ -109,7 +109,7 @@ map : console
map ! console shell%space
map @ console -p6 shell %%s
map # console shell -p%space
map x chain draw_possible_programs; console open_with%%space
map x chain draw_possible_programs; console open_with%space
map fi console find%space
map cd console cd%space

View File

@ -123,17 +123,14 @@ ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, f
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
ext djvu, has zathura,X, flag f = zathura -- "$@"
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
ext cbz|cbr, has zathura,X, flag f = zathura -- "$@"
ext djvu|cbz|cbr, has zathura,X, flag f = zathura -- "$@"
#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
ext gif, has sxiv, X, flag f = sxiv-gif -- "$@"
mime ^image, has sxiv, X, flag f = sxiv-rifle -- "$@"

View File

@ -1,7 +1,7 @@
configuration {
modi: "run,drun,window";
combi-modi: "run,drun,window";
theme: "customdark";
theme: "customenu";
terminal: "termite";
run-command: "{cmd}";
run-shell-command: "termite --hold -e {cmd}";

View File

@ -29,21 +29,12 @@ alt + {_,shift} + Tab
super + {comma,period}
bspc node @/ -R {90,270}
super + {_,shift,ctrl} + ntilde
whid {hide,last,dmenu}
super + {Up,Down,Left,Right}
bspc node -f @{parent,brother,first,second}
super + {equal, plus, minus}
bspc node -l {normal, above, below}
super + {_,shift,ctrl} + u
bspc node {@/ -B,@brother -B,@/ -E}
super + alt + u
euclid_balancer
super + o
bspc node @parent -B
@ -53,18 +44,30 @@ super + y
super + {_,shift} + i
{bspc node -i,for win in `bspc query -N -d -n .leaf.!window`; do bspc node $win -k; done}
super + {_,shift,ctrl} + u
bspc node {@/ -B,@brother -B,@/ -E}
super + alt + u
euclid_balancer
super + {_,shift} + ntilde
whid {hide,dmenu}
# Run Applications
super + {t,b,v,q,x,c}
{subl,$BROWSER,pavucontrol,powermenu,$TERMINAL,gsimplecal}
super + {t,b,v,q,c}
{subl,$BROWSER,pavucontrol,powermenu,gsimplecal}
super + z
termite --name=multi -e termux
super + x
termite --name=flota
super + {n,m}
termite --name=flota -e {nmtui,brandr}
super + {space,s,r}
rofi {-show drun,-theme customenu -show window,-theme dmenu2 -show run}
rofi {-theme customdark -show drun,-show window,-theme dmenu2 -show run}
ctrl + alt + x
xkill

View File

@ -1,6 +1,6 @@
[options]
# font = NotoSansMono Nerd Font Regular 9.5
font = JetBrains Mono Regular 10.5
font = JetBrainsMono Nerd Font Regular 10.5
hyperlinks = true
icon_name = terminal
scroll_on_output = false

View File

@ -17,7 +17,6 @@ alias surfraw='surfraw -browser=$BROWSER'
alias bm='bashmount'
alias kat='cat'
alias nb='newsboat --quiet'
alias sxiv='sxiv-rifle -p -b -a -q'
alias yt='mpsyt'
alias pudb='python -m pudb.run'

View File

@ -3,7 +3,7 @@ Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=sxiv -p -b -a %f
Exec=sxiv -bpa %f
Name=sxiv-gif
Comment=Custom definition for sxiv
MimeType=image/gif

View File

@ -5,18 +5,18 @@ set -ga terminal-overrides ",*col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# Opciones basicas
setw -gq utf8 on
set -g set-clipboard on
set -g mouse on
set -gq status-utf8 on
setw -gq utf8 on
set -g escape-time 0
set-option -g history-limit 102400
set -g history-limit 102400
# Ventanas
set -g base-index 1
setw -g automatic-rename on
set -g renumber-windows on
set -g allow-rename on
setw -g automatic-rename on
set -g base-index 1
# Panes
setw -g pane-base-index 1
@ -39,13 +39,13 @@ setw -g pane-border-format '─'
setw -g automatic-rename-format "#{s/zsh//:pane_current_command}"
setw -g pane-border-style 'fg=#080808'
setw -g pane-active-border-style 'fg=#080808'
set -g set-titles on
set -g status-interval 10
set -g mode-style fg=black,bg=yellow
set -g message-command-style bg=colour0,fg=colour13
set -g message-style bg=default,fg=default
set -g status-style bg=default,fg=colour7
set -g set-titles on
set -g set-titles-string "#T"
set -g status-interval 1
set -g status-left ''
set -g status-right '#(txbar) #[fg=colour134]%a %d #[fg=colour167]%R #[fg=colour10]#S:#[fg=colour14]#I.#P'
set -g window-status-separator ' '
@ -99,8 +99,8 @@ bind-key Z kill-session
bind-key Q kill-server
# Ventanas
bind-key C-h prev
bind-key C-l next
bind-key -r C-h prev
bind-key -r C-l next
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key Enter new-window
@ -111,11 +111,14 @@ bind-key s choose-tree -Zw "swap-pane -t '%%'"
bind-key m choose-tree -Zw "move-pane -t '%%'"
# Copy/paste. Seleccionar texto con el mouse lo copia automaticamente al clipboard
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i -p -b"
bind-key -n M-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind-key [ copy-mode
bind-key ] paste-buffer
bind-key b list-buffers
bind-key p paste-buffer
bind-key P choose-buffer
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xsel -i -p -b"
bind-key -n M-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
# Prender y apagar statusbar
bind-key & set-option -g status

2
.zshrc
View File

@ -48,13 +48,13 @@ setopt AUTO_CONTINUE
# }}}
# Autocompletar {{{
zstyle ':completion:*' list-colors $LS_COLORS
zstyle ':completion:*' menu select
zstyle ':completion:*' group-name ''
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' verbose true
zstyle ':completion:*' format $'\n %F{yellow}--- %d ---%f'
zstyle ':completion:*' list-separator "--"
zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*:*:*:default' menu yes select search
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
zstyle ':completion:*:default' select-prompt ' --- Match %M %P ---'
zstyle ':completion:*:options' description 'yes'

View File

@ -1,5 +1,4 @@
abook
advcp
alsa-utils
android-tools
android-udev
@ -12,6 +11,7 @@ autopep8
bat
bison
blueman
brandr
bspwm
cadence
chafa
@ -42,6 +42,7 @@ file-roller
firefox
flex
gcc
ghex
ghostscript
gimp-plugin-gmic
gimp-plugin-lqr
@ -134,10 +135,12 @@ pygmentize
python-glfw
python-language-server
python-lxml
python-numpy
python-matplotlib
python-opengl
python-pdoc
python-pillow
python-pip
python-pudb
python-pydocstyle
python-pylint
python-pynvim
@ -180,7 +183,7 @@ texlive-science
tidy
tmux
transmission-cli
ttf-ibm-plex
ttf-jetbrains-mono
typescript
udisks2
unace

View File

@ -1,6 +1,7 @@
advcp
bashmount
bfs
cozette-otb
create-react-app
figlet-fonts
gimp-paint-studio
@ -31,6 +32,7 @@ tcllib
terminus-font-ll2-td1
toilet-fonts
transmission-remote-cli-git
tweak-hexeditor
unclutter-xfixes-git
xcursor-alkano-default
xf86-input-keyboard

View File

@ -1,3 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euf -o pipefail
sxiv-rifle -p -q -b -a "$@"
sxiv -bpa "$@"

View File

@ -42,7 +42,7 @@ target="$(abspath "$1")"
count="$(listfiles | grep -a -m 1 -ZznF "$target" | cut -d: -f1)"
if [ -n "$count" ]; then
listfiles | xargs -0 sxiv -p -b -n "$count" --
listfiles | xargs -0 sxiv -bpn "$count" --
else
sxiv -p -b -q -- "$@" # fallback
sxiv -bpq -- "$@" # fallback
fi

50
bin/whid Executable file
View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
file="/tmp/.minimized"
touch $file
# By https://github.com/tatou-tatou
lines=$(wc -l < $file)
case $1 in
hide)
if [[ $lines -ge 10 ]]; then ## Fight against bad practices
notify-send "10 windows are already hidden" "You should consider closing some before hiding even more." -i warning
else
focusedDesktop=$(xdotool get_desktop)
focusedID=$(xdo id)
focusedName=$(xdotool getwindowname "$focusedID")
notiflines=$((lines + 1))
echo "$focusedID $focusedDesktop $focusedName" >> "$file" && xdo hide "$focusedID" && notify-send "${notiflines} hidden windows." "$focusedName" -i warning
fi
;;
dmenu)
miniList=$(cat $file)
# Dmenu cannot draw more than 30 lines
if [[ $lines -gt 30 ]]
then linesDisplayed=30
else linesDisplayed=$lines
fi
# If the list is empty
if [ -z "$miniList" ]
then
miniList=" Nothing is hidden!"
linesDisplayed=1
fi
dmenu_cmd="rofi -lines $linesDisplayed -dmenu -p Hidden:"
# Launch dmenu
lineNumber=$(echo "$miniList" | cut -d " " -f 3- | nl -w 3 -n rn | sed -r 's/^([ 0-9]+)[ \t]*(.*)$/\1 - \2/' | $dmenu_cmd | cut -d '-' -f -1)
# If you exited dmenu without selecting anything or if the list was empty
[ -z "$lineNumber" ] || [ "$miniList" = " Nothing is hidden!" ] && exit
# Show the selected hidden window
selectedID=$(sed -n "$lineNumber p" $file | cut -d ' ' -f 1)
selectedDesktop=$(sed -n "$lineNumber p" $file | cut -d ' ' -f 2)
xdotool set_desktop "$selectedDesktop"
xdo show "$selectedID" && sed -i "${lineNumber}d" $file
;;
esac