From 3978a6d3d9c68d090239387a9575b08d20325344 Mon Sep 17 00:00:00 2001 From: deadguy Date: Mon, 26 Sep 2022 18:07:09 -0300 Subject: [PATCH] Habilite dbus-launch para cuestiones de gamemode y placa de video, cambie la invocacion de polybar para que sea en un solo monitor, cambios cosmeticos de neomutt y lf, mantenimiento de nvim y el resto es acomodar giladas en archivos pero sin hacer cambios puntuales. --- X11/xinitrc | 2 +- bspwm/bspwmrc | 10 +- htop/htoprc | 46 +++-- lf/lfrc | 6 +- neomutt/mailcap | 5 +- neomutt/neomuttrc | 20 ++- neomutt/neomuttrc.d/bindings.neomuttrc | 2 +- neomutt/neomuttrc.d/powerline.neomuttrc | 13 +- nvim/lua/configs/telescope.lua | 12 +- nvim/lua/plugins.lua | 29 +-- nvim/plugin/keymaps.lua | 1 + pipe-viewer/pipe-viewer.conf | 12 +- polybar/config | 101 ++++++++--- xbpaketes | 224 +++++++++--------------- zsh/conf/01_teclas.zsh | 27 +-- zsh/conf/02_historial.zsh | 1 + zsh/conf/05_zmarks.zsh | 3 +- 17 files changed, 267 insertions(+), 247 deletions(-) diff --git a/X11/xinitrc b/X11/xinitrc index 09a7bc7..0da5fcd 100644 --- a/X11/xinitrc +++ b/X11/xinitrc @@ -7,4 +7,4 @@ xset r rate 200 30 xset s 0 900 xrdb -merge "$XDG_CONFIG_HOME/X11/xresources" -exec runsvdir -P ~/.local/service.x +exec dbus-launch --exit-with-session runsvdir -P ~/.local/service.x diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index ed4c892..fca1b2d 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -1,9 +1,10 @@ #!/bin/sh -bspc monitor DP-3 -d 1 2 3 4 5 -bspc monitor HDMI-1 -d 6 7 8 9 10 +bspc monitor DisplayPort-2 -d 1 2 3 4 5 +bspc monitor HDMI-A-0 -d 6 7 8 9 10 bspc config bottom_padding 0 -bspc config top_padding 23 +bspc config -m DisplayPort-2 top_padding 23 +bspc config -m HDMI-A-0 top_padding 0 bspc config border_width 3 bspc config window_gap 6 bspc config split_ratio 0.5 @@ -40,6 +41,7 @@ bspc config presel_feedback_color "$(get_xrdb color6)" # Flotantes bspc rule -a mpv state=floating +bspc rule -a renpy state=floating bspc rule -a pentablet state=floating bspc rule -a Alacritty:flota state=floating bspc rule -a Firefox:Browser state=floating @@ -49,6 +51,6 @@ bspc rule -a Borderlands2 state=fullscreen bspc rule -a Cities.x64 state=fullscreen unclutter --jitter 30 --timeout 3 --ignore-scrolling & +$TERMINAL & randbg & barrita -$TERMINAL & diff --git a/htop/htoprc b/htop/htoprc index 03e0d9b..ba4e602 100644 --- a/htop/htoprc +++ b/htop/htoprc @@ -1,16 +1,15 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -fields=0 48 39 2 46 47 49 1 -sort_key=47 -sort_direction=1 -tree_sort_key=0 -tree_sort_direction=1 +htop_version=3.2.1 +config_reader_min_version=3 +fields=0 49 48 2 46 47 39 1 hide_kernel_threads=1 hide_userland_threads=1 shadow_other_users=0 show_thread_names=0 show_program_path=1 highlight_base_name=1 +highlight_deleted_exe=1 highlight_megabytes=1 highlight_threads=1 highlight_changes=1 @@ -18,22 +17,45 @@ highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=0 -tree_view=1 -tree_view_always_by_pid=0 header_margin=0 +screen_tabs=0 detailed_cpu_time=0 cpu_count_from_one=1 show_cpu_usage=1 show_cpu_frequency=0 -show_cpu_temperature=0 +show_cpu_temperature=1 degree_fahrenheit=0 update_process_names=0 account_guest_in_cpu_meter=0 color_scheme=0 enable_mouse=0 delay=15 -left_meters=Blank AllCPUs2 Blank -left_meter_modes=2 1 2 -right_meters=Blank CPU Memory Tasks DiskIO NetworkIO -right_meter_modes=2 2 2 2 2 2 hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=Blank AllCPUs2 Blank +column_meter_modes_0=2 1 2 +column_meters_1=Blank CPU Memory Tasks DiskIO NetworkIO +column_meter_modes_1=2 2 2 2 2 2 +tree_view=1 +sort_key=47 +tree_sort_key=0 +sort_direction=1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID TIME USER STATE PERCENT_CPU PERCENT_MEM M_RESIDENT Command +.sort_key=PERCENT_MEM +.tree_sort_key=PID +.tree_view=1 +.tree_view_always_by_pid=0 +.sort_direction=1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/lf/lfrc b/lf/lfrc index 916a9e0..c209b74 100644 --- a/lf/lfrc +++ b/lf/lfrc @@ -138,7 +138,7 @@ cmd paste-overwrite %{{ }} cmd fzf_jump ${{ - res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')" + res="$(find . -maxdepth 3 | sed "s|^\./||" | fzf --reverse --header='Jump to location' | sed 's/\\/\\\\/g;s/"/\\"/g')" if [ -d "$res" ]; then cmd="cd" else @@ -268,6 +268,7 @@ map D %mv -i $fs . map zf $file-roller "$f" map zc $zip -9 -r "$f".cbz $f map zx $zx "$f" +map zm $zip "$f" map I push A # at the very beginning map A rename # at the very end map i push A # at the very beginning @@ -290,7 +291,6 @@ map gE cd /etc map gU cd /usr map gM cd /media map gl cd ~/.local/share -map gg cd ~/.local/share/go map gb cd ~/.local/bin map g. cd ~/.config map gn cd ~/.config/nvim @@ -298,9 +298,9 @@ map gz cd ~/.config/zsh map gd cd ~/doc map gm cd ~/mus map ga cd ~/prg -map gp cd ~/doc/paginas map gv cd ~/vid map ge cd ~/etc map gi cd ~/img map gc cd /mnt/cell map gx cd /mnt/vb/graveyard +map gg cd /mnt/wd1tb/catacombs diff --git a/neomutt/mailcap b/neomutt/mailcap index 2a78092..bde6664 100644 --- a/neomutt/mailcap +++ b/neomutt/mailcap @@ -1,9 +1,10 @@ text/plain; less -R %s # text/html; lynx -dump -width ${COLUMNS:-80} %s ; copiousoutput -text/html; elinks -no-connect -dump -dump-charset UTF-8 -dump-width 140 -default-mime-type text/html %s; needsterminal; copiousoutput; +# text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput +text/html; elinks -no-connect -dump -dump-charset UTF-8 -dump-width 90 -default-mime-type text/html %s; needsterminal; copiousoutput; text/x-diff; colordiff; copiousoutput text/x-patch; colordiff; copiousoutput -image/*; sxiv-rifle %s ; +image/*; nsxiv-rifle %s ; video/*; setsid mpv --quiet--keep-open - audio/*; mpv %s ; application/pdf; zathura --fork - && sleep 1; test=test -n "$DISPLAY" diff --git a/neomutt/neomuttrc b/neomutt/neomuttrc index f470834..be9ffae 100644 --- a/neomutt/neomuttrc +++ b/neomutt/neomuttrc @@ -22,6 +22,9 @@ set forward_format = "Fwd: %s" # Format of subject when forwarding set timeout = 2 set sleep_time = 0 # Pause 0 seconds for informational messages set mail_check = 60 # To avoid lags using IMAP +set pager_index_lines = 20 +set pager_context = 3 +set wrap = 90 # email view width set use_envelope_from = yes set edit_headers = yes set rfc2047_parameters = yes @@ -29,34 +32,37 @@ set mime_forward = yes # Attachments are forwarded with mail set auto_tag = yes # Automatically apply actions to all tagged messages set delete = yes # Don't ask, do. set edit_headers = yes # Allow editing fields +set count_alternatives = yes # recurse into text/multipart when looking for attachement types set sidebar_visible = no # Not needed set markers = no # Disables the `+` displayed at line wraps set mark_old = no # Unread mail stay unread until read set wait_key = no # mutt won't ask "press key to continue" set recall = no # that's what R keybind is for +set thorough_search = no # don't process mail (via mailcap etc) before parsing with queries like ~B set fast_reply # skip to compose when replying +set smart_wrap # wrap lines at word boundaries rather than splitting up words set fcc_attach # save attachments with the body set forward_quote # include message in forwards set reverse_name # reply as whomever it was to set menu_scroll # scroll in menus +set allow_ansi # allow ansi escape codes (e.g. colors) +set flag_safe # flagged messages can't be deleted set arrow_cursor set pipe_decode - -set pager_index_lines = 20 -set pager_context = 3 set pager_stop -alternative_order text/calendar text/plain text/enriched text/html unauto_view * +auto_view application/ics auto_view text/calendar +auto_view text/plain auto_view text/html auto_view text/x-diff auto_view text/x-patch -auto_view application/ics auto_view application/pgp-encrypted +alternative_order text/calendar application/ics text/plain text/enriched text/html -set print_command = "nvim -R -c 'set ft=mail background=dark \ - popt=header:0' -c 'ha' -c 'q' -" +# set print_command = "nvim -R -c 'set ft=mail background=dark \ +# popt=header:0' -c 'ha' -c 'q' -" # neomutt doesn't have this yet :( # set editor = "carta.sh `echo $EDITOR`" diff --git a/neomutt/neomuttrc.d/bindings.neomuttrc b/neomutt/neomuttrc.d/bindings.neomuttrc index 318262e..0b7cb6e 100644 --- a/neomutt/neomuttrc.d/bindings.neomuttrc +++ b/neomutt/neomuttrc.d/bindings.neomuttrc @@ -61,4 +61,4 @@ macro browser h '..' "Go to parent folder" macro index,pager 'source ~/.config/neomutt/accounts/dgy@fuckup.club.muttrc!;' "switch to dgy@fuckup" macro index,pager 'source ~/.config/neomutt/accounts/dgy@texto-plano.xyz.muttrc!;' "switch to dgy@t-p" -macro index,pager 'source ~/.config/neomutt/accounts/alejo.muttrc!;' "switch to namefag" +# macro index,pager 'source ~/.config/neomutt/accounts/alejo.muttrc!;' "switch to namefag" diff --git a/neomutt/neomuttrc.d/powerline.neomuttrc b/neomutt/neomuttrc.d/powerline.neomuttrc index a6d9737..4cf8a82 100644 --- a/neomutt/neomuttrc.d/powerline.neomuttrc +++ b/neomutt/neomuttrc.d/powerline.neomuttrc @@ -1,19 +1,22 @@ # vim: filetype=neomuttrc -# Powerline / nerdfont -# This is a bit "hackish" due to neomutt limitations -# Author: Sheoak https://github.com/sheoak/neomutt-powerline-nerdfonts +# Author: Sheoak https://github.com/ceuk/mutt_dotfiles # Modified by Deadguy - +set date_format = "%a %d %h %H:%M" set index_format=" %zs %zc %zt %<[y?%<[m?%<[d?%[%R ]&%[%a %d]>&%[%b %d]>&%[%F ]> %-28.28L %?K?%15.14K& ? %?M?(%1M)& ? %?X? & ? %s %> %?g?%g?" set pager_format="\n%n %T %s%*  %{!%F · %R} %?X? %X? %P\n \n" set status_format = " %f %?r? %m ?%?n? %n ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? %> %P\n \n" set vfolder_format = " %N %?n?%3n& ? %8m  · %f" set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" +index-format-hook attachment_info '=B text/calendar ~X 1' ' ' +index-format-hook attachment_info '=B text/calendar' " " +index-format-hook attachment_info '~X 1' " " +index-format-hook attachment_info '~A' " " # not addressed to me, to me, not only recipient, cc, sent by me, mailing list, reply-to -set to_chars=" " +# set to_chars=" " +set to_chars=" " # unchanged mailbox, changed, read only, attach mode set status_chars = " " ifdef crypt_chars set crypt_chars = " " diff --git a/nvim/lua/configs/telescope.lua b/nvim/lua/configs/telescope.lua index 281b274..f4a899d 100644 --- a/nvim/lua/configs/telescope.lua +++ b/nvim/lua/configs/telescope.lua @@ -9,16 +9,6 @@ require("telescope").setup({ layout_config = { prompt_position = "top", }, - vimgrep_arguments = { - "rg", - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - "--smart-case", - "--trim", - }, preview = { filesize_limit = 5, timeout = 150, @@ -56,7 +46,7 @@ require("telescope").setup({ borderchars = { "─", " ", " ", " ", " ", " ", " ", " " }, grouped = true, initial_mode = "normal", - -- sorting_strategy = "ascending", + sorting_strategy = "ascending", }, }, }) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 26b8cd1..182f1e2 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -1,16 +1,16 @@ -local packer_bootstrap -local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" -if vim.fn.empty(vim.fn.glob(install_path)) > 0 then - vim.notify("Installing packer...") - vim.fn.termopen(("git clone https://github.com/wbthomason/packer.nvim %q"):format(install_path)) +local ensure_packer = function() + local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + if vim.fn.empty(vim.fn.glob(install_path)) > 0 then + vim.fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) + vim.cmd([[packadd packer.nvim]]) + return true + end + return false end -local _packer, packer = pcall(require, "packer") -if not _packer then - return -end +local packer_bootstrap = ensure_packer() -packer.init({ +require("packer").init({ display = { open_fn = function() return require("packer.util").float({ border = "single" }) @@ -25,7 +25,7 @@ packer.init({ compile_on_sync = true, }) -return packer.startup(function(use) +return require("packer").startup(function(use) use("lewis6991/impatient.nvim") use("nvim-lua/plenary.nvim") use("wbthomason/packer.nvim") @@ -86,8 +86,7 @@ return packer.startup(function(use) { "windwp/nvim-autopairs", config = function() - -- require("configs.pairs") - require("nvim-autopairs").setup {} + require("nvim-autopairs").setup({}) end, }, }, @@ -116,10 +115,12 @@ return packer.startup(function(use) require("configs.colorizer") end, }) + -- acordarse de borrar este plugin en cuanto salga nvim 0.8 use("antoinemadec/FixCursorHold.nvim") + use({ "vimwiki/vimwiki", ft = "wiki" }) + if packer_bootstrap then - vim.notify("Installing plugins...") require("packer").sync() end end) diff --git a/nvim/plugin/keymaps.lua b/nvim/plugin/keymaps.lua index 1ba0831..c6cf251 100644 --- a/nvim/plugin/keymaps.lua +++ b/nvim/plugin/keymaps.lua @@ -13,6 +13,7 @@ vim.keymap.set("n", "}l", ":lnext", { silent = true }) vim.keymap.set("n", "}o", ':call append(line("."), "")', { silent = true }) vim.keymap.set("n", "}b", ":bnext", { silent = true }) vim.keymap.set("n", "}t", ":tablast", { silent = true }) +vim.keymap.set("i", "", "", { silent = true }) -- Splits vim.keymap.set("n", "", "wincmd h") diff --git a/pipe-viewer/pipe-viewer.conf b/pipe-viewer/pipe-viewer.conf index c2e8612..ea7b396 100644 --- a/pipe-viewer/pipe-viewer.conf +++ b/pipe-viewer/pipe-viewer.conf @@ -1,9 +1,10 @@ #!/usr/bin/perl -# CLI Pipe Viewer 0.2.1 - configuration file +# CLI Pipe Viewer 0.3.1 - configuration file our $CONFIG = { api_host => "auto", + audio_quality => "best", auto_captions => 0, autoplay_mode => 0, bypass_age_gate_with_proxy => 0, @@ -48,6 +49,7 @@ our $CONFIG = { downloads_dir => "$ENV{HOME}/vid", env_proxy => 1, fat32safe => 0, + features => ["hd"], ffmpeg_cmd => "/bin/ffmpeg", force_fallback => 0, fullscreen => 0, @@ -78,6 +80,7 @@ our $CONFIG = { region => undef, remove_played_file => 1, resolution => "best", + saved_channels_file => "$ENV{HOME}/.config/pipe-viewer/users.txt", show_video_info => 1, skip_if_exists => 1, skip_watched => 0, @@ -109,15 +112,10 @@ our $CONFIG = { srt => "--sub-file=*SUB*", }, }, - videoCaption => undef, - videoDefinition => "high", - videoDimension => undef, videoDuration => undef, - videoLicense => undef, watch_history => 0, - watched_file => "/tmp/pipe-viewer/watched.txt", + watch_history_file => "/tmp/pipe-viewer/watched.txt", wget_cmd => "wget", - youtube_users_file => "$ENV{HOME}/.config/pipe-viewer/users.txt", youtube_video_url => "https://www.youtube-nocookie.com/watch?v=%s", ytdl => 1, ytdl_cmd => "/bin/yt-dlp", diff --git a/polybar/config b/polybar/config index 71bb4ef..e46cb60 100644 --- a/polybar/config +++ b/polybar/config @@ -1,5 +1,5 @@ [colors] -background = #BB080808 +background = #DD080808 foreground = ${xrdb:color7} foreground-alt = ${xrdb:color8} primary = ${xrdb:color11} @@ -10,34 +10,31 @@ wifi = ${xrdb:color12} cartas = ${xrdb:color13} [bar/LaBarra] -monitor = ${env:MONITOR:} +; monitor = ${env:MONITOR:} width = 100% height = 22 offset-x = 0 offset-y = 0 radius = 0 -fixed-center = false +fixed-center = true enable-ipc = true locale = es_AR.UTF-8 background = ${colors.background} foreground = ${colors.foreground} - line-size = 2 line-color = ${colors.background} - border-size = 2 border-color = ${colors.background} - -padding = 4 -module-margin = 3 +module-margin = 2 font-0 = System Charcoal:size=12;1 font-1 = System Charcoal:weight=bold:size=12;1 font-2 = JetBrainsMono Nerd Font:size=12;1 font-3 = Noto Color Emoji:pixelsize=16:scale=10;1 -modules-right = correo wlan temperature date bspwm +modules-left = bspwm +modules-right = correo temp_nvm temp_cpu temp_gpu temp_jun temp_mem date tray-position = none override-redirect = false wm-restack = bspwm @@ -53,21 +50,21 @@ label-focused-padding = 1 label-focused-foreground = ${colors.primary} label-focused-font = font-1 -label-occupied = %index% -label-occupied-padding = 2 +label-occupied = " %index% " +label-occupied-padding = 1 label-occupied-foreground = ${colors.secondary} -label-urgent = %index%! +label-urgent = "%index%! " label-urgent-foreground = ${colors.alert} -label-urgent-padding = 2 +label-urgent-padding = 1 -label-empty = %index% +label-empty = " %index% " label-empty-foreground = ${colors.foreground-alt} -label-empty-padding = 2 +label-empty-padding = 1 [module/wlan] type = internal/network -interface = wlp9s0f3u2 +interface = wlp10s0f3u2 interval = 3.0 format-connected = @@ -95,7 +92,7 @@ format-foreground = ${colors.cartas} label = 📥 %output% -[module/temperature] +[module/temp_mem] type = internal/temperature ; Full path of temperature sysfs path @@ -103,15 +100,79 @@ type = internal/temperature ; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done ; to find path to desired file ; Default reverts to thermal zone setting -hwmon-path = /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/hwmon/hwmon0/temp3_input +hwmon-path = /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/0000:02:00.0/0000:03:00.0/hwmon/hwmon1/temp3_input + +base-temperature = 25 +warn-temperature = 90 + +format =