This commit is contained in:
josh
2018-08-24 21:43:38 +03:00
parent 641da4c1b4
commit 6d7cd2f827
49 changed files with 1299 additions and 0 deletions

10
dotfiles/.Xresources Executable file
View File

@@ -0,0 +1,10 @@
urxvt.scrollBar: false
urxvt.letterSpace: -1
urxvt.depth: 32
!urxvt.background: rgba:2800/2A00/3600/F000
urxvt.font: xft:DejaVu Sans Mono:size=9
urxvt.italicFont: xft:DejaVu Sans Mono:size=9:italic
urxvt.boldFont: xft:DejaVu Sans Mono:size=9:bold
urxvt.boldItalicFont: xft:DejaVu Sans Mono:size=9:bold:italic

2
dotfiles/.bash_logout Executable file
View File

@@ -0,0 +1,2 @@
clear

2
dotfiles/.bash_profile Executable file
View File

@@ -0,0 +1,2 @@
[[ -f ~/.bashrc ]] && . ~/.bashrc

29
dotfiles/.bashrc Executable file
View File

@@ -0,0 +1,29 @@
[[ $- != *i* ]] && return
set -o vi
unset HISTFILE
export LESSHISTFILE=-
export PYTHONSTARTUP=~/.pythonrc
export XAUTHORITY=~/.cache/.Xauthority
# Import colorscheme from "wal" asynchronously
# & # Run the process in the background.
# ( ) # Hide shell job control messages.
(cat ~/.cache/wal/sequences &)
# Alternative (blocks terminal for 0-3ms)
cat ~/.cache/wal/sequences
alias ls="ls --color=auto"
alias diff="diff --color=auto"
alias grep="grep --color=auto"
alias graphs="ssh net@192.168.1.137"
alias installed_packages="comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort)"
alias unused_packages="pacman -Qtdq"
alias piavpn="sh /opt/pia/ruby/ruby.sh /opt/pia/pia_manager/run.rb </dev/null &>/dev/null&"
PS1="\u@\h:\w \$ "

2
dotfiles/.config/compton.conf Executable file
View File

@@ -0,0 +1,2 @@
shadow = false;
fading = false;

26
dotfiles/.config/htop/htoprc Executable file
View File

@@ -0,0 +1,26 @@
# 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 46 39 109 110 1
sort_key=46
sort_direction=1
hide_threads=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_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=1
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=Hostname CPU Memory
left_meter_modes=2 1 1
right_meters=Uptime Tasks Swap
right_meter_modes=2 2 2

117
dotfiles/.config/i3/config Executable file
View File

@@ -0,0 +1,117 @@
set $mod Mod4
font pango:DejaVu Sans Mono 9
exec_always setxkbmap ee
exec_always "xrandr --output HDMI1 --mode 2560x1440 --rate 59.95 --output HDMI2 --mode 1920x1080 --rate 59.93 --left-of HDMI1"
exec_always ~/.scripts/daemons.sh
# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $fg color7 #f0f0f0
set_from_resource $bg color2 #f0f0f0
#class border backgr. text indicator child_border
client.focused $bg $bg $fg $bg $bg
client.focused_inactive $bg $bg $fg $bg $bg
client.unfocused $bg $bg $fg $bg $bg
client.urgent $bg $bg $fg $bg $bg
client.placeholder $bg $bg $fg $bg $bg
client.background $bg
exec_always xrdb ~/.Xresources
exec_always ~/.scripts/wal.sh
gaps inner 10
default_border pixel 1
bindsym $mod+Ctrl+r restart
bindsym $mod+Ctrl+q kill
bindsym $mod+s exec ~/.scripts/dmen_run.sh
bindsym $mod+Return exec urxvt
bindsym $mod+F1 exec ~/.scripts/audio.sh toggle_mute
bindsym $mod+F2 exec ~/.scripts/audio.sh lower
bindsym $mod+F3 exec ~/.scripts/audio.sh raise
bindsym $mod+F4 exec ~/.scripts/wal.sh
bindsym $mod+F5 exec ~/.scripts/music.sh toggle
bindsym $mod+Shift+F2 exec ~/.scripts/music.sh lower
bindsym $mod+Shift+F3 exec ~/.scripts/music.sh raise
bindsym $mod+F7 exec ~/.scripts/music.sh prev
bindsym $mod+F8 exec ~/.scripts/music.sh next
bindsym $mod+F9 exec ~/.scripts/mount.sh
bindsym $mod+F10 exec ~/.scripts/umount.sh
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Control+h move left
bindsym $mod+Control+j move down
bindsym $mod+Control+k move up
bindsym $mod+Control+l move right
bindsym $mod+Control+y resize shrink width 10 px or 1 ppt
bindsym $mod+Control+u resize grow height 10 px or 1 ppt
bindsym $mod+Control+i resize shrink height 10 px or 1 ppt
bindsym $mod+Control+o resize grow width 10 px or 1 ppt
bindsym $mod+Ctrl+w split h
bindsym $mod+Ctrl+s split v
bindsym $mod+Ctrl+f fullscreen toggle
bindsym $mod+Ctrl+space floating toggle
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+Ctrl+1 move container to workspace 1
bindsym $mod+Ctrl+2 move container to workspace 2
bindsym $mod+Ctrl+3 move container to workspace 3
bindsym $mod+Ctrl+4 move container to workspace 4
bindsym $mod+Ctrl+5 move container to workspace 5
bindsym $mod+Ctrl+6 move container to workspace 6
set_from_resource $darkblack color0
set_from_resource $black color8
set_from_resource $darkred color1
set_from_resource $red color9
set_from_resource $darkgreen color2
set_from_resource $green color10
set_from_resource $darkyellow color3
set_from_resource $yellow color11
set_from_resource $darkblue color4
set_from_resource $blue color12
set_from_resource $darkmagenta color5
set_from_resource $magenta color13
set_from_resource $darkcyan color6
set_from_resource $cyan color14
set_from_resource $darkwhite color7
set_from_resource $white color15
bar {
font pango:DejaVu Sans Mono 9
colors {
statusline $fg
separator $darkblue
focused_workspace $darkblack $darkblack $fg
active_workspace $darkblack $darkblack $fg
inactive_workspace $darkblack $darkblack $black
urgent_workspace $darkblue $bg $fg
}
position top
status_command i3blocks
}

View File

@@ -0,0 +1,14 @@
[mpd]
command=echo "$(mpc current)" $(mpc volume | awk '{match($2,"[0-9]*",a)}END{print a[0]"%"}')
interval=5
signal=2
[volume]
command=echo "$(pamixer --get-volume)%"
interval=once
signal=1
[time]
command=echo "$(date '+%d.%m %H:%M')"
interval=1

Binary file not shown.

View File

@@ -0,0 +1,14 @@
music_directory "~/Music"
auto_update "yes"
playlist_directory "~/.config/mpd/playlists"
sticker_file "~/.config/mpd/sticker.sql"
db_file "~/.config/mpd/database"
pid_file "~/.config/mpd/pid"
log_file "syslog"
audio_output {
type "pulse"
name "pulse audio"
}

1
dotfiles/.config/mpd/pid Normal file
View File

@@ -0,0 +1 @@
732

Binary file not shown.

View File

@@ -0,0 +1,14 @@
no-input-default-bindings
#profile=gpu-hq
deband=no
#scale=ewa_lanczossharp
#cscale=ewa_lanczossharp
alang=jpn,jp
slang=eng,en
#video-sync=display-resample
#interpolation

View File

@@ -0,0 +1,11 @@
def_key "j"
scroll_down
def_key "k"
scroll_up
def_key "h"
previous_column
def_key "l"
next_column

11
dotfiles/.config/ncmpcpp/config Executable file
View File

@@ -0,0 +1,11 @@
mouse_support = no
user_interface = alternative
header_visibility = no
playlist_display_mode = columns
browser_display_mode = columns
search_engine_display_mode = columns
playlist_editor_display_mode = columns
progressbar_look = -|

View File

@@ -0,0 +1,719 @@
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
info "Host" model
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Terminal" term
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
# info "GPU Driver" gpu_driver # Linux/macOS only
# info "Disk" disk
# info "Battery" battery
# info "Font" font
# info "Song" song
# info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
# info "Locale" locale # This only works on glibc systems.
info line_break
info cols
info line_break
}
# Kernel
# Shorten the output of the kernel function.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
#
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="on"
# Distro
# Shorten the output of the distro function
#
# Default: 'off'
# Values: 'on', 'off', 'tiny'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="off"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
#
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
# Uptime
# Shorten the output of the uptime function
#
# Default: 'on'
# Values: 'on', 'off', 'tiny'
# Flag: --uptime_shorthand
#
# Example:
# on: '2 days, 10 hours, 3 mins'
# off: '2 days, 10 hours, 3 minutes'
# tiny: '2d 10h 3m'
uptime_shorthand="on"
# Packages
# Show/Hide Package Manager names.
#
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
#
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
# Shell
# Show the path to $SHELL
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
#
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
#
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
# CPU
# CPU speed type
#
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand.
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="on"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="off"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="off"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
disk_subtitle="mount"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# Google Play
# guayadeque
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# Spotify
# tomahawk
# vlc
# xmms2d
# yarock
music_player="auto"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %album% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="-"
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '7'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 7)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
#
# NOTE: Arch and Ubuntu have 'old' logo variants.
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
# NOTE: Arch, Crux and Gentoo have a smaller logo variant.
# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
#
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
#
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
#
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
#
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
#
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
#
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
#
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color
background_color=
# Misc Options
# Stdout mode
# Turn off all colors and disables image backend (ASCII/Image).
# Useful for piping into another command.
# Default: 'off'
# Values: 'on', 'off'
stdout="off"

View File

@@ -0,0 +1,5 @@
#set show_hidden true
set preview_images true
set use_preview_script true
set preview_script=~/.config/ranger/scope.sh

179
dotfiles/.config/ranger/scope.sh Executable file
View File

@@ -0,0 +1,179 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
# If the option `use_preview_script` is set to `true`,
# then this script will be called and its output will be displayed in ranger.
# ANSI color codes are supported.
# STDIN is disabled, so interactive scripts won't work properly
# This script is considered a configuration file and must be updated manually.
# It will be left untouched if you upgrade ranger.
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | Display stdout as preview
# 1 | no preview | Display no preview at all
# 2 | plain text | Display the plain content of the file
# 3 | fix width | Don't reload when width changes
# 4 | fix height | Don't reload when height changes
# 5 | fix both | Don't ever reload
# 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
# 7 | image | Display the file directly as an image
# Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
# Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=8
HIGHLIGHT_STYLE='pablo'
PYGMENTIZE_STYLE='autumn'
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
# Archive
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)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1;;
rar)
# Avoid password prompt by providing empty password
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1;;
7z)
# Avoid password prompt by providing empty password
7z l -p -- "${FILE_PATH}" && exit 5
exit 1;;
# PDF
pdf)
# Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
# BitTorrent
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1;;
# OpenDocument
odt|ods|odp|sxw)
# Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
exit 1;;
# HTML
htm|html|xhtml)
# Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
esac
}
handle_image() {
local mimetype="${1}"
case "${mimetype}" in
# SVG
# image/svg+xml)
# convert "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
# exit 1;;
# Image
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
# If orientation data is present and the image actually
# needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
# ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
# `w3mimgdisplay` will be called for all images (unless overriden as above),
# but might fail for unsupported types.
exit 7;;
# Video
video/*)
# # Thumbnail
ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
exit 1;;
# PDF
# application/pdf)
# pdftoppm -f 1 -l 1 \
# -scale-to-x 1920 \
# -scale-to-y -1 \
# -singlefile \
# -jpeg -tiffcompression jpeg \
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
# && exit 6 || exit 1;;
esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
# Text
text/* | */xml)
# Syntax highlight
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$( tput colors )" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
# pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
exit 2;;
# Image
image/*)
# Preview as text conversion
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
exiftool "${FILE_PATH}" && exit 5
exit 1;;
# Video and audio
video/* | audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

19
dotfiles/.gtkrc-2.0 Normal file
View File

@@ -0,0 +1,19 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
include "/home/josh/.gtkrc-2.0.mine"
gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="Papirus-Dark"
gtk-font-name="DejaVu Sans 9"
gtk-cursor-theme-name="Adwaita"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_MENU
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintfull"

3
dotfiles/.pythonrc Executable file
View File

@@ -0,0 +1,3 @@
import readline
readline.write_history_file = lambda *args: None

27
dotfiles/.scripts/audio.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
current_volume=$(pamixer --get-volume)
case $1 in
"raise")
(( current_volume += 5 ))
[[ current_volume -gt 100 ]] && current_volume=100
pamixer --set-volume $current_volume
notify-send -t 250 "VOL: $current_volume"
pkill -RTMIN+1 i3blocks
;;
"lower")
(( current_volume -= 5 ))
[[ current_volume -lt 0 ]] && current_volume=0
pamixer --set-volume $current_volume
notify-send -t 250 "VOL: $current_volume"
pkill -RTMIN+1 i3blocks
;;
"toggle_mute")
pamixer --toggle-mute
notify-send -t 300 "MUTE: $(pamixer --get-mute)"
;;
esac

8
dotfiles/.scripts/daemons.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
[[ ! $(pidof compton) ]] && compton &
[[ ! $(pidof unclutter) ]] && unclutter &
[[ ! $(pidof mpd) ]] && mpd &
[[ ! $(pidof transmission-daemon) ]] && transmission-daemon &
[[ ! $(pidof dunst) ]] && dunst &

6
dotfiles/.scripts/dmen.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
. "${HOME}/.cache/wal/colors.sh"
dmenu -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15" "$@"

6
dotfiles/.scripts/dmen_run.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
. "${HOME}/.cache/wal/colors.sh"
dmenu_run -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15" "$@"

23
dotfiles/.scripts/mount.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
# Gives a dmenu prompt to mount unmounted drives.
# If they're in /etc/fstab, they'll be mounted automatically.
# Otherwise, you'll be prompted to give a mountpoint from already existsing directories.
# If you input a novel directory, it will prompt you to create that directory.
COLS="name,type,size,mountpoint"
drives="$(lsblk -rpo "$COLS" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
[ -z "$drives" ] && exit 1
chosen="$(echo "$drives" | ~/.scripts/dmen.sh -i -p "Mount which drive?" | awk '{print $1}')"
[ -z "$chosen" ] && exit 1
sudo -A mount "$chosen" && exit 0
# You may want to change the line below for more suggestions for mounting.
# I.e. you can increase the depth of the search, or add directories.
# This will increase the load time briefly though.
mp="$(find /mnt /media /mount /home -type d -maxdepth 5 2>/dev/null | ~/.scripts/dmen.sh -i -p "Type in mount point.")"
[ "$mp" = "" ] && exit 1
if [ ! -d "$mp" ]; then
mkdiryn=$(printf "No\\nYes" | ~/.scripts/dmen.sh -i -p "$mp does not exist. Create it?")
[ "$mkdiryn" = "Yes" ] && sudo -A mkdir -p "$mp"
fi
sudo -A mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp."

26
dotfiles/.scripts/music.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
case $1 in
"toggle")
mpc toggle
;;
"prev")
mpc prev &
pkill -RTMIN+2 i3blocks
;;
"next")
mpc next &
pkill -RTMIN+2 i3blocks
;;
"lower")
mpc volume -5
notify-send -t 250 "VOL: $(mpc volume | awk '{match($2,"[0-9]*",a)}END{print a[0]}')"
pkill -RTMIN+2 i3blocks
;;
"raise")
mpc volume +5
notify-send -t 250 "VOL: $(mpc volume | awk '{match($2,"[0-9]*",a)}END{print a[0]}')"
pkill -RTMIN+2 i3blocks
;;
esac

11
dotfiles/.scripts/umount.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
# A dmenu prompt to unmount drives.
# Provides you with mounted partitions, select one to unmount.
# Drives mounted at /, /boot and /home will not be options to unmount.
drives=$(lsblk -nrpo "name,type,size,mountpoint" | awk '$2=="part"&&$4!~/\/boot|\/home$|SWAP/&&length($4)>1{printf "%s (%s) on %s\n",$1,$3,$4}')
[ -z "$drives" ] && exit
chosen=$(echo "$drives" | ~/.scripts/dmen.sh -i -p "Unmount which drive?" | awk '{print $1}')
[ -z "$chosen" ] && exit
sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."

5
dotfiles/.scripts/wal.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
files=(~/.wallpapers/*)
wal -i ${files[RANDOM % ${#files[@]}]} -a 80

7
dotfiles/.vimrc Executable file
View File

@@ -0,0 +1,7 @@
syntax on
set number
set tabstop=4
set autoindent
set viminfo=
let g:netrw_dirhistmax = 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 KiB

BIN
dotfiles/.wallpapers/IwucZ6x.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
dotfiles/.wallpapers/mnt.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 MiB

BIN
dotfiles/.wallpapers/pnt.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

2
dotfiles/.xinitrc Executable file
View File

@@ -0,0 +1,2 @@
exec i3