This commit is contained in:
lelgenio 2020-04-21 19:36:45 -03:00
parent a7d06e8ef7
commit 501237b4bd
14 changed files with 123 additions and 26 deletions

3
.gitignore vendored
View File

@ -8,9 +8,10 @@ nvim/.config/nvim/autoload/
nvim/.config/nvim/plugged/ nvim/.config/nvim/plugged/
theme/.config/gtk-3.0/bookmarks theme/.config/gtk-3.0/bookmarks
qutebrowser/ qutebrowser/**
!qutebrowser/.config/qutebrowser/config.py !qutebrowser/.config/qutebrowser/config.py
!qutebrowser/.local/share/qutebrowser/greasemonkey/youtube-ad.js !qutebrowser/.local/share/qutebrowser/greasemonkey/youtube-ad.js
!qutebrowser/.local/share/qutebrowser/userscripts/readability
fish/ fish/
!fish/.config/fish/config.fish !fish/.config/fish/config.fish

View File

@ -121,7 +121,7 @@ set_pkgs() {
pkgs+=' pass gnupg pam-gnupg' pkgs+=' pass gnupg pam-gnupg'
# pkgs+=' i3 termite scrot pamixer' # pkgs+=' i3 termite scrot pamixer'
pkgs+=' thunar redshift-wlr-gamma-control-git ' pkgs+=' nemo cinnamon-translations thunar redshift-wlr-gamma-control-git '
pkgs+=' pkgfile alacritty neovim moreutils htop-vim-git' pkgs+=' pkgfile alacritty neovim moreutils htop-vim-git'
# Audio # Audio
pkgs+=' pulseaudio pavolume-git' pkgs+=' pulseaudio pavolume-git'

View File

@ -37,6 +37,12 @@ end
abbr ec edit-config abbr ec edit-config
function mutt --wraps=neomutt --description 'alias mutt=neomutt'
neomutt $argv;
pkill -SIGRTMIN+4 waybar
end
abbr neomutt mutt
# }}} # }}}
# start window manager if using tty1 {{{ # start window manager if using tty1 {{{
# #
@ -46,7 +52,7 @@ abbr ec edit-config
export QT_SCALE_FACTOR=1 export QT_SCALE_FACTOR=1
export QPA_PLATFORM=wayland export QPA_PLATFORM=wayland
export QT_QPA_PLATFORM=wayland export QT_QPA_PLATFORM=wayland
exec sway pgrep sway || exec sway
end end
function ei3 function ei3
clear clear
@ -72,8 +78,7 @@ abbr ec edit-config
# }}} # }}}
# use tmux{{{ # use tmux{{{
set TMUX 1 if test -z "$TMUX" -a -n "$DISPLAY" ;and status is-interactive
if test -z "$argv" -a -z "$TMUX" -a -n "$DISPLAY"
set attach_session (tmux 2> /dev/null ls -F \ set attach_session (tmux 2> /dev/null ls -F \
'#{session_attached} #{?#{==:#{session_last_attached},},1,#{session_last_attached}} #{session_id}' | '#{session_attached} #{?#{==:#{session_last_attached},},1,#{session_last_attached}} #{session_id}' |
awk '/^0/ { if ($2 > t) { t = $2; s = $3 } }; END { if (s) printf "%s", s }') awk '/^0/ { if ($2 > t) { t = $2; s = $3 } }; END { if (s) printf "%s", s }')

View File

@ -29,7 +29,7 @@ input {
audio_output { audio_output {
type "pulse" type "pulse"
name "My Pulse Output" name "My Pulse Output"
mixer_type "software" mixer_type "hardware"
} }
audio_output { audio_output {
type "fifo" type "fifo"

View File

@ -128,22 +128,23 @@ bind index,pager B sidebar-toggle-visible
# }}} # }}}
# colors{{{ # colors{{{
# {{{ # {{{
# # Default index colors: # # Default index colors:
color index yellow default '.*' color index yellow default '.*'
color index_author red default '.*' color index_author red default '.*'
color index_number blue default color index_number blue default
color index_subject cyan default '.*' color index_subject cyan default '.*'
#
# # New mail is boldened: # # New mail is boldened:
color index brightyellow black "~N" color index brightyellow black "~N"
color index_author brightred black "~N" color index_author brightred black "~N"
color index_subject brightcyan black "~N" color index_subject brightcyan black "~N"
#
# # Tagged mail is highlighted: # # Tagged mail is highlighted:
# color index brightyellow blue "~T" # color index brightyellow blue "~T"
# color index_author brightred blue "~T" # color index_author brightred blue "~T"
# color index_subject brightcyan blue "~T" # color index_subject brightcyan blue "~T"
#
# # Other colors and aesthetic settings: # # Other colors and aesthetic settings:
mono bold bold mono bold bold
mono underline underline mono underline underline
@ -174,7 +175,7 @@ color signature brightgreen default
color bold black default color bold black default
color underline black default color underline black default
color normal default default color normal default default
#
# # Regex highlighting: # # Regex highlighting:
color header blue default ".*" color header blue default ".*"
color header brightmagenta default "^(From)" color header brightmagenta default "^(From)"
@ -199,6 +200,7 @@ color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature" mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*" mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
# }}} # }}}
# color normal white default # color normal white default
# color hdrdefault blue default # color hdrdefault blue default
@ -214,9 +216,10 @@ color status brightwhite default
# color markers red white # color markers red white
# color search white black # color search white black
# color tilde brightmagenta default # color tilde brightmagenta default
color index blue white ~F color index blue white "~F"
color index brightgreen default "~N|~O" color index brightgreen default "~N|~O"
color index_author brightred black "~N" color index_author brightred black "~N"
color index_subject brightcyan black "~N" color index_subject brightcyan black "~N"
color sidebar_new red default
# }}} # }}}
# vim: filetype=neomuttrc:foldmethod=marker # vim: filetype=neomuttrc:foldmethod=marker

View File

@ -373,6 +373,7 @@ c.fonts.tabs = '14px Inter'
# Bindings for normal mode # Bindings for normal mode
config.bind(',m', 'spawn --userscript view_in_mpv') config.bind(',m', 'spawn --userscript view_in_mpv')
config.bind(',r', 'spawn --userscript readability')
config.bind(';m', 'hint links spawn mpv --fs {hint-url}') config.bind(';m', 'hint links spawn mpv --fs {hint-url}')
config.bind('J', 'tab-prev') config.bind('J', 'tab-prev')
config.bind('K', 'tab-next') config.bind('K', 'tab-next')

View File

@ -0,0 +1,69 @@
#!/usr/bin/env python
#
# Executes python-readability on current page and opens the summary as new tab.
#
# Depends on the python-readability package, or its fork:
#
# - https://github.com/buriy/python-readability
# - https://github.com/bookieio/breadability
#
# Usage:
# :spawn --userscript readability
#
from __future__ import absolute_import
import codecs, os
tmpfile = os.path.join(
os.environ.get('QUTE_DATA_DIR',
os.path.expanduser('~/.local/share/qutebrowser')),
'userscripts/readability.html')
if not os.path.exists(os.path.dirname(tmpfile)):
os.makedirs(os.path.dirname(tmpfile))
# Styling for dynamic window margin scaling and line height
HEADER = """
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>%s</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
body {
background-color: #202020;
color:white;
margin: 40px auto;
max-width: 650px;
line-height: 1.4;
padding: 0 10px;
}
h1, h2, h3 {
line-height: 1.2;
}
a{
color:lightblue;
}
</style>
</head>
"""
with codecs.open(os.environ['QUTE_HTML'], 'r', 'utf-8') as source:
data = source.read()
try:
from breadability.readable import Article as reader
doc = reader(data)
title = doc._original_document.title
content = HEADER % title + doc.readable + "</html>"
except ImportError:
from readability import Document
doc = Document(data)
title = doc.title()
content = doc.summary().replace('<html>', HEADER % title)
with codecs.open(tmpfile, 'w', 'utf-8') as target:
target.write(content.lstrip())
with open(os.environ['QUTE_FIFO'], 'w') as fifo:
fifo.write('open -t %s' % tmpfile)

View File

@ -4,7 +4,7 @@
# BEMENU_BACKEND=wayland # BEMENU_BACKEND=wayland
if [ "$1" == "run" ] if [ "$1" == "run" ]
then then
[ -n "$2" ] && t="$2" || t="kitty" [ -n "$2" ] && t="$2" || t="alacritty"
exec j4-dmenu-desktop --dmenu="bmenu -p Iniciar:" --term "$t" exec j4-dmenu-desktop --dmenu="bmenu -p Iniciar:" --term "$t"
fi fi

View File

@ -18,13 +18,7 @@ password_files=( "${password_files[@]%.gpg}" )
[ -f $CACHE ] || touch $CACHE [ -f $CACHE ] || touch $CACHE
for line in $(cat $CACHE); do for line in $(cat $CACHE); do
for password_file in "${password_files[@]}"; do password_files+=( $line )
echo "$line" = "$password_file"
if [ "$line" = "$password_file" ];then
echo added
password_files+=( $line )
fi
done
done done
entry=$(printf '%s\n' "${password_files[@]}" | entry=$(printf '%s\n' "${password_files[@]}" |

View File

@ -2,6 +2,7 @@ font=Inter 12
text-color=#aaaaaa text-color=#aaaaaa
background-color=#202020 background-color=#202020
border-color=#cc5757 border-color=#cc5757
border-size=5
progress-color=#cc5757 progress-color=#cc5757
icons=1 icons=1
default-timeout=10000 default-timeout=10000

View File

@ -72,7 +72,7 @@
bindsym $mod+q exec qutebrowser bindsym $mod+q exec qutebrowser
#start file manager #start file manager
bindsym $mod+m exec thunar bindsym $mod+m exec nemo
# Kill focused window # Kill focused window
bindsym $mod+x kill bindsym $mod+x kill
@ -90,7 +90,7 @@
bindsym $mod+Shift+c reload; exec kanshi bindsym $mod+Shift+c reload; exec kanshi
# Lock Sway # Lock Sway
bindsym $mod+Control+s exec swaylock bindsym $mod+Control+s exec systemctl suspend
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'

View File

@ -13,6 +13,8 @@
"custom/spigot", "custom/spigot",
"tray", "tray",
"custom/mail", "custom/mail",
"custom/delugeD",
"custom/delugeS",
"custom/updates", "custom/updates",
"pulseaudio", "pulseaudio",
"network", "network",
@ -105,7 +107,7 @@
"format": "<b>{}</b>", "format": "<b>{}</b>",
"exec": "jq -r '.temp +\"°C \"+ .weather' .forecast.json", "exec": "jq -r '.temp +\"°C \"+ .weather' .forecast.json",
"interval": 30, "interval": 30,
"on-click": "kitty --class weather sh -c 'forecast full;read -n1 -p\"Press Any key to quit \"'", "on-click": "alacritty --class weather -e sh -c 'forecast full;read -n1 -p\"Press Any key to quit \"'",
"on-click-right": "xdg-open https://openweathermap.org" "on-click-right": "xdg-open https://openweathermap.org"
}, },
"custom/mail": { "custom/mail": {
@ -113,7 +115,7 @@
"format":"{} <b></b>", "format":"{} <b></b>",
"exec-if":"sleep 30s", "exec-if":"sleep 30s",
"exec": "checkmail", "exec": "checkmail",
"on-click": "kitty neomutt; pkill -SIGRTMIN+4 waybar", "on-click": "alacritty -e neomutt; pkill -SIGRTMIN+4 waybar",
"signal": 4, "signal": 4,
"interval": 30 "interval": 30
}, },
@ -123,7 +125,7 @@
"interval": 60, "interval": 60,
"exec-if":"sleep 60s", "exec-if":"sleep 60s",
"exec": "yay -Qqu | wc -l | sed 's/^0$//'", "exec": "yay -Qqu | wc -l | sed 's/^0$//'",
"on-click": "kitty sh -c 'ping -qc1 archlinux.org >/dev/null && yay -Syu || yay -Su; pkill -SIGRTMIN+8 waybar; read'", "on-click": "alacritty -e sh -c 'ping -qc1 archlinux.org >/dev/null && yay -Syu || yay -Su; pkill -SIGRTMIN+8 waybar; read'",
"signal": 8 "signal": 8
}, },
"custom/recording": { "custom/recording": {
@ -137,8 +139,21 @@
"format":"{}", "format":"{}",
"exec":"pgrep -f spigot.jar>/dev/null && spigot command list | awk '/There are/ {if ($6) print $6}'", "exec":"pgrep -f spigot.jar>/dev/null && spigot command list | awk '/There are/ {if ($6) print $6}'",
"interval":30, "interval":30,
"on-click":"kitty spigot console" "on-click":"alacritty -e spigot console"
},
"custom/delugeD":{
"format":"{}",
"exec":"timeout 10s deluge-console info | grep '\\[D\\]' | wc -l | sed s/^0\\$//",
"exec-if":"pgrep deluge",
"interval":180
},
"custom/delugeS":{
"format":"{}",
"exec":"timeout 10s deluge-console info | grep '\\[S\\]' | wc -l | sed s/^0\\$//",
"exec-if":"pgrep deluge",
"interval":180
} }
} }
# vim:ft=json # vim:ft=json

View File

@ -38,11 +38,14 @@ window#waybar.empty {
margin:0 4px; margin:0 4px;
} }
#mpd, #mpd,
#tray, #tray,
#clock, #clock,
#network, #network,
#battery, #battery,
#delugeD,
#delugeS,
#backlight, #backlight,
#pulseaudio, #pulseaudio,
#custom-mail, #custom-mail,
@ -61,7 +64,7 @@ window#waybar.empty {
font-size:15px; font-size:15px;
} }
#network{ #network{
margin-top:-1; margin-top:-1px;
font-size:16px; font-size:16px;
} }

View File

@ -0,0 +1,5 @@
# This file is written by LXAppearance. Do not edit.
[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=capitaine-cursors