dgy
/
hexagons
Archived
1
0
Fork 0

rezagos del 2018. lo ultimo que quedo

This commit is contained in:
deadguy 2019-01-08 10:01:43 -03:00
parent 8e4692a00d
commit 6eb0b10a8d
Signed by: dgy
GPG Key ID: 37CA55B52CF63730
18 changed files with 94 additions and 70 deletions

View File

@ -1,4 +1,4 @@
hsetroot -fill /home/deadguy/Pictures/wallpaper/IUZQAde.png &
hsetroot -fill /home/deadguy/Pictures/wallpaper/wallhaven-559044.png &
#~/.config/polybar/launch.sh &
# redshift -c ~/.config/redshift/redshift.conf &
dunst -conf ~/.config/dunst/dunstrc &

View File

@ -1,4 +1,6 @@
#!/usr/bin/env dash
#!/usr/bin/env bash
set -euf -o pipefail
# neeasade
# depends on: jq
# goal: natural feeling window spawning
@ -6,11 +8,6 @@
# if there are any presel's on current desktop, spawn there.
# else, spawn a prefered split in current node based on node size.
# if any one shot rule exists, defer to potentially that.
# have to check a file/set outside of this script because bspc calls here make external rule take priority
wid=$1
class_name="$2"
# preferred split directions:
horiPref=east
vertPref=south
@ -19,14 +16,6 @@ vertPref=south
# else direction is determined by width or height being greater.
percent=.45
# if 1 node is open, switch directions (related to custom_monocle)
mon_width=$(bspc query -T -m | jq .rectangle.width)
mon_height=$(bspc query -T -m | jq .rectangle.height)
if [ "$mon_width" -gt "$mon_height" ]; then
node_count=$(bspc query -N -d $desk -n .leaf.normal | wc -l)
[ "$node_count" -eq 1 ] && vertPref=$horiPref
fi
# get any presels on the current desktop, select one if so.
presel="$(bspc query -N -d -n .\!automatic | head -n 1)"
targetNode=${presel:-focused}
@ -40,7 +29,7 @@ height=$(bspc query -T -n "$targetNode" | jq '.rectangle.height')
echo node="$targetNode"
# not specifying split dir if targetting presel
[ ! -z "$presel" ] && exit 0
[ -n "$presel" ] && exit 0
bcInput="$(iif "[ $width -gt $height ]" \
"($width-$height)/$width" \
@ -54,4 +43,56 @@ else
split_dir=$(iif "[ $width -gt $height ]" $horiPref $vertPref)
fi
echo split_dir="$split_dir"
echo split_dir="$split_dir"
get_xrdb() {
xrdb -query | grep "$1" | awk '{print $2}' | tail -n1
}
xrdb -merge "${HOME}/.Xresources"
borderW=$(bspc config border_width)
focused=$(get_xrdb color3)
focused2=$(get_xrdb color0)
unfocused=$(get_xrdb color8)
unfocused2=$(get_xrdb color8)
subscribe_focus() { # this sets the borders of the next and previous window when moving focus
# listen to events
bspc subscribe node_focus | while read -ra msg; do
if [[ ${msg[0]} == 'node_focus' ]]
then
# newly focussed window
chwb2 -O "$focused2" -o "$borderW" -I "$focused" -i "$borderW" "${msg[3]}"
# previously focussed window
chwb2 -O "$unfocused2" -o "$borderW" -I "$unfocused" -i "$borderW" "$prev"
prev=${msg[3]}
fi
done
}
subscribe_geometry() { # this resets borders when windows change size
# listen to events
bspc subscribe node_geometry | while read -ra msg; do
if [[ ${msg[0]} == 'node_geometry' ]]
then
if [[ $(bspc query -N -n) == "${msg[3]}" ]]
then
chwb2 -O "$focused2" -o "$borderW" -I "$focused" -i "$borderW" "${msg[3]}"
else
chwb2 -O "$unfocused2" -o "$borderW" -I "$unfocused" -i "$borderW" "${msg[3]}"
fi
fi
done
}
subscribe_desktop_focus() { # this sets the border when moving to next/prev desktop
bspc subscribe desktop_focus | while read -ra msg
do
if [[ ${msg[0]} == 'desktop_focus' ]]
then
chwb2 -O "$focused2" -o "$borderW" -I "$focused" -i "$borderW" "$(bspc query -N -n)"
fi
done
}

View File

@ -156,8 +156,4 @@ macro index o "<shell-escape>$HOME/bin/correo.sh -qf INBOX<enter>" "run offlinei
#copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# Notmuch searching
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"<enter>" "show only messages matching a notmuch pattern"
macro index A "<limit>all\n" "show all messages (undo limit)"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

View File

@ -405,17 +405,6 @@ let g:slime_default_config = {"socket_name": "default", "target_pane": ":.2"}
let g:slime_dont_ask_default = 1
" }}}
" Iron {{{
"nnoremap <leader>ir :IronRepl<CR>
"
"let g:iron_repl_open_cmd = '10split'
"let g:iron_map_defaults = 0
"
"nmap + <S-v><Plug>(iron-send-motion)
"vmap + <Plug>(iron-send-motion)
"nmap rr <Plug>(iron-repeat-cmd)
" }}}
" LSP {{{
let g:LanguageClient_serverCommands = {
\ 'python': ['/usr/bin/pyls'],
@ -477,6 +466,8 @@ if !exists("autocommands_loaded") && has("autocmd")
" Runs a script that cleans out tex build files whenever I close out of a .tex file.
autocmd VimLeave *.tex !texclear %
autocmd BufWritePost ~/.Xresources,~/.Xdefaults !xrdb %
aug skeletons
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
autocmd BufRead,BufNewFile *.foxdot 0r ~/.config/nvim/templates/foxdot.skeleton

View File

@ -60,7 +60,7 @@ 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 false
set line_numbers true
set one_indexed true
set save_tabs_on_exit false
set wrap_scroll true

View File

@ -4,11 +4,14 @@ scroll_on_keystroke = true
audible_bell = false
mouse_autohide = true
allow_bold = false
bold_is_bright = true
dynamic_title = true
icon_name = terminal
urgent_on_bell = true
clickable_url = true
scrollback_lines = 10000
scrollback_lines = -10000
search_wrap = true
scrollbar = off
#font = Sarasa Term J 10
#font = xos4 terminus 10
#font = t cherry 11

View File

@ -8,7 +8,7 @@ alias amix='alsamixer'
alias v='nvim'
alias vi='nvim'
alias vim='nvim'
alias chat='irssi'
alias irc='irssi'
alias 3='ncmpcpp'
alias torr='transmission-remote-cli'
alias cal='calcurse'
@ -31,7 +31,7 @@ alias mv='mv -iv'
alias rmdir='rmdir -v' # rm empty directory only
alias rm='rm -iv' # Always confirm before deleting things
alias mkdir='mkdir -pv' # Make parent directories that dont exist
alias cp="cp -raiv" # Confirm before overwriting something
alias cp="cp -raiv" # Confirm before overwriting something
alias ln='ln -iv'
alias rename='rename -v'
alias mount='mount -v | column -t'
@ -41,13 +41,10 @@ alias umount='umount -v'
alias cat='bat --style=numbers,changes,header --color=always'
alias find='fd -H --color=always'
alias ncdu='ncdu --color dark -rr -x --exclude .git'
alias ytdl='youtube-dl --add-metadata -ic'
alias yta='youtube-dl --add-metadata -icw --no-cache-dir --no-call-home --restrict-filenames --extract-audio --audio-format mp3 --audio-quality 0 --prefer-ffmpeg -o "%(title)s.%(ext)s"'
alias ls='ls -F --color=always --group-directories-first'
alias grep='grep --color=tty -d skip'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
alias dmesg='dmesg --color=always'
alias ag="ag --one-device --color --color-line-number '0;35' --color-match '46;30' --color-path '4;36'"
alias tree='tree -CAFa -I "CVS|*.*.package|.svn|.git|.hg|node_modules|bower_components" --dirsfirst'
alias lsblk='lsblk -o "KNAME,HOTPLUG,SIZE,FSTYPE,TYPE,LABEL,MOUNTPOINT,UUID,MODEL,SERIAL"'
alias dir='dir --color=always'
@ -57,28 +54,19 @@ alias free='free -ht' # Human readable and total
alias du='du -d1 -h | sort -rh' # Human readable, max depth
alias info='info --vi-keys' # GNU info act like man command
alias inxi='inxi -Fz'
alias slop='slop --highlight --tolerance=0 --color=0.3,0.4,0.6,0.4 -f '%wx%h+%x+%y''
alias slop="slop --highlight --tolerance=0 --color=0.3,0.4,0.6,0.4 -f '%wx%h+%x+%y'"
alias ping='ping -c 5 '
alias dd="dd status=progress"
alias dirs='dirs -v -p'
alias dfc='dfc -dmT'
# Comandos
alias search="rg \
--color='always' \
--heading \
--line-number \
--no-messages \
--hidden \
--follow \
--smart-case \
--glob '!.git/' \
--glob '!node_modules/' \
--regexp"
alias sudo='sudo '
alias logout="bspc quit 1"
alias pacmir='sudo pacman-mirrors -f5'
alias ytw='youtube-viewer -C -D -W -f -7 --results=10'
alias yta='youtube-dl --add-metadata -icw --no-cache-dir --no-call-home --restrict-filenames --extract-audio --audio-format mp3 --audio-quality 0 --prefer-ffmpeg -o "%(title)s.%(ext)s"'
alias ytdl='youtube-dl --add-metadata -ic --no-call-home'
#alias hoy='calcurse -a --format-apt=" - %m (%S a %E)\n" --format-recur-apt=" - %m (%S a %E)\n"'
#alias week='calcurse -r7 --format-apt=" - %m (%S a %E)\n" --format-recur-apt=" - %m (%S a %E)\n"'
#alias todo='calcurse -t --format-todo "(%p) %m\n"'
@ -88,5 +76,4 @@ alias compare='grep -nFxvf' # Usage: compare <file1> <file2>
alias pwn='chmod +x'
alias ta='tmux attach -t'
alias tk='tmux kill-session -t'
alias lst='ls -FAghoBtH --group-directories-first --dereference-command-line-symlink-to-dir --time-style=+"%d-%m-%Y %H:%M"'
alias shot='maim -d 5 -q -u ~/Pictures/scrot/$(date +%s).png && notify-send "Screen captured"'
alias lst='ls -FAghoBtH --group-directories-first --dereference-command-line-symlink-to-dir --time-style=+"%d-%m-%Y %H:%M"'

View File

@ -146,7 +146,7 @@ formats = {
whois_extra = "%y│ %wextr%b %|$1";
end_of_whois = "%y└─┄┄ ";
whois_not_found = "%y──┄┄ %wthere is no such nick %b$0";
topic = " %y ├─┄┄┄─┄"
topic = " %y ├─┄┄┄─┄";
topic_info = " %y │ %wtopic set by %b$0 %B(%w$1%B)";
channel_synced = "%n %N sync %y╪ %n{hilight $1} secs%: %y ├─┄┄┄─┄";
channel_created = " %n created %y╞ %n$1";

View File

@ -6,7 +6,7 @@ FILE="$FOLDER/$1"
if [[ -f $FILE ]]; then
echo -e "There's a file called that already..."
else
echo -e "#!/usr/bin/env bash\\n set -euf -o pipefail\\n" > "$FILE"
echo -e "#!/usr/bin/env bash\\nset -euf -o pipefail\\n" > "$FILE"
chmod +x "$FILE"
$EDITOR "$FILE"
fi

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
set -euf -o pipefail
echo "╓───── m o u n t . p o i n t s"; echo "╙────────────────────────────────────── ─ ─ "; lsblk -a; echo ""; echo "╓───── d i s k . u s a g e"; echo "╙────────────────────────────────────── ─ ─ "; df -h;

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -euf -o pipefail
set -euf -o pipefail
case "$1" in
*/..|*/../) cd -- "$1";; # that doesn't make any sense unless the directory already exists

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -euf -o pipefail
set -euf -o pipefail
pacman -Qdt
echo "Press ENTER to remove these orphaned packages or CTRL+C to cancel."

View File

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

View File

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

4
bin/shot Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euf -o pipefail
maim -d 5 -q -u ~/Pictures/scrot/"$(date +%s)".png && notify-send "Screen captured"

View File

@ -3,10 +3,11 @@
# Clears the build files of a LaTeX/XeLaTeX build.
# I have vim run this file whenever I exit a .tex file.
[[ "$1" == *.tex ]] || exit
file=$(readlink -f "$1")
dir=$(dirname "$file")
base="${file%.*}"
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\(busy\)|lof|nav|out|snm|toc|bcf|run\.xml|synctex\.gz|blg|bbl)" -delete
case "$1" in
*.tex)
file=$(readlink -f "$1")
dir=$(dirname "$file")
base="${file%.*}"
find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete ;;
*) printf "Give .tex file as argument.\\n" ;;
esac

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -euf -o pipefail
set -euf -o pipefail
sudo pacman-mirrors -f5
yay -Syu

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -euf -o pipefail
set -euf -o pipefail
hsetroot -fill ~/Pictures/wallpaper/"$1"