dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README

commit ec70ed36f8af3221088cd923c5ba653cda19532c
parent fceb31a6bf78630cc8592b7dec51dd3267bd6073
Author: Pablo Cárdenas <pablo-cardenas@outlook.com>
Date:   Mon, 23 Nov 2020 10:32:58 -0500

Commit before new linode

Diffstat:
Mhome/.bashrc | 13++++---------
Mhome/.editorconfig | 2+-
Mlinux/.Xresources.d/colors | 55++++++++++++++++++++++++++++++++++++++-----------------
Mlinux/.config/i3/config | 29++++++++++++++++++++++++-----
Alinux/.config/mpd/.gitignore | 4++++
Alinux/.config/mpd/mpd.conf | 22++++++++++++++++++++++
Mlinux/.config/picom/picom.conf | 57++++++++++++++++++++++++++++++++++++++++++++++++---------
Mlinux/.config/polybar/config | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++------------
Mlinux/.config/polybar/launch.sh | 9+++++++--
Alinux/.config/polybar/scripts/taskwarrior.sh | 9+++++++++
Mlinux/.config/rofi/config.rasi | 16++++++++--------
Alinux/.config/sxiv/exec/key-handler | 35+++++++++++++++++++++++++++++++++++
Mlinux/.xinitrc | 16+++++++++++-----
13 files changed, 264 insertions(+), 68 deletions(-)

diff --git a/home/.bashrc b/home/.bashrc @@ -3,9 +3,9 @@ shopt -s checkwinsize histappend -HISTCONTROL=ignoreboth -HISTSIZE=10000 -HISTFILESIZE=2000 +export HISTCONTROL=ignoreboth:erasedups +export HISTSIZE=100000 +export HISTFILESIZE=20000 # Bash completions if ! shopt -oq posix; then @@ -25,7 +25,6 @@ done # Para clases #export PS1='\[\033[01;31m\]\W $\[\033[00m\] ' - export LESS=-R export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink export LESS_TERMCAP_md=$'\E[1;36m' # begin bold @@ -35,8 +34,4 @@ export LESS_TERMCAP_se=$'\E[0m' # reset reverse video export LESS_TERMCAP_us=$'\E[1;32m' # begin underline export LESS_TERMCAP_ue=$'\E[0m' # reset underline -PATH="/home/pablo/perl5/bin${PATH:+:${PATH}}"; export PATH; -PERL5LIB="/home/pablo/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; -PERL_LOCAL_LIB_ROOT="/home/pablo/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; -PERL_MB_OPT="--install_base \"/home/pablo/perl5\""; export PERL_MB_OPT; -PERL_MM_OPT="INSTALL_BASE=/home/pablo/perl5"; export PERL_MM_OPT; +export PYTHONSTARTUP=${HOME}/.pythonrc.py diff --git a/home/.editorconfig b/home/.editorconfig @@ -6,7 +6,7 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -[*.{c,cpp,h,hpp,cc,java,bash,sh}] +[*.{c,cpp,h,hpp,cc,java}] indent_style = tab tab_width = 4 max_line_length = 79 diff --git a/linux/.Xresources.d/colors b/linux/.Xresources.d/colors @@ -1,25 +1,46 @@ -*.foreground: #ffffff -*.background: #000000 -URxvt.foreground: #ffffff -URxvt.background: #000000 -i3wm.fg0: #ffffff -i3wm.fg1: #e5e5e5 -i3wm.bg0: #000000 -i3wm.bg1: #4d4d4d +*.background: #ffffff +!*.foreground: #080808 +*.foreground: #000000 +URxvt.background: #ffffff +!URxvt.foreground: #080808 +URxvt.foreground: #000000 +i3wm.bg0: #ffffff +i3wm.bg1: #bbbbbb +i3wm.fg0: #111111 +i3wm.fg1: #666666 -*.color0: #000000 +! light +*.color0: #080808 *.color1: #cd0000 *.color2: #00cd00 -*.color3: #cdcd00 -*.color4: #0000cd +*.color3: #999900 +*.color4: #4444ff *.color5: #cd00cd *.color6: #00cdcd -*.color7: #e5e5e5 -*.color8: #4d4d4d -*.color9: #ff0000 +*.color7: #b0b0b0 +*.color8: #777777 +*.color9: #ff8888 *.color10: #00ff00 -*.color11: #ffff00 -*.color12: #0000ff -*.color13: #ff00ff +*.color11: #cdcd00 +*.color12: #6666ff +*.color13: #ffAAff *.color14: #00ffff *.color15: #ffffff + +! dark +!*.color0: #080808 +!*.color1: #cd0000 +!*.color2: #00cd00 +!*.color3: #999900 +!*.color4: #4444ff +!*.color5: #cd00cd +!*.color6: #00cdcd +!*.color7: #e5e5e5 +!*.color8: #4d4d4d +!*.color9: #ff2222 +!*.color10: #00ff00 +!*.color11: #ffff00 +!*.color12: #6666ff +!*.color13: #ffAAff +!*.color14: #00ffff +!*.color15: #ffffff diff --git a/linux/.config/i3/config b/linux/.config/i3/config @@ -1,5 +1,5 @@ set_from_resource $black color0 #000000 -set_from_resource $red3 color1 #cd0000 +SET_FROM_resource $red3 color1 #cd0000 set_from_resource $green3 color2 #00cd00 set_from_resource $yellow3 color3 #cdcd00 set_from_resource $blue3 color4 #0000cd @@ -166,8 +166,27 @@ bindsym XF86AudioStop exec playerctl stop bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous -new_window pixel 2 -new_float pixel 2 -gaps vertical 6 -gaps horizontal 43 +#new_window pixel 2 +#new_float pixel 2 +#gaps vertical 162 +#gaps horizontal 320 + +# You can also use any non-zero value if you'd like to have a border +#default_border pixel 0 +for_window [class=".*"] border pixel 0 +for_window [class=".*"] child_border pixel 0 + +gaps vertical 8 +gaps horizontal 20 gaps inner 8 + +#smart_gaps on +#smart_gaps inverse_outer +#smart_borders no_gaps +#hide_edge_borders smart_no_gaps + + + +#gaps vertical 0 +#gaps horizontal 0 +#gaps inner 0 diff --git a/linux/.config/mpd/.gitignore b/linux/.config/mpd/.gitignore @@ -0,0 +1,4 @@ +database +playlists +state +sticker.sql diff --git a/linux/.config/mpd/mpd.conf b/linux/.config/mpd/mpd.conf @@ -0,0 +1,22 @@ +# Recommended location for database +db_file "~/.config/mpd/database" + +# Logs to systemd journal +log_file "syslog" + +# The music directory is by default the XDG directory, uncomment to amend and choose a different directory +music_directory "~/Music" + +# Uncomment to refresh the database whenever files in the music_directory are changed +#auto_update "yes" + +# Uncomment to enable the functionalities +playlist_directory "~/.config/mpd/playlists" +pid_file "~/.config/mpd/pid" +state_file "~/.config/mpd/state" +sticker_file "~/.config/mpd/sticker.sql" + +audio_output { + type "pulse" + name "pulse audio" +} diff --git a/linux/.config/picom/picom.conf b/linux/.config/picom/picom.conf @@ -1,19 +1,58 @@ -shadow = true; +#backend = "glx" +#glx-copy-from-front = false; +#vsync = true -shadow-offset-x = -10; -shadow-offset-y = -10; -shadow-radius = 10; +shadow = true; +shadow-offset-x = -25; +shadow-offset-y = -25; +shadow-radius = 25; +shadow-opacity = 1.0 +shadow-red = 0.0 +shadow-green = 0.0 +shadow-blue = 0.0 shadow-exclude = [ "! name~=''", "class_g = 'Osdlyrics'", "class_g = 'i3-frame'", "class_g = 'zoom'", - "name = 'cpt_frame_window'" -] + "name = 'cpt_frame_window'", + "!focused", + "bounding_shaped && !rounded_corners", +]; + + +fading = true; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-delta = 0.01; + + +#active-opacity = 1.0; +inactive-opacity = 0.95; +frame-opacity = 0.8; +inactive-opacity-override = false; opacity-rule = [ - "90:class_g = 'URxvt' && focused", - "60:class_g = 'URxvt' && !focused", - "70:class_g = 'Zathura' && !focused", + "95:class_g = 'URxvt' && focused", + "70:class_g = 'URxvt' && !focused", + "90:class_g = 'Zathura' && !focused", + "60:class_g *?= 'Rofi'", ]; +inactive-dim = 0.05; + +# I need a better graphic card to do this +#blur: { +# method = "gaussian"; +# size = 10; +# deviation = 5.0; +#} + +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; }; + dock = { shadow = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.9; } + dropdown_menu = { opacity = 0.9; } +}; diff --git a/linux/.config/polybar/config b/linux/.config/polybar/config @@ -2,7 +2,7 @@ fg0 = ${xrdb:i3wm.fg0:#000000} fg1 = ${xrdb:i3wm.fg1:#4d4d4d} bg0 = ${xrdb:i3wm.bg0:#ffffff} -bg1 = ${xrdb:i3wm.bg1:#e5e5e5} +bg1 = ${Xrdb:i3wm.bg1:#e5e5e5} black = ${xrdb:color0:#000000} red3 = ${xrdb:color1:#cd0000} @@ -26,6 +26,7 @@ secondary = ${xrdb:color2:#00cd00} alert = ${xrdb:color3:#cdcd00} [bar/base] +monitor = ${env:MONITOR:HDMI1} background = ${colors.bg0} foreground = ${colors.fg1} width = 100% @@ -41,7 +42,8 @@ fixed-center = false font-0 = Fira Mono:pixelsize=9;2 font-1 = FontAwesome5Free:style=Solid:pixelsize=9;1 font-2 = FontAwesome5Brands:style=Solid:pixelsize=9;1 -font-3 = Dejavu:pixelsize=13;3 +font-3 = Fira Mono:pixelsize=9:style=bold;2 +font-4 = Dejavu:pixelsize=13;3 scroll-up = i3wm-wsnext scroll-down = i3wm-wsprev @@ -51,15 +53,16 @@ inherit = bar/base padding-left = 0 modules-left = i3 xwindow #modules-right = gmail xkeyboard battery backlight volume date -modules-right = updates-arch-combined info-hackspeed xkeyboard backlight volume date +modules-right = timer taskwarrior updates-arch-combined info-hackspeed xkeyboard backlight volume date [bar/bottom] inherit = bar/base bottom = true tray-position = right tray-margin-right = 5 -modules-left = cpu memory filesystem -modules-right = battery system-uptime-pretty network +modules-left = cpu memory filesystem system-gpu-intel +#modules-left = cpu memory filesystem system-gpu-intel +modules-right = battery system-uptime-pretty wired-network wireless-network [module/xwindow] type = internal/xwindow @@ -78,8 +81,9 @@ label-mode-foreground = ${colors.fg0} label-mode-background = ${colors.red3} ; focused = Active workspace on focused monitor -label-focused = %index% -label-focused-foreground = ${colors.fg0} +label-focused = %{T4}%index% +label-focused-font = 3 +label-focused-foreground = ${colors.fg1} label-focused-background = ${colors.bg1} label-focused-underline = ${colors.yellow3} label-focused-padding = 1 @@ -92,9 +96,9 @@ label-unfocused-background = ${colors.bg0} ; visible = Active workspace on unfocused monitor label-visible = %index% -label-visible-foreground = ${colors.bg1} -label-visible-background = ${colors.bg0} -label-visible-padding = ${self.label-focused-padding} +label-visible-foreground = ${colors.fg1} +label-visible-background = ${colors.bg1} +label-visible-padding = 1 ; urgent = Workspace with urgency hint set label-urgent = %index% @@ -116,7 +120,8 @@ label = %date% %time% [module/volume] type = internal/pulseaudio -sink = alsa_output.pci-0000_00_1b.0.analog-stereo +#sink = alsa_output.pci-0000_00_1b.0.analog-stereo +sink = alsa_output.usb-BurrBrown_from_Texas_Instruments_USB_AUDIO_CODEC-00.analog-stereo format-volume = "<label-volume> <bar-volume>" label-volume =  %percentage:2%% @@ -146,7 +151,15 @@ bar-volume-empty = ─ bar-volume-empty-font = 2 bar-volume-empty-foreground = ${colors.fg1} -[module/network] +[module/wired-network] +type = internal/network +interface = eno1 + +format-connected = <label-connected> + +label-connected = %local_ip% %downspeed:8%  %upspeed:8%  + +[module/wireless-network] type = internal/network interface = wlp9s0 @@ -296,6 +309,11 @@ type = custom/script exec = /usr/share/polybar/scripts/system-uptime-pretty.sh interval = 60 +#[module/system-gpu-intel] +#type = custom/script +#exec = /usr/share/polybar/scripts/system-gpu-intel.sh +#interval = 20 + [module/info-hackspeed] type = custom/script exec = /usr/share/polybar/scripts/info-hackspeed.sh @@ -306,6 +324,29 @@ type = custom/script exec = /usr/share/polybar/scripts/updates-pacman-aurhelper.sh interval = 600 +[module/timer] +type = custom/script +exec = ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh tail 'TIMER' 5 +tail = true +click-left = ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh new 25 'Pomo session' 'notify-send "Session finished"' ; ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh update %pid% +click-middle = ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh cancel ; ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh update %pid% +click-right = ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh new 5 'Pomo break' 'notify-send "Break finished"' ; ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh update %pid% +scroll-up = ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh increase 60 || ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh new 1 'TIMER:' 'notify-send -u critical "Timer expired."' ; ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh update %pid% +scroll-down = ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh increase -60 ; ~/.config/polybar/scripts/polybar-timer/polybar-timer.sh update %pid% + +[module/taskwarrior] +type = custom/script +interval = 10 +exec = ~/.config/polybar/scripts/taskwarrior.sh +tail = true +format = <label> +format-foreground = #fff +format-background = #000 +label-padding = 1 +label= "%output%" +click-right = kill -USR2 %pid% +click-left = kill -USR1 %pid% + ;[module/gmail] ;type = custom/script ;exec = ~/.config/polybar/gmail/launch.py diff --git a/linux/.config/polybar/launch.sh b/linux/.config/polybar/launch.sh @@ -7,7 +7,12 @@ killall -q polybar while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done # Launch top and bottom -polybar top & -polybar bottom & +MONITOR=HDMI1 polybar top & +MONITOR=HDMI1 polybar bottom & + +MONITOR=VGA1 polybar top & +MONITOR=VGA1 polybar bottom & + + echo "Bars launched..." diff --git a/linux/.config/polybar/scripts/taskwarrior.sh b/linux/.config/polybar/scripts/taskwarrior.sh @@ -0,0 +1,9 @@ +active_id=$(task +ACTIVE rc.verbose: limit:1 id | cut -d ' ' -f1) +next_id=$(task next rc.verbose: limit:1 id | cut -d ' ' -f1) + +if [ -z $active_id ] +then + echo NEXT $(task _get ${next_id}.description) +else + echo ACTIVE $(task _get ${active_id}.description) +fi diff --git a/linux/.config/rofi/config.rasi b/linux/.config/rofi/config.rasi @@ -14,10 +14,10 @@ configuration { blue: #0000cd; mangenta: #cd00cd; cyan: #00cdcd; - fg0: #ffffff; - fg1: #e5e5e5; - bg0: #000000; - bg1: #4d4d4d; + bg0: #ffffff; + bg1: #e5e5e5; + fg0: #000000; + fg1: #4d4d4d; spacing: 0; @@ -26,9 +26,9 @@ configuration { } window { - background-color: #000000ee; + background-color: #ffffffee; border: 1; - border-color: #ffffff; + border-color: @fg0; padding: 5; } @@ -54,7 +54,7 @@ textbox-prompt-colon { entry { margin: 0px 5px; - text-color: #e5e5e5; + text-color: @fg1; } listview { @@ -65,7 +65,7 @@ listview { element { padding: 1px; - text-color: @bg1; + text-color: @fg1; highlight: bold #00cd00; border-radius: 3px; } diff --git a/linux/.config/sxiv/exec/key-handler b/linux/.config/sxiv/exec/key-handler @@ -0,0 +1,35 @@ +#!/bin/sh + +# Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler +# Called by sxiv(1) after the external prefix key (C-x by default) is pressed. +# The next key combo is passed as its first argument. Passed via stdin are the +# images to act upon, one path per line: all marked images, if in thumbnail +# mode and at least one image has been marked, otherwise the current image. +# sxiv(1) blocks until this script terminates. It then checks which images +# have been modified and reloads them. + +# The key combo argument has the following form: "[C-][M-][S-]KEY", +# where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X +# keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. + +rotate() { + degree="$1" + tr '\n' '\0' | xargs -0 realpath | sort | uniq | while read file; do + case "$(file -b -i "$file")" in + image/jpeg*) jpegtran -rotate "$degree" -copy all -outfile "$file" "$file" ;; + *) mogrify -rotate "$degree" "$file" ;; + esac + done +} + +case "$1" in +"C-x") xclip -in -filter | tr '\n' ' ' | xclip -in -selection clipboard ;; +"C-c") while read file; do xclip -selection clipboard -target image/png "$file"; done ;; +"C-e") while read file; do urxvt -bg "#444" -fg "#eee" -sl 0 -title "$file" -e sh -c "exiv2 pr -q -pa '$file' | less" & done ;; +"C-g") tr '\n' '\0' | xargs -0 gimp & ;; +"C-r") while read file; do rawtherapee "$file" & done ;; +"C-comma") rotate 270 ;; +"C-period") rotate 90 ;; +"C-slash") rotate 180 ;; +esac + diff --git a/linux/.xinitrc b/linux/.xinitrc @@ -20,19 +20,25 @@ fi setxkbmap -model pc104 -layout us,es -option grp:ctrls_toggle [[ -d /usr/share/fonts/terminus ]] && xset +fp /usr/share/fonts/terminus -command -v picom >/dev/null 2>&1 && picom -bc & -#command -v feh >/dev/null 2>&1 && feh --bg-scale $HOME/.wallpaper +#command -v picom >/dev/null 2>&1 && picom --experimental-backends --backend glx & +#command -v picom >/dev/null 2>&1 && picom -bc udiskie & dunst & redshift & -xset -b -hsetroot -solid gray50 +xset -b & +xsetwacom set 16 MapToOutput HDMI1 +xsetwacom set 17 MapToOutput HDMI1 +#hsetroot -solid gray50 +xrandr \ + --output HDMI1 --mode 1920x1080 \ + --output VGA1 --mode 1440x900 \ + --right-of HDMI1 +command -v feh >/dev/null 2>&1 && feh --bg-scale $HOME/.wallpaper session=${1:-i3} case $session in i3|i3wm ) exec i3;; openbox ) exec openbox-session;; - # No known session, try to run it as command * ) exec $1;; esac