aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Editor/vimrc2
-rw-r--r--File_Manager/ranger/rifle.conf1
-rwxr-xr-xFile_Manager/ranger/scope.sh55
-rw-r--r--Mail/muttrc6
-rwxr-xr-xPanel/lemonbar/batterymon19
-rwxr-xr-xPanel/lemonbar/music2
-rwxr-xr-xPanel/lemonbar/panel_bar2
-rwxr-xr-xPanel/lemonbar/profile2
-rwxr-xr-xPanel/lemonbar/windows2
-rw-r--r--Shell/bash_aliases1
-rw-r--r--Window_Manager/ratpoison/ratpoisonrc.conf11
-rw-r--r--Xinit/Xdefaults8
-rwxr-xr-xXinit/xinitrc11
13 files changed, 82 insertions, 40 deletions
diff --git a/Editor/vimrc b/Editor/vimrc
index f27115a..491e557 100644
--- a/Editor/vimrc
+++ b/Editor/vimrc
@@ -1,7 +1,7 @@
set nocompatible " be iMproved, required
filetype off " required
-set background=light
+set background=dark
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
diff --git a/File_Manager/ranger/rifle.conf b/File_Manager/ranger/rifle.conf
index 9c19db3..256808d 100644
--- a/File_Manager/ranger/rifle.conf
+++ b/File_Manager/ranger/rifle.conf
@@ -147,6 +147,7 @@ ext xcf, X, flag f = gimp -- "$@"
#-------------------------------------------
# Documents
#-------------------------------------------
+ext pdf, has chromium, X, flag f = chromium --new-window --kiosk "$@"
ext pdf, has llpp, X, flag f = llpp "$@"
ext pdf, has zathura, X, flag f = zathura -- "$@"
ext pdf, has mupdf, X, flag f = mupdf -- "$@"
diff --git a/File_Manager/ranger/scope.sh b/File_Manager/ranger/scope.sh
index 64bab71..da7168e 100755
--- a/File_Manager/ranger/scope.sh
+++ b/File_Manager/ranger/scope.sh
@@ -16,42 +16,67 @@
# 3 | fix width | success. Don't reload when width changes
# 4 | fix height | success. Don't reload when height changes
# 5 | fix both | success. Don't ever reload
+# 6 | image | success. display the image $cached points to as an image preview
+# 7 | image | success. display the file directly as an image
# Meaningful aliases for arguments:
-path="$1" # Full path of the selected file
-width="$2" # Width of the preview pane (number of fitting characters)
-height="$3" # Height of the preview pane (number of fitting characters)
+path="$1" # Full path of the selected file
+width="$2" # Width of the preview pane (number of fitting characters)
+height="$3" # Height of the preview pane (number of fitting characters)
+cached="$4" # Path that should be used to cache image previews
+preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
# Find out something about the file:
mimetype=$(file --mime-type -Lb "$path")
-extension=${path##*.}
+extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
# Functions:
# runs a command and saves its output into $output. Useful if you need
# the return value AND want to use the output in a pipe
try() { output=$(eval '"$@"'); }
-# writes the output of the previouosly used "try" command
-dump() { echo "$output"; }
+# writes the output of the previously used "try" command
+dump() { /bin/echo "$output"; }
# a common post-processing function used after most commands
trim() { head -n "$maxln"; }
# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
-highlight() { command highlight "$@"; test $? = 0 -o $? = 141; }
+safepipe() { "$@"; test $? = 0 -o $? = 141; }
+
+# Image previews, if enabled in ranger.
+if [ "$preview_images" = "True" ]; then
+ case "$mimetype" in
+ # Image previews for SVG files, disabled by default.
+ ###image/svg+xml)
+ ### convert "$path" "$cached" && exit 6 || exit 1;;
+ # Image previews for image files. w3mimgdisplay will be called for all
+ # image files (unless overriden as above), but might fail for
+ # unsupported types.
+ image/*)
+ exit 7;;
+ # Image preview for video, disabled by default.:
+ video/*)
+ ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
+ esac
+fi
case "$extension" in
# Archive extensions:
- 7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
+ 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)
try als "$path" && { dump | trim; exit 0; }
try acat "$path" && { dump | trim; exit 3; }
try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;;
rar)
+ # avoid password prompt by providing empty password
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
+ 7z)
+ # avoid password prompt by providing empty password
+ try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
# PDF documents:
pdf)
try pdftotext -l 10 -nopgbrk -q "$path" - && \
@@ -59,6 +84,9 @@ case "$extension" in
# BitTorrent Files
torrent)
try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
+ # ODT Files
+ odt|ods|odp|sxw)
+ try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
# HTML Pages:
htm|html|xhtml)
try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
@@ -70,7 +98,16 @@ esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
- try highlight --out-format=ansi "$path" && { dump | trim; exit 5; } || exit 2;;
+ if [ "$(tput colors)" -ge 256 ]; then
+ pygmentize_format=terminal256
+ highlight_format=xterm256
+ else
+ pygmentize_format=terminal
+ highlight_format=ansi
+ fi
+ try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
+ try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
+ exit 2;;
# Ascii-previews of images:
image/*)
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
diff --git a/Mail/muttrc b/Mail/muttrc
index 70d22cf..66376fa 100644
--- a/Mail/muttrc
+++ b/Mail/muttrc
@@ -3,7 +3,7 @@ source ~/.mutt/crypto.rc
#LocalMail config
set mbox_type = Maildir
-set sendmail = /usr/bin/msmtp
+set sendmail = /usr/local/bin/msmtpq
set folder = ~/.mail/
set spoolfile = "+dove/Inbox"
@@ -33,8 +33,8 @@ set message_cachedir=~/.muttlocal/cache/bodies
set certificate_file=~/.muttlocal/certificates
set move = no
set include
-set sort = 'reverse-date-received'
-#set sort_aux = 'reverse-last-date-received'
+set sort = 'threads'
+set sort_aux = 'reverse-last-date-received'
set auto_tag = yes
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
diff --git a/Panel/lemonbar/batterymon b/Panel/lemonbar/batterymon
index 27ea7a6..9d8c74d 100755
--- a/Panel/lemonbar/batterymon
+++ b/Panel/lemonbar/batterymon
@@ -1,13 +1,14 @@
#!/bin/sh
while true;do
-if [ `battery -f '%i'` -lt 4 ] && ! [ -z ~/.dontshut ]; then
-touch ~/.dontshut
-zenity --question --title "Battery" --text "Battery if pretty fucking low, go to sleep?"
-if [ $? -ne 1 ];then
-pm-suspend
-fi
-else
-rm ~/.dontshut
-fi
+ if [ `battery -f '%i'` -lt 4 ] && ! [ -z ~/.dontshut ]; then
+ touch ~/.dontshut
+ zenity --question --title "Battery" --text "Battery if pretty fucking low, go to sleep?"
+ if [ $? -ne 1 ];then
+ pm-suspend
+ fi
+ else
+ if [ -z ~/.dontshut ]
+ rm ~/.dontshut
+ fi
sleep 180;
done
diff --git a/Panel/lemonbar/music b/Panel/lemonbar/music
index d9e1d45..0ee2611 100755
--- a/Panel/lemonbar/music
+++ b/Panel/lemonbar/music
@@ -15,6 +15,6 @@ echo "K`mpc volume -h 127.0.0.1 | perl -pe 's/^volume://' | perl -pe 's/%$//' |
mpc -h 127.0.0.1 idle > /dev/null
if [ $? -ne 0 ];then
echo 'mpd not alive';
-sleep 30;
+sleep 300;
fi
done
diff --git a/Panel/lemonbar/panel_bar b/Panel/lemonbar/panel_bar
index 5d36a88..64eed1d 100755
--- a/Panel/lemonbar/panel_bar
+++ b/Panel/lemonbar/panel_bar
@@ -1,7 +1,5 @@
#! /bin/sh
-num_mon=$(bspc query -M | wc -l)
-
. ./panel_colors
. ./icons
while read -r line ; do
diff --git a/Panel/lemonbar/profile b/Panel/lemonbar/profile
index 5c34dd7..fe9d7b1 100755
--- a/Panel/lemonbar/profile
+++ b/Panel/lemonbar/profile
@@ -1,6 +1,6 @@
#!/bin/sh
PANEL_FIFO=/tmp/panel-fifo
-PANEL_HEIGHT=48
+PANEL_HEIGHT=40
FONT_FONT="DejaVuSans-10"
ICON_FONT="FontAwesome-10"
diff --git a/Panel/lemonbar/windows b/Panel/lemonbar/windows
index 108eeac..4af5a5c 100755
--- a/Panel/lemonbar/windows
+++ b/Panel/lemonbar/windows
@@ -1,3 +1,3 @@
#!/bin/sh
echo 'Wclear' > /tmp/panel-fifo
-ratpoison -c 'windows %s%n %t' | while read line;do echo "${line}" | cut -c -25 > /tmp/panel-fifo && sleep 0.004;done
+ratpoison -c 'windows %s%n %t' | cut -c -25 > /tmp/panel-fifo
diff --git a/Shell/bash_aliases b/Shell/bash_aliases
index 9a21eb1..b2c0874 100644
--- a/Shell/bash_aliases
+++ b/Shell/bash_aliases
@@ -17,6 +17,7 @@ alias ,.='!!'
# mpv
alias mpvl='mpv --ytdl-format=43'
+alias mpvh='mpv --ytdl-format=137+251'
alias mpv="mpv --ytdl-format 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4'"
alias serial='micronucleus --run ~/Sync/Programming/serial.hex'
diff --git a/Window_Manager/ratpoison/ratpoisonrc.conf b/Window_Manager/ratpoison/ratpoisonrc.conf
index d467bd1..4d592f4 100644
--- a/Window_Manager/ratpoison/ratpoisonrc.conf
+++ b/Window_Manager/ratpoison/ratpoisonrc.conf
@@ -1,12 +1,13 @@
#using jcs hacks
# info: C=control, M=meta/alt, s=super, S=shift, H = Hyper
# xnest for testing
+
escape grave
definekey top s-grave meta
definekey top Arabic_dammatan meta
-#set quiet 1
-
+# Surpress 'Current Frame'
+set framemsgwait -1
set historyexpansion 1
@@ -47,7 +48,7 @@ exec xsetroot -cursor_name left_ptr
#exec nitrogen --restore
#Border & Padding
-alias showpanel set padding 0 48 0 0
+alias showpanel set padding 0 40 0 0
alias hidepanel set padding 0 0 0 0
showpanel
@@ -139,7 +140,7 @@ alias cont exec pkill -CONT
# b : Open url
-alias browse_cmd exec .config/ratpoison/exec_to_workspace 2 chromium
+alias browse_cmd exec .config/ratpoison/exec_to_workspace 2 chromium --start-fullscreen --new-window https://google.com
alias browse colon browse_cmd
bind b browse
# B : open a new firefox tab and browse to the X clipboard selection
@@ -159,7 +160,7 @@ definekey top s-c colon cont
definekey top s-x colon stop
definekey top s-f exec firefox
-definekey top s-v exec chromium
+definekey top s-v exec chromium --new-window --start-fullscreen https://google.com
definekey top s-V exec mpv `xclip -o` --ytdl-format=22
definekey top s-h exec ~/.config/vimb/history-search
#definekey top s-g exec gvim
diff --git a/Xinit/Xdefaults b/Xinit/Xdefaults
index 7e08674..99371ec 100644
--- a/Xinit/Xdefaults
+++ b/Xinit/Xdefaults
@@ -2,7 +2,7 @@
! Xft settings
!-------------------------------------------------------------------------------
-Xft.dpi: 186
+Xft.dpi: 161
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
@@ -18,10 +18,10 @@ URxvt.lineSpace: 0
! Fonts
URxvt.allow_bold: true
-URxvt.font: xft:DejaVu Sans Mono:pixelsize=26
+URxvt.font: xft:DejaVu Sans Mono:pixelsize=22
! Fix font space
-URxvt*letterSpace: -1
+URxvt*letterSpace: -2
! Scrollbar
URxvt.scrollStyle: rxvt
@@ -33,7 +33,7 @@ URxvt.matcher.button: 1
URxvt.urlLauncher: vimb
! Cursor
-URxvt.cursorBlink: true
+URxvt.cursorBlink: false
URxvt.cursorColor: #657b83
URxvt.cursorUnderline: false
diff --git a/Xinit/xinitrc b/Xinit/xinitrc
index c20998c..d517206 100755
--- a/Xinit/xinitrc
+++ b/Xinit/xinitrc
@@ -24,8 +24,11 @@ statnot ~/dotfiles/Panel/statnot/config &
# Init clipboard
~/.tools/clipboard init
+# Toutchpad config
+xinput --set-prop 12 "libinput Natural Scrolling Enabled" 1
+xinput --set-prop 12 "libinput Tapping Enabled" 1
+
# Keyboard bindings
-xcape -t 300 -e 'Shift_L=parenleft;Shift_R=parenright;Hyper_L=Shift_L|exclam;Hyper_R=Shift_L|question' &
xset r 64
xset r 133
xset r rate 170 60
@@ -33,14 +36,14 @@ xset m 0 0
xset -b
# Launch locking program
-xautolock -detectsleep -locker '~/.tools/lock' -time 11 -corners 0-00 &
+#xautolock -detectsleep -locker '~/.tools/lock' -time 11 -corners 0-00 &
# Load xterm colors
xrdb -merge ~/.Xresources
xrdb -merge ~/.Xdefaults
# Automount
-#udiskie -N &
+udiskie -N -T -q --no-appindicator -a &
-xrandr --dpi 186
+xrandr --dpi 161
ratpoison