dgy
/
hexagons
Archived
1
0
Fork 0

Enter the Void. Zarpado overhauling de cosas hice. Aca esta la primera parte de los cambios

This commit is contained in:
deadguy 2020-04-14 01:07:37 -03:00
parent aff169ca1f
commit cda160033a
71 changed files with 722 additions and 3448 deletions

View File

@ -35,10 +35,14 @@
*.color7: #a89984
*.color15: #ffffff
!st.font: JetBrainsMono Nerd Font:pixelsize=15:antialias=true:autohint=true;
!st.alpha: 0.85
st.font: JetBrains Mono:pixelsize=14:antialias=true:autohint=true;
st.fontalt0: JetBrainsMono Nerd Font:pixelsize=14:antialias=true:autohint=true;
st.alpha: 0.85
st.blinktimeout: 0
st.borderpx: 10
st.cwscale: 1.05
st.chscale: 1.0
! dmenu
dmenu.font: SF Pro Text:pixelsize=16:antialias=true:autohint=true;
dmenu.background: #222222
dmenu.foreground: #bbbbbb
@ -47,13 +51,14 @@ dmenu.selforeground: #eeeeee
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintmedium
Xft.hintstyle: hintslight
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
Xft.dpi: 96
Xcursor.theme: Alkano
Xcursor.theme: Qogir-cursors
Sxiv.font: cozette:size=14
Sxiv.background: black
Sxiv.foreground: white
Sxiv.foreground: white

95
.config/alacritty.yml Normal file
View File

@ -0,0 +1,95 @@
window:
dimensions:
columns: 80
lines: 25
padding:
x: 12
y: 5
decorations: none
scrolling:
history: 10000
# Font configuration
font:
normal:
family: JetBrainsMono Nerd Font
style: Regular
# Point size
size: 11
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
offset:
x: 1
draw_bold_text_with_bright_colors: true
colors:
# Default colors
primary:
background: '#080808'
foreground: '#B3B1AD'
# Cursor colors
cursor:
text: '#FFcc66'
cursor: '#FFcc66'
# Normal colors
normal:
black: '#0A0E14'
red: '#FF3333'
green: '#AEC82A'
yellow: '#FFB454'
blue: '#008bbd'
magenta: '#ab6ba6'
cyan: '#6fa69f'
white: '#A89984'
# Bright colors
bright:
black: '#222222'
red: '#FF3333'
green: '#Bae67e'
yellow: '#FFd580'
blue: '#73d0ff'
magenta: '#F28779'
cyan: '#95E6CB'
white: '#FFFFFF'
visual_bell:
duration: 0
background_opacity: 0.85
selection:
semantic_escape_chars: ""
save_to_clipboard: true
dynamic_title: true
cursor:
style: Underline
unfocused_hollow: true
live_config_reload: true
mouse:
hide_when_typing: true
mouse_bindings:
- { mouse: Middle, action: Copy }
key_bindings:
# (Windows, Linux, and BSD only)
- { key: Insert, mods: Shift, action: Paste }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Add, mods: Control, action: IncreaseFontSize }
- { key: Subtract, mods: Control, action: DecreaseFontSize }
- { key: Minus, mods: Control, action: DecreaseFontSize }

View File

@ -42,24 +42,19 @@ bspc config active_border_color "$(get_xrdb color8)"
bspc config presel_feedback_color "$(get_xrdb color5)"
# Flotantes
bspc rule -a Pavucontrol state=floating
bspc rule -a Catia state=floating
bspc rule -a Cadence state=floating
bspc rule -a Qalculate-gtk state=floating
bspc rule -a mpv state=floating
bspc rule -a Gucharmap state=floating
bspc rule -a File-roller state=floating
bspc rule -a obs state=floating
bspc rule -a PdWindow state=floating
bspc rule -a PatchWindow state=floating
bspc rule -a Godot state=floating
bspc rule -a Pinentry state=floating
bspc rule -a St:flota state=floating
bspc rule -a Alacritty:flota state=floating
bspc rule -a Toplevel state=floating
bspc rule -a Firefox state=floating
bspc rule -a Lxappearance state=floating
# Otros
bspc rule -a Zathura state=tiled
bspc rule -a Firefox:Navigator state=tiled, desktop='^2'
bspc rule -a St:multi desktop='^1'
bspc rule -a Alacritty:multi desktop='^1'
stx &

View File

@ -6,6 +6,6 @@ EndSection
Section "ServerLayout"
Identifier "ServerLayout0"
Option "StandbyTime" "10"
Option "SuspendTime" "20"
Option "OffTime" "30"
Option "SuspendTime" "15"
Option "OffTime" "20"
EndSection

View File

@ -1,6 +0,0 @@
mainwindow_position = center
mainwindow_yoffset = -260
mainwindow_xoffset = 570
mainwindow_skip_taskbar = 0
close_on_unfocus = 1
force_lang = es_AR.utf8

View File

@ -2,10 +2,10 @@
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/deadguy/.config/gtk-2.0/gtkrc-2.0.mine"
gtk-theme-name="B00merang-Dark"
gtk-icon-theme-name="ArchLabs-Light"
gtk-theme-name="Marwaita-Dark"
gtk-icon-theme-name="Marwaita-Light"
gtk-font-name="Noto Sans Display 10"
gtk-cursor-theme-name="Alkano"
gtk-cursor-theme-name="Qogir-cursors"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR

View File

@ -1,8 +1,8 @@
[Settings]
gtk-application-prefer-dark-theme=1
gtk-cursor-theme-name=Alkano
gtk-theme-name=B00merang-Dark
gtk-icon-theme-name=ArchLabs-Light
gtk-cursor-theme-name=Qogir-cursors
gtk-theme-name=Marwaita-Dark
gtk-icon-theme-name=Marwaita-Light
gtk-font-name=Noto Sans Display 10
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ

View File

@ -3,16 +3,18 @@ set shell zsh
set shellopts '-eu:--shwordsplit'
set ifs "\n"
set scrolloff 5
set previewer ~/.config/lf/lf-preview
set wrapscroll
set sortby time
set info size:time
set reverse
set incsearch
set period 1
set color256
# All other settings need to go above this comment because reasons
set icons
$lf -remote "send $id set previewer ${XDG_CONFIG_HOME}/lf/preview"
%{{
w=$(tput cols)
if [ $w -le 80 ]; then
@ -20,7 +22,7 @@ set icons
elif [ $w -le 160 ]; then
lf -remote "send $id set ratios 1:2:2"
else
lf -remote "send $id set ratios 1:3:2"
lf -remote "send $id set ratios 1:2:3"
fi
}}
@ -32,10 +34,10 @@ cmd open ${{
image/x-xcf|image/svg+xml) setsid gimp $f >/dev/null 2>&1 & ;;
image/gif) setsid sxiv-gif $f 2>/dev/null & ;;
image/*) setsid sxiv-rifle $f 2>/dev/null & ;;
audio/*) mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f ;;
video/*) setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%%s) $f -quiet >/dev/null 2>&1 & ;;
audio/*) mpv $f ;;
video/*) setsid mpv $f -quiet >/dev/null 2>&1 & ;;
application/pdf|application/cbz|application/cbr) setsid zathura $fx >/dev/null 2>&1 & ;;
*) xdg-open "$f" ;;
*) for f in $fx; do setsid $OPENER $f > /dev/null 2>&1 & done;;
esac
}}
@ -288,10 +290,10 @@ map / $lf -remote "send $id select \"$(FZF_DEFAULT_COMMAND='fd --max-depth=1' fz
map F $find | lf -remote "send $id select $(fzf-tmux --height 50% --reverse --border --margin 5% --inline-info --color border:#005688,bg+:#16252E,fg+:#26c6da,hl+:#ffffff,hl:#26c6da)"
# Movement
map gu cd ~/Documents/
map gu cd ~/doc/
map gE cd /etc
map gU cd /usr
map gd cd ~/Downloads
map gd cd ~/etc
map g. cd ~/.config
map gs cd ~/.local/share
map gr cd /run/media/deadguy
@ -299,7 +301,7 @@ map gm cd /mnt/remote
map gc cd /mnt/cel
map gb cd ~/.local/bin
map gR cd /
map gv cd ~/Videos/Learning
map gp cd ~/Pictures
map gv cd ~/vid/Learning
map gp cd ~/img
map cg $$EDITOR ~/.config/lf/lfrc
map sg source ~/.config/lf/lfrc

View File

@ -18,7 +18,6 @@ IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
# Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
HEIGHT="${2}"
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER=$(echo "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')
@ -99,7 +98,7 @@ handle_mime() {
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}"
exit 2;;
application/zip) atool --list -- "${FILE_PATH}" ;;
image/*) chafa --fill=block --symbols=block -c 240 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
image/*) mediainfo "${FILE_PATH}" || exit 1;;
video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
*/pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;
*opendocument*) odt2txt "${FILE_PATH}" ;;

View File

@ -1,19 +1,19 @@
# playlist_directory "~/Music/Albums/0playlists"
music_directory "/mnt/remote"
db_file "~/.config/mpd/mpd.db"
log_file "~/.config/mpd/mpd.log"
pid_file "~/.config/mpd/mpd.pid"
state_file "~/.config/mpd/mpdstate"
sticker_file "~/.config/mpd/sticker.sql"
db_file "$XDG_CONFIG_HOME/mpd/mpd.db"
log_file "$XDG_CONFIG_HOME/mpd/mpd.log"
pid_file "$XDG_CONFIG_HOME/mpd/mpd.pid"
state_file "$XDG_CONFIG_HOME/mpd/mpdstate"
sticker_file "$XDG_CONFIG_HOME/mpd/sticker.sql"
audio_output {
type "pulse"
name "pulse audio"
type "alsa"
name "ALSA"
}
audio_output {
type "fifo"
name "my_fifo"
name "Visualizer"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
@ -29,7 +29,6 @@ playlist_plugin {
}
bind_to_address "127.0.0.1"
bind_to_address "~/.config/mpd/socket"
port "6600"
log_level "default"
restore_paused "no"

View File

@ -1,18 +0,0 @@
# - The first entry with a matching MIME type will be executed, * is a wildcard
# - %s will be replaced with the image or video url
# - Add ``test=test -n "$DISPLAY"`` if your command opens a new window
# - Add ``needsterminal`` for commands that use the terminal
# - Add ``copiousoutput`` for commands that dump text to stdout
image/gif; sxiv-gif %s; test=test -n "$DISPLAY"
image/*; sxiv-rifle %s; test=test -n "$DISPLAY"
video/*; setsid mpv --quiet %s & disown; test=test -n "$DISPLAY"; copiousoutput
audio/*; setsid mpv --quiet %s & disown; test=test -n "$DISPLAY"; copiousoutput
application/pdf; zathura %s & disown; test=test -n "$DISPLAY"
# Autoview html
text/plain; $EDITOR %s ;
text/html; openfile %s ; nametemplate=%s.html
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 dump %s; nametemplate=%s.html; copiousoutput
application/pgp-encrypted; gpg -d '%s'; copiousoutput;

View File

@ -1,104 +0,0 @@
# vim: filetype=neomuttrc
source /usr/share/mutt-wizard/mutt-wizard.muttrc # mw-autogenerated
source /home/deadguy/.config/mutt/accounts/1-alex.muttrc # mw-autogenerated
macro index,pager <F1> '<sync-mailbox><enter-command>source /home/deadguy/.config/mutt/accounts/1-alex.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to vidaar@gmail.com" # mw-autogenerated
macro index,pager <F2> '<sync-mailbox><enter-command>source /home/deadguy/.config/mutt/accounts/2-alejo.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to alejo.jardon@gmail.com" # mw-autogenerated
macro index,pager <F3> '<sync-mailbox><enter-command>source /home/deadguy/.config/mutt/accounts/3-zeta.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to iamz@airmail.cc" # mw-autogenerated
set mailcap_path = /home/deadguy/.config/mutt/mailcap
source "~/.config/mutt/gpg.rc"
macro index O "<shell-escape>correo -a<enter>" "run offlineimap to sync all mail"
macro index,pager u "<pipe-message> urlscan -dcp -r 'linkhandler \"{}\"'<Enter>" "call urlscan to extract URLs out of a message"
bind index,pager,browser D half-down
bind index,pager,browser U half-up
bind index,pager d delete-message
bind index \cu undelete-message
bind index <space> collapse-thread
bind index <left> previous-unread
bind index <right> next-unread
bind pager <up> previous-line
bind pager <down> next-line
bind pager <left> previous-undeleted
bind pager <right> next-undeleted
set sort = threads # like gmail
set sort_aux = reverse-last-date-received # like gmail
set strict_threads
set uncollapse_jump # no collapse on unread message
set autoedit # Skip directly to composing
set edit_headers
set sendmail_wait = 1 # wait for sending to complete
set attribution = "El %d, %n escribio:" # set the attribution
set reply_to # reply to Reply to: field
set sig_dashes # dashes before sig
set text_flowed = yes # Eliminate odd line breaks
set sort_re # thread based on regex
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
set skip_quoted_offset = 3
set sidebar_visible = no
set editor="nvim -c 'set textwidth=80'"
set status_on_top = yes
set send_charset="utf-8"
set assumed_charset="cp1252"
charset-hook ^iso-8859-1$ cp1252
set recall=no
set read_inc=100
set alias_format = " %4n %t %-20a %r "
set date_format ="%a %d %b %R"
set index_format=" %T %{!%d %b} %1M %-28.28L %?X?&·? %s"
set pager_format=" %n  %T %s%*  %{!%d %b · %H:%M}  %?X?  %X ? %P  "
set status_format = " %f%?r? %r?   %m %?n?  %n ?  %?d?  %d ?%?t?  %t ?%?F?  %F? %>  %?p?  %p ?"
set vfolder_format = " %N %?n?%3n& ? %8m  · %f"
set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M"
# no addressed to me, to me, group, cc, sent by me, mailing list
set to_chars=""
# unchanged mailbox, changed, read only, attach mode
set status_chars = " "
set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"
tag-transforms "replied" "↻ " \
"encrytpted" " " \
"signed" " " \
"attachment" " " \
# The formats must start with 'G' and the entire sequence is case sensitive.
tag-formats "replied" "GR" \
"encrypted" "GE" \
"signed" "GS" \
"attachment" "GA" \
# powerline status bar hack
color status white black
color status green black ' '
color status yellow black ' '
color status red black ' '
color status brightblack blue '(.*) ' 1
color status blue black '.*( )' 1
color status black blue '\s* [0-9]+\s*'
color status blue black '( ).*$' 1
color status yellow black '( )\s* \s*[0-9]+\s*' 1
color status black yellow '\s* \s*[0-9]+\s*'
color status blue yellow '( ) ([0-9]+%|all|end)  \s*' 1
color status black blue ' ([0-9]+%|all|end)  \s*'
color status yellow black '( )\s* ' 1
color status default black ' '
ignore * # Ignore all headers
unignore from: to: cc: date: subject: # Show only these
unhdr_order * # Some distros order things
hdr_order from: to: cc: date: subject: # And in this order
# Warns if replying to multiple recipt email
reply-hook "~C 2" "set sleep_time=10\;echo 'Warning, original message has multiple recipients!'\;set sleep_time=1"
# "from" field gets 30% of remaining space, "subject" gets 70%. Remaining space is the total width minus the other fields
set my_index_format_pre='set my_col_from = `echo $((30 * ($(tput cols)-50) / 100))`; set my_col_subject = `echo $((70 * ($(tput cols)-50) / 100))`; set index_format="%2C %Z %D %-$my_col_from.${my_col_from}'
set my_index_format_post=' %-4.4c %?M?<%M ?%-$my_col_subject.${my_col_subject}s"'
folder-hook .*[sS]ent.* "$my_index_format_pre"t"$my_index_format_post"
folder-hook ! .*[sS]ent.* "$my_index_format_pre"F"$my_index_format_post"

View File

@ -56,6 +56,7 @@ browser_sort_mode = mtime
# LIBRARY
media_library_sort_by_mtime = yes
media_library_albums_split_by_date = yes
# UI
titles_visibility = no
@ -90,6 +91,6 @@ incremental_seeking = yes
# LYRICS
follow_now_playing_lyrics = no
store_lyrics_in_song_dir = no
lyrics_directory = ~/.local/share/lyrics
lyrics_directory = /tmp/lyrics
execute_on_song_change = "tapa"

View File

@ -2,7 +2,7 @@
"coc.preferences.currentFunctionSymbolAutoUpdate": true,
"coc.preferences.extensionUpdateCheck": "never",
"coc.preferences.colorSupport": true,
"diagnostic.displayByAle": true,
"diagnostic.displayByAle": false,
"diagnostic.refreshOnInsertMode": true,
"diagnostic.refreshAfterSave": true,
"diagnostic.checkCurrentLine": true,
@ -74,11 +74,30 @@
"javascriptreact": ["javascript"],
"typescript": ["javascript"]
},
"tsserver.npm": "/home/deadguy/.yarn/bin/yarn",
"tsserver.npm": "/home/deadguy/.config/yarn/bin/yarn",
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true,
"diagnostic-languageserver.filetypes": {
"vint": {
"command": "vint",
"debounce": 100,
"args": [ "--enable-neovim", "-"],
"offsetLine": 0,
"offsetColumn": 0,
"sourceName": "vint",
"formatLines": 1,
"formatPattern": [
"[^:]+:(\\d+):(\\d+):\\s*(.*)(\\r|\\n)*$",
{
"line": 1,
"column": 2,
"message": 3
}
]
}
}
}

View File

@ -2,24 +2,25 @@
scriptencoding utf-8 " Set utf-8 as default script encoding
let g:loaded_python_provider=1 " Disable python 2 interface
let g:python_host_skip_check=1 " Skip python 2 host check
let g:python3_host_prog = '/usr/bin/python3'
let g:node_host_prog = '/usr/local/bin/neovim-node-host'
let g:tagbar_ctags_bin = '/usr/bin/ctags'
let python_highlight_all=1 " full python syntax highlighting
let g:python3_host_prog = '/bin/python3'
" let g:node_host_prog = '/usr/local/bin/neovim-node-host'
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" }}}
" Plugins {{{
call plug#begin('~/.config/nvim/plugged')
Plug 'w0rp/ale'
call plug#begin(stdpath('data') . '/plugged')
Plug 'othree/yajs.vim', {'for': 'javascript'}
Plug 'othree/es.next.syntax.vim', {'for': 'javascript'}
Plug 'mhartington/nvim-typescript', {'do': './install.sh', 'for': 'typescript'}
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'sheerun/vim-polyglot'
Plug 'liuchengxu/vista.vim'
Plug 'jpalardy/vim-slime'
Plug 'liuchengxu/vista.vim', {'for': ['python', 'javascript', 'typescript']}
Plug 'jpalardy/vim-slime', {'for': ['python', 'foxdot']}
Plug 'tmsvg/pear-tree'
Plug 'tpope/vim-commentary'
Plug 'honza/vim-snippets'
Plug 'mhartington/oceanic-next'
call plug#end()
" }}}
@ -103,74 +104,11 @@ let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
let g:polyglot_disabled = ['javascript', 'python']
let g:markdown_fenced_languages = ['vim', 'help']
" }}}
" {{{ Ale
let g:ale_use_global_executables = 1
let g:ale_completion_enabled = 0
let g:ale_linters_explicit = 1
let g:ale_lint_delay = 0
let g:ale_lint_on_text_changed = 'normal'
let g:ale_lint_on_insert_leave = 1
let g:ale_fix_on_save = 1
let g:ale_close_preview_on_insert = 1
let g:ale_sign_highlight_linenrs = 1
let g:ale_sign_error = '✖'
let g:ale_sign_warning = '⚠'
let g:ale_sign_info = '●'
let g:ale_set_balloons = 1
let g:ale_virtualtext_cursor = 1
let g:ale_loclist_msg_format = '[%linter%] %s% (code)% [%severity%]'
let g:ale_set_highlights = 1
let g:ale_set_signs = 1
let g:ale_python_mypy_options = '--ignore-missing-imports'
let g:ale_python_pylint_options = '--disable=C'
let g:ale_python_flake8_options = '--ignore=E221'
let g:move_key_modifier = 'N'
let g:ale_linter_aliases = {
\ 'jsx': ['css', 'javascript'],
\ 'vue': ['vue', 'javascript'],
\}
let g:ale_linters = {
\ 'javascript': ['prettier_standard'],
\ 'jsx': ['prettier_standard'],
\ 'typescript': ['tsserver', 'eslint'],
\ 'json': ['prettier'],
\ 'html': ['prettier'],
\ 'css': ['stylelint'],
\ 'scss': ['stylelint'],
\ 'bash': ['shellcheck'],
\ 'sh': ['shellcheck'],
\ 'vim': ['vint'],
\ 'python': ['pyls', 'flake8', 'pylint']
\}
let g:ale_fixers = {
\ 'javascript': ['prettier_standard'],
\ 'jsx': ['prettier_standard'],
\ 'typescript': ['prettier'],
\ 'json': ['prettier'],
\ 'scss': ['stylelint'],
\ 'css': ['stylelint'],
\ 'html': ['prettier'],
\ 'markdown': ['prettier'],
\ 'python': ['autopep8', 'remove_trailing_lines', 'isort', 'yapf']
\}
let g:ale_pattern_options = {
\ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []},
\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []},
\}
nmap <silent> <F7> <Plug>(ale_previous_wrap)
nmap <silent> <F8> <Plug>(ale_next_wrap)
let g:vim_jsx_pretty_colorful_config = 1
let g:jsx_ext_required = 1
" }}}
" CoC {{{
let g:coc_global_extensions = ['coc-lists', 'coc-highlight', 'coc-explorer', 'coc-snippets', 'coc-tsserver', 'coc-emmet', 'coc-css', 'coc-html', 'coc-json']
" Explorer
nmap <silent><F5> :CocCommand explorer<CR>
" Config
nnoremap <silent><F6> :CocConfig<CR>
let g:coc_global_extensions = ['coc-lists', 'coc-highlight', 'coc-explorer', 'coc-prettier', 'coc-tsserver', 'coc-emmet', 'coc-css', 'coc-html', 'coc-json']
" Lists
nnoremap <silent><F1> :<C-u>CocList -S --ignore-case helptags<CR>
@ -178,6 +116,17 @@ nnoremap <silent><F2> :<C-u>CocList -S --ignore-case files<CR>
nnoremap <silent><F3> :<C-u>CocList --normal buffers<CR>
nnoremap <silent><F4> :<C-u>CocList windows<CR>
" Explorer
nnoremap <silent><F5> :CocCommand explorer<CR>
" Config
nnoremap <silent><F6> :CocConfig<CR>
" Diagnostics
nnoremap <silent> <F7> <Plug>(coc-diagnostic-prev)
nnoremap <silent> <F8> <Plug>(coc-diagnostic-next)
nnoremap <silent> <F9> :<C-u>CocList diagnostics<cr>
" <CR> to confirm completion
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<CR>"
@ -192,14 +141,31 @@ let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Snippets
imap <C-j> <Plug>(coc-snippets-expand-jump)
let g:coc_snippet_next = '<tab>'
let g:coc_snippet_prev = '<S-TAB>'
" Python
nnoremap <silent>gp :CocCommand python.execInTerminal<CR>
nnoremap <silent>gr :CocCommand python.startREPL<CR>
"}}}
" Vista {{{
let g:vista#renderer#enable_icon = 1
@ -214,11 +180,6 @@ let g:vista_executive_for = {
nnoremap <silent> <F11> :Vista!!<cr>
" }}}
" JS {{{
let g:vim_jsx_pretty_colorful_config = 1
let g:jsx_ext_required = 1
let g:yats_host_keyword = 1
"}}}
" Colors {{{
set termguicolors
let g:oceanic_next_terminal_italic = 1
@ -231,7 +192,7 @@ function! MyHighlights() abort
call matchadd('ColorColumn', '\%81v', 100)
endfunction
hi! VertSplit ctermbg=NONE ctermfg=NONE guibg=#080808 guifg=#080808
hi! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
hi! Comment cterm=italic ctermbg=NONE guibg=NONE
hi! Normal ctermbg=NONE guibg=NONE
hi! NonText ctermbg=NONE guibg=NONE
@ -240,22 +201,26 @@ hi! CursorLineNr ctermbg=236 ctermfg=NONE guibg=#303030
hi! CursorLine ctermbg=236 ctermfg=NONE guibg=#303030
hi! SignColumn ctermbg=NONE guibg=NONE
hi! Folded ctermbg=NONE guibg=NONE
hi! TabLineFill ctermfg=NONE ctermbg=NONE guibg=#080808 guifg=#080808
hi! TablineSel ctermfg=234 ctermbg=4 guibg=#008bbd guifg=#1c1c1c
hi! TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
hi! TablineSel ctermfg=234 ctermbg=NONE guibg=NONE guifg=#008bbd
hi! EndOfBuffer ctermbg=NONE ctermfg=NONE guibg=NONE guifg=#080808
hi! WildMenu ctermfg=228 ctermbg=0 guifg=#ffff00 guibg=#000000
hi! RedrawDebugClear guibg=#080808
hi! NvimInternalError guifg=#080808
hi! DiffAdded guifg=#333333
hi! PmenuSel guifg=#6699cc guibg=#111111
hi! PmenuThumb guifg=#333333
hi! link CocErrorSign WarningMsg
hi! link CocWarningSign Number
hi! link CocInfoSign Type
" }}}
" Statusline {{{
highlight User1 ctermfg=251 ctermbg=NONE guibg=#080808 guifg=#c6c6c6
highlight User2 ctermfg=234 ctermbg=NONE guibg=#f74782 guifg=#1c1c1c
highlight User3 ctermfg=234 ctermbg=4 guibg=#008bb4 guifg=#1c1c1c
highlight User4 ctermfg=234 ctermbg=251 guibg=#c6c6c6 guifg=#1c1c1c
highlight User5 ctermfg=234 ctermbg=4 guibg=#e64eff guifg=#1c1c1c
highlight User6 ctermfg=234 ctermbg=9 guibg=#fbad34 guifg=#1c1c1c
highlight User7 ctermfg=234 ctermbg=251 guibg=#407e4a guifg=#ffffff
highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6
highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782
highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4
highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6
highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff
highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34
highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a
let g:modes={
\ 'n' : ['%3*', 'NORMAL'],
@ -280,14 +245,16 @@ let g:modes={
\}
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '' : printf(
\ ' ⚠ :%d ✖ :%d ',
\ l:all_non_errors,
\ l:all_errors
\)
let info = get(b:, 'coc_diagnostic_info', {})
if empty(info) | return '' | endif
let msgs = []
if get(info, 'error', 0)
call add(msgs, '✖ :' . info['error'])
endif
if get(info, 'warning', 0)
call add(msgs, '⚠ :' . info['warning'])
endif
return join(msgs, ' '). ' ' . get(g:, 'coc_status', '')
endfunction
function! ModeColor() abort
@ -298,7 +265,7 @@ function! CurrentMode() abort
return ' ' . get(g:modes, mode(), '-')[1] . ' '
endfunction
function! LinePasteMode()
function! LinePasteMode() abort
let paste_status = &paste
if paste_status == 1
return ' paste '
@ -314,10 +281,10 @@ function! Statusline()
let b:status.=LinePasteMode()
let b:status.='%1* '
let b:status.='%= '
let b:status.=coc#status()
let b:status.=' %6*'
let b:status.=LinterStatus()
let b:status.='%3* %p%% %c '
let b:status.=''
return b:status
endfunction
@ -406,7 +373,7 @@ if !exists('autocommands_loaded') && has('autocmd')
au CursorHold * call CocActionAsync('doHover')
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
au ColorScheme * call MyHighlights()
aug END
aug END
aug inserts
au InsertEnter * setlocal nocursorline
@ -451,7 +418,7 @@ function! LaunchSC() range abort
silent exe "normal! :vsplit\n"
silent exe "normal! :terminal\n"
call SetActiveTerminalJobID()
call jobsend(g:my_active_terminal_job_id, "sclang -D ~/Music/LiveCoding/foxdot.scd\r")
call jobsend(g:my_active_terminal_job_id, "sclang -D ~/doc/Algorave/foxdot.scd\r")
silent exe "normal! :tabprev\n"
silent exe "normal! <cr>\n"
sleep 2200ms
@ -483,13 +450,6 @@ map <silent> <Leader>xs :call LaunchSC()<CR>
map <silent> <Leader>xd :call LaunchFoxDot()<CR>
map <silent> <Leader>xf :set filetype=foxdot<CR>
"}}}
" Vim-Tmux Navigator {{{
" Intelligently navigate tmux panes and Vim splits using the same keys.
" See https://sunaku.github.io/tmux-select-pane.html for documentation.
let progname = substitute($VIM, '.*[/\\]', '', '')
set title titlestring=%{progname}\ %f\ +%l\ #%{tabpagenr()}.%{winnr()}
if &term =~? '^screen' && !has('nvim') | exe "set t_ts=\e]2; t_fs=\7" | endif
"}}}
"Mappings {{{
"Normal {{{
" Plug
@ -500,10 +460,10 @@ 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
nnoremap <silent> <S-Left> <C-W>H
nnoremap <silent> <S-Right> <C-W>L
nnoremap <silent> <S-Up> <C-W>K
nnoremap <silent> <S-Down> <C-W>J
" Resize splits
nnoremap <silent> <Left> :vertical resize -2<CR>
@ -511,11 +471,11 @@ nnoremap <silent> <Right> :vertical resize +2<CR>
nnoremap <silent> <Up> :resize -1<CR>
nnoremap <silent> <Down> :resize +1<CR>
" Maximize current split vertically
nnoremap <silent> <leader>z <C-W><C-_>
" Make all splits equal size vertically
nnoremap <silent> <leader>Z <C-W><C-=>
" Alt to switch windows
nnoremap <M-j> <C-W><C-J>
nnoremap <M-k> <C-W><C-K>
nnoremap <M-l> <C-W><C-L>
nnoremap <M-h> <C-W><C-H>
" Edit and source config file
nnoremap <silent> <leader>ev :vsplit $MYVIMRC<CR>
@ -531,9 +491,6 @@ nnoremap <silent> <leader>b :bdelete<CR>
nnoremap <silent> <leader>q :q!<CR>
nnoremap <silent> <leader>Q :qa!<CR>
" Fast leave insert mode
cnoremap jk <C-c>
" Fast beginning and end of document
nnoremap <Bar> gg
nnoremap ¿ G
@ -589,28 +546,14 @@ nnoremap g# g#zz
" What about the Q
nnoremap Q <nop>
map q <nop>
" Shift butterfinger
:command! WQ wq
:command! Wq wq
:command! Wqa wqa
:command! Wa wa
:command! WA wa
:command! W w
:command! Q q
:command! Qa qa
:command! QA qa
"}}}
"Insert {{{
inoremap jk <esc>
inoremap kj <esc>
" Ensure that ctrl+u in insert mode can be reversed
" http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U
inoremap <c-u> <c-g>u<c-u>
inoremap <c-w> <c-g>u<c-w>
" Deedee
" Exit insert, dd line, enter insert
inoremap <c-d> <esc>ddi
" Line movements
@ -665,17 +608,6 @@ function! CmdLine(str)
call feedkeys(':' . a:str)
endfunction
" vp doesn't replace paste buffer
function! RestoreRegister()
let @" = s:restore_reg
return ''
endfunction
function! s:Repl()
let s:restore_reg = @"
return "p@=RestoreRegister()\<cr>"
endfunction
vmap <silent> <expr> p <sid>Repl()
" global replace
vnoremap <Leader>sw "hy
\ :let b:sub = input('global replacement: ') <Bar>
@ -705,13 +637,5 @@ nnoremap <Leader>cw
\ execute "%s/<C-r><C-w>/".b:sub.'/gc' <Bar>
\ unlet b:sub <Bar>
\ endif <CR>
" local keyword jump
nnoremap <Leader>fw
\ [I:let b:jump = input('Go To: ') <Bar>
\ if b:jump !=? '' <Bar>
\ execute "normal! ".b:jump."[\t" <Bar>
\ unlet b:jump <Bar>
\ endif <CR><Paste>
" }}}
" vim:foldmethod=marker:foldlevel=0

View File

@ -1,7 +0,0 @@
from FoxDot import *
Clock.clear()
Clock.bpm = 130

View File

@ -1,173 +0,0 @@
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
# GLX backend
glx-no-stencil = true;
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
glx-copy-from-front = false;
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
# May break VSync and is not available on some drivers.
# Overrides --glx-copy-from-front.
# glx-use-copysubbuffermesa = true;
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
glx-no-rebind-pixmap = true;
# Enabled client-side shadows on windows.
shadow = false;
# The blur radius for shadows. (default 12)
shadow-radius = 3;
# The left offset for shadows. (default -15)
shadow-offset-x = 2.5;
# The top offset for shadows. (default -15)
shadow-offset-y = 2.5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.65;
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
"! name~=''",
"!focused",
"fullscreen",
"name = 'Notification'",
"name *= 'picom'",
"class_g = 'Firefox' && argb",
"class_g = 'Rofi'",
"class_g = 'slop'",
"class_g = 'maim'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
shadow-ignore-shaped = true;
# Opacity
inactive-opacity = 25;
active-opacity = 50;
frame-opacity = 50;
inactive-opacity-override = true;
# Dim inactive windows. (0.0 - 1.0)
inactive-dim = 0.2;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
blur-background = true;
# Blur background of opaque windows with transparent frames as well.
blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = false;
blur-kern = "5x5box";
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"class_g = 'slop'",
"class_g = 'maim'",
];
opacity-rule = [
"35:class_g = 'Bspwm' && class_i = 'presel_feedback'",
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" #FLASHFOCUS
]
opacity-exclude = [
"class_g = 'mpv'",
"class_g = 'Firefox'",
"name *?= 'Notification'",
"_GTK_FRAME_EXTENTS@:c",
"n:w:Firefox",
"! name~=''",
"class_g ?= 'Xfce4-power-manager'",
"class_g = 'slop'",
"class_g = 'Rofi'",
"class_g = 'maim'",
];
# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 3;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.03;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.03;
# Fade windows in/out when opening/closing
# no-fading-openclose = true;
# Specify a list of conditions of windows that should not be faded.
fade-exclude = [ ];
# Try to detect WM windows and mark them as active.
mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
mark-ovredir-focused = true;
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
use-ewmh-active-win = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
detect-client-opacity = true;
# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
refresh-rate = 0;
# Vertical synchronization: match the refresh rate of the monitor
vsync = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = false;
# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#sw-opti = true;
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
# Known to cause flickering when redirecting/unredirecting windows.
unredir-if-possible = false;
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [ ];
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
detect-transient = true;
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
detect-client-leader = true;
# Window type settings
wintypes:
{
tooltip =
{
# fade: Fade the particular type of windows.
fade = true;
# shadow: Give those windows shadow
shadow = false;
# opacity: Default opacity for the type of windows.
opacity = 0.85;
# focus: Whether to always consider windows of this type focused.
focus = true;
};
dnd = { shadow = false };
dock = { shadow = false };
};
# XSync
# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
xrender-sync-fence = true;

View File

@ -1,209 +0,0 @@
from __future__ import (absolute_import, division, print_function)
# You can import any python module as needed.
# from collections import deque
import os
import re
# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import Command
from ranger.core.loader import CommandLoader
class paste_as_root(Command):
def execute(self):
if self.fm.do_cut:
self.fm.execute_console('shell sudo mv %c .')
else:
self.fm.execute_console('shell sudo cp -r %c .')
# https://github.com/ranger/ranger/wiki/Integrating-File-Search-with-fzf
# add this to your ~/.config/ranger/rc.conf: map <C-f> fzf_select
class select(Command):
"""
:fzf_select
Find a file using fzf.
With a prefix argument select only directories.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
if self.quantifier:
# match only directories
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
else:
# match files and directories
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
# fzf_locate
class locate(Command):
"""
:fzf_locate
Find a file using fzf.
With a prefix argument select only directories.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
if self.quantifier:
command = "locate home media | fzf -e -i"
else:
command = "locate home media | fzf -e -i"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
class bring(Command):
"""
:fzf_bring
Find a file using fzf and bring it to the current directory.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
if self.quantifier:
# match only directories
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
else:
# match files and directories
command = "find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
# fzf_fasd - Fasd + Fzf + Ranger (Interactive Style)
class fazdf(Command):
"""
:fzf_fasd
Jump to a file or folder using Fasd and fzf
URL: https://github.com/clvv/fasd
URL: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
if self.quantifier:
command = "fasd | fzf -e -i --tac --no-sort | awk '{print $2}'"
else:
command = "fasd | fzf -e -i --tac --no-sort | awk '{print $2}'"
fzf = self.fm.execute_command(command, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.decode('utf-8').rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)
# Fasd with ranger (Command Line Style)
# https://github.com/ranger/ranger/wiki/Commands
class fasd(Command):
"""
:fasd
Jump to directory using fasd
URL: https://github.com/clvv/fasd
"""
def execute(self):
import subprocess
arg = self.rest(1)
if arg:
directory = subprocess.check_output(["fasd", "-d"] + arg.split(), universal_newlines=True).strip()
self.fm.cd(directory)
# mkcd (mkdir + cd)
class mkcd(Command):
"""
:mkcd <dirname>
Creates a directory with the name <dirname> and enters it.
"""
def execute(self):
from os.path import join, expanduser, lexists
from os import makedirs
dirname = join(self.fm.thisdir.path, expanduser(self.rest(1)))
if not lexists(dirname):
makedirs(dirname)
match = re.search('^/|^~[^/]*/', dirname)
if match:
self.fm.cd(match.group(0))
dirname = dirname[match.end(0):]
for m in re.finditer('[^/]+', dirname):
s = m.group(0)
if s == '..' or (s.startswith('.') and not self.fm.settings['show_hidden']):
self.fm.cd(s)
else:
# We force ranger to load content before calling `scout`.
self.fm.thisdir.load_content(schedule=False)
self.fm.execute_console('scout -ae ^{}$'.format(s))
else:
self.fm.notify("file/directory exists!", bad=True)
class extracthere(Command):
def execute(self):
""" Extract copied files to current directory """
copied_files = tuple(self.fm.copy_buffer)
if not copied_files:
return
def refresh(_):
cwd = self.fm.get_directory(original_path)
cwd.load_content()
one_file = copied_files[0]
cwd = self.fm.thisdir
original_path = cwd.path
au_flags = ['-X', cwd.path]
au_flags += self.line.split()[1:]
au_flags += ['-e']
self.fm.copy_buffer.clear()
self.fm.cut_buffer = False
if len(copied_files) == 1:
descr = "extracting: " + os.path.basename(one_file.path)
else:
descr = "extracting files from: " + os.path.basename(one_file.dirname)
obj = CommandLoader(args=['aunpack'] + au_flags + [f.path for f in copied_files], descr=descr)
obj.signal_bind('after', refresh)
self.fm.loader.add(obj)

View File

@ -1,239 +0,0 @@
#!/usr/bin/python
# coding=UTF-8
# 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 os
import re
# 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': '',
}
dir_node_exact_matches = {
# 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': '',
}
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, ''))

View File

@ -1,513 +0,0 @@
# == Options
set viewmode miller
set column_ratios 1,3,4
set hidden_filter ^\.|\.(?:pyc|vrb|pyo|bak|swp|aux|log|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)$|^lost\+found$|^__(py)?cache__$
set show_hidden false
set confirm_on_delete always
set preview_script ~/.config/ranger/scope.sh
set use_preview_script true
set automatically_count_files true
set open_all_images true
set vcs_aware true
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set vcs_backend_svn disabled
set preview_images false
set preview_images_method ueberzug
set w3m_delay 0.05
set unicode_ellipsis true
set show_hidden_bookmarks true
set colorscheme default
set preview_files true
set preview_directories true
set collapse_preview true
set save_console_history false
set status_bar_on_top false
set draw_progress_bar_in_status_bar true
set draw_borders none
set dirname_in_tabs true
set mouse_enabled true
set display_size_in_main_column true
set display_size_in_status_bar true
set display_free_space_in_status_bar true
set display_tags_in_all_columns true
set update_title true
set update_tmux_title true
set shorten_title 4
set hostname_in_titlebar false
set tilde_in_titlebar true
set max_history_size 20
set max_console_history_size 50
set scroll_offset 8
set flushinput true
set padding_right false
set autosave_bookmarks false
set save_backtick_bookmark true
set autoupdate_cumulative_size false
set show_cursor false
set sort mtime
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
set sort_unicode true
set xterm_alt_key false
set cd_bookmarks true
set cd_tab_case sensitive
set preview_max_size 5242880
set hint_collapse_threshold 10
set show_selection_in_titlebar true
set idle_delay 2000
set metadata_deep_search false
set clear_filters_on_dir_change true
set line_numbers true
set one_indexed true
set save_tabs_on_exit false
set wrap_scroll true
set global_inode_type_filter
# == Command Aliases in the Console
alias e edit
alias q quit
alias q! quit!
alias qa quitall
alias qa! quitall!
alias qall quitall
alias qall! quitall!
alias setl setlocal
alias filter scout -prts
alias find scout -aeit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefiklst
# == Define keys for the browser
# Basic
map Q quitall
map q quit
map R reload_cwd
map F set freeze_files!
map <A-l> redraw_window
map <C-r> reset
map <C-c> abort
map <esc> change_mode normal
map ~ set viewmode!
map <A-j> scroll_preview 1
map <A-k> scroll_preview -1
map i display_file
map ? help
map W display_log
map w taskview_open
map S shell $SHELL
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 fi console find%space
map cd console cd%space
map <C-p> chain console; eval fm.ui.console.history_move(-1)
# Change the line mode
map lmf linemode filename
map lmi linemode fileinfo
map lmm linemode mtime
map lmp linemode permissions
map lms linemode sizemtime
map lmt linemode metatitle
# Tagging / Marking
map at tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map va mark_files all=True toggle=True
map uv mark_files all=True val=False
map vs toggle_visual_mode
map uV toggle_visual_mode reverse=True
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F2> eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
map <F3> cut
map <F4> copy
map <F5> reload_cwd
map <F6> edit
map <F7> console mkdir%space
map <F8> console delete
map <F9> display_file
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
map <DELETE> console delete
map <INSERT> console touch%space
# VIM-like
copymap <UP> k
copymap <DOWN> j
copymap <LEFT> h
copymap <RIGHT> l
copymap <HOME> gg
copymap <END> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
# Jumping around
map H history_go -1
map L history_go 1
map } move_parent 1
map { move_parent -1
map ] traverse
map [ traverse_backwards
map ) jump_non
map gh cd ~
map gu cd ~/Documents/
map gE cd /etc
map gU cd /usr
map gd cd ~/Downloads
map g. cd ~/.config
map gs cd ~/.local/share
map gm cd /mnt/remote
map gc cd /mnt/cel
map gb cd ~/.local/bin
map gM cd /media
map gR cd /
map gr cd /run/media/deadguy
map g? cd /usr/share/doc/ranger
map gl cd -r .
map gL cd -r %f
map gv cd ~/Videos/Learning
map gp cd ~/Pictures
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
# Tabs
map <C-n> eval fm.tab_new('%d')
map <C-w> tab_close
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
map t+ tab_move 1
map t- tab_move -1
map th tab_new ~
map tu tab_restore
map tc tab_close
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map cg chain shell nvim -p ~/.config/ranger/rc.conf; source ~/.config/ranger/rc.conf
# Open file in a new tmux pane
map ef eval import shlex; fm.run("tmux splitw -h rifle " + shlex.quote(fm.thisfile.basename))
map ev eval import shlex; fm.run("tmux splitw -v rifle " + shlex.quote(fm.thisfile.basename))
map ew eval import shlex; fm.run("tmux new-window rifle " + shlex.quote(fm.thisfile.basename))
# Better file renaming
map rw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
map ra rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
# Filesystem Operations
map pp paste
map po paste overwrite=True
map pP paste append=True
map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
map pr paste_as_root
map dD console delete
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map dt cut mode=toggle
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
map yt copy mode=toggle
map y. yank name_without_extension
map yp yank path
map yd yank dir
map yn yank name
# Searching
map ff console scout -ftsea%space
map / console travel%space
map n search_next
map N search_next forward=False
map st search_next order=tag
map ss search_next order=size
map si search_next order=mimetype
map sc search_next order=ctime
map sm search_next order=mtime
map sa search_next order=atime
# Sorting
map or toggle_option sort_reverse!
map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
# Settings
map zc set collapse_preview!
map zd set sort_directories_first!
map zh set show_hidden!
map <C-h> set show_hidden!
map zI set flushinput!
map zi set preview_images!
map zm set mouse_enabled!
map zp set preview_files!
map zP set preview_directories!
map zs set sort_case_insensitive!
map zu set autoupdate_cumulative_size!
map zv set use_preview_script!
map zf console filter -s%space
# Filter stack
map .n console filter_stack add name%space
map .m console filter_stack add mime%space
map .d filter_stack add type d
map .f filter_stack add type f
map .l filter_stack add type l
map .| filter_stack add or
map .& filter_stack add and
map .! filter_stack add not
map .r console filter_stack rotate
map .c filter_stack clear
map .* filter_stack decompose
map .p filter_stack pop
map .. filter_stack show
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map mm<any> set_bookmark %any
map um<any> unset_bookmark %any
map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# == Define keys for the console
# Note: Unmapped keys are passed directly to the console.
# Basic
cmap <tab> eval fm.ui.console.tab()
cmap <s-tab> eval fm.ui.console.tab(-1)
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
cmap <A-l> redraw_window
copycmap <ESC> <C-c>
copycmap <CR> <C-j>
# Move around
cmap <up> eval fm.ui.console.history_move(-1)
cmap <down> eval fm.ui.console.history_move(1)
cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
cmap <a-left> eval fm.ui.console.move_word(left=1)
cmap <a-right> eval fm.ui.console.move_word(right=1)
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
# And of course the emacs way
copycmap <up> <C-p>
copycmap <down> <C-n>
copycmap <left> <C-b>
copycmap <right> <C-f>
copycmap <home> <C-a>
copycmap <end> <C-e>
copycmap <delete> <C-d>
copycmap <backspace> <C-h>
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
# and <backspace2> (code 127). To be sure, use both.
copycmap <backspace> <backspace2>
# This special expression allows typing in numerals:
cmap <allow_quantifiers> false
# == Pager Keybindings
# Movement
pmap <down> pager_move down=1
pmap <up> pager_move up=1
pmap <left> pager_move left=4
pmap <right> pager_move right=4
pmap <home> pager_move to=0
pmap <end> pager_move to=-1
pmap <pagedown> pager_move down=1.0 pages=True
pmap <pageup> pager_move up=1.0 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <C-u> pager_move up=0.5 pages=True
copypmap <UP> k <C-p>
copypmap <DOWN> j <C-n> <CR>
copypmap <LEFT> h
copypmap <RIGHT> l
copypmap <HOME> g
copypmap <END> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
pmap <A-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
# == Taskview Keybindings
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
tmap <A-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
# Assorted stuff
map cx shell chmod +x %s
map V console shell vim%space
map Nf console touch%space
map Nd console mkdir%space
map Nc console mkcd%space
map sl console shell ln -sT%space
map X shell atool -x %f
map Zt shell tar -cvzf %f.tar.gz %f
map Zz shell apack %f.zip %f
map Zb shell apack --format=zip %f.cbz %f
map bg shell setbg %f
map C shell convert -rotate 90 %s %s
map zf select
map zl locate
map zb bring
map zz fazdf
map zo console fasd%space
map Ma shell mpc add "%s"
map Ms shell mpc play
map Mp shell mpc toggle
map Mn shell mpc next
map Mb shell mpc prev
## Move
map mD shell mv %s ~/Documents/
map md shell mv %s ~/Downloads/
map mp shell mv %s ~/Pictures/
map m. shell mv %s ~/.config/
map mv shell mv %s ~/Videos/
map mm shell mv %s ~/Music/
map mb shell mv %s ~/bin/
map mh shell mv %s ~/
## Copy
map YD shell cp -r %s ~/Documents/
map Yd shell cp -r %s ~/Downloads/
map Yp shell cp -r %s ~/Pictures/
map Y. shell cp -r %s ~/.config/
map Yv shell cp -r %s ~/Videos/
map Ym shell cp -r %s ~/Music/
map Yb shell cp -r %s ~/bin/
map Yh shell cp -r %s ~/
default_linemode devicons

View File

@ -1,180 +0,0 @@
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
# $1-$9 | The n-th selected file
# $@ | All selected files
#
# If you use the special command "ask", rifle will ask you what program to run.
#
# Prefixing a condition with "!" will negate its result.
# These conditions are currently supported:
# match <regexp> | The regexp matches $1
# ext <regexp> | The regexp matches the extension of $1
# mime <regexp> | The regexp matches the mime type of $1
# name <regexp> | The regexp matches the basename of $1
# path <regexp> | The regexp matches the absolute path of $1
# has <program> | The program is installed (i.e. located in $PATH)
# env <variable> | The environment variable "variable" is non-empty
# file | $1 is a file
# directory | $1 is a directory
# number <n> | change the number of this command to n
# terminal | stdin, stderr and stdout are connected to a terminal
# X | $DISPLAY is not empty (i.e. Xorg runs)
#
# There are also pseudo-conditions which have a "side effect":
# flag <flags> | Change how the program is run. See below.
# label <label> | Assign a label or name to the command so it can
# | be started with :open_with <label> in ranger
# | or `rifle -p <label>` in the standalone executable.
# else | Always true.
#
# Flags are single characters which slightly transform the command:
# f | Fork the program, make it run in the background.
# | New command = setsid $command >& /dev/null &
# r | Execute the command with root permissions
# | New command = sudo $command
# t | Run the program in a new terminal. If $TERMCMD is not defined,
# | rifle will attempt to extract it from $TERM.
# | New command = $TERMCMD -e $command
# Note: The "New command" serves only as an illustration, the exact
# implementation may differ.
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
#-------------------------------------------
# Websites
#-------------------------------------------
# Rarely installed browsers get higher priority; It is assumed that if you
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
# other hand are often only installed as fallback browsers.
ext x?html?, has firefox, X, flag f = firefox -- "$@"
ext x?html?, has links, terminal = links "$@"
ext x?html?, has lynx, terminal = lynx -- "$@"
ext x?html?, has w3m, terminal = w3m "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
# Define the "editor" for text files as first action
mime ^text, label editor = $EDITOR -- "$@"
mime ^text, label pager = "$PAGER" -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
ext 1|5 = man "$1"
ext s[wmf]c, has zsnes, X = zsnes "$1"
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
ext nes, has fceux, X = fceux "$1"
ext exe = wine "$1"
name ^[mM]akefile$ = make
#--------------------------------------------
# Code
#-------------------------------------------
ext py = python -- "$1"
ext pl = perl -- "$1"
ext rb = ruby -- "$1"
ext js = node -- "$1"
ext sh = sh -- "$1"
ext php = php -- "$1"
name ^[mM]akefile$ = make
name ^PKGBUILD$ = makepkg --printsrcinfo >.SRCINFO && makepkg -f
#--------------------------------------------
# Audio without X
#-------------------------------------------
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
#--------------------------------------------
# Video/Audio with a GUI
#-------------------------------------------
mime ^video, has mpv, X, flag f = mpv -- "$@"
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
mime ^text, ext aup, has audacity, X, flag f = audacity -- "$@"
directory, has mpv, flag f = ptv -- "$@"
#--------------------------------------------
# Video without X:
#-------------------------------------------
mime ^video, terminal, !X, has mpv = mpv -- "$@"
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has zathura, X, flag f = zathura -- "$@"
ext pdf, has mupdf, X, flag f = mupdf "$@"
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
ext epub, has zathura, X, flag f = zathura "$@"
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
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 mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
ext djvu|cbz|cbr, has zathura,X, flag f = zathura -- "$@"
#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
ext gif, has sxiv, X, flag f = sxiv-gif -- "$@"
mime ^image, has sxiv, X, flag f = sxiv-rifle -- "$@"
mime ^image, has gimp, X, flag f = gimp -- "$@"
ext xcf, X, flag f = gimp -- "$@"
ext webm, has mpv, X, flag f = mpv --loop=8 -- "$@"
ext blend, has blender, X, flag f = blender -- "$@"
#-------------------------------------------
# Archives
#-------------------------------------------
ext to|torrent, flag f, has transmission = transmission "$1"
# avoid password prompt by providing empty password
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
# This requires atool
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
# Listing and extracting archives without atool:
ext 7z|rar|zip|tar|tgz|xz, has file-roller, X, flag f = file-roller -- "$@"
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
ext zip, has unzip = unzip -l "$1" | less
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
ext ace, has unace = unace l "$1" | less
ext ace, has unace = for file in "$@"; do unace e "$file"; done
ext rar, has unrar = unrar l "$1" | less
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
# Flag t fallback terminals
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
# Define the editor for non-text files + pager as last action
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
# The very last action, so that it's never triggered accidentally, is to execute a program:
mime application/x-executable = "$1"

View File

@ -1,257 +0,0 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
# If the option `use_preview_script` is set to `true`,
# then this script will be called and its output will be displayed in ranger.
# ANSI color codes are supported.
# STDIN is disabled, so interactive scripts won't work properly
# This script is considered a configuration file and must be updated manually.
# It will be left untouched if you upgrade ranger.
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | Display stdout as preview
# 1 | no preview | Display no preview at all
# 2 | plain text | Display the plain content of the file
# 3 | fix width | Don't reload when width changes
# 4 | fix height | Don't reload when height changes
# 5 | fix both | Don't ever reload
# 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
# 7 | image | Display the file directly as an image
# Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER=$(echo "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')
# Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=4
HIGHLIGHT_STYLE='pablo'
PYGMENTIZE_STYLE='autumn'
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
# Archive
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1;;
rar)
# Avoid password prompt by providing empty password
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1;;
7z)
# Avoid password prompt by providing empty password
7z l -p -- "${FILE_PATH}" && exit 5
exit 1;;
# PDF
pdf)
# Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w "${PV_WIDTH}" && exit 5
pdftoppm -jpeg -singlefile "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
exiftool "${FILE_PATH}" && exit 5
exit 1;;
# BitTorrent
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1;;
# OpenDocument
odt|ods|odp|sxw)
# Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
exit 1;;
# HTML
htm|html|xhtml)
# Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
# JSON
json)
jq --color-output . "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
;;
esac
}
handle_image() {
local DEFAULT_SIZE="1366x768"
local mimetype="${1}"
case "${mimetype}" in
# SVG
# image/svg+xml)
# convert "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
# exit 1
# ;;
# Image
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
# If orientation data is present and the image actually
# needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
# ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
# `w3mimgdisplay` will be called for all images (unless overriden as above),
# but might fail for unsupported types.
exit 7;;
# Video
#video/*)
# # Thumbnail
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
# exit 1;;
# PDF
application/pdf)
pdftoppm -f 1 -l 1 \
-scale-to-x 1920 \
-scale-to-y -1 \
-singlefile \
-jpeg -tiffcompression jpeg \
-- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
&& exit 6 || exit 1;;
# Font
application/font*|application/*opentype)
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
if fontimage -o "${preview_png}" \
--pixelsize "120" \
--fontname \
--pixelsize "80" \
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
--text " abcdefghijklmnopqrstuvwxyz " \
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
--text " The quick brown fox jumps over the lazy dog. " \
"${FILE_PATH}";
then
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
&& rm "${preview_png}" \
&& exit 6
else
exit 1
fi
;;
# Preview archives using the first image inside.
# (Very useful for comic book collections for example.)
# application/zip|application/x-rar|application/x-7z-compressed|\
application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
local fn=""; local fe=""
local zip=""; local rar=""; local tar=""; local bsd=""
case "${mimetype}" in
application/zip) zip=1 ;;
application/x-rar) rar=1 ;;
application/x-7z-compressed) ;;
*) tar=1 ;;
esac
{ [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
{ fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
{ [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
{ [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
[ print(l, end='') for l in sys.stdin if \
(m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
sort -V | head -n 1)
[ "$fn" = "" ] && return
[ "$bsd" ] && fn=$(printf '%b' "$fn")
[ "$tar" ] && tar --extract --to-stdout \
--file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
[ "$bsd" ] && bsdtar --extract --to-stdout \
--file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
[ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
[ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
"${IMAGE_CACHE_PATH}" && exit 6
[ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
"${IMAGE_CACHE_PATH}" && exit 6
[ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
;;
esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
# Text
text/* | */xml)
# Syntax highlight
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$( tput colors )" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
# pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
exit 2;;
# Image
image/*)
local orientation
orientation="$(identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}")"
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
# Video and audio
video/*)
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
;;
audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

View File

@ -51,29 +51,17 @@ super + {_,shift} + ntilde
whid {hide,dmenu}
# Run Applications
super + {b,v,q,c}
{$BROWSER,pavucontrol,powermenu,gsimplecal}
super + {z,b,q,m,s,g}
{stx,$BROWSER,powermenu,monisel,dswitcher,grabar}
super + {z,n,x}
$TERMINAL -n {multi -e termux,flota -e nmtui,flota}
super + {n,v,x}
floterm {-e connman-ncurses,-e alsamixer,_}
super + shift + x
tmenux
super + m
monisel
super + space
j4-dmenu-desktop --dmenu="dmenu -i -p 'Apps '" --no-generic
super + r
dmenu_run -i -p "Run "
super + s
dswitcher
super + g
grabar
dmenu_run -i -p "Apps "
super + shift + g
corte
@ -94,5 +82,8 @@ XF86Audio{Prev,Next,Play}
XF86MonBrightness{Down,Up}
brillo {down,up}
XF86AudioMute
amixer sset Master toggle
XF86Audio{Raise,Lower}Volume
pactl set-sink-volume @DEFAULT_SINK@ {+,-}2%
amixer sset Master 2% {+,-}

View File

@ -1,51 +0,0 @@
[options]
# font = NotoSansMono Nerd Font Regular 9.5
font = JetBrainsMono Nerd Font Regular 10.5
hyperlinks = true
icon_name = terminal
scroll_on_output = false
scroll_on_keystroke = true
audible_bell = false
mouse_autohide = true
allow_bold = false
bold_is_bright = true
dynamic_title = true
urgent_on_bell = true
clickable_url = true
scrollback_lines = -10000
search_wrap = true
scrollbar = off
cursor_blink = off
size_hints = false
filter_unmatched_urls = true
cursor_shape = underline
cell_width_scale = 1.2
# cell_height_scale = 1.4
[colors]
cursor = #ffcc66
cursor_foreground = #ffcc66
foreground = #b3b1ad
foreground_bold = #b3b1ad
background = rgba(10, 14, 20, 0.85)
color0 = #0a0e14
color1 = #ff3333
color2 = #aec82a
color3 = #ffb454
color4 = #59c2ff
color5 = #f07178
color6 = #95e6cb
color7 = #a89984
color8 = #1f2430
color9 = #ff3333
color10 = #bae67e
color11 = #ffd580
color12 = #73d0ff
color13 = #f28779
color14 = #95e6cb
color15 = #ffffff
# vim: ft=dosini cms=#%s

8
.config/user-dirs.dirs Normal file
View File

@ -0,0 +1,8 @@
XDG_DESKTOP_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/doc"
XDG_DOWNLOAD_DIR="$HOME/etc"
XDG_MUSIC_DIR="$HOME/snd"
XDG_PICTURES_DIR="$HOME/img"
XDG_VIDEOS_DIR="$HOME/vid"

View File

@ -1,36 +0,0 @@
{
"buildDir": "/home/deadguy/.cache/yay",
"editor": "",
"editorflags": "",
"makepkgbin": "makepkg",
"pacmanbin": "pacman",
"pacmanconf": "/etc/pacman.conf",
"tarbin": "bsdtar",
"redownload": "no",
"rebuild": "no",
"answerclean": "",
"answerdiff": "",
"answeredit": "",
"answerupgrade": "",
"gitbin": "git",
"gpgbin": "gpg",
"gpgflags": "",
"mflags": "",
"sortby": "votes",
"gitflags": "",
"requestsplitn": 150,
"sortmode": 0,
"sudoloop": false,
"timeupdate": false,
"devel": true,
"cleanAfter": false,
"gitclone": true,
"provides": true,
"pgpfetch": true,
"upgrademenu": true,
"cleanmenu": true,
"diffmenu": true,
"editmenu": true,
"combinedupgrade": false,
"useask": false
}

View File

@ -52,7 +52,7 @@ zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-
zstyle ':completion:*' verbose true
zstyle ':completion:*' format $'\n %F{yellow}--- %d ---%f'
zstyle ':completion:*' list-separator "--"
zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
zstyle ':completion:*:default' select-prompt ' --- Match %M %P ---'
zstyle ':completion:*:options' description 'yes'
@ -90,7 +90,7 @@ zstyle ':completion:*:*:kill:*' insert-ids single
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
zstyle ':completion:*' accept-exact '*(N)'
zstyle ':completion:*' ignore-parents pwd
zstyle ':completion:*' ignore-parents pwd
zstyle ':completion:*' rehash true
zmodload -i zsh/complist
# }}}
@ -114,37 +114,32 @@ setopt SHARE_HISTORY
# }}}
# Plugins y extras {{{
foreach extra (
zsh-completions/zsh-completions.plugin.zsh
up.plugin.zsh
teclas.zsh
extras.zsh
aliases.plugin.zsh
zsh-completions/zsh-completions.plugin.zsh
zsh-system-clipboard/zsh-system-clipboard.zsh
git-extras-completion.zsh
zsh-autopair/autopair.zsh
lf-icons.zsh
) {
source $ZDOTDIR/$extra
}
foreach programa (
LS_COLORS/dircolors.sh
fzf/key-bindings.zsh
fzf/completion.zsh
) {
source /usr/share/$programa
source /usr/share/doc/$programa
}
typeset -g ZSH_SYSTEM_CLIPBOARD_TMUX_SUPPORT='true'
source $XDG_CONFIG_HOME/broot/launcher/bash/br
foreach plugin (
zsh-autopair/autopair.zsh
zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
zsh-history-substring-search/zsh-history-substring-search.zsh
) {
source /usr/share/zsh/plugins/$plugin
}
source $XDG_DATA_HOME/lscolors.sh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $ZDOTDIR/zsh-history-substring-search/zsh-history-substring-search.zsh
# }}}
# Prompt {{{
function precmd() {

View File

@ -1,92 +1,93 @@
# Programas
alias vdi='vimdiff'
alias gdl='gallery-dl'
alias m='neomutt'
alias rr='ranger'
alias am='alsamixer'
alias pm='pulsemixer'
alias v='$EDITOR'
alias irc='weechat -d "$XDG_CONFIG_HOME"/weechat'
alias play='ncmpcpp'
alias torr='tremc'
alias py='python '
alias help='run-help'
alias p='pacui'
alias surfraw='surfraw -browser=$BROWSER'
alias bm='bashmount'
alias kat='cat'
alias yt='mpsyt'
alias pudb='python -m pudb.run'
alias \
vdi='nvim -d' \
gdl='gallery-dl' \
m='neomutt' \
am='alsamixer' \
v='$EDITOR' \
irc='weechat -d "$XDG_CONFIG_HOME"/weechat' \
play='ncmpcpp' \
torr='tremc' \
py='python ' \
x='xui' \
bm='bashmount' \
kat='cat' \
yt='mpsyt' \
pudb='python -m pudb.run' \
xq='xbps-query'
# Git
alias git='lab'
alias gst='git status'
alias gca='git commit -a -m'
alias gu='git add -vu'
alias gc='git add --all && git commit -m'
alias gp="git push"
alias \
git='lab' \
gst='git status' \
gca='git commit -a -m' \
gu='git add -vu' \
gc='git add --all && git commit -m' \
gp='git push'
# Dotfiles
alias hxa='hx add -v'
alias hxu='hx add -vu'
alias hxp='hx push'
alias hxc='hx commit -m'
alias hxs='hx status'
alias hxr='hx rm --cached'
alias \
hxa='hx add -v' \
hxu='hx add -vu' \
hxp='hx push' \
hxc='hx commit -m' \
hxs='hx status' \
hxr='hx rm --cached'
# MAXIMUM VERBOSITY YIELDS MAXIMUM RESULTS
alias chmod='chmod -v'
alias chown='chown -v'
alias mv='mv -iv'
alias rmdir='rmdir -v'
alias mkdir='mkdir -pv'
alias cp='cp -raiv'
alias rm='rm -Iv'
alias ln='ln -iv'
alias rename='rename -v'
alias mount='mount -v'
alias umount='umount -v'
alias \
chmod='chmod -v' \
chown='chown -v' \
mv='mv -iv' \
rmdir='rmdir -v' \
mkdir='mkdir -pv' \
cp='cp -raiv' \
rm='rm -Iv' \
ln='ln -iv' \
mount='mount -v' \
umount='umount -v'
# Colores para pintar este twist
alias \
diff='diff --color=auto' \
cat='bat --color=always --terminal-width=-10' \
ls='ls -AFpt --color=always --group-directories-first' \
grep='grep --color=tty -d skip' \
dmesg='dmesg --color=always' \
dir='dir --color=always' \
vsv='sudo vsv -c yes' \
vpm='sudo vpm --color=yes'
# Con opciones por defecto
alias cat='bat --color=always --terminal-width=-10'
alias ncdu='ncdu --color dark -rr -x --exclude .git --exclude node_modules'
alias ls='ls -AFpt --color=always --group-directories-first'
alias ll='ls -coghptFAB --group-directories-first --time-style=+"%d-%m-%Y %H:%M"'
alias grep='grep --color=tty -d skip'
alias ccat="highlight --out-format=ansi"
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
alias dmesg='dmesg --color=always'
alias tree='tree -CAFa -I "CVS|*.*.package|.svn|.git|.hg|node_modules" --dirsfirst'
alias lsblk='lsblk -o "KNAME,HOTPLUG,SIZE,FSTYPE,TYPE,LABEL,MOUNTPOINT,UUID,MODEL,SERIAL"'
alias dir='dir --color=always'
alias df='df -hT --total'
alias free='free -ht'
alias doo='du -d1 -h | sort -rh'
alias du='du -sh'
alias info='info --vi-keys'
alias inxi='inxi -Fz'
alias ping='ping -c 5 '
alias dd='dd status=progress'
alias dirs='dirs -v -p'
alias dfc='dfc -dmT'
alias diff='diff --color=auto'
alias dif='diff-so-fancy | less --tabs=1,5 -SRX'
alias atl='atool --each --extract'
alias \
ll='ls -coghptFAB --group-directories-first --time-style=+"%d-%m-%Y %H:%M"' \
sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}' \
lsblk='lsblk -o "KNAME,HOTPLUG,SIZE,FSTYPE,TYPE,LABEL,MOUNTPOINT,UUID,MODEL,SERIAL"' \
df='df -hT --total' \
free='free -ht' \
du='du -sh' \
ping='ping -c 5' \
dd='dd status=progress' \
dirs='dirs -v -p' \
dfc='dfc -dmT' \
dif='diff-so-fancy | less --tabs=1,5 -SRX' \
atl='atool --each --extract'
# Comandos
alias sudo='sudo '
alias chau="bspc quit 1"
alias path='echo -e ${PATH//:/\\n}'
alias pwn='chmod +x'
alias ta='tmux attach -t'
alias tn='tmux new-session -s'
alias tk='tmux kill-session -t'
alias tsq='pkill transmission-daemon'
alias tsl='transmission-remote --list'
alias tsx='transmission-remote --remove-and-delete -t'
alias tsr='transmission-remote --remove -t'
alias jamachi='systemctl start logmein-hamachi.service'
alias jamacho='systemctl stop logmein-hamachi.service'
alias \
sudo='sudo ' \
reboot='loginctl reboot' \
shutdown='loginctl poweroff' \
chau='bspc quit 1' \
path='echo -e ${PATH//:/\\n}' \
pwn='chmod +x' \
ta='tmux attach -t' \
tn='tmux new-session -s' \
tk='tmux kill-session -t' \
tsq='pkill transmission-daemon' \
tsl='transmission-remote --list' \
tsx='transmission-remote --remove-and-delete -t' \
tsr='transmission-remote --remove -t' \
# Directorios
alias gb='cd ~/.local/bin'
alias g.='cd ~/.config'

View File

@ -26,14 +26,4 @@ _fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
#}}}
# Prevent ranger nesting {{{
ranger() {
if [ -z "$RANGER_LEVEL" ]; then
/usr/bin/ranger "$@"
else
exit
fi
}
# }}}
# vim:foldmethod=marker:foldlevel=0
# vim:foldmethod=marker:foldlevel=0

View File

@ -1,65 +0,0 @@
# Transmission CLI
# source https://github.com/gotbletu/dotfiles
# https://wiki.archlinux.org/index.php/transmission#Reducing_journal_spam
# blocklist https://github.com/gotbletu/dotfiles/blob/master/scripts/.scripts/blocklist.sh
# WEBUI: http://localhost:9091/transmission/web/
ts-clear() {
transmission-remote -l | grep 100% | grep Done | \
awk '{print $1}' | xargs -n 1 -I % transmission-remote -t % -r
}
# display numbers of ip being blocked by the blocklist (credit: smw from irc #transmission)
ts-count() {
echo "Blocklist rules:" $(curl -s --data \
'{"method": "session-get"}' localhost:9091/transmission/rpc -H \
"$(curl -s -D - localhost:9091/transmission/rpc | grep X-Transmission-Session-Id)" \
| cut -d: -f 11 | cut -d, -f1)
}
ts-d() { transmission-daemon --foreground --log-info 2>&1 | while read line; do
echo $line |
grep -v "announcer.c:\|platform.c:\|announce done (tr-dht.c:" |
grep -v "Saved.*variant.c:" |
while read line; do
echo $line | grep -q "Queued for verification (verify.c:" &&
notify-send --app-name="Transmission Started" "${line#* * }"
echo $line | grep -q "changed from .Incomplete. to .Complete." &&
notify-send --app-name="Transmission Complete" "${line#* * }"
echo $line | systemd-cat --identifier="TransWrap" --priority=5
done 2>&1 > /dev/null
done&disown ;}
ts-block() {
echo "${Red} Stopping Transmission Daemon ${Color_Off}"
ts-q
echo "${Yellow} Updating Blocklist ${Color_Off}"
~/bin/blocklist.sh
echo "${Green} Restarting Transmission Daemon ${Color_Off}"
ts-d
sleep 3
echo "${Blue}╓───────────── ─ ─ Number of IPs Blocked ─ ─ ─────────────╖${Color_Off}"
ts-count
echo "╙─────────────────────────────────────────────────────╜"
}
ts-add() {
TRANS_PID=$(pidof transmission-daemon)
if [[ $TRANS_PID ]]; then
transmission-remote --add "$1"
else
ts-d
sleep 5
transmission-remote --add "$1"
fi
;}
ts-q() { killall transmission-daemon 2> /dev/null ;}
ts-peers() { transmission-remote -t"$1" --reannounce ;}
ts-pause() { transmission-remote -t"$1" --stop ;} # <id> or all
ts-go() { transmission-remote -t"$1" --start ;} # <id> or all
ts-del() { transmission-remote -t"$1" --remove-and-delete ;} # delete data also
ts-rm() { transmission-remote -t"$1" --remove ;} # leaves data alone
ts-info() { transmission-remote -t"$1" --info ;}
ts-ls() { transmission-remote --list ;}

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -euf -o pipefail
ping -q -c 1 1.1.1.1 > /dev/null || exit
export DISPLAY=:0.0
trap 'rm /tmp/{pacmanupdates,aurupdates} 2>/dev/null' INT TERM QUIT EXIT
nb_pac=$(checkupdates | tee /tmp/pacmanupdates | wc -l)
nb_aur=$(yay -Qua | tee /tmp/aurupdates | wc -l)
if ((nb_pac>0 || nb_aur>0)); then
((nb_aur>0)) && nb_aur="+ ${nb_aur}" && cat /tmp/aurupdates >> /tmp/pacmanupdates
((nb_aur==0)) && unset nb_aur
notify-send -i ~/Pictures/.icn/arch.png "Updates" "${nb_pac} ${nb_aur} available"
fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
fd --type file --color=always . ~/.local/bin -d=1 | fzf -m --cycle --preview='bat --color=always {}' --height='45%' --select-1 --exit-0 | xargs -r "$EDITOR"
fd -c always -t f -d 1 . ~/.local/bin | fzf -m --cycle --preview='bat --color=always {}' --height='45%' | xargs -r "$EDITOR"

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
set -euf -o pipefail
yay -Syua
pacman -Qqettm > ~/Documents/pacman/paurketos.txt

View File

@ -2,7 +2,7 @@
set -euf -o pipefail
function send_notification {
icon="/home/deadguy/.local/share/icons/ArchLabs-Light/24x24/actions/contrast.svg"
icon="$HOME/.local/share/icons/Marwaita-Dark/24x24/actions/contrast.svg"
dunstify -i "$icon" -r 5555 -u low " $(printf %.0f%% "$(xbacklight -get)")"
}

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euf -o pipefail
notify-send -u urgent -i ~/Pictures/.icn/control.png "Tres meses han pasado..." "Es hora de limpiar el cache"
notify-send -u critical -i ~/img/.icn/control.png "Tres meses han pasado..." "Es hora de limpiar el cache" &
sleep 10s
st --class=flota -e paccache -rk1 && yay -Sca
floterm -e sudo xbps-remove -v -O

View File

@ -1,23 +1,23 @@
#!/usr/bin/env zsh
function () {
# Bookmarks
local -A bookmarks=(
'nvim' '~/.config/nvim/init.vim'
'lf' '~/.config/lf/lfrc'
'preview' '~/.config/lf/preview'
'mpv' '~/.config/mpv/mpv.conf'
'xres' '~/.config/X11/xresources'
'wm' '~/.config/bspwm/bspwmrc'
'keys' '~/.config/sxhkd/sxhkdrc'
'correo' '~/.config/mutt/muttrc'
'shell' '~/.config/zsh/.zshrc'
'dunst' '~/.config/dunst/dunstrc'
'ranger' '~/.config/ranger/rc.conf'
'music' '~/.config/ncmpcpp/config'
'tmux' '~/.tmux.conf'
'xinit' '~/.xinitrc'
'alias' '~/.config/zsh/aliases.plugin.zsh'
'compose' '~/.config/picom.conf'
'term' '~/.config/alacritty.yml'
'env' '~/.zshenv'
)

View File

@ -1,39 +0,0 @@
#!/bin/sh
pgrep -u "$USER" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}
ping -q -c 1 1.1.1.1 > /dev/null || { echo "No internet connection detected."; exit ;}
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export DISPLAY=:0.0
syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")"
mbsync "$acc"
new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
if [ "$newcount" -gt "0" ]; then
for file in $new; do
# Extract subject and sender from mail.
from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//')
subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n-1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n')
notify-send --app-name="mutt-wizard" -i ~/Pictures/.icn/correo.png "New message in $acc" "$from: $subject" &
done
fi
}
if [ "$#" -eq "0" ]; then
accounts="$(awk '/^Channel/ {print $2}' "$HOME/.mbsyncrc")"
else
accounts=$*
fi
for account in $accounts
do
syncandnotify &
done
wait
notmuch new 2>/dev/null
touch "$HOME/.config/mutt/.mailsynclastrun"

View File

@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
FOLDER="$HOME/.local/bin"

View File

@ -34,7 +34,7 @@ c8='#eeeeecff'
c9='#12121200'
cA='#c4a000ff'
lock="$HOME/Pictures/lockscreen/alienlock.png"
lock="$HOME/img/lockscreen/alienlock.png"
i3lock \
--image="$lock" \

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
notify-send -u low -t 5000 -i ~/Pictures/.icn/calendar.png "$(date +'%A %d de %B %H:%M')"
notify-send -u low -t 5000 -i ~/img/.icn/calendar.png "$(date +'%A %d de %B %H:%M')"

View File

@ -27,10 +27,10 @@ screencast() { \
-framerate 60 \
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
-i "$DISPLAY" \
-f alsa -ac 2 -i pulse \
-f alsa -ac 2 -i default \
-r 30 \
-c:v libx264rgb -crf 0 -preset ultrafast -c:a flac \
"$HOME/Videos/Screen/$(date '+%y%m%d-%H%M-%S').mkv" &
"$HOME/vid/Screen/$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
}
@ -39,7 +39,7 @@ jacka() { \
-thread_queue_size 4096 \
-f jack -i jack_out.monitor \
-ac 2 -channel_layout stereo -async 1 \
-c:a flac "$HOME/Videos/Tape/$(date '+%y%m%d-%H%M-%S').flac"
-c:a flac "$HOME/vid/Tape/$(date '+%y%m%d-%H%M-%S').flac"
echo $! > /tmp/recordingpid
}
@ -53,7 +53,7 @@ jackv() {
-i "$DISPLAY" \
-r 30 \
-c:v libx264 -qp 0 -r 30 -c:a flac \
"$HOME/Videos/Screen/$(date '+%y%m%d-%H%M-%S').mkv" &
"$HOME/vid/Screen/$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
}
@ -64,17 +64,17 @@ mute() {
-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
-i "$DISPLAY" \
-c:v libx264 -qp 0 -r 30 \
"$HOME/Videos/$(date '+%y%m%d-%H%M-%S').mkv" &
"$HOME/vid/$(date '+%y%m%d-%H%M-%S').mkv" &
echo $! > /tmp/recordingpid
}
audio() { \
ffmpeg -y \
-thread_queue_size 4096 \
-f pulse -i default \
-f alsa -i default \
-ac 2 -channel_layout stereo -async 1 \
-c:a flac \
"$HOME/Music/Tape/$(date '+%y%m%d-%H%M-%S').mp3" &
"$HOME/snd/Tape/$(date '+%y%m%d-%H%M-%S').mp3" &
echo $! > /tmp/recordingpid
}

View File

@ -4,25 +4,25 @@ set -euf -o pipefail
I=1
M=$(bspc query -M | wc -l)
if [[ "$M" == 1 ]]; then
bspc monitor -d 1 2 3 4 5 6 7 8 9 10
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
elif [[ "$M" == 2 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2 3 4 5
bspc monitor "$(bspc query -M | awk NR==2)" -d 6 7 8 9 10
bspc monitor "$(bspc query -M | awk NR==2)" -d 6 7 8 9 0
elif [[ "$M" == 3 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2 3 4
bspc monitor "$(bspc query -M | awk NR==2)" -d 5 6 7
bspc monitor "$(bspc query -M | awk NR==3)" -d 8 9 10
bspc monitor "$(bspc query -M | awk NR==3)" -d 8 9 0
elif [[ "$M" == 4 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2 3
bspc monitor "$(bspc query -M | awk NR==2)" -d 4 5 6
bspc monitor "$(bspc query -M | awk NR==3)" -d 7 8
bspc monitor "$(bspc query -M | awk NR==4)" -d 9 10
bspc monitor "$(bspc query -M | awk NR==4)" -d 9 0
elif [[ "$M" == 5 ]]; then
bspc monitor "$(bspc query -M | awk NR==1)" -d 1 2
bspc monitor "$(bspc query -M | awk NR==2)" -d 3 4
bspc monitor "$(bspc query -M | awk NR==3)" -d 5 6
bspc monitor "$(bspc query -M | awk NR==4)" -d 7 8
bspc monitor "$(bspc query -M | awk NR==5)" -d 9 10
bspc monitor "$(bspc query -M | awk NR==5)" -d 9 0
else
for monitor in $(bspc query -M); do
bspc monitor "$monitor" \

View File

@ -66,4 +66,4 @@ case "$chosen" in
esac
setbg # Fix background if screen size/arangement has changed.
pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen
{ killall dunst ; setsid dunst & } >/dev/null 2>&1 # Restart dunst to ensure proper location on screen

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
set -euf -o pipefail
sudo rm -f /var/lib/pacman/db.lck
sudo pacman-mirrors -f5
sudo pacman -Syyuu
sudo pacman -Suu

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
set -euf -o pipefail
echo "Actualizando la lista de paquetes..."
pacman -Qqettn > ~/Documents/pacman/paketes.txt
pacman -Qqettm > ~/Documents/pacman/paurketos.txt
locate -e --regex "\.pac(new|save)$" > ~/Documents/pacman/pacnew.log
status=$?
if test $status -eq 0
then
echo "Listo. Usa sudo pacdiff para ver los cambios a archivos de configuracion"
else
echo "Listo."
fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
maim -u ~/Pictures/scrot/"$(date +%s)".png && notify-send -u low -t 3000 -i ~/Pictures/.icn/camera.png 'Screen captured'
maim -u ~/img/scrot/"$(date +%s)".png && notify-send -u low -t 3000 -i ~/img/.icn/camera.png 'Screen captured'

View File

@ -6,17 +6,17 @@ if [ -d /sys/class/power_supply/BAT0 ]; then
current_charge=$(echo "$battery_info" | grep -o '[0-9]\+%' | awk '{sub (/%/, "", $1); print $1}')
if [[ $current_charge -lt 11 ]]; then
ICON="/home/deadguy/Pictures/.icn/battery-empty.png"
ICON="$HOME/img/.icn/battery-empty.png"
elif [[ $current_charge -lt 31 ]]; then
ICON="/home/deadguy/Pictures/.icn/battery-caution.png"
ICON="$HOME/img/.icn/battery-caution.png"
elif [[ $current_charge -lt 51 ]]; then
ICON="/home/deadguy/Pictures/.icn/battery-low.png"
ICON="$HOME/img/.icn/battery-low.png"
elif [[ $current_charge -lt 71 ]]; then
ICON="/home/deadguy/Pictures/.icn/battery-good.png"
ICON="$HOME/img/.icn/battery-good.png"
elif [[ $current_charge -lt 90 ]]; then
ICON="/home/deadguy/Pictures/.icn/battery-full.png"
ICON="$HOME/img/.icn/battery-full.png"
else
ICON="/home/deadguy/Pictures/.icn/battery-full.png"
ICON="$HOME/img/.icn/battery-full.png"
fi
notify-send -t 5000 -i "$ICON" "$current_charge%"
fi

View File

@ -11,10 +11,10 @@ options="$shutdown\n$reboot\n$suspend\n$lock\n$log_out"
chosen="$(echo -e "$options" | dmenu -i -p "⏻ ")"
case $chosen in
$shutdown) systemctl poweroff;;
$reboot) systemctl reboot;;
$suspend) systemctl suspend;;
$lock) exeflock4;;
$shutdown) loginctl poweroff;;
$reboot) loginctl reboot;;
$suspend) loginctl suspend;;
$lock) xset s activate;;
$log_out) bspc quit 1;;
*) exit 0;;
esac

View File

@ -2,9 +2,10 @@
set -euf -o pipefail
bgloc="/tmp/bg"
dir="$HOME/img/wallpaper"
[ -f "$1" ] && ln -sf "$(readlink -f "$1")" "$bgloc"
[ -f "$dir" ] && ln -sf "$(readlink -f "$dir")" "$bgloc"
[ -d "$1" ] && ln -sf "$(find "$(readlink -f "$1")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc"
[ -d "$dir" ] && ln -sf "$(find "$(readlink -f "$dir")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc"
hsetroot -fill "$bgloc"
hsetroot -fill "$bgloc" >/dev/null 2>&1

View File

@ -1,7 +1,7 @@
#!/bin/sh
opt="bspwm mpd dunst picom fonts shell"
program="$(echo "$opt" | sed 's/ /\n/g' | dmenu -i -p "Reload ")"
program="$(echo "$opt" | sed 's/ /\n/g' | fzf --height='45%')"
case $program in
bspwm) bspc wm -r;;
@ -9,6 +9,6 @@ case $program in
dunst) pkill dunst; dunst &;;
picom) pkill picom; picom -b;;
fonts) fc-cache -v -f;;
shell) source $ZDOTDIR/.zshrc;;
shell) . "$ZDOTDIR/.zshrc" ;;
*) exit
esac

View File

@ -1,4 +1,3 @@
#!/bin/sh
# Sets the background. If given an argument, will set file as background.
# [ -n "$1" ] && cp "$1" ~/.config/wall.png
hsetroot -fill /tmp/bg >/dev/null 2>&1

4
.local/bin/stx Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
alacritty --class=multi -e termux

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Compatible with ranger 1.6.*
#
# This script searches image files in a directory, opens them all with sxiv and

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
[[ -n "$TMUX" ]] && change="switch-client" || change="attach-session"
if [ "$@" ]; then
tmux $change -t "$1" 2>/dev/null || (tmux new-session -d -s "$@" && tmux $change -t "$@"); return
fi
session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0) && tmux $change -t "$session" || echo "No sessions found."

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euf -o pipefail
pgrep -x transmission-da || (transmission-daemon && notify-send "Starting transmission daemon")
ps ax | grep -q "\stransmission-daemon$" || (transmission-daemon && notify-send "Starting transmission daemon")
sleep 8

View File

@ -1,7 +1,7 @@
#!/bin/zsh
icon1="/home/deadguy/Pictures/.icn/trans1.png"
icon2="/home/deadguy/Pictures/.icn/trans2.png"
icon1="$HOME/img/.icn/trans1.png"
icon2="$HOME/img/.icn/trans2.png"
killall transmission-daemon 2> /dev/null
transmission-daemon --foreground --log-info 2>&1 | while read line; do

View File

@ -1,8 +1,13 @@
#!/usr/bin/env bash
set -euf -o pipefail
sudo pacman-mirrors -c Chile,United_States
yay -Syu
sudo xbps-install -Su
echo "Actualizando db..."
sudo updatedb
paclist
echo "Actualizando manpages..."
sudo makewhatis /usr/share/man
echo "Actualizando la lista de paquetes..."
xbps-query -v -m > ~/doc/xbpaketes
echo "Hay que reiniciar estos servicios:"
xcheckrestart
echo "Listo."

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
set -euf -o pipefail
fd --type file ~/Pictures/wallpaper d=1 | shuf | sxiv

View File

@ -3,5 +3,5 @@ Type=Application
Name=Mail
NoDisplay=true
Terminal=false
Exec=/usr/bin/alacritty -e neomutt %u
Exec=/usr/bin/st -e neomutt %u
MimeType=x-scheme-handler/mailto;

View File

@ -2,4 +2,4 @@
Type=Application
Name=Text editor
NoDisplay=true
Exec=/usr/bin/termite --name=flota -e nvim %u
Exec=/usr/bin/st -n=flota -e nvim %u

View File

@ -1,691 +0,0 @@
:root {
--tabs-border: #212121 !important;
/* active tab left & right borders - not working in 58?*/
--toolbox-border-bottom-color: #212121 !important;
/* 1px line under background tabs */
--chrome-nav-bar-controls-border-color: #212121 !important;
/* border around url bar */
}
/* nav bar icons appear on hover */
:root:not([customizing]) #nav-bar toolbarbutton {
margin-left: -28px !important;
opacity: 0 !important;
transform: scale(0.85, 0.85) !important;
pointer-events: none !important;
transition: all 100ms var(--animation-easing-function) !important;
}
:root:not([customizing]) :hover > #nav-bar toolbarbutton,
:root:not([customizing]) #navigator-toolbox:focus-within #nav-bar toolbarbutton,
:root:not([customizing]) :hover > #titlebar toolbarbutton {
transform: scale(1, 1) !important;
opacity: 1 !important;
margin-left: 0 !important;
pointer-events: auto !important;
}
:root:not([customizing]) #nav-bar #back-button, :root:not([customizing]) #nav-bar #forward-button {
display: none !important;
}
/* general dark theme stuff */
:root[lwt-popup-brighttext] {
--panel-separator-color: #212121 !important;
border: none !important;
}
#nav-bar,
.sidebar-placesTree,
#sidebar-header {
background-color: rgb(12, 12, 13) !important;
border: none !important;
}
#sidebar-header {
border: none !important;
}
textbox {
background-color: #212121 !important;
border: none !important;
}
window#main-window {
--tabs-navbar-shadow-size: 0px !important;
--chrome-content-separator-color: none !important;
--backbutton-background: none !important;
--toolbar-bgcolor: #212121 !important;
--lwt-toolbar-field-background-color: #212121 !important;
--arrowpanel-background: #212121 !important;
--arrowpanel-border-color: #212121 !important;
--lwt-sidebar-background-color: #212121 !important;
}
#main-window[lwthemetextcolor="bright"] #urlbar,
#main-window[lwthemetextcolor="bright"] .searchbar-textbox {
box-shadow: initial !important;
background-color: rgb(12, 12, 13) !important;
transition: background-color 0.3s !important;
font-size: 10pt !important;
border: none !important;
}
#main-window[lwthemetextcolor="bright"] #urlbar:focus-within,
#main-window[lwthemetextcolor="bright"] .searchbar-textbox:focus-within {
background-color: rgb(12, 12, 13) !important;
border-color: transparent !important;
border-image: none !important;
}
#main-window[lwthemetextcolor="bright"] #urlbar:hover,
#main-window[lwthemetextcolor="bright"] .searchbar-textbox:hover {
box-shadow: initial !important;
background-color: rgb(12, 12, 13) !important;
border-color: transparent !important;
border-image: none !important;
}
#urlbar[focused="true"],
#urlbar:hover,
.searchbar-textbox:hover {
box-shadow: 0 0 0 !important;
border: 1 solid #535c5c !important;
}
/* no tab close button */
#tabbrowser-tabs .tabbrowser-tab .tab-close-button {
display: none !important;
}
/* Removal of black bottom 1px line */
#navigator-toolbox::after {
border-bottom: 0px !important;
}
/* hide the one pixel top border for tabs */
.tab-background {
border-top: none !important;
}
/* hide tab bar if only one tab */
tab:only-of-type {
display: none;
}
.tabbrowser-tab {
font-size: 9pt !important;
}
/* unset the tab bar min-height */
#tabbrowser-tabs,
#tabbrowser-tabs > .tabbrowser-arrowscrollbox,
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
min-height: initial !important;
}
/* set the height on the tabs instead */
tab {
line-height: 25px;
height: 25px;
}
.tabbrowser-tab::after,
.tabbrowser-tab::before {
border: none !important;
color: #141414 !important;
opacity: 0.2 !important;
}
.tabbrowser-tab:not([visuallyselected="true"]):not([multiselected]) {
color: #777777 !important;
}
.tabbrowser-tab:not([visuallyselected="true"]):not([multiselected]) image {
display: none !important;
}
#tracking-protection-icon-container {
border-inline-end:none !important;
}
/* This moves the tabs under the URL bar */
#titlebar {
-moz-box-ordinal-group: 3 !important;
}
/* page action buttons on hover */
#page-action-buttons > *[class^=urlbar-icon]{
margin-inline-end: -26px;
opacity: 0;
transition: margin-inline-end 200ms linear, opacity 200ms linear;
}
:root[uidensity="compact"] #page-action-buttons > *[class^=urlbar-icon]{ margin-inline-end: -22px; }
#page-action-buttons:hover > *[class^=urlbar-icon],
#page-action-buttons > *[class^=urlbar-icon][open],
#page-action-buttons > *[class^=urlbar-icon][open] ~ *[class^=urlbar-icon]{
opacity: 1;
margin-inline-end: 0px !important;
}
#pageActionButton, #pageActionSeparator, #reader-mode-button {
display: none !important;
}
/* TAB ANIMATION: LOADING PROGRESS LINE INDICATOR */
.tabbrowser-tab .tab-loading-burst {
background-image: linear-gradient(90deg, transparent, dodgerblue) !important;
background-repeat: no-repeat !important;
transition: background-size 0.5s ease-out !important;
opacity: 0.5s linear !important;
background-size: 0px 100% !important;
background-position-y: bottom !important;
}
.tabbrowser-tab:not([busy]) .tab-loading-burst {
opacity: 0 !important;
}
.tabbrowser-tab[busy] .tab-loading-burst {
background-size: 20% 100% !important;
transition: background-size 0.3s ease-out !important;
}
.tabbrowser-tab[busy][progress] .tab-loading-burst {
background-size: 100% 100% !important;
transition-duration: 2s !important;
}
.tabbrowser-tab[bursting] .tab-loading-burst {
background-size: 100% 100% !important;
transition-duration: 0.5s !important;
}
/* smaller scrollbars */
.panel-subview-body,
#permList,
scrollbar{
color: inherit;
scrollbar-color: #383838 #212121;
scrollbar-width: thin
}
/* chrome style open urlbar */
#nav-bar {
height: 37px !important;;
}
#identity-box:hover:not(.no-hover):not([open="true"]), #tracking-protection-icon-container:hover:not([open="true"]){
background-color: : transparent !important;;
}
.ac-type-icon
{
order: 9 !important;
margin-inline-start: 16px !important;
margin-inline-end: 0 !important;
}
.ac-site-icon
{
margin-inline-end: 16px !important;
}
.ac-separator
{
display: none !important;
}
.ac-title,
.ac-url
{
flex: 1 !important;
}
.search-panel-one-offs
{
border-radius: 0 0 8px 8px !important;
margin-bottom: 18px !important;
}
.search-one-offs
{
display: block !important;
}
#urlbarView-results
{
padding: 0 !important;
}
.urlbarView-row
{
padding: 0 18px !important;
height: 32px !important;
border-radius: 0 !important;
display: flex !important;
align-items: center !important;
}
.urlbarView-row-inner
{
height: 100% !important;
width: 100% !important;
grid-template-columns: 32px 1fr 0 0 !important;
grid-template-rows: 16px 16px !important;
grid-template-areas:
"icon title . secondary-icon"
"icon secondary . secondary-icon" !important;
align-items: center !important;
align-content: center !important;
}
.urlbarView-row[type]
{
height: 32px !important;
}
.urlbarView-row[type] .urlbarView-row-inner
{
grid-template-columns: 32px 1fr auto 0 !important;
grid-template-rows: auto !important;
grid-template-areas:
"icon title secondary secondary-icon" !important;
}
.urlbarView-row[type=switchtab] .urlbarView-row-inner
{
grid-template-columns: 32px 1fr auto 32px !important;
}
.urlbarView-row[type] .urlbarView-url
{
display: none !important;
}
.urlbarView-favicon
{
grid-area: icon !important;
}
.urlbarView-title
{
padding-inline-end: 8px !important;
grid-area: title !important;
}
.urlbarView-title,
.urlbarView-url
{
text-overflow: ellipsis !important;
mask-image: none !important;
}
.urlbarView-secondary
{
grid-area: secondary !important;
}
.urlbarView-type-icon
{
justify-self: flex-end !important;
margin: 0 !important;
grid-area: secondary-icon !important;
}
.search-one-offs
{
padding: 4px !important;
display: flex !important;
flex-direction: row !important;
}
.search-panel-one-offs-header
{
margin-inline-start: 12px !important;
line-height: 40px !important;
transform: translateY(-1px) !important;
}
.search-panel-one-offs
{
display: inline-flex !important;
flex-direction: row !important;
padding: 0 !important;
margin: 0 !important;
float: left !important;
}
.searchbar-engine-one-off-item
{
height: 32px !important;
border-radius: 16px !important;
padding: 0 8px !important;
margin: 4px !important;
background-image: none !important;
color: inherit !important;
border: 0 !important;
}
#urlbar-container
{
max-height: 37px !important;
}
#urlbar,
#searchbar
{
border-radius: 99px !important;
background-color: var(--toolbar-field-background-color) !important;
border: 0 !important;
box-shadow: none !important;
background-clip: padding-box !important;
min-height: 37x !important;
transition: background-color .1s var(--ease-basic) !important;
-moz-box-align: center !important;
display: block !important;
margin: 0 !important;
}
#urlbar:not(:-moz-lwtheme),
#searchbar:not(:-moz-lwtheme)
{
color: inherit !important;
}
#urlbar:hover,
#searchbar:hover
{
background-color: var(--toolbar-field-hover-background-color) !important;
}
#urlbar[focused],
#urlbar[open],
#searchbar[focused],
#searchbar[open]
{
background-color: var(--toolbar-field-focus-background-color) !important;
}
#urlbar[focused],
#searchbar[focused]
{
border: 2px solid var(--toolbar-field-focus-border-color) !important;
padding: 0 !important;
margin: 0 !important;
}
#urlbar[open],
#searchbar[open]
{
border: 0 !important;
border-radius: 8px !important;
min-height: 37px !important;
position: relative !important;
z-index: 99999 !important;
}
/* 71+ */
#urlbar-background
{
display: none !important;
}
#urlbar-input-container,
#searchbar
{
display: flex !important;
align-items: center !important;
}
.urlbar-input-box,
.searchbar-textbox
{
flex: 1 !important;
}
#urlbar-input
{
width: 100% !important;
}
#urlbar[open] #urlbar-input-container
{
height: 37px !important;
}
.urlbarView
{
top: 0 !important;
left: 0 !important;
right: 0 !important;
position: relative !important;
box-shadow: none !important;
border: 0 !important;
background: 0 !important;
margin-left: 0 !important;
--item-padding-start: 0 !important;
--item-padding-end: 0 !important;
}
#urlbar[open] .urlbarView
{
display: block !important;
width: 100% !important;
}
#urlbar-results
{
padding: 0 !important;
}
#urlbar-container,
#searchbar-container
{
overflow: visible !important;
padding: 0 !important;
margin-inline: 6px !important;
}
.searchbar-textbox
{
color: inherit !important;
min-height: auto !important;
}
#identity-icon
{
fill-opacity: 1 !important;
}
#identity-icon-labels
{
color: inherit !important;
opacity: 1 !important;
padding: 0 !important;
display: none !important;
}
#urlbar-label-box
{
border: 0 !important;
padding: 0 !important;
}
#urlbar[pageproxystate=valid] #identity-box:-moz-any(.notSecureText, .verifiedIdentity, .chromeUI, .extensionPage, .certUserOverridden):not(.no-hover):-moz-any([open], :hover) #identity-icon-labels::after
{
opacity: 0 !important;
}
#urlbar[pageproxystate=valid] #identity-box:-moz-any(
.mixedActiveBlocked,
.mixedDisplayContentLoadedActiveBlocked,
.mixedActiveContent
) > #connection-icon
{
display: -moz-box !important;
}
#urlbar[pageproxystate=valid] #identity-box:-moz-any(.weakCipher, .certUserOverridden, .certErrorPage, .insecureLoginForms, .mixedActiveContent)
{
color: #c94031 !important;
}
#identity-box[pageproxystate="invalid"] > #identity-icon {
list-style-image: url(chrome://branding/content/identity-icons-brand.svg) !important;
fill: orange !important;
fill-opacity: 1 !important; /* optional */
}
.urlbar-input
{
padding: 0 !important;
}
.searchbar-textbox
{
border: 0 !important;
background: 0 !important;
box-shadow: none !important;
margin: 0 !important;
-moz-appearance: none !important;
}
.searchbar-search-icon
{
margin: 0 !important;
fill-opacity: 1 !important;
}
.searchbar-search-icon-overlay
{
margin-inline-start: -11px !important;
margin-inline-end: 0 !important;
display: none !important;
}
.urlbar-icon-wrapper
{
background: 0 !important;
}
#identity-box #notification-popup-box
{
padding: 0 !important;
margin: 0 !important;
}
.urlbar-icon:hover:not([disabled]),
#page-action-buttons > toolbarbutton:hover:not([disabled]),
.searchbar-search-button:hover,
#identity-box:hover:not(.no-hover)
{
background-color: var(--toolbarbutton-hover-background) !important;
}
.urlbar-icon:hover:active:not([disabled]),
.urlbar-icon[open],
#page-action-buttons > toolbarbutton:hover:active:not([disabled]),
.searchbar-search-button:hover:active,
#identity-box:hover:active:not(.no-hover),
#identity-box[open]:not(.no-hover)
{
background-color: var(--toolbarbutton-active-background) !important;
transition-duration: 0 !important;
}
#contextual-feature-recommendation
{
width: auto !important;
}
.urlbar-page-action:-moz-any(
#pageActionButton,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-addSearchEngine
)
{
transition:
background-color .2s var(--ease-basic),
margin .15s var(--ease-in),
opacity .15s var(--ease-basic),
visibility 0s .2s !important;
opacity: 0 !important;
visibility: hidden !important;
margin-inline-start: -32px !important;
}
#urlbar:hover .urlbar-page-action:-moz-any(
#pageActionButton,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-addSearchEngine
),
.urlbar-page-action:-moz-any(
#pageActionButton,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-addSearchEngine
):-moz-any(:hover, [open], [readeractive]),
.urlbar-page-action:-moz-any(:hover, [open]) ~ .urlbar-page-action:-moz-any(
#pageActionButton,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-addSearchEngine),
#page-action-buttons .urlbar-page-action:-moz-any(
#pageActionButton,
#pageAction-urlbar-screenshots_mozilla_org,
#pageAction-urlbar-addSearchEngine)
{
transition:
background-color .2s var(--ease-basic),
margin .3s var(--ease-out),
opacity .3s var(--ease-basic) !important;
opacity: 1 !important;
visibility: visible !important;
margin-inline-start: 0 !important;
}
.urlbar-display
{
color: inherit !important;
margin: 0 !important;
}
#star-button-animatable-box
{
display: none !important;
}
#userContext-label
{
margin: 0 !important;
}
#userContext-label + #userContext-indicator
{
margin-inline-start: 6px !important;
}
.search-go-container
{
display: flex !important;
}
#searchbar .textbox-input
{
padding: 0 !important;
}
#urlbar-input,
#searchbar-input,
.searchbar-textbox /* < 71 */
{
transform: translateY(var(--input-offset)) !important;
}
#urlbar,
#searchbar
{
--input-offset: -1px;
}
.urlbarView-row[has-url]:not([type="switchtab"]) .urlbarView-title-separator{ display: none }

View File

@ -0,0 +1,164 @@
/* nav bar icons appear on hover */
:root:not([customizing]) #nav-bar toolbarbutton {
margin-left: -30px !important;
opacity: 0 !important;
transform: scale(0.85, 0.85) !important;
pointer-events: none !important;
transition: all 100ms var(--animation-easing-function) !important;
}
:root:not([customizing]) :hover > #nav-bar toolbarbutton,
:root:not([customizing]) #navigator-toolbox:focus-within #nav-bar toolbarbutton,
:root:not([customizing]) :hover > #titlebar toolbarbutton {
transform: scale(1, 1) !important;
opacity: 1 !important;
margin-left: 0 !important;
pointer-events: auto !important;
}
/* general dark theme stuff */
:root[lwt-popup-brighttext] {
--panel-separator-color: #212121 !important;
border: none !important;
}
#nav-bar,
.sidebar-placesTree,
#sidebar-header {
background-color: black !important;
border: none !important;
}
#sidebar-header {
border: none !important;
}
window#main-window {
--tabs-navbar-shadow-size: 0px !important;
--chrome-content-separator-color: none !important;
--backbutton-background: none !important;
--toolbar-bgcolor: black !important;
--lwt-toolbar-field-background-color: black !important;
--arrowpanel-background: black !important;
--arrowpanel-border-color: black !important;
--lwt-sidebar-background-color: black !important;
}
#main-window[lwthemetextcolor="bright"] #urlbar,
#main-window[lwthemetextcolor="bright"] .searchbar-textbox {
box-shadow: initial !important;
background-color: black !important;
transition: background-color 0.3s !important;
font-size: 10pt !important;
border: none !important;
}
#main-window[lwthemetextcolor="bright"] #urlbar:focus-within,
#main-window[lwthemetextcolor="bright"] .searchbar-textbox:focus-within {
background-color: black !important;
border-color: transparent !important;
border-image: none !important;
}
#main-window[lwthemetextcolor="bright"] #urlbar:hover,
#main-window[lwthemetextcolor="bright"] .searchbar-textbox:hover {
box-shadow: initial !important;
background-color: black !important;
border-color: transparent !important;
border-image: none !important;
}
/* no tab close button */
#tabbrowser-tabs .tabbrowser-tab .tab-close-button {
display: none !important;
}
/* Removal of black bottom 1px line */
#navigator-toolbox {
border-bottom: none !important;
}
/* hide the one pixel top border for tabs */
.tab-background {
border-top: none !important;
}
/* hide tab bar if only one tab */
tab:only-of-type {
display: none;
}
.tabbrowser-tab {
font-size: 9pt !important;
}
/* unset the tab bar min-height */
#tabbrowser-tabs,
#tabbrowser-tabs > .tabbrowser-arrowscrollbox,
#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
min-height: initial !important;
}
/* set the height on the tabs instead */
tab {
line-height: 25px;
height: 25px;
}
/* grey out unselected tabs */
.tabbrowser-tab:not([visuallyselected="true"]):not([multiselected]) {
color: #777777 !important;
}
.tabbrowser-tab:not([visuallyselected="true"]):not([multiselected]) image {
display: none !important;
}
#tracking-protection-icon-container {
border-inline-end:none !important;
}
/* This moves the tabs under the URL bar */
#titlebar {
-moz-box-ordinal-group: 3 !important;
}
#urlbar-container {
transform: translateY(0);
position: relative;
z-index: 10;
padding-block: 3px !important;
padding-inline: 0px !important;
margin-inline: 2px !important;
}
#nav-bar-customization-target {
overflow: visible !important;
}
#urlbar-results {
max-width: 100% !important;
}
.urlbarView {
top: calc(100% - 5px) !important;
width: 100% !important;
border-color: transparent !important;
}
:root[uidensity="compact"] .urlbarView {
margin-top: 2px !important;
}
:root[uidensity="touch"] .urlbarView {
margin-top: 1px !important;
}
#urlbar[open] {
border-bottom-right-radius: 0px !important;
border-bottom-left-radius: 0px !important;
}
.urlbarView-row {
padding: 10px 0px !important;
}

View File

@ -1,6 +1,6 @@
@-moz-document url(about:blank), url(about:newtab), url(about:home) {
html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
background: #121212 !important;
background: #080808 !important;
}
}

View File

@ -1,10 +1,9 @@
# Opciones basicas
set -g default-terminal tmux-256color
setw -gq utf8 on
set -g set-clipboard on
set -g mouse on
set -gq status-utf8 on
set -sg escape-time 0
set -sg escape-time 10
set -g history-limit 102400
# Ventanas
@ -19,7 +18,7 @@ setw -g aggressive-resize on
# Notificaciones
set -g monitor-activity on
set -g visual-activity off
set -g visual-activity on
set -g visual-bell off
set -g visual-silence off
set -g bell-action none
@ -50,56 +49,44 @@ set -g window-status-format "#{=-15:?window_name,#{window_name},#{s/
set -g window-status-current-format "#{=-15:?window_name,#{window_name},#{s/deadguy/home/:?pane_current_path,#{b:pane_current_path},}}"
# Limpiar atajos
unbind-key -a
unbind-key C-b
unbind-key space
unbind-key '"'
unbind-key %
unbind-key [
unbind-key p
unbind-key -
# Prefijo
set -g prefix M-a
bind-key M-a send-prefix
# Varios
bind-key ? list-keys
bind-key D detach-client
bind-key : command-prompt
bind-key R respawn-window
bind-key T command-prompt 'rename-window %%'
bind-key S command-prompt 'rename-session %%'
bind-key r source-file $HOME/.tmux.conf \; display "Config Reloaded"
# Redimensionar usando shift+vimkeys con prefijo
bind-key -r H resize-pane -L 2
bind-key -r L resize-pane -R 2
bind-key -r K resize-pane -U 2
bind-key -r J resize-pane -D 2
bind-key * if-shell "$is_vim" "send-keys Space *" "resize-pane -Z"
# Trocar panes
bind-key < swap-pane -U
bind-key > swap-pane -D
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 $HOME/.tmux.conf \; display "Config Reloaded"
# Dividir
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key / split-window -fh -c "#{pane_current_path}"
bind-key _ split-window -fv -c "#{pane_current_path}"
bind-key = select-layout even-vertical
# Cerrar
bind-key x kill-pane
bind-key X kill-window
bind-key Z kill-session
bind-key Q kill-server
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
# Ventanas
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 -r BSpace swap-window -t -1
bind-key -r Space swap-window -t +1
bind-key Enter new-window
bind-key Tab choose-window
bind-key d display-panes
@ -108,89 +95,15 @@ 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 Escape copy-mode
bind-key p paste-buffer
bind-key b list-buffers
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 -n M-S-v run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind -Tcopy-mode-vi 'v' send -X begin-selection
bind -Tcopy-mode-vi 'y' send -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'
# Prender y apagar statusbar
bind-key & set-option -g status
# Intelligently navigate tmux panes and Vim splits using the same keys.
# See https://sunaku.github.io/tmux-select-pane.html for documentation.
#
# +-------------+------------+-----------------------------+
# | inside Vim? | is Zoomed? | Action taken by key binding |
# +-------------+------------+-----------------------------+
# | No | No | Focus directional tmux pane |
# | No | Yes | Nothing: ignore key binding |
# | Yes | No | Seamlessly focus Vim / tmux |
# | Yes | Yes | Focus directional Vim split |
# +-------------+------------+-----------------------------+
# number of seconds we give Vim to navigate
vim_navigation_timeout=0.1
navigate=' \
pane_is_zoomed() { \
test #{window_zoomed_flag} -eq 1; \
}; \
pane_title_changed() { \
test "#{pane_title}" != "$(tmux display -p "##{pane_title}")"; \
}; \
command_is_vim() { \
case "${1%% *}" in \
(vi|?vi|vim*|?vim*|view|?view|vi??*) true ;; \
(*) false ;; \
esac; \
}; \
pane_contains_vim() { \
case "#{=3:pane_current_command}" in \
(ssh|sh) command_is_vim "#{=5:pane_title}" ;; \
(*) command_is_vim "#{=5:pane_current_command}" ;; \
esac; \
}; \
pane_contains_neovim_terminal() { \
test "#{=12:pane_title}" = "nvim term://"; \
}; \
navigate() { \
tmux_navigation_command=$1; \
vim_navigation_command=$2; \
vim_navigation_only_if=${3:-true}; \
if pane_contains_vim && eval "$vim_navigation_only_if"; then \
if pane_contains_neovim_terminal; then \
tmux send-keys C-\\ C-n; \
fi; \
eval "$vim_navigation_command"; \
if ! pane_is_zoomed; then \
sleep $vim_navigation_timeout; : wait for Vim to change title; \
if ! pane_title_changed; then \
eval "$tmux_navigation_command"; \
fi; \
fi; \
elif ! pane_is_zoomed; then \
eval "$tmux_navigation_command"; \
fi; \
}; \
navigate '
navigate_left=" $navigate 'tmux select-pane -L' 'tmux send-keys C-w h'"
navigate_down=" $navigate 'tmux select-pane -D' 'tmux send-keys C-w j'"
navigate_up=" $navigate 'tmux select-pane -U' 'tmux send-keys C-w k'"
navigate_right="$navigate 'tmux select-pane -R' 'tmux send-keys C-w l'"
navigate_back=" $navigate 'tmux select-pane -l || tmux select-pane -t1'\
'tmux send-keys C-w p' \
'pane_is_zoomed' "
bind-key -n M-h run-shell -b "$navigate_left"
bind-key -n M-j run-shell -b "$navigate_down"
bind-key -n M-k run-shell -b "$navigate_up"
bind-key -n M-l run-shell -b "$navigate_right"
bind-key -n M-\\ run-shell -b "$navigate_back"
# Mejor soporte para mouse
set -g @prevent-scroll-for-fullscreen-alternate-buffer 'on'
set -g @scroll-speed-num-lines-per-scroll '3'

View File

@ -1,45 +1,16 @@
#!/bin/sh
userresources=$HOME/.config/X11/xresources
usermodmap=$HOME/.config/X11/xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
[ -d /etc/X11/xinit/xinitrc.d ] && \
for f in /etc/X11/xinit/xinitrc.d/*; do [ -x "$f" ] && . "$f"; done && unset f
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
# eval `dbus-launch --sh-syntax`
# fi
xrdb -merge "$XDG_CONFIG_HOME"/X11/xresources
setxkbmap -option caps:escape
eval "$(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)"
export SSH_AUTH_SOCK
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
xsetroot -cursor_name left_ptr &
sxhkd &
randbg "$HOME/Pictures/wallpaper" &
dunst -conf ~/.config/dunst/dunstrc &
picom -b -d :0 &
mpd &
unclutter &
(sleep 1 && xcompmgr) &
xset s 0 550
xss-lock -l -- exeflock4 &
exec bspwm
exec runsvdir -P ~/.local/service.x 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'

17
.zshenv
View File

@ -1,5 +1,5 @@
# Programas y Opciones del Sistema {{{
export TERMINAL="st"
export TERMINAL="alacritty"
export EDITOR="nvim"
export GIT_EDITOR="$EDITOR"
export BROWSER="firefox"
@ -13,7 +13,6 @@ export WM="bspwm"
export FILE="lf"
export GREP_COLOR="0;32"
export RANGER_LOAD_DEFAULT_RC="FALSE"
export TIME_STYLE="long-iso"
export BLOCK_SIZE="'1"
export QUOTING_STYLE=literal
@ -21,13 +20,13 @@ export QT_QPA_PLATFORMTHEME=qt5ct
export HIGHLIGHT_OPTIONS='--out-format="ansi" --style="pablo"'
export BAT_STYLE="numbers,changes,header"
export BAT_THEME="TwoDark"
export SSH_ASKPASS="/usr/lib/seahorse/ssh-askpass"
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export INPUTRC="$XDG_CONFIG_HOME/inputrc"
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
@ -56,18 +55,15 @@ export FZF_DEFAULT_OPTS="$FZF_DEFAULT_COLORS \
--bind ctrl-f:page-down,ctrl-b:page-up \
--preview-window wrap"
export FZF_DEFAULT_COMMAND="fd --type file --color=always --follow --hidden --exclude .git"
export FZF_DEFAULT_COMMAND="fd -t f -c always -H"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND="bfs -type d -nohidden"
export FZF_COMPLETION_OPTS='+c -x'
export FZF_CTRL_T_OPTS="--select-1 --exit-0 --preview 'bat --color=always {}'"
export FZF_ALT_C_OPTS="--select-1 --exit-0"
export FZF_VIM_LOG=$(git config --get alias.l | awk '{$1=""; print $0;}' | tr -d '\r')
# }}}
# Less {{{
export LESS=-R
export LESSCHARSET=UTF-8
export LESS=X-+I
export LESS_TERMCAP_mb="$(printf '%b' '')"
export LESS_TERMCAP_md="$(printf '%b' '')"
export LESS_TERMCAP_me="$(printf '%b' '')"
@ -75,11 +71,12 @@ export LESS_TERMCAP_so="$(printf '%b' '')"
export LESS_TERMCAP_se="$(printf '%b' '')"
export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
export LESSHISTFILE="-"
# }}}
# Path {{{
typeset -U PATH path
path=(~/.local/bin ~/.config/yarn/bin ~/.config/yarn/global/node_modules/.bin /usr/lib/surfraw $path[@])
path=(~/.local/bin ~/.config/yarn/bin ~/.local/share/npm/bin $path[@])
# }}}
# vim:foldmethod=marker:foldlevel=0

View File

@ -1,230 +0,0 @@
acpid
alacritty
alsa-utils
android-tools
android-udev
atool
audacity
autoconf
automake
autopep8
bat
bison
broot
bspwm
cadence
chafa
cpupower
crda
cronie
ctags
dash
dfc
dhclient
dhcpcd
diff-so-fancy
discount
dnsmasq
downgrade
dunst
ecryptfs-utils
efibootmgr
eslint
ethtool
exfat-utils
f2fs-tools
fakeroot
fd
ffmpegthumbnailer
file-roller
firefox
flex
gcc
ghex
ghostscript
gimp-plugin-gmic
gimp-plugin-lqr
gpart
gparted
grub
gsimplecal
gst-libav
gst-plugins-ugly
gstreamer-vaapi
gucharmap
haveged
highlight
hsetroot
htop
hub
hunspell-en_US
hunspell-es_any
hunspell-es_ar
i3lock-color
iniparser
inkscape
innoextract
intel-ucode
inxi
iputils
ipython
isync
jfsutils
jp2a
jq
jre11-openjdk
lib32-alsa-oss
lib32-libpulse
lib32-openal
libmatroska
libzip
licenses
linux-rt-manjaro
logrotate
lrzip
lxappearance-gtk3
lynx
lzop
maim
make
man-db
man-pages
manjaro-firmware
manjaro-release
manjaro-system
mediainfo
memtest86+
mixxx
mkinitcpio-openswap
mlocate
mpc
mpd
mps-youtube
mpv
msmtp
ncdu
ncmpcpp
neomutt
networkmanager
nfs-utils
nilfs-utils
nmap
notmuch
noto-fonts-cjk
ntfs-3g
offlineimap
os-prober
ossp
p7zip
pacgraph
pacui
parallel
pass
patch
pavucontrol
perl-autovivification
perl-curses-ui
perl-glib-object-introspection
perl-image-exiftool
perl-lwp-protocol-https
perl-term-readline-gnu
perl-text-charwidth
picom
pkgbrowser
polkit-gnome
prettier
pulseaudio-jack
pulsemixer
python-beautifulsoup4
python-glfw
python-language-server
python-lxml
python-numpy
python-opengl
python-pdoc
python-pillow
python-pip
python-pudb
python-pydocstyle
python-pylint
python-pynvim
python-pyperclip
python-pytest-flake8
python-rope
python-setproctitle
python-virtualenv
python-wheel
python-xlib
qalculate-gtk
qt5ct
ranger
realtime-privileges
reiserfsprogs
ripgrep
rp-pppoe
rsync
rtirq
s-nail
sc3-plugins
sdl2_image
sdl2_mixer
sdl2_ttf
seahorse
shellcheck
smartmontools
source-highlight
spectre-meltdown-checker
sshfs
steam-manjaro
sublime-text
surfraw
sxhkd
systemd-sysvcompat
tidy
tmux
transmission-cli
ttf-jetbrains-mono
typescript
udisks2
unace
unarj
uncrustify
unrar
urlscan
usbutils
vice
vint
weechat
wget
wireless_tools
wmctrl
wmutils
x86_energy_perf_policy
xcb-util-cursor
xdo
xdotool
xf86-input-evdev
xf86-input-synaptics
xf86-video-fbdev
xf86-video-intel
xorg-server
xorg-xbacklight
xorg-xdpyinfo
xorg-xev
xorg-xhost
xorg-xinit
xorg-xinput
xorg-xkill
xorg-xsetroot
xorg-xwininfo
xsel
xss-lock
xtitle
yapf
yay
zathura-cb
zathura-pdf-poppler
zsh-completions
zsh-doc
zsh-history-substring-search
zsh-syntax-highlighting

View File

@ -1,43 +0,0 @@
bashmount
bfs
cozette-otb
cozette-ttf
figlet-fonts
gimp-paint-studio
gimp-plugin-akkana-git
gimp-plugin-create-layer-mask-from
gimp-plugin-duplicate-to-another-image
gimp-plugin-export-layers
gimp-plugin-layer-via-copy-cut
gimp-plugin-layerfx
gimp-plugin-saveforweb
gimp-plugin-scale-layer-to-image-size
git-extras
godot
gog-unreal-tournament-goty
j4-dmenu-desktop
lab
lf
logmein-hamachi
lscolors-git
neovim-drop-in
nerd-fonts-roboto-mono
obs-ndi-bin
otf-san-francisco
perl-extract-url
python-lolcat
python-pysdl2
realtimeconfigquickscan-git
simple-mtpfs
soulseekqt
stylelint
tcllib
terminess-powerline-font-git
toilet-fonts
tremc
tweak-hexeditor
unclutter-xfixes-git
xcursor-alkano-default
xf86-input-keyboard
xf86-input-mouse
zsh-autopair-git

114
doc/xbpaketes Normal file
View File

@ -0,0 +1,114 @@
alacritty-0.4.2_2
alsa-plugins-1.2.2_1
alsa-plugins-ffmpeg-1.2.2_1
alsa-plugins-jack-1.2.2_1
alsa-utils-1.2.2_1
atool-0.39.0_5
autopep8-1.5_1
base-system-0.113_2
bashmount-3.2.0_2
bat-0.12.1_1
broot-0.13.4_1
bspwm-0.9.9_2
cadence-0.9.1_1
chrony-3.5_2
connman-1.38_1
connman-ncurses-1.0_3
cryptsetup-2.3.1_1
dfc-3.1.1_1
dunst-1.4.1_1
elogind-243.4_2
fd-7.5.0_1
ffmpeg-4.2.2_2
firefox-74.0.1_1
fzf-0.21.1_1
gallery-dl-1.13.2_1
gcc-9.3.0_3
git-2.26.0_1
git-extras-5.1.0_1
google-fonts-ttf-20190605_1
grub-i386-efi-2.04_3
grub-x86_64-efi-2.04_3
haveged-1.9.8_1
highlight-3.55_1
hsetroot-1.0.5_1
htop-2.2.0_1
hub-2.14.2_1
i3lock-color-2.12_2
iwd-1.6_1
j4-dmenu-desktop-2.17_1
jq-1.6_1
lf-r13_2
librsvg-2.47.1_1
lvm2-2.02.186_1
maim-5.5.3_2
mdadm-4.1_2
mlocate-0.26_4
mpc-0.33_1
mpd-0.21.22_1
mpv-0.32.0_1
ncmpcpp-0.8.2_9
neovim-0.4.3_1
nmap-7.80_2
nodejs-13.2.0_1
noto-fonts-cjk-20190416_1
noto-fonts-ttf-20190926_1
p7zip-16.02_5
pd-0.50.2_1
picom-7.5_1
pkg-config-0.29.2_2
powertop-2.11_1
python3-3.8.2_1
python3-BeautifulSoup4-4.8.2_1
python3-ipython-7.12.0_1
python3-isort-4.3.21_2
python3-language-server-0.31.8_1
python3-lxml-4.4.1_2
python3-mccabe-0.6.1_3
python3-pip-20.0.2_1
python3-pycodestyle-2.5.0_2
python3-pyflakes-2.1.1_2
python3-vint-0.3.19_3
sc3-plugins-3.9.1_1
setxkbmap-1.3.2_1
shellcheck-0.7.0_3
simple-mtpfs-0.3.0_3
socklog-void-20200115_1
supercollider-3.10.4_1
sxhkd-0.6.1_1
sxiv-26_1
tmux-3.0a_2
transmission-2.94_4
tremc-0.9.1_1
udisks2-2.8.4_1
unzip-6.0_13
vpm-1.2a_1
vsv-1.3.4_1
weechat-2.8_2
wmctrl-1.07_5
wmutils-core-1.5_1
wmutils-opt-1.0_1
xbacklight-1.2.3_1
xclip-0.13_1
xdo-0.5.7_1
xdotool-3.20160805.1_2
xdpyinfo-1.3.2_2
xf86-video-intel-2.99.917.899_2
xkill-1.0.5_1
xorg-minimal-1.2_2
xrandr-1.5.1_1
xrdb-1.2.0_2
xset-1.2.4_1
xsetroot-1.1.2_1
xss-lock-0.3.0_2
xtools-0.58_1
xz-5.2.5_1
yarn-1.22.0_1
youtube-dl-2020.03.24_1
zathura-0.4.5_2
zathura-cb-0.1.8_2
zathura-pdf-mupdf-0.3.5_2
zip-3.0_6
zsh-5.8_1
zsh-completions-0.31.0_1
zsh-syntax-highlighting-0.7.1_1