mas limpieza, un par de rollbacks, un par de cambios, script para usar con iwd
This commit is contained in:
parent
75db457f80
commit
5d0f2b0431
|
@ -48,7 +48,7 @@ Xft.hinting: 1
|
|||
Xft.antialias: 1
|
||||
Xft.rgba: rgb
|
||||
|
||||
Xcursor.theme: HaikuHandRe
|
||||
Xcursor.theme:BloxCursors-White
|
||||
|
||||
Sxiv.font: chicagoflf:size=9
|
||||
Sxiv.background: black
|
||||
|
|
|
@ -67,13 +67,12 @@ colors:
|
|||
cyan: '#6fc3df'
|
||||
white: '#fcfcfc'
|
||||
|
||||
background_opacity: 0.9
|
||||
background_opacity: 1
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ""
|
||||
save_to_clipboard: true
|
||||
|
||||
|
||||
cursor:
|
||||
style: Beam
|
||||
unfocused_hollow: true
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
include "/home/deadguy/.config/gtk-2.0/gtkrc-2.0.mine"
|
||||
gtk-theme-name="Haiku"
|
||||
gtk-icon-theme-name="AMIGAOSLINUX"
|
||||
gtk-icon-theme-name="BluecurveRH"
|
||||
gtk-font-name="System Charcoal 10"
|
||||
gtk-cursor-theme-name="HaikuHandRe"
|
||||
gtk-cursor-theme-name="BloxCursors-White"
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[Settings]
|
||||
gtk-application-prefer-dark-theme=1
|
||||
gtk-cursor-theme-name=HaikuHandRe
|
||||
gtk-cursor-theme-name=BloxCursors-White
|
||||
gtk-theme-name=Haiku
|
||||
gtk-icon-theme-name=AMIGAOSLINUX
|
||||
gtk-icon-theme-name=BluecurveRH
|
||||
gtk-font-name=System Charcoal 10
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
|
||||
|
|
|
@ -9,7 +9,7 @@ hide_userland_threads=0
|
|||
shadow_other_users=0
|
||||
show_thread_names=1
|
||||
show_program_path=1
|
||||
highlight_base_name=0
|
||||
highlight_base_name=1
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=1
|
||||
|
@ -22,5 +22,5 @@ color_scheme=0
|
|||
delay=15
|
||||
left_meters=AllCPUs
|
||||
left_meter_modes=1
|
||||
right_meters=Tasks Memory LoadAverage Battery Uptime
|
||||
right_meter_modes=2 2 2 2 2
|
||||
right_meters=Tasks Memory LoadAverage Battery
|
||||
right_meter_modes=2 2 2 2
|
||||
|
|
|
@ -268,7 +268,6 @@ map bg $setbg $f
|
|||
map U %du -sh $f
|
||||
map Y %cp -ri $fs .
|
||||
map D %mv -i $fs .
|
||||
map ma $mepetre "$f"
|
||||
map za $apack "$f".zip $f
|
||||
map zu $file-roller "$f"
|
||||
map zx $atool --each --extract "$f"
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
{
|
||||
"coc.preferences.hoverTarget": "float",
|
||||
"coc.preferences.formatOnSaveFiletypes": [
|
||||
"javascript",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"json",
|
||||
"javascriptreact",
|
||||
"typescript.tsx",
|
||||
"graphql",
|
||||
"css",
|
||||
"html"
|
||||
],
|
||||
"diagnostic.displayByAle": true,
|
||||
"diagnostic.infoSign": "● ",
|
||||
"diagnostic.errorSign": " ",
|
||||
|
|
|
@ -20,7 +20,6 @@ set clipboard^=unnamedplus
|
|||
set number
|
||||
set noshowmode
|
||||
set showtabline=2
|
||||
set pumheight=12
|
||||
set noswapfile
|
||||
set hidden
|
||||
set lazyredraw
|
||||
|
@ -109,13 +108,6 @@ if !exists('autocommands_loaded') && has('autocmd')
|
|||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call Relativize(0)
|
||||
aug END
|
||||
|
||||
aug term_stuff
|
||||
au TermOpen * setlocal nonumber norelativenumber
|
||||
au TermOpen * setlocal signcolumn=no noruler nocursorline scrolloff=0
|
||||
au TermOpen * setlocal statusline=%{b:term_title}
|
||||
au BufEnter term://* startinsert
|
||||
aug END
|
||||
|
||||
aug miscs
|
||||
au CursorHold * silent call CocActionAsync('highlight')
|
||||
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
|
@ -123,7 +115,6 @@ if !exists('autocommands_loaded') && has('autocmd')
|
|||
aug END
|
||||
|
||||
aug inserts
|
||||
au InsertEnter * norm zz
|
||||
au InsertEnter * setlocal nocursorline
|
||||
au InsertLeave * setlocal cursorline nopaste
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
|
@ -131,13 +122,8 @@ if !exists('autocommands_loaded') && has('autocmd')
|
|||
au WinLeave * setlocal nocursorline
|
||||
aug END
|
||||
|
||||
aug skeletons
|
||||
au BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
au BufNewFile *.sh 0r ~/.config/nvim/templates/sh.skeleton
|
||||
au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton
|
||||
aug END
|
||||
|
||||
aug file_types
|
||||
au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton
|
||||
au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
|
||||
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
|
||||
au BufNewFile,BufRead requirements*.txt set syntax=python
|
||||
|
@ -506,18 +492,17 @@ nnoremap ¿ G
|
|||
|
||||
" Splits
|
||||
nnoremap <silent> <leader>v :vnew<CR>
|
||||
nnoremap <silent> <leader>s :new<CR><CR>
|
||||
nnoremap <silent> <leader>h :new<CR><CR>
|
||||
|
||||
" Quote words under cursor
|
||||
nnoremap <leader>" viW<esc>a"<esc>gvo<esc>i"<esc>gvo<esc>3l
|
||||
nnoremap <leader>' viW<esc>a'<esc>gvo<esc>i'<esc>gvo<esc>3l
|
||||
|
||||
" Move a line of text using Shift+[jk]
|
||||
nnoremap <silent> <S-j> mz:m+<cr>`z
|
||||
nnoremap <silent> <S-k> mz:m-2<cr>`z
|
||||
nnoremap <silent> J mz:m+<cr>`z
|
||||
nnoremap <silent> K mz:m-2<cr>`z
|
||||
|
||||
" My vim wants to enter all the time, enter all the time
|
||||
nnoremap <silent> +<CR> i<CR><ESC>
|
||||
nnoremap <silent> <leader>o :call append(line('.'), '')<CR>
|
||||
nnoremap <silent> <leader>O :call append(line('.')-1, '')<CR>
|
||||
|
||||
|
@ -573,8 +558,12 @@ map q <nop>
|
|||
inoremap <c-u> <c-g>u<c-u>
|
||||
inoremap <c-w> <c-g>u<c-w>
|
||||
|
||||
" Better nav for omnicomplete
|
||||
inoremap <expr> <c-j> ("\<C-n>")
|
||||
inoremap <expr> <c-k> ("\<C-p>")
|
||||
|
||||
" Exit insert, dd line, enter insert
|
||||
inoremap <c-d> <esc>ddi
|
||||
inoremap <A-d> <esc>ddi
|
||||
|
||||
" Line movements
|
||||
inoremap <silent> <Home> <C-o>g<Home>
|
||||
|
@ -591,9 +580,6 @@ inoremap <A-l> <Esc><C-w>l
|
|||
vnoremap ¿ G
|
||||
vnoremap <Bar> gg
|
||||
|
||||
" Visual mode pressing # searches for the current selection
|
||||
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
|
||||
|
||||
" Move a line of text using Shift+[jk]
|
||||
vnoremap <S-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||
vnoremap <S-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||
|
@ -602,9 +588,6 @@ vnoremap <S-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
|||
vnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
||||
vnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
||||
|
||||
" Line movements
|
||||
vnoremap $ $h
|
||||
|
||||
" Fix indentation without leaving visual mode
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
|
|
@ -39,8 +39,8 @@ super + {_,shift,ctrl} + u
|
|||
bspc node {@/ -B,@brother -B,@/ -E}
|
||||
|
||||
# Run Applications
|
||||
super + {b,q,m,s,n,p,t,g,r}
|
||||
{$BROWSER,powermenu,monis,vent,escribir,pom,tv,grabar,ref}
|
||||
super + {b,q,m,s,n,p,t,g,r,d,i}
|
||||
{$BROWSER,powermenu,monis,vent,escribir,pom,tv,grabar,ref,leer,wifimenu}
|
||||
|
||||
super + shift + {x,m,g}
|
||||
{tmenux,unimon,corte}
|
||||
|
|
|
@ -12,13 +12,7 @@ exec 2>/dev/null
|
|||
filename=$(basename -- "$1")
|
||||
filesize=$(du -Hh -- "$1" | cut -f 1)
|
||||
|
||||
#geometry="${2}x${3}"
|
||||
#tags=$(identify -format '%[IPTC:2:25]' ":$1" | tr ';' ',')
|
||||
|
||||
# The '[0]' stands for the first frame of a multi-frame file, e.g. gif.
|
||||
geometry=$(identify -format '%wx%h' "$1[0]")
|
||||
|
||||
tags=$(exiv2 -q pr -pi "$1" | awk '$1~"Keywords" { printf("%s,", $4); }')
|
||||
tags=${tags%,}
|
||||
|
||||
echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}"
|
||||
echo "${filesize}${s}${geometry}${s}${filename}"
|
||||
|
|
|
@ -7,7 +7,7 @@ do
|
|||
"r") convert -rotate 90 "$file" "$file" ;;
|
||||
"R") convert -rotate -90 "$file" "$file" ;;
|
||||
"f") convert -flop "$file" "$file" ;;
|
||||
"y") echo -n "$file" | xsel -i & ;;
|
||||
"y") printf %s "$file" | xclip -selection clipboard & ;;
|
||||
"d") rm "$file" ;;
|
||||
"g") krita "$file" & ;;
|
||||
esac
|
||||
|
|
|
@ -3,17 +3,21 @@ set -g default-terminal 'tmux-256color'
|
|||
set -as terminal-overrides ',alacritty:Tc'
|
||||
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
|
||||
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
|
||||
# set -g set-titles-string "#S > #{pane_current_command} (#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}})"
|
||||
set -g set-titles-string "#S > #T (#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}})"
|
||||
set -g mode-keys vi
|
||||
set -g history-limit 102400
|
||||
set -sg escape-time 0
|
||||
set -g set-clipboard on
|
||||
set -g mouse on
|
||||
set -gq utf8 on
|
||||
set -gq status-utf8 on
|
||||
set -sg escape-time 10
|
||||
set -wg wrap-search off
|
||||
|
||||
# Ventanas
|
||||
set -g automatic-rename on
|
||||
set -wg automatic-rename on
|
||||
set -g renumber-windows on
|
||||
set -g allow-rename on
|
||||
set -g allow-rename on
|
||||
set -g base-index 1
|
||||
|
||||
# Panes
|
||||
|
@ -23,15 +27,8 @@ set -wg main-pane-width 100
|
|||
|
||||
# Notificaciones
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
set -g visual-bell off
|
||||
set -g visual-silence off
|
||||
set -g bell-action none
|
||||
|
||||
# Vi
|
||||
set -g mode-keys vi
|
||||
set -g status-keys vi
|
||||
|
||||
# Statusbar
|
||||
set -g pane-border-status bottom
|
||||
set -g pane-border-format '──'
|
||||
|
@ -40,13 +37,12 @@ set -g pane-border-style fg=colour0,dim
|
|||
set -g pane-active-border-style fg=colour0,dim
|
||||
set -g set-titles on
|
||||
set -g status-interval 60
|
||||
set -g mode-style fg=colour0,bg=yellow
|
||||
set -g mode-style 'fg=#EEEEEE,bg=#75507B'
|
||||
set -g message-command-style bg=colour0,fg=colour13
|
||||
set -g message-style 'bg=#151515,fg=white,italics'
|
||||
set -g message-style 'bg=#222222,fg=white,italics'
|
||||
set -g status-style bg=default,fg=colour7
|
||||
set -g set-titles-string "#S > #T"
|
||||
set -g status-left ''
|
||||
set -g status-right '#(txbar) #[fg=colour134]%a %d #[fg=colour167]%R'
|
||||
set -g status-right '#(txbar) #[fg=colour134]%a %d #[fg=colour167]%R #[fg=colour7]#S'
|
||||
set -g window-status-separator ' '
|
||||
set -g window-status-current-style fg=colour3
|
||||
set -g window-status-activity-style bg=default,fg=colour15,italics
|
||||
|
@ -60,12 +56,12 @@ unbind-key %
|
|||
unbind-key -
|
||||
|
||||
# Prefijo
|
||||
set -g prefix M-a
|
||||
bind-key M-a send-prefix
|
||||
set -g prefix F12
|
||||
set -g prefix2 M-a
|
||||
bind a send-prefix
|
||||
|
||||
# Varios
|
||||
bind-key D detach-client
|
||||
bind-key T command-prompt -I "#W" "rename-window '%%'"
|
||||
bind-key S command-prompt -I "#S" "rename-session '%%'"
|
||||
bind-key M command-prompt -p man: "split-window -fh 'man %1'"
|
||||
bind-key R source-file $XDG_CONFIG_HOME/tmux/tmux.conf \; display "Config Reloaded"
|
||||
|
@ -84,18 +80,27 @@ bind-key Q kill-server
|
|||
bind-key % delete-buffer
|
||||
|
||||
# Paneles
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind-key k select-pane -U
|
||||
bind-key j select-pane -D
|
||||
bind-key h select-pane -L
|
||||
bind-key l select-pane -R
|
||||
bind-key M-S-Up resize-pane -U
|
||||
bind-key M-S-Down resize-pane -D
|
||||
bind-key M-S-Left resize-pane -L
|
||||
bind-key M-S-Right resize-pane -R
|
||||
bind-key M-Up swap-pane -s :. -t :.- \; select-pane -t :.-
|
||||
bind-key M-Down swap-pane -s :. -t :.+ \; select-pane -t :.+
|
||||
|
||||
# Ventanas
|
||||
bind-key C-Left previous-window
|
||||
bind-key C-Right next-window
|
||||
bind-key C-Up swap-window -t :-1 -d
|
||||
bind-key C-Down swap-window -t :+1 -d
|
||||
bind-key Tab choose-window
|
||||
bind-key Enter new-window
|
||||
bind-key d display-panes
|
||||
bind-key w choose-tree -Zw "swap-window -t '%%'"
|
||||
bind-key s choose-tree -Zw "swap-pane -t '%%'"
|
||||
bind-key m choose-tree -Zw "move-pane -t '%%'"
|
||||
bind-key Space last-window
|
||||
bind-key w choose-tree -Zw "swap-window -t '%%'"
|
||||
bind-key W command-prompt -I "#W" "rename-window '%%'"
|
||||
|
||||
# Copy/paste. Seleccionar texto con el mouse lo copia automaticamente al clipboard
|
||||
bind-key b list-buffers
|
||||
|
@ -103,6 +108,7 @@ bind-key P choose-buffer
|
|||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||
bind-key P capture-pane -S -32768 \; save-buffer "/tmp/printscreen" \; delete-buffer \; new-window -n "PRINTSCREEN" "$EDITOR /tmp/printscreen"
|
||||
|
||||
# Prender y apagar statusbar
|
||||
bind-key & set-option -g status
|
||||
|
|
|
@ -22,9 +22,11 @@ setopt PUSHD_SILENT # Do not print the directory stack after pushd or po
|
|||
setopt PUSHD_TO_HOME # Push to home directory when no argument is given.
|
||||
setopt CDABLE_VARS # Change directory to a path stored in a variable.
|
||||
setopt MULTIOS # Write to multiple descriptors.
|
||||
setopt AUTO_PARAM_SLASH # Tab completing directory appends a slash
|
||||
setopt PROMPT_SUBST
|
||||
# }}}
|
||||
# Historial {{{
|
||||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help:* --version:* -v:man *:up:tuir *"
|
||||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help:* --version:* -v:* -h:man *:up:tuir *"
|
||||
HISTFILE="$ZDOTDIR/histfile"
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
|
@ -76,17 +78,13 @@ function precmd() {
|
|||
fi
|
||||
}
|
||||
|
||||
setopt PROMPT_SUBST
|
||||
|
||||
# Anonymous function to avoid leaking variables.
|
||||
function () {
|
||||
local LVL=$SHLVL
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
local SUFFIX='%F{yellow}%n%f'$(printf '%%F{yellow}>%.0s%%f' {1..$LVL})
|
||||
if [[ $EUID == 0 ]]; then
|
||||
local SUFFIX=' %F{yellow}%n%f:'
|
||||
else
|
||||
local SUFFIX=$(printf '>%.0s%%f' {1..$LVL})
|
||||
local SUFFIX=$(printf ':')
|
||||
fi
|
||||
export PROMPT="%(?..%{%F{red}%}(%?%)%{%f%} )%F{green}${SSH_TTY:+%n@%m}%f%B${SSH_TTY:+:}%b%F{blue}%B%2~%b%F{yellow}%B%(1j.*.)%b%f %B${SUFFIX}%b "
|
||||
export PS1="%(?..%{%F{red}%}(%?%)%{%f%} )%F{green}${SSH_TTY:+[%n@%m]}%f%B${SSH_TTY:+:}%b%F{blue}%B%2~%b%f%B${SUFFIX}%b "
|
||||
}
|
||||
export SPROMPT="zsh: correct %F{red}'%R'%f to %F{green}'%r'%f [%B%Uy%u%bes, %B%Un%u%bo, %B%Ue%u%bdit, %B%Ua%u%bbort]? "
|
||||
|
||||
|
@ -106,7 +104,7 @@ zle-line-init() {
|
|||
echo -ne "\e[6 q"
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
preexec() { echo -ne '\e[6 q' ;} # Use beam shape cursor for each new prompt.
|
||||
echo -ne '\e[5 q'
|
||||
preexec() { echo -ne '\e[6 q' ;}
|
||||
# }}}
|
||||
# vim:foldmethod=marker:foldlevel=0
|
||||
|
|
|
@ -36,9 +36,8 @@ alias \
|
|||
# Transmission
|
||||
alias \
|
||||
tsk='pkill transmission-da' \
|
||||
ts='transmission-remote' \
|
||||
tsl='transmission-remote --list' \
|
||||
tsx='transmission-remote --remove-and-delete -t' \
|
||||
tsr='transmission-remote --remove -t' \
|
||||
|
||||
# Git
|
||||
alias \
|
||||
|
|
|
@ -53,50 +53,55 @@ key[Right]="$terminfo[kcuf1]"
|
|||
key[PageUp]="$terminfo[kpp]"
|
||||
key[PageDown]="$terminfo[knp]"
|
||||
# }}}
|
||||
# General use {{{
|
||||
bindkey "^L" tmux-clear-screen
|
||||
bindkey '^X' run-with-sudo
|
||||
# bindkey '^U' backward-kill-line
|
||||
# }}}
|
||||
# Insert {{{
|
||||
bindkey -M viins '^K' up-history # ^K to previous command.
|
||||
bindkey -M viins '^J' down-history # ^J to next command.
|
||||
bindkey -M viins '^F' vi-forward-char # Go forward char or complete current completion.
|
||||
# bindkey -M viins '^B' backward-kill-word # Delete a WORD backward.
|
||||
bindkey -M viins '^Y' redo
|
||||
bindkey -M viins '^P' up-line-or-beginning-search
|
||||
bindkey -M viins '^N' down-line-or-beginning-search
|
||||
bindkey -M viins '^U' history-incremental-pattern-search-backward
|
||||
bindkey -M viins '^[[A' history-substring-search-up
|
||||
bindkey -M viins '^[[B' history-substring-search-down
|
||||
bindkey -M viins '^x^x' edit-command-line
|
||||
|
||||
[[ -n "$key[Home]" ]] && bindkey -M viins -- "$key[Home]" beginning-of-line
|
||||
[[ -n "$key[End]" ]] && bindkey -M viins -- "$key[End]" end-of-line
|
||||
[[ -n "$key[Insert]" ]] && bindkey -M viins -- "$key[Insert]" overwrite-mode
|
||||
# [[ -n "$key[Backspace]" ]] && bindkey -M viins -- "$key[Backspace]" backward-delete-char
|
||||
[[ -n "$key[Backspace]" ]] && bindkey -M viins -- "$key[Backspace]" backward-delete-char
|
||||
[[ -n "$key[Delete]" ]] && bindkey -M viins -- "$key[Delete]" delete-char
|
||||
[[ -n "$key[Right]" ]] && bindkey -M viins -- "$key[Right]" forward-char
|
||||
[[ -n "$key[PageUp]" ]] && bindkey -M viins -- "$key[PageUp]" history-beginning-search-backward
|
||||
[[ -n "$key[PageDown]" ]] && bindkey -M viins -- "$key[PageDown]" history-beginning-search-forward
|
||||
[[ -n "$key[Up]" ]] && bindkey -M viins -- "$key[Up]" history-substring-search-up
|
||||
[[ -n "$key[Down]" ]] && bindkey -M viins -- "$key[Down]" history-substring-search-down
|
||||
|
||||
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
|
||||
autoload -Uz add-zle-hook-widget
|
||||
function zle_application_mode_start { echoti smkx }
|
||||
function zle_application_mode_stop { echoti rmkx }
|
||||
add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
|
||||
add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
|
||||
fi
|
||||
|
||||
bindkey -M viins '^K' up-history # ^K to previous command.
|
||||
bindkey -M viins '^J' down-history # ^J to next command.
|
||||
bindkey -M viins '^F' vi-forward-char # Go forward char or complete current completion.
|
||||
bindkey -M viins '^B' backward-kill-word # Delete a WORD backward.
|
||||
bindkey -M viins '^Y' redo
|
||||
bindkey -M viins '^P' up-line-or-beginning-search
|
||||
bindkey -M viins '^N' down-line-or-beginning-search
|
||||
bindkey -M viins '^U' history-incremental-pattern-search-backward
|
||||
bindkey -M viins '^[[A' history-substring-search-up
|
||||
bindkey -M viins '^[[B' history-substring-search-down
|
||||
bindkey -M viins '^E' edit-command-line
|
||||
bindkey '^L' tmux-clear-screen
|
||||
bindkey '^X' run-with-sudo
|
||||
# }}}
|
||||
# Normal {{{
|
||||
bindkey -M vicmd 'j' down-line # Override down-line-or-history.
|
||||
bindkey -M vicmd 'k' up-line # Override up-line-or-history.
|
||||
bindkey -M vicmd '^K' up-history # ^K to previous command.
|
||||
bindkey -M vicmd '^J' down-history # ^J to next command.
|
||||
bindkey -M vicmd 'H' vi-beginning-of-line # Go beginning of line.
|
||||
bindkey -M vicmd 'L' vi-end-of-line # Go end of line.
|
||||
bindkey -M vicmd 'cs' change-surround # Change surround operator.
|
||||
bindkey -M vicmd 'ds' delete-surround # Delete surround operator.
|
||||
bindkey -M vicmd 'ys' add-surround # Add surround operator.
|
||||
bindkey -M vicmd '?' history-incremental-search-backward
|
||||
bindkey -M vicmd '/' history-incremental-search-forward
|
||||
bindkey -M vicmd 'j' down-line # Override down-line-or-history.
|
||||
bindkey -M vicmd 'k' up-line # Override up-line-or-history.
|
||||
bindkey -M vicmd '^K' up-history # ^K to previous command.
|
||||
bindkey -M vicmd '^J' down-history # ^J to next command.
|
||||
bindkey -M vicmd 'H' vi-beginning-of-line # Go beginning of line.
|
||||
bindkey -M vicmd 'L' vi-end-of-line # Go end of line.
|
||||
bindkey -M vicmd 'cs' change-surround # Change surround operator.
|
||||
bindkey -M vicmd 'ds' delete-surround # Delete surround operator.
|
||||
bindkey -M vicmd 'ys' add-surround # Add surround operator.
|
||||
bindkey -M vicmd '?' history-incremental-search-backward
|
||||
bindkey -M vicmd '/' history-incremental-search-forward
|
||||
bindkey -M vicmd '^[[A' history-substring-search-up
|
||||
bindkey -M vicmd '^[[B' history-substring-search-down
|
||||
bindkey -M vicmd '^Y' redo
|
||||
bindkey -M vicmd '^Y' redo
|
||||
# }}}
|
||||
# Visual {{{
|
||||
bindkey -M visual 'H' vi-beginning-of-line # Go beginning of line.
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# xrdb
|
||||
get_xrdb() {
|
||||
xrdb -query | grep "$1" | awk '{print $2}' | tail -n1
|
||||
}
|
||||
|
||||
outer="$(get_xrdb color0)" # outer
|
||||
inner1="$(get_xrdb color12)" # focused
|
||||
inner2="$(get_xrdb color8)" # normal
|
||||
|
||||
draw() { chwb2 -I "$i" -O "$o" -i "2" -o "8" $@ 2> /dev/null; }
|
||||
|
||||
# initial draw, and then subscribe to events
|
||||
{ echo; bspc subscribe node_geometry node_focus; } |
|
||||
while read -r _; do
|
||||
i=$inner1 o=$outer draw "$(targets focused)"
|
||||
i=$inner2 o=$outer draw "$(targets normal)"
|
||||
done
|
|
@ -1,3 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
kill -9 "$(cat ~/.recordingpid)"
|
||||
if [ -f "/tmp/blaze-pid" ]; then
|
||||
recpid="$(cat /tmp/blaze-pid)"
|
||||
# kill with SIGTERM, allowing finishing touches.
|
||||
kill -15 "$recpid"
|
||||
rm -f /tmp/blaze-pid
|
||||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
||||
(
|
||||
sleep 3
|
||||
kill -9 "$recpid"
|
||||
) >/dev/null 2>&1 &
|
||||
notify-send -t 2000 "Grabación Terminada"
|
||||
exit
|
||||
else
|
||||
notify-send -t 2000 "Grabación inactiva"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -3,33 +3,35 @@
|
|||
# Sets the correct DPI for your monitor instead of the generic '100'
|
||||
# ! Make sure there is no DPI entry in your Xresources already!
|
||||
|
||||
file=$XDG_CONFIG_HOME/X11/xresources
|
||||
FILE=$XDG_CONFIG_HOME/X11/xresources
|
||||
|
||||
grep 'Xft.dpi' "$file" && xrdb -merge "$file" && exit
|
||||
grep 'Xft.dpi' "$FILE" && xrdb -merge "$FILE" && exit
|
||||
|
||||
info=$(xrandr | grep ' connected')
|
||||
INFO=/tmp/display_info
|
||||
xrandr | grep ' connected' > $INFO
|
||||
|
||||
width=$(echo "$info" | rev | cut -d ' ' -f 3 | rev)
|
||||
width_in=$(echo "${width%mm}" | awk '{print $1 * 0.039370}')
|
||||
WIDTH_MM=$(awk '{print $NF}' $INFO)
|
||||
WIDTH_IN=$(echo "${WIDTH_MM%mm}" | awk '{print $1 * 0.03937007874015748}')
|
||||
|
||||
height=$(echo "$info" | rev | cut -d ' ' -f 1 | rev)
|
||||
height_in=$(echo "${height%mm}" | awk '{print $1 * 0.039370}')
|
||||
HEIGHT_MM=$(awk '{print $(NF-2)}' $INFO)
|
||||
HEIGHT_IN=$(echo "${HEIGHT_MM%mm}" | awk '{print $1 * 0.03937007874015748}')
|
||||
|
||||
px=$(echo "$info" | cut -d ' ' -f 4)
|
||||
DIAGONAL_IN=$(awk -v w="$WIDTH_IN" -v h="$HEIGHT_IN" \
|
||||
'BEGIN{print sqrt(w^2 + h^2)}')
|
||||
|
||||
width_px=${px%x*}
|
||||
PX=$(cut -d ' ' -f 4 $INFO)
|
||||
|
||||
height_px=${px#*x}
|
||||
height_px=${height_px%%+*}
|
||||
WIDTH_PX=${PX%x*}
|
||||
|
||||
diagonal_px=$(awk -v w="$width_px" -v h="$height_px" \
|
||||
'BEGIN{print sqrt(w*w+h*h)}')
|
||||
TEMP_HEIGHT_PX=${PX#*x}
|
||||
HEIGHT_PX=${TEMP_HEIGHT_PX%%+*}
|
||||
|
||||
diagonal_in=$(awk -v w="$width_in" -v h="$height_in" \
|
||||
'BEGIN{print sqrt(w*w + h*h)}')
|
||||
DIAGONAL_PX=$(awk -v w="$WIDTH_PX" -v h="$HEIGHT_PX" \
|
||||
'BEGIN{print sqrt(w^2 +h^2)}')
|
||||
|
||||
dpi=$(awk -v dp="$diagonal_px" -v di="$diagonal_in" \
|
||||
DPI=$(awk -v dp="$DIAGONAL_PX" -v di="$DIAGONAL_IN" \
|
||||
'BEGIN{print dp / di}')
|
||||
|
||||
echo "Xft.dpi: $dpi" >> "$file"
|
||||
xrdb -merge "$file"
|
||||
echo "Xft.dpi: $DPI" >> "$FILE"
|
||||
xrdb -merge "$FILE"
|
||||
rm $INFO
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
#!/bin/sh
|
||||
|
||||
diario() {
|
||||
cd "$HOME/doc/blog" || exit
|
||||
menublog=$(printf "Hoy\\nMañana\\nAyer\\nArchivo" | dmenu -i -w 120 -p " ")
|
||||
case $menublog in
|
||||
"Hoy") alacritty --class=flota -e nvim "$(date -I)".wiki ;;
|
||||
"Mañana") alacritty --class=flota -e nvim "$(date --date='tomorrow' +%F)".wiki ;;
|
||||
"Ayer") alacritty --class=flota -e nvim "$(date --date='yesterday' +%F)".wiki ;;
|
||||
"Archivo") archivo ;;
|
||||
esac
|
||||
cd "$HOME/doc/blog" || exit
|
||||
menublog=$(printf "Hoy\\nMañana\\nAyer\\nArchivo" | dmenu -i -w 120 -p " ")
|
||||
case $menublog in
|
||||
"Hoy") alacritty --class=flota -e nvim "$(date -I)".wiki ;;
|
||||
"Mañana") alacritty --class=flota -e nvim "$(date --date='tomorrow' +%F)".wiki ;;
|
||||
"Ayer") alacritty --class=flota -e nvim "$(date --date='yesterday' +%F)".wiki ;;
|
||||
"Archivo") archivo ;;
|
||||
esac
|
||||
}
|
||||
|
||||
notas() {
|
||||
cd "$HOME/doc/notas" || exit
|
||||
menunota=$(printf "Nueva\\nArchivo" | dmenu -i -w 120 -p " ")
|
||||
case $menunota in
|
||||
"Nueva")
|
||||
nombre="$(dmenu -i -p "Titulo: ")" 2> /dev/null
|
||||
cd "$HOME/doc/notas" || exit
|
||||
menunota=$(printf "Nueva\\nArchivo" | dmenu -i -w 120 -p " ")
|
||||
case $menunota in
|
||||
"Nueva")
|
||||
nombre="$(dmenu -i -p "Titulo: ")" 2>/dev/null
|
||||
alacritty --class=flota -e nvim "$nombre".wiki
|
||||
;;
|
||||
"Archivo") archivo ;;
|
||||
esac
|
||||
}
|
||||
|
||||
articulo(){
|
||||
cd "$HOME/doc/dgy.io" || exit
|
||||
nom="$(dmenu -i -p "Titulo: ")" 2> /dev/null
|
||||
nombre="$(echo "$nom" | tr ' ' '-')"
|
||||
hugo new articulos/"$nombre".md
|
||||
sleep 1
|
||||
alacritty --class=flota -e nvim content/articulos/"$nombre".md
|
||||
articulo() {
|
||||
cd "$HOME/doc/dgy.io" || exit
|
||||
nom="$(dmenu -i -p "Titulo: ")" 2>/dev/null
|
||||
nombre="$(echo "$nom" | tr ' ' '-')"
|
||||
hugo new articulos/"$nombre".md
|
||||
sleep 1
|
||||
alacritty --class=flota -e nvim content/articulos/"$nombre".md
|
||||
}
|
||||
|
||||
archivo(){
|
||||
selarch=$(fd -d 1 -e wiki | sort -Mr | dmenu -i -w 200 -p " ")
|
||||
[ -z "$selarch" ] && exit 0
|
||||
alacritty --class=flota -e nvim "$selarch"
|
||||
archivo() {
|
||||
selarch=$(fd -d 1 -e wiki | sort -Mr | dmenu -i -w 200 -p " ")
|
||||
[ -z "$selarch" ] && exit 0
|
||||
alacritty --class=flota -e nvim "$selarch"
|
||||
}
|
||||
|
||||
MENU="$(printf "Articulo\\nBlog\\nNotas" | dmenu -i -w 130 -p " ")"
|
||||
MENU="$(printf "Artículo\\nBlog\\nNotas" | dmenu -i -w 130 -p " ")"
|
||||
case $MENU in
|
||||
'Blog') diario;;
|
||||
'Articulo') articulo;;
|
||||
'Notas') notas;;
|
||||
'Blog') diario ;;
|
||||
'Artículo') articulo ;;
|
||||
'Notas') notas ;;
|
||||
esac
|
||||
|
|
|
@ -1,104 +1,80 @@
|
|||
#!/bin/sh
|
||||
|
||||
M=$(bspc query -M --names)
|
||||
NUM=$(echo "$M" | awk 'END{print NR}')
|
||||
# Blaze - record screen and audio
|
||||
# https://github.com/cherrry9/blaze/
|
||||
# modificado por deadguy
|
||||
|
||||
if [ "$NUM" = 1 ]; then
|
||||
pant=-video_size 1366x768 -i :0.0
|
||||
elif [ "$NUM" = 2 ]; then
|
||||
pant=$()
|
||||
output="$HOME/vid/Screen/$(date '+%y%m%d-%H%M-%S').mp4"
|
||||
m() { ${DMENU:-dmenu} "$@"; }
|
||||
|
||||
method="$(printf "Pantalla\nSelección" | m -w 200 -p "Grabar")"
|
||||
|
||||
if [ "$method" = "Pantalla" ]; then
|
||||
# get information about the display
|
||||
monitors="$(xrandr --listmonitors | awk 'NR>1 { printf $NF"\n" }')"
|
||||
|
||||
# if there's only one display, use that and skip asking
|
||||
if [ "$(printf "%b\n" "$monitors" | wc -l)" = 1 ]; then
|
||||
display="$monitors"
|
||||
else # if there are other displays ask the user which one to use
|
||||
[ ! "$display" ] && display="$(printf "%b" "$monitors" | m -w 200 -p "Pantalla")"
|
||||
fi
|
||||
|
||||
set -- $(xrandr -q | grep "$display" | grep -oP '\d*x\d*\+\d*\+\d*' | tr '+x' ' ')
|
||||
|
||||
width="$1"
|
||||
height="$2"
|
||||
offX="$3"
|
||||
offY="$4"
|
||||
|
||||
sonido="$(printf "Sí\nNo" | m -w 200 -p "Audio")"
|
||||
|
||||
if [ "$sonido" = "Sí" ]; then
|
||||
# find default audio device
|
||||
pacmd="$(pacmd list-sources | grep -i -B 1 output)"
|
||||
dev="$(echo "$pacmd" | grep -i '\* index' ||
|
||||
echo "$pacmd" | grep -i 'index' | head -n 1)"
|
||||
audio="-f pulse -i $(echo "$dev" | grep -o '[0-9]')"
|
||||
else
|
||||
audio=""
|
||||
fi
|
||||
|
||||
elif [ "$method" = "Selección" ]; then
|
||||
# select an area and make each number a separate word
|
||||
set -- $(slop -f '%w %h %x %y')
|
||||
|
||||
# get information about the display
|
||||
width="$1"
|
||||
height="$2"
|
||||
offX="$3"
|
||||
offY="$4"
|
||||
|
||||
[ "$((width % 2))" = 1 ] && width="$((width + 1))"
|
||||
[ "$((height % 2))" = 1 ] && height="$((height + 1))"
|
||||
else
|
||||
printf "Método inválido.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
killrecording() {
|
||||
recpid="$(cat /tmp/recordingpid)"
|
||||
# kill with SIGTERM, allowing finishing touches.
|
||||
kill -15 "$recpid"
|
||||
rm -f /tmp/recordingpid
|
||||
# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
|
||||
sleep 3
|
||||
kill -9 "$recpid"
|
||||
exit
|
||||
# ask the user if they want to start the recording
|
||||
[ ! "$ready" ] && ready="$(printf "Sí\nNo" | m -w 200 -p "Empezar")"
|
||||
|
||||
[ "$ready" = "Sí" ] && {
|
||||
notify-send -t 1500 "Grabando"
|
||||
|
||||
ffmpeg \
|
||||
-loglevel error \
|
||||
-y \
|
||||
-thread_queue_size 4096 \
|
||||
$audio \
|
||||
-f x11grab \
|
||||
-draw_mouse 1 \
|
||||
-s "${width}x$height" \
|
||||
-r 60 \
|
||||
-i "$DISPLAY.0+$offX,$offY" \
|
||||
-pix_fmt yuv420p \
|
||||
-q:v 0 \
|
||||
"$output" &
|
||||
|
||||
echo $! >/tmp/blaze-pid
|
||||
}
|
||||
|
||||
screencast() { \
|
||||
ffmpeg -y \
|
||||
-thread_queue_size 4096 \
|
||||
-f x11grab \
|
||||
-framerate 60 \
|
||||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-f alsa -ac 2 -i pulse \
|
||||
-r 30 \
|
||||
-c:v libx264rgb -crf 0 -preset ultrafast -c:a libfdk_aac \
|
||||
"$HOME/vid/Screen/$(date -I).mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
}
|
||||
|
||||
jacka() { \
|
||||
ffmpeg -y \
|
||||
-thread_queue_size 4096 \
|
||||
-f jack -i jack_out.monitor \
|
||||
-ac 2 -channel_layout stereo -async 1 \
|
||||
-c:a libopus "$HOME/snd/Tape/$(date -I).opus"
|
||||
echo $! > /tmp/recordingpid
|
||||
}
|
||||
|
||||
jackv() {
|
||||
ffmpeg -y \
|
||||
-thread_queue_size 4096 \
|
||||
-f jack -i ffmpeg \
|
||||
-f x11grab \
|
||||
-framerate 60 \
|
||||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-r 30 \
|
||||
-c:v libx264 -qp 0 -r 30 -c:a libfdk_aac \
|
||||
"$HOME/vid/Screen/$(date -I).mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
}
|
||||
|
||||
mute() {
|
||||
ffmpeg -y \
|
||||
-f x11grab \
|
||||
-thread_queue_size 4096 \
|
||||
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
|
||||
-i "$DISPLAY" \
|
||||
-c:v libx264 -qp 0 -r 30 \
|
||||
"$HOME/vid/$(date -I).mkv" &
|
||||
echo $! > /tmp/recordingpid
|
||||
}
|
||||
|
||||
audio() { \
|
||||
ffmpeg -y \
|
||||
-thread_queue_size 4096 \
|
||||
-f pulse -i default \
|
||||
-ac 2 -channel_layout stereo -async 1 \
|
||||
-c:a flac \
|
||||
"$HOME/snd/tape/$(date -I).mp3" &
|
||||
echo $! > /tmp/recordingpid
|
||||
}
|
||||
|
||||
askrecording() { \
|
||||
choice=$(printf "Screencast\\nVideo\\nAudio\\nJack Screencast\\nJack Audio" | dmenu -i -w 200 -p " ")
|
||||
case "$choice" in
|
||||
"Screencast") screencast;;
|
||||
"Video") mute;;
|
||||
"Audio") audio;;
|
||||
"Jack Screencast") jackv;;
|
||||
"Jack Audio") jacka;;
|
||||
esac
|
||||
}
|
||||
|
||||
asktoend() { \
|
||||
response=$(printf "No\\nSi" | dmenu -i -w 220 -p "Cortar? ") &&
|
||||
[ "$response" = "Si" ] && killrecording
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
"Screencast") screencast;;
|
||||
"Video") mute;;
|
||||
"Audio") audio;;
|
||||
"Jack Screencast") jackv;;
|
||||
"Jack Audio") jacka;;
|
||||
*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
|
||||
esac
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
chosen="$(printf "Apagar\\nReiniciar\\nSuspender\\nCerrar\\nSalir" | dmenu -w 150 -i -p "⏻ ")"
|
||||
chosen="$(printf "Apagar\\nReiniciar\\nSuspender\\nBloquear\\nSalir" | dmenu -w 150 -i -p "⏻ ")"
|
||||
case $chosen in
|
||||
"Apagar") loginctl poweroff;;
|
||||
"Reiniciar") loginctl reboot;;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# output focused / unfocused windows
|
||||
|
||||
case $1 in
|
||||
focused) bspc query -N -n .local.focused.\!fullscreen;;
|
||||
normal) bspc query -N -n .local.\!focused.\!fullscreen
|
||||
esac
|
|
@ -18,8 +18,15 @@ tele(){
|
|||
mpv https://twitch.tv/"$canal"
|
||||
}
|
||||
|
||||
MENU="$(printf "Twitch\\nTuto" | dmenu -i -w 120 -p "磊 ")"
|
||||
shutub(){
|
||||
video="$(dmenu -i -p " ")" 2> /dev/null
|
||||
[ -z "$video" ] && exit 0
|
||||
mpv https://www.youtube.com/watch?v="$video"
|
||||
}
|
||||
|
||||
MENU="$(printf "Twitch\\nYoutube\\nTuto" | dmenu -i -w 120 -p "磊 ")"
|
||||
case $MENU in
|
||||
'Twitch') tele;;
|
||||
'Youtube') shutub;;
|
||||
'Tuto') tutos;;
|
||||
esac
|
||||
|
|
|
@ -1,30 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
HEART='🤍 '
|
||||
WIFI='📡 '
|
||||
HEART=' '
|
||||
WIFI='直'
|
||||
THERM=''
|
||||
|
||||
if [ -d /sys/class/power_supply/BAT0 ]; then
|
||||
battery_info="$(head -n 1 /sys/class/power_supply/BAT0/capacity)%"
|
||||
current_charge=$(echo "$battery_info" | grep -o '[0-9]\+%' | awk '{sub (/%/, "", $1); print $1}')
|
||||
|
||||
if [ "$current_charge" -lt 11 ]; then
|
||||
printf '#[fg=colour9]'
|
||||
elif [ "$current_charge" -lt 31 ]; then
|
||||
printf '#[fg=colour126]'
|
||||
elif [ "$current_charge" -lt 51 ]; then
|
||||
printf '#[fg=colour201]'
|
||||
elif [ "$current_charge" -lt 71 ]; then
|
||||
printf '#[fg=colour178]'
|
||||
elif [ "$current_charge" -lt 90 ]; then
|
||||
printf '#[fg=colour11]'
|
||||
else
|
||||
printf '#[fg=colour123]'
|
||||
fi
|
||||
printf "%s\n $HEART $current_charge"
|
||||
printf '#[fg=colour123] %s' "$HEART$current_charge"
|
||||
fi
|
||||
|
||||
if ping -q -w 1 -c 1 "$(ip r | awk '/default/ {print $3}')" >/dev/null
|
||||
then
|
||||
if ping -q -w 1 -c 1 "$(ip r | awk '/default/ {print $3}')" >/dev/null; then
|
||||
net="$(awk 'NR == 3 { print substr($3, 1, length($3) - 1) }' /proc/net/wireless)"
|
||||
printf "%s\n #[fg=colour177]$WIFI${net} "
|
||||
printf '#[fg=colour177] %s' "$WIFI$net"
|
||||
fi
|
||||
|
||||
temp="$(sensors | awk '(/Core 0/){printf $3}' | sed 's/\.0//; s/+//')"
|
||||
printf '#[fg=default] %s' "$THERM $temp"
|
||||
|
||||
# ip -o -4 a show dev tun0 | awk '{print $4}'
|
||||
# ip -4 -br a | awk '/UP/ {print $3}' | cut -f1 -d'/'
|
||||
# chequear tmux show-env|grep ^SSH_CONNECTION=|cut -d= -f2|cut -d" " -f1 o tmux show-env|sed -n "/^SSH_CONNECTION=/{s/[^=]*=//;s/ .*//;p;} y usar eso como condicion?
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# It's simple script to control a wirelless network connection
|
||||
# using iwd and dhcpcd
|
||||
#
|
||||
|
||||
interface='wlo1'
|
||||
m() { ${DMENU:-dmenu} "$@"; }
|
||||
|
||||
add() {
|
||||
list_all=$(iwctl station "$interface" get-networks | awk 'NR > 4 && $0 !~ /^$/ && $0 !~ />/ { print $1}')
|
||||
list_known=$(iwctl known-networks list | awk 'NR>4 && $0 !~ /^$/ { print $1 }')
|
||||
list=$(comm -23 <(sort -u <<<"$list_all") <(sort -u <<<"$list_known"))
|
||||
ssid=$(printf "%s" "$list" | m -i -p "add") || return
|
||||
pass=$(m -P) || return
|
||||
|
||||
if iwctl --passphrase "$pass" station $interface connect "$ssid"; then
|
||||
notify-send "Agregué $ssid"
|
||||
exit
|
||||
else
|
||||
notify-send "$ssid: Contraseña incorrecta"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
switch() {
|
||||
list_known=$(iwctl known-networks list | awk 'NR>4 && $0 !~ /^$/ { print $1 }')
|
||||
connected=$(iwctl station "$interface" show | awk 'NR>4 && /Connected/ { print $3 }')
|
||||
list=$(comm -23 <(sort -u <<<"$list_known") <(sort -u <<<"$connected"))
|
||||
|
||||
[ -z "$list" ] && {
|
||||
notify-send "No hay redes disponibles"
|
||||
return
|
||||
}
|
||||
|
||||
ssid=$(printf "%s" "$list" | m -p "switch") || return
|
||||
if iwctl station $interface connect "$ssid"; then
|
||||
notify-send "Conectado a $ssid"
|
||||
exit
|
||||
else
|
||||
notify-send "No se pudo conectar a $ssid"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
forget() {
|
||||
list=$(iwctl known-networks list | awk 'NR>4 && $0 !~ /^$/ { print $1 }')
|
||||
[ -z "$list" ] && {
|
||||
notify-send "No hay redes para olvidar."
|
||||
return
|
||||
}
|
||||
ssid=$(printf "%s" "$list" | m -p "forget") || return
|
||||
iwctl known-networks "$ssid" forget && notify-send "Olvidé $ssid" && exit
|
||||
}
|
||||
|
||||
scan() {
|
||||
iwctl station $interface scan
|
||||
notify-send "Scanneando..."
|
||||
}
|
||||
|
||||
while true; do
|
||||
options="Scanear\nAgregar\nCambiar\nOlvidar"
|
||||
choice=$(printf "%b" "$options" | m -i -w 150 -p " ") || exit
|
||||
case $choice in
|
||||
"Scanear") scan ;;
|
||||
"Agregar") add ;;
|
||||
"Cambiar") switch ;;
|
||||
"Olvidar") forget ;;
|
||||
esac
|
||||
done
|
|
@ -1,68 +1,99 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html class="has-background-dark">
|
||||
<head>
|
||||
<title>Hola Si</title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="icon"><img src="icons/reddit.svg" /></div>
|
||||
<div class="icon"><img src="icons/entertainment.svg" /></div>
|
||||
<div class="icon"><img src="icons/code.svg" /></div>
|
||||
<div class="icon"><img src="icons/music.svg" /></div>
|
||||
<div class="category">
|
||||
<li>
|
||||
<a class="bm" href="https://www.reddit.com/r/unixporn/new"
|
||||
>Unixporn</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a class="bm" href="https://www.reddit.com/r/voidlinux/new"
|
||||
>Void Linux</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a class="bm" href="https://www.reddit.com/r/neovim/new">Neovim</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="bm" href="https://www.reddit.com/r/argentina/new"
|
||||
>Argentina</a
|
||||
>
|
||||
</li>
|
||||
<body class="columns">
|
||||
<main class="column is-four-fifths container my-6">
|
||||
<div class="columns my-6">
|
||||
<section class="column my-6">
|
||||
<div class="box has-background-black">
|
||||
<article class="media">
|
||||
<aside class="media-left">
|
||||
<figure class="image is-64x64">
|
||||
<img src="icons/reddit.svg" alt="Image" />
|
||||
</figure>
|
||||
</aside>
|
||||
<p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://www.reddit.com/r/unixporn/new">Unixporn</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.reddit.com/r/voidlinux/new"
|
||||
>Void Linux</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.reddit.com/r/neovim/new">Neovim</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.reddit.com/r/republicaargentina/new"
|
||||
>Argentina</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
<section class="column my-6">
|
||||
<div class="box has-background-black">
|
||||
<article class="media">
|
||||
<aside class="media-left">
|
||||
<figure class="image is-64x64">
|
||||
<img src="icons/entertainment.svg" alt="Image" />
|
||||
</figure>
|
||||
</aside>
|
||||
<p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://www.questionablecontent.net/"
|
||||
>Questionable Content</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.empoweredcomic.com/">Empowered</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://rock.pungas.space/">Rocket Chat</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://discordapp.com/channels/586006476879953932/586006476879953936"
|
||||
>Discord</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
<section class="column my-6">
|
||||
<div class="box has-background-black">
|
||||
<article class="media">
|
||||
<aside class="media-left">
|
||||
<figure class="image is-64x64">
|
||||
<img src="icons/code.svg" alt="Image" />
|
||||
</figure>
|
||||
</aside>
|
||||
<p>
|
||||
<ul>
|
||||
<li><a href="https://wiki.archlinux.org">Arch Wiki</a></li>
|
||||
<li>
|
||||
<a href="https://gitlab.com/deadguy/hexagons">Dotfiles</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://voidlinux.org/packages">Void Packages</a>
|
||||
</li>
|
||||
<li><a href="https://docs.voidlinux.org">Void Wiki</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="category">
|
||||
<li>
|
||||
<a class="bm" href="https://www.questionablecontent.net/"
|
||||
>Questionable Content</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a class="bm" href="https://www.empoweredcomic.com/">Empowered</a>
|
||||
</li>
|
||||
<li><a class="bm" href="https://rock.pungas.space/">Rocket Chat</a></li>
|
||||
<li>
|
||||
<a
|
||||
class="bm"
|
||||
href="https://discordapp.com/channels/586006476879953932/586006476879953936"
|
||||
>Discord</a
|
||||
>
|
||||
</li>
|
||||
</div>
|
||||
<div class="category">
|
||||
<li><a class="bm" href="https://wiki.archlinux.org">Arch Wiki</a></li>
|
||||
<li>
|
||||
<a class="bm" href="https://gitlab.com/deadguy/hexagons">Dotfiles</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="bm" href="https://voidlinux.org/packages">Void Packages</a>
|
||||
</li>
|
||||
<li><a class="bm" href="https://docs.voidlinux.org">Void Wiki</a></li>
|
||||
</div>
|
||||
<div class="category">
|
||||
<li><a class="bm" href="https://invidio.us/">Invidio.us</a></li>
|
||||
<li><a class="bm" href="https://bandcamp.com/">Bandcamp</a></li>
|
||||
<li><a class="bm" href="https://twitch.tv/">Twitch</a></li>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because one or more lines are too long
2
.xinitrc
2
.xinitrc
|
@ -3,10 +3,10 @@
|
|||
dpi &
|
||||
setxkbmap -option caps:escape
|
||||
xsetroot -cursor_name left_ptr &
|
||||
randbg &
|
||||
xcompmgr &
|
||||
equiset &
|
||||
mpd &
|
||||
randbg &
|
||||
xss-lock -l -- exeflock4 &
|
||||
|
||||
exec runsvdir -P ~/.local/service.x 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
|
||||
|
|
|
@ -19,8 +19,6 @@ bspwm
|
|||
cadence
|
||||
catgirl
|
||||
chrony
|
||||
connman
|
||||
connman-ncurses
|
||||
crispy-doom
|
||||
cryptsetup
|
||||
ctags
|
||||
|
@ -32,8 +30,8 @@ fd
|
|||
ffmpeg
|
||||
figlet
|
||||
file-roller
|
||||
filezilla
|
||||
firefox
|
||||
freepats
|
||||
fzf
|
||||
gallery-dl
|
||||
gcc
|
||||
|
@ -53,17 +51,21 @@ i3lock-color
|
|||
intel-ucode
|
||||
isync
|
||||
iwd
|
||||
j4-dmenu-desktop
|
||||
jack-devel
|
||||
jq
|
||||
keychain
|
||||
klystrack
|
||||
krita
|
||||
lf
|
||||
libXft-devel
|
||||
libXinerama-devel
|
||||
libfluidsynth
|
||||
libressl-devel
|
||||
librsvg
|
||||
librsvg-utils
|
||||
libsndfile-devel
|
||||
lm_sensors
|
||||
lynx
|
||||
maim
|
||||
mblaze
|
||||
|
@ -111,6 +113,7 @@ socklog-void
|
|||
sxhkd
|
||||
sxiv
|
||||
texlive-bin
|
||||
timidity
|
||||
tmux
|
||||
toilet
|
||||
transmission
|
||||
|
@ -121,8 +124,6 @@ unzip
|
|||
vice
|
||||
void-repo-nonfree
|
||||
vsv
|
||||
weechat
|
||||
weechat-python
|
||||
xbacklight
|
||||
xclip
|
||||
xcompmgr
|
||||
|
|
Reference in New Issue