reorganize directory structure again

This commit is contained in:
David Todd
2021-01-12 18:33:49 -06:00
parent 74ba4615d1
commit 158ccfcea0
63 changed files with 32 additions and 30 deletions

45
home/.Xresources Normal file
View File

@@ -0,0 +1,45 @@
! special
*.foreground: #c6c8d1
*.background: #161821
*.cursorColor: #c6c8d1
! black
*.color0: #161821
*.color8: #6b7089
! red
*.color1: #e27878
*.color9: #e98989
! green
*.color2: #b4be82
*.color10: #c0ca8e
! yellow
*.color3: #e2a478
*.color11: #e9b189
! blue
*.color4: #84a0c6
*.color12: #91acd1
! magenta
*.color5: #a093c7
*.color13: #ada0d3
! cyan
*.color6: #89b8c2
*.color14: #95c4ce
! white
*.color7: #c6c8d1
*.color15: #d2d4de
URxvt.font: xft:Source Code Pro:size=10.5
URxvt.depth: 32
URxvt*scrollBar: false
URxvt*mouseWheelScrollPage: true
URxvt*cursorBlink: true
URxvt*saveLines: 99999
URxvt*internalBorder: 5
URxvt*geometry: 70x19

23
home/.aliases Normal file
View File

@@ -0,0 +1,23 @@
# Common Aliases
# These will be sourced into the main *sh config that's loaded
alias ls='ls --color=auto'
alias ll='ls -l'
alias la='ls -Alh'
alias l='ls -C'
alias ld='ls -ld'
alias lo='ls -lh | sed -e 's/--x/1/g' -e 's/-w-/2/g' -e 's/-wx/3/g' -e 's/r--/4/g' -e 's/r-x/5/g' -e 's/rw-/6/g' -e 's/rwx/7/g' -e 's/---/0/g''
alias back='cd $OLDPWD'
alias clkear='clear'
alias ckear='clear'
alias reload='source ~/.zshrc'
alias webshare='python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"'
alias ipa='ip addr|grep inet'
alias cls='clear;ls'
alias rvi='sudo -E vim'
alias ta='tmux attach -t C0DE || tmux new -s C0DE'
alias open='xdg-open'
# Use `shred` if it exists, or just `rm -P`
type "$shred" > /dev/null || alias shred='rm -P'

96
home/.bashrc Normal file
View File

@@ -0,0 +1,96 @@
# Include our shared environment stuff
source ~/.environment
source ~/.aliases
source ~/.functions
# Basic options
export HISTCONTROL=ignoredups
export COLORFGBG='default;default'
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
shopt -s checkwinsize
eval "$(dircolors -b /etc/dircolors)"
# X Terminal titles
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
# Bash completion
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
echo "appending a '&' on the back of commands will run them in the background"
echo "Don't forget ^s to pause commands and ^q to resume paused commands"
function timer_start {
timer=${timer:-$SECONDS}
}
function timer_stop {
timer_show=$(($SECONDS - $timer))
unset timer
}
trap 'timer_start' DEBUG
PROMPT_COMMAND=timer_stop
# Prompt
# Black 0;30 Dark Gray 1;30
# Blue 0;34 Light Blue 1;34
# Green 0;32 Light Green 1;32
# Cyan 0;36 Light Cyan 1;36
# Red 0;31 Light Red 1;31
# Purple 0;35 Light Purple 1;35
# Brown 0;33 Yellow 1;33
# Light Gray 0;37 White 1;37
BLACK='\[\033[0;30m\]'
BLUE='\[\033[0;34m\]'
GREEN='\[\033[0;32m\]'
CYAN='\[\033[0;36m\]'
RED='\[\033[0;31m\]'
PURPLE='\[\033[0;35m\]'
BROWN='\[\033[0;33m\]'
LGRAY='\[\033[0;37m\]'
DGRAY='\[\033[1;30m\]'
LBLUE='\[\033[1;34m\]'
LGREEN='\[\033[1;32m\]'
LCYAN='\[\033[1;36m\]'
LRED='\[\033[1;31m\]'
LPURPLE='\[\033[1;35m\]'
YELLOW='\[\033[1;33m\]'
WHITE='\[\033[1;37m\]'
RBG='\e[41m'
ALERT=${WHITE}${RBG} # Bold White on red background
NC="\e[m" # Color Reset
PS1="\[\033]0;Bash | \u@\H:\w\007\]" # Add a dynamically changing window title - Shows current user@host:current directory (comment this and "$PS1" at beginning of next line when not an a terminal emulator)
PS1="$PS1""${LGREEN}[${LPURPLE}\u${WHITE}@${LBLUE}\h${LGREEN}]-(${YELLOW}\w${LGREEN})"
PS1="$PS1""\n [${LRED}\@ ${LGRAY}Last:${WHITE} \${timer_show}s ${LCYAN}Err:"
# Error code test - not working
#if [[ \$? = "0" ]] # If last program exited with 0 (good exit)
#then
PS1="$PS1"" ${WHITE}\$?" # show white error code
#else
# PS1="$PS1"" ${LRED}\$?" # if last program exited with anything else, show red error code
#fi
PS1="$PS1"" ${LPURPLE}BJobs:${PURPLE} \j ${LBLUE}Hist: ${LCYAN}\!${LGREEN}]\n ->${LGRAY} "
#PS1="$PS1"" ${NC}"

View File

@@ -0,0 +1,13 @@
configuration {
color-enabled: true;
theme: "iceberg-dark";
separator-style: solid;
sindebar-mode: false;
lines: 5;
font: "Source Code Pro Semibold 10.5";
bw: 1;
columns: 3;
padding: 5;
fixed-num-lines: true;
hide-scrollbar: true;
}

View File

@@ -0,0 +1,201 @@
/*******************************************************************************
* ROFI Color Theme
* User: Sheepla
* Copyleft: Sheepla
*******************************************************************************/
* {
highlight: bold italic;
scrollbar: true;
/* Color palette from iceberg.vim and iceberg-dark
* https://github.com/cocopon/iceberg.vim
* https://github.com/gkeep/iceberg-dark
*/
palette-bg0: #161821;
palette-bg1: #1e2132;
palette-bg2: #444b71;
palette-fg0: #c6c8d1;
palette-fg1: #aeb4cc;
palette-red: #e27878;
palette-green: #b4be82;
palette-yellow: #e2a478;
palette-blue: #84a0c6;
palette-purple: #a093c7;
palette-cyan: #89b8c2;
palette-grey: #c0bfc9;
/* Base colors */
background: @palette-bg0;
background-color: @background;
foreground: @palette-fg1;
/* Normal colors */
normal-background: @background;
normal-foreground: @foreground;
alternate-normal-background: @palette-bg1;
alternate-normal-foreground: @foreground;
selected-normal-background: @palette-bg2;
selected-normal-foreground: @palette-fg0;
/* Active window colors */
active-background: @normal-background;
active-foreground: @palette-blue;
alternate-active-background: @alternate-normal-background;
alternate-active-foreground: @active-foreground;
selected-active-background: @palette-blue;
selected-active-foreground: @normal-background;
/* Urgent colors */
urgent-background: @background;
urgent-foreground: @palette-yellow;
alternate-urgent-background: @alternate-normal-background;
alternate-urgent-foreground: @urgent-foreground;
selected-urgent-background: @urgent-foreground;
selected-urgent-foreground: @normal-background;
/* Other colors */
border-color: @palette-bg2;
separatorcolor: @border-color;
scrollbar-handle: @palette-bg2;
}
#window {
background-color: @background-color;
children: [mainbox];
}
#mainbox {
border: 0;
orientation: vertical;
children: [ entry, message, listview, mode-switcher ];
}
#entry {
expand: false;
text-color: @normal-foreground;
/* Padding between 2 lines */
padding: 10px 0px 10px 10px;
border: 0 0 2px;
border-color: @palette-bg2;
margin: 10px;
}
#sidebar {
expand: false;
}
/* Message box */
#textbox {
horizontal-align: 0;
background-color: @palette-bg2;
padding: 10px 20px 10px 20px ;
text-color: @palette-fg0;
}
#listview {
border: 0px 0px 0px ;
border-color: @palette-bg2;
padding: 0px 0px 5px 0px;
scrollbar: @scrollbar;
}
#mode-switcher {
border: 3px 0px 0px 0px;
border-color: @palette-bg2;
}
button {
padding: 5px;
}
#button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element {
border: 0;
padding: 3px 10px 3px 10px ;
}
#element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
#element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
#element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 2px;
children: [ textbox-prompt-sep, entry, case-indicator ];
}
case-indicator,
entry,
button {
spacing: 0;
text-color: @normal-foreground;
}
button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
textbox-prompt-sep {
expand: false;
str: ":";
text-color: @normal-foreground;
margin: 0 0.3em 0 0;
}
prompt {
padding:6px 9px;
background-color: @palette-bg2;
}
#element-icon {
size: 18;
}

View File

@@ -0,0 +1,94 @@
# Shadow
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the
# window. Fix some weirdness with ARGB windows.
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-opacity = 0.7; # The translucency for shadows. (default .75)
# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
shadow-exclude = [ "n:e:Notification" ]; # Exclude conditions for shadows.
# shadow-exclude = "n:e:Notification";
shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
# (see also: --detect-rounded-corners)
# Opacity
menu-opacity = 0.9; # The opacity for menus. (default 1.0)
inactive-opacity = 0.94; # Default opacity of inactive windows. (0.0 - 1.0)
# active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
# frame-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0)
# inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
# value of _NET_WM_OPACITY. Bad choice.
#alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
# it may result in less X resource usage,
# Yet fading may look bad.
# inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)
# inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
# blur-background = true; # Blur background of transparent windows.
# Bad performance with X Render backend.
# GLX backend is preferred.
# blur-background-frame = true; # Blur background of opaque windows with transparent
# frames as well.
blur-background-fixed = false; # Do not let blur radius adjust based on window opacity.
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
# Exclude conditions for background blur.
# Fading
fading = true; # Fade windows during opacity changes.
# fade-delta = 30; # The time between steps in a fade in milliseconds. (default 10).
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
fade-exclude = [ ]; # Exclude conditions for fading.
# Other
backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically
# much faster but depends on a sane driver.
mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
use-ewmh-active-win = false; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
# instead of using FocusIn/Out events. Usually more reliable but
# depends on a EWMH-compliant WM.
detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
# managers not passing _NET_WM_OPACITY of client windows to frame
# windows.
refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
vsync = "opengl"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
# See man page for more details.
dbe = false; # Enable DBE painting mode. Rarely needed.
#paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
# Incompatible with certain VSync methods.
unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
# detected, to maximize performance for full-screen windows.
focus-exclude = [ ]; # A list of conditions of windows that should always be considered
# focused.
detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
# the same group focused at the same time.
detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
# GLX backend # GLX backend fine-tune options. See man page for more info.
# glx-no-stencil = true; # Recommended.
glx-copy-from-front = false; # Useful with --glx-swap-method,
# glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
# glx-no-rebind-pixmap = true; # Recommended if it works.
glx-swap-method = "undefined"; # See man page.
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
# fade: Fade the particular type of windows.
# shadow: Give those windows shadow
# opacity: Default opacity for the type of windows.
# focus: Whether to always consider windows of this type focused.
};
# Fullscreen windows should have no transparency
opacity-rule = [ "100:_NET_WM_STATE@:32a = '_NET_WM_STATE_FULLSCREEN'" ];

228
home/.config/dunst/dunstrc Normal file
View File

@@ -0,0 +1,228 @@
[global]
frame_width = 1
frame_color = "#6b7089"
font = Source Code Pro Semibold 10.5
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
# # For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the
# message.
markup = yes
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# Markup is allowed
format = "%s %p\n%b"
# Sort messages by urgency.
sort = yes
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# The frequency with wich text that is longer than the notification
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 5
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Split notifications into multiple lines if they don't fit into
# geometry.
word_wrap = no
# Ignore newlines '\n' in notifications.
ignore_newline = no
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "0x4-25+25"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
shrink = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 15
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# default 120
idle_threshold = 120
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
# # "keyboard" needs a windowmanager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern windowmanagers.
# # If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
# The height of a single line. If the height is smaller than the
# font height, it will get raised to the font height.
# This adds empty space above and under the text.
line_height = 0
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 1
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 10
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = #263238
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = google-chrome-stable
# Align icons left/right/off
icon_position = left
# Paths to default icons.
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/
# Limit icons size.
max_icon_size=128
[shortcuts]
# Shortcuts are specified as [modifier+][modifier+]...key
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
# "mod3" and "mod4" (windows-key).
# Xev might be helpful to find names for keys.
# Close notification.
close = mod1+space
# Close all notifications.
# close_all = ctrl+shift+space
close_all = ctrl+mod1+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1".
history = ctrl+mod4+h
# Context menu
context = ctrl+mod1+c
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#6b7089"
foreground = "#c6c8d1"
timeout = 10
[urgency_normal]
background = "#89b8c2"
foreground = "#161821"
timeout = 10
[urgency_critical]
background = "#e27878"
foreground = "#CB4B16"
timeout = 0
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
## NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[mute.sh]
# appname = mute
# category = mute.sound
# script = mute.sh
# vim: ft=cfg

View File

@@ -0,0 +1,11 @@
[Filechooser Settings]
LocationMode=path-bar
ShowHidden=false
ShowSizeColumn=true
GeometryX=4410
GeometryY=320
GeometryWidth=780
GeometryHeight=585
SortColumn=name
SortOrder=ascending
StartupMode=recent

View File

@@ -0,0 +1,4 @@
file:///home/dtodd/dev dev
file:///mnt/otdc otdc
file:///mnt/erp erp
file:///mnt/external external

View File

@@ -0,0 +1,4 @@
.window-frame {
box-shadow: none;
margin: 0;
}

View File

@@ -0,0 +1,10 @@
[Settings]
gtk-icon-theme-name=Papirus-Adapta-Nokto-Maia
gtk-theme-name=Adapta-Nokto-Eta-Maia
gtk-cursor-theme-name=xcursor-breeze
gtk-font-name=Source Code Pro Semibold 10.5
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb
gtk-application-prefer-dark-theme=true

26
home/.config/htop/htoprc Normal 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 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
tree_view=1
header_margin=1
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2

View File

@@ -0,0 +1,27 @@
# Configure applications to start once i3 has initialized
#exec --no-startup-id xfce4-panel --disable-wm-check
#exec --no-startup-id stalonetray -c ~/.stalonetrayrc
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id xfce4-power-manager
exec_always --no-startup-id fix_xcursor
exec --no-startup-id nm-applet
exec --no-startup-id clipit
# exec_always --no-startup-id ff-theme-util
# exec --no-startup-id start_conky_mia
# Random wallpaper
exec --no-startup-id ~/bin/wallpaper.sh &
# Timeout to activate screensaver/lockscreen
exec --no-startup-id xautolock -time 10 -locker 'i3lock-fancy -p' &
# Composition Manager (Transparency)
#exec --no-startup-id xcompmgr -c -f -n
#exec --no-startup-id compton --config ~/.config/compton/compton.conf &
# Network Keyboard/Mouse/Clipboard
#exec --no-startup-id synergy &
exec --no-startup-id barrier &
# End autostart configuration

View File

@@ -0,0 +1,70 @@
# Base configuration options
set $i3_path ~/.config/i3
# Use the Super key as $mod, because Alt is used in tmux
set $mod Mod4
floating_modifier $mod
new_window pixel 1
new_float normal
hide_edge_borders none
bindsym $mod+u border none
bindsym $mod+y border pixel 1
bindsym $mod+n border normal
font xft:URWGothic-Book 11
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3lock-fancy -p
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################
exec --no-startup-id volumeicon
bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
#exec --no-startup-id pulseaudio
#exec --no-startup-id pa-applet
#bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################
# Screen brightness controls
# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
# Theme colors
# class border backgr. text indic. child_border
client.focused #89b8c2 #89b8c2 #161821 #b4be82
client.focused_inactive #a093c7 #a093c7 #161821 #e2a478
client.unfocused #6b7089 #6b7089 #c6c8d1 #84a0c6
client.urgent #e27878 #e27878 #CB4B16 #CB4B16
client.placeholder #e2a478 #e2a478 #161821 #95c4ce
client.background #161821
# End base configuration

View File

@@ -0,0 +1,49 @@
# Begin i3-gaps configuration - Stuff specific to i3-gaps
smart_gaps on
smart_borders on
# Gap spacing
gaps inner 10
gaps outer 4
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
# End i3-gaps configuration

View File

@@ -0,0 +1,58 @@
# Begin i3-bar configuration
bar {
position top
height 18
tray_padding 0
#mode hide
#workspace_buttons yes
#tray_output DP-0
#separator_symbol "|"
status_command i3blocks -c $i3_path/i3blocks.conf
# status_command i3status -c $i3_path/i3status.conf
# status_command bumblebee-status \
# -m \
# disk:root \
# cpu2 \
# memory \
# playerctl \
# title \
# todo \
# ping \
# network_traffic \
# date \
# time \
# -p \
# root.path=/ \
# root.critical="50" \
# cpu2.layout="cpu2.cpuload cpu2.coresload" \
# cpu2.colored=1 \
# cpu2.temp_pattern="temp" \
# todo.file="~/todo.vim" \
# ping.address="1.1.1.1" \
# time.format="%H:%M" \
# date.format="%a, %b %d" \
# -a \
# disk \
# ping \
# -t \
# iceberg-dark-powerline
#
colors {
background #161821
statusline #c6c8d1
separator #161821
# border backgr. text
focused_workspace #89b8c2 #89b8c2 #161821
active_workspace #a093c7 #a093c7 #161821
inactive_workspace #6b7089 #6b7089 #c6c8d1
binding_mode #e2a478 #e2a478 #161821
urgent_workspace #e27878 #e27878 #CB4B16
}
}
# End i3-bar configuration

View File

@@ -0,0 +1,46 @@
# Configure keybinds to start applications
# Frequently used programs
bindsym $mod+Return exec --no-startup-id terminator
bindsym $mod+Shift+Return exec --no-startup-id urxvt
bindsym $mod+F2 exec --no-startup-id google-chrome-stable
bindsym $mod+F3 exec --no-startup-id pcmanfm
bindsym $mod+F4 exec --no-startup-id code
bindsym $mod+F6 exec --no-startup-id ~/bin/music_player
# Help
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
# Program Launchers
bindsym $mod+z exec --no-startup-id morc_menu
bindsym $mod+d exec --no-startup-id rofi -show run
bindsym $mod+Tab exec --no-startup-id rofi -show window
# Force Kill program
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
# Kill focused window
bindsym $mod+Shift+q kill
# Lock screen
bindsym $mod+p exec --no-startup-id i3lock-fancy -p
# Toggle visibility of status bar
bindsym $mod+m bar mode toggle
# music player control
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
# Screenshots
# Selection
bindsym Insert exec --no-startup-id maim -s ~/Pictures/$(date +%Y-%m-%d-%s).png
# Active Window
bindsym $mod+Insert exec --no-startup-id ~/bin/screenshotter.sh
# Fullscreen
bindsym $mod+Shift+Insert --release exec --no-startup-id maim ~/Pictures/$(date +%Y-%m-%d).png
# Selection and Edit
bindsym $mod+Ctrl+Insert exec --no-startup-id maim -s ~/Pictures/$(date +%Y-%m-%d-%M).png&& pinta ~/Pictures/$(date +%Y-%m-%d-%M).png
# End keybind configuration

View File

@@ -0,0 +1,97 @@
# Configure keybinds that interact with window layout
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# toggle fullscreen mode for the focused container (spans across all monitors)
bindsym $mod+Shift+f fullscreen toggle global
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+F11 move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+F12 scratchpad show
# split orientation
bindsym $mod+h split h;exec notify-send 'tile horizontally'
bindsym $mod+v split v;exec notify-send 'tile vertically'
bindsym $mod+q split toggle;exec notify-send 'tile direction toggled'
# To prevent accidentally changing the workspace mode, those
# keybinds are hidden behind "view_mode"
bindsym $mod+Shift+m mode "view_mode"
mode "view_mode" {
# change container layout (stacked, tabbed, toggle split)
# Also send a notification saying the mode was changed
bindsym $mod+s layout stacking;exec notify-send 'Stacking Mode'
bindsym $mod+w layout tabbed;exec notify-send 'Tabbed Mode'
# Default mode
bindsym $mod+e layout toggle split;exec notify-send 'Split Mode'
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# change focus vim keybinding
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# change focus arrow keybinding
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window vim keybinding
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# move focused window arrow keybinding
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym semicolon resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# End layout keybinds

View File

@@ -0,0 +1,29 @@
# Begin configuration for window classes
# Open specific applications in floating mode
for_window [class="URxvt"] floating enable border pixel 0
for_window [title="alsamixer"] floating enable border pixel 1
for_window [class="(?i)gvim"] floating enable boarder pixel 0
for_window [class="Calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lightdm-gtk-greeter-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [class="Pamac-manager"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
#for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="(?i)qemu.*"] floating enable
for_window [class="Xfburn"] floating enable
for_window [class="feh"] floating enable
for_window [class="steamwebhelper"] floating enable
for_window [class="terminator"] floating enable sticky enable
for_window [class="^telegram-desktop"] floating enable sticky enable
# End window class configuration

View File

@@ -0,0 +1,71 @@
# Begin configuration for workspaces (virtual desktops)
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# Workspace labels - uses font icons
set $ws1 "1|"
set $ws2 "2|"
set $ws3 "3|"
set $ws4 "4|"
set $ws5 "5|"
set $ws6 "6|"
set $ws7 "7|"
set $ws8 "8|"
set $ws9 "9|"
# switch to numbered workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
bindsym $mod+Ctrl+9 move container to workspace $ws9
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
# Move to next/previous workspace
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# Assign window classes to specific workspaces on launch
assign [class="^telegram-desktop"] $ws2
assign [class="^Telegram"] $ws2
assign [class="^Discord"] $ws2
assign [class="^Spotify"] $ws6
assign [class="^discord"] $ws2
assign [class="^Steam"] $ws8
assign [class="^Java"] $ws7
assign [class="^Synergy"] $ws4
assign [class="^AnyDesk"] $ws4
assign [class="^Code"] $ws5
# End workspace configuration

454
home/.config/i3/config Normal file
View File

@@ -0,0 +1,454 @@
# This file is generated with the `build-i3-config` command
# Configuration has been broken up into the `conf.d` directory
# Base configuration options
set $i3_path ~/.config/i3
# Use the Super key as $mod, because Alt is used in tmux
set $mod Mod4
floating_modifier $mod
new_window pixel 1
new_float normal
hide_edge_borders none
bindsym $mod+u border none
bindsym $mod+y border pixel 1
bindsym $mod+n border normal
font xft:URWGothic-Book 11
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3lock-fancy -p
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
################################################################################################
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################
exec --no-startup-id volumeicon
bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
#exec --no-startup-id pulseaudio
#exec --no-startup-id pa-applet
#bindsym $mod+Ctrl+m exec pavucontrol
################################################################################################
# Screen brightness controls
# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'"
# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'"
# Theme colors
# class border backgr. text indic. child_border
client.focused #89b8c2 #89b8c2 #161821 #b4be82
client.focused_inactive #a093c7 #a093c7 #161821 #e2a478
client.unfocused #6b7089 #6b7089 #c6c8d1 #84a0c6
client.urgent #e27878 #e27878 #CB4B16 #CB4B16
client.placeholder #e2a478 #e2a478 #161821 #95c4ce
client.background #161821
# End base configuration
# Begin i3-gaps configuration - Stuff specific to i3-gaps
smart_gaps on
smart_borders on
# Gap spacing
gaps inner 10
gaps outer 4
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
# End i3-gaps configuration
# Begin configuration for workspaces (virtual desktops)
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# Workspace labels - uses font icons
set $ws1 "1|"
set $ws2 "2|"
set $ws3 "3|"
set $ws4 "4|"
set $ws5 "5|"
set $ws6 "6|"
set $ws7 "7|"
set $ws8 "8|"
set $ws9 "9|"
# switch to numbered workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
# Move focused container to workspace
bindsym $mod+Ctrl+1 move container to workspace $ws1
bindsym $mod+Ctrl+2 move container to workspace $ws2
bindsym $mod+Ctrl+3 move container to workspace $ws3
bindsym $mod+Ctrl+4 move container to workspace $ws4
bindsym $mod+Ctrl+5 move container to workspace $ws5
bindsym $mod+Ctrl+6 move container to workspace $ws6
bindsym $mod+Ctrl+7 move container to workspace $ws7
bindsym $mod+Ctrl+8 move container to workspace $ws8
bindsym $mod+Ctrl+9 move container to workspace $ws9
# Move to workspace with focused container
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
# Move to next/previous workspace
bindsym $mod+Ctrl+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
# Assign window classes to specific workspaces on launch
assign [class="^telegram-desktop"] $ws2
assign [class="^Telegram"] $ws2
assign [class="^Discord"] $ws2
assign [class="^Spotify"] $ws6
assign [class="^discord"] $ws2
assign [class="^Steam"] $ws8
assign [class="^Java"] $ws7
assign [class="^Synergy"] $ws4
assign [class="^AnyDesk"] $ws4
assign [class="^Code"] $ws5
# End workspace configuration
# Begin i3-bar configuration
bar {
#status_command i3status -c ~/.config/i3/i3status.conf
status_command i3blocks -c $i3_path/i3blocks.conf
# status_command bumblebee-status \
# -m \
# disk:root \
# cpu2 \
# memory \
# playerctl \
# title \
# todo \
# ping \
# network_traffic \
# date \
# time \
# -p \
# root.path=/ \
# root.critical="50" \
# cpu2.layout="cpu2.cpuload cpu2.coresload" \
# cpu2.colored=1 \
# cpu2.temp_pattern="temp" \
# todo.file="~/todo.vim" \
# ping.address="1.1.1.1" \
# time.format="%H:%M" \
# date.format="%a, %b %d" \
# -a \
# disk \
# ping \
# -t \
# iceberg-dark-powerline
#
position top
#mode hide
#workspace_buttons yes
#tray_output DP-0
tray_padding 0
#separator_symbol "|"
colors {
background #161821
statusline #c6c8d1
separator #161821
# border backgr. text
focused_workspace #89b8c2 #89b8c2 #161821
active_workspace #a093c7 #a093c7 #161821
inactive_workspace #6b7089 #6b7089 #c6c8d1
binding_mode #e2a478 #e2a478 #161821
urgent_workspace #e27878 #e27878 #CB4B16
}
height 18
}
# End i3-bar configuration
# Begin configuration for window classes
# Open specific applications in floating mode
for_window [class="URxvt"] floating enable border pixel 0
for_window [title="alsamixer"] floating enable border pixel 1
for_window [class="(?i)gvim"] floating enable boarder pixel 0
for_window [class="Calamares"] floating enable border normal
for_window [class="Clipgrab"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [class="Galculator"] floating enable border pixel 1
for_window [class="GParted"] floating enable border normal
for_window [title="i3_help"] floating enable sticky enable border normal
for_window [class="Lightdm-gtk-greeter-settings"] floating enable
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Manjaro-hello"] floating enable
for_window [class="Manjaro Settings Manager"] floating enable border normal
for_window [class="Pamac-manager"] floating enable
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
#for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="(?i)qemu.*"] floating enable
for_window [class="Xfburn"] floating enable
for_window [class="feh"] floating enable
for_window [class="steamwebhelper"] floating enable
for_window [class="terminator"] floating enable sticky enable
for_window [class="^telegram-desktop"] floating enable sticky enable
# End window class configuration
# Configure keybinds that interact with window layout
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# toggle fullscreen mode for the focused container (spans across all monitors)
bindsym $mod+Shift+f fullscreen toggle global
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+F11 move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+F12 scratchpad show
# split orientation
bindsym $mod+h split h;exec notify-send 'tile horizontally'
bindsym $mod+v split v;exec notify-send 'tile vertically'
bindsym $mod+q split toggle;exec notify-send 'tile direction toggled'
# To prevent accidentally changing the workspace mode, those
# keybinds are hidden behind "view_mode"
bindsym $mod+Shift+m mode "view_mode"
mode "view_mode" {
# change container layout (stacked, tabbed, toggle split)
# Also send a notification saying the mode was changed
bindsym $mod+s layout stacking;exec notify-send 'Stacking Mode'
bindsym $mod+w layout tabbed;exec notify-send 'Tabbed Mode'
# Default mode
bindsym $mod+e layout toggle split;exec notify-send 'Split Mode'
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# change focus vim keybinding
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# change focus arrow keybinding
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window vim keybinding
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# move focused window arrow keybinding
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 5 px or 5 ppt
bindsym k resize grow height 5 px or 5 ppt
bindsym l resize shrink height 5 px or 5 ppt
bindsym semicolon resize grow width 5 px or 5 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# exit resize mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# End layout keybinds
# Configure keybinds to start applications
# Frequently used programs
bindsym $mod+Return exec --no-startup-id terminator
bindsym $mod+Shift+Return exec --no-startup-id urxvt
bindsym $mod+F2 exec --no-startup-id google-chrome-stable
bindsym $mod+F3 exec --no-startup-id pcmanfm
bindsym $mod+F4 exec --no-startup-id code
bindsym $mod+F6 exec --no-startup-id ~/bin/music_player
# Help
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
# Program Launchers
bindsym $mod+z exec --no-startup-id morc_menu
bindsym $mod+d exec --no-startup-id rofi -show run
bindsym $mod+Tab exec --no-startup-id rofi -show window
# Configuration Editor
bindsym $mod+Ctrl+b exec --no-startup-id urxvt -e bmenu
# File Explorer
bindsym $mod+n --release exec --no-startup-id urxvt -e nnn
# Force Kill program
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
# Kill focused window
bindsym $mod+Shift+q kill
# Lock screen
bindsym $mod+p exec --no-startup-id i3lock-fancy -p
# Toggle visibility of status bar
bindsym $mod+m bar mode toggle
# Screenshots
# Selection
bindsym Insert exec --no-startup-id maim -s ~/Pictures/$(date +%Y-%m-%d-%s).png
# Active Window
bindsym $mod+Insert exec --no-startup-id ~/bin/screenshotter.sh
# Fullscreen
bindsym $mod+Shift+Insert --release exec --no-startup-id maim ~/Pictures/$(date +%Y-%m-%d).png
# Selection and Edit
bindsym $mod+Ctrl+Insert exec --no-startup-id maim -s ~/Pictures/$(date +%Y-%m-%d).png&& pinta ~/Pictures/$(date +%Y-%m-%d-%s).png
# Screen recording
bindsym Shift+Print exec --no-startup-id ~/bin/screencast2gif.sh
bindsym Print exec --no-startup-id "ffcast -q $(while slop -q -n -f '-g %g ';do :;done) rec ~/Videos/rec-%si-$(date +%Y-%m-%d-%s).mp4"
bindsym $mod+Print exec --no-startup-id pkill -fxn '(/\S+)*ffmpeg\s.*\sx11grab\s.*'
# End keybind configuration
# Configure applications to start once i3 has initialized
#exec --no-startup-id xfce4-panel --disable-wm-check
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
#exec --no-startup-id stalonetray
exec --no-startup-id clipit
# exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor
# exec --no-startup-id start_conky_mia
# Random wallpaper
exec --no-startup-id ~/bin/wallpaper.sh &
# Timeout to activate screensaver/lockscreen
exec --no-startup-id xautolock -time 10 -locker 'i3lock-fancy -p' &
# Composition Manager (Transparency)
#exec --no-startup-id xcompmgr -c -f -n
#exec --no-startup-id compton --config ~/.config/compton.conf &
# Network Keyboard/Mouse/Clipboard
#exec --no-startup-id synergy &
exec --no-startup-id barrier &
# End autostart configuration

View File

@@ -0,0 +1,39 @@
# vim: filetype=yaml
# This is an example configuration file for i3-dstatus.
#
# Make sure you are using a pango font by putting `pango:` before your i3 font
# string to use the markup features
---
general:
generators: [ focused-window, scratchpad, playerctl, clipboard, netifaces, disk, battery, clock ]
separator-block-width: 25
clock:
format: '%h %d <b>%H:%M</b>'
disk:
'/':
prefix: 'custom'
format: '%free'
clipboard:
format: '<span size="small" font="FontAwesome"></span> %text'
focused-window:
truncate-length: 100
netifaces:
enp3s0:
format-up: '%iface: %ip'
format-down: '%iface: <b>down</b>'
scratchpad:
format: 'scratchpad: <b>%classes</b>'
playerctl:
format: '{{artist}} - {{title}}'
check-http:
sites: [ 'http://i3wm.org' ]
interval: 600
format-up: ''
format-down: '<span color="red">%site is down (status: %status, %reason)</span>'
github-repos:
users: [ altdesktop ]
interval: 600
format: '<span color="yellow">★</span>%stars <small>?</small>%issues'
battery:
name: 'BAT0' # defaults to the first battery found
format: '%name %percentage%'

View File

@@ -0,0 +1,82 @@
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent
# Global properties
#
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
#command=/usr/lib/i3blocks/$BLOCK_NAME
command=~/bin/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=pango
[scratchpad]
interval=5
[gpu-load]
interval=15
label=⎚
[load_average]
interval=15
label=⨏
[cpu_usage]
interval=persist
label=💻
[cpu]
interval=15
label=🌡
[memory]
interval=30
label=
[bandwidth]
command=~/bin/i3blocks/bandwidth -u Kb
interval=persist
#label=
#[disk]
#interval=60
#command=~/bin/i3blocks/disk /
#[disk]
#interval=60
#command=~/bin/i3blocks/disk /home 🏠
[spotify]
label=
color=#81b71a
interval=5
[window]
interval=1
label=🗔
[clock]
label=
interval=30
[internet]
interval=15

View File

@@ -0,0 +1,54 @@
[Default Applications]
x-scheme-handler/http=userapp-google-chrome.desktop
x-scheme-handler/https=userapp-google-chrome.desktop
x-scheme-handler/ftp=userapp-google-chrome.desktop
x-scheme-handler/chrome=userapp-google-chrome.desktop
text/html=userapp-google-chrome.desktop
application/x-extension-htm=userapp-google-chrome.desktop
application/x-extension-html=userapp-google-chrome.desktop
application/x-extension-shtml=userapp-google-chrome.desktop
application/xhtml+xml=userapp-google-chrome.desktop
application/x-extension-xhtml=userapp-google-chrome.desktop
application/x-extension-xht=userapp-google-chrome.desktop
image/jpeg=viewnior.desktop;gpicview.desktop;
image/png=viewnior.desktop;gpicview.desktop;
text/plain=gvim.desktop
x-scheme-handler/mailto=google-chrome.desktop
message/rfc822=userapp-Thunderbird.desktop
application/pdf=epdfview.desktop
application/x-bittorrent=deluge.desktop
x-scheme-handler/webcal=google-chrome.desktop
x-scheme-handler/postman=Postman.desktop
x-scheme-handler/rdp=org.remmina.Remmina.desktop
x-scheme-handler/spice=org.remmina.Remmina.desktop
x-scheme-handler/vnc=org.remmina.Remmina.desktop
x-scheme-handler/remmina=org.remmina.Remmina.desktop
application/x-remmina=org.remmina.Remmina.desktop
text/x-python=gvim.desktop
x-scheme-handler/etcher=balena-etcher-electron.desktop
[Added Associations]
x-scheme-handler/http=userapp-google-chrome.desktop;
x-scheme-handler/https=userapp-google-chrome.desktop;
x-scheme-handler/ftp=userapp-google-chrome.desktop;
x-scheme-handler/chrome=userapp-google-chrome.desktop;
text/html=userapp-google-chrome.desktop;
application/x-extension-htm=userapp-google-chrome.desktop;
application/x-extension-html=userapp-google-chrome.desktop;
application/x-extension-shtml=userapp-google-chrome.desktop;
application/xhtml+xml=userapp-google-chrome.desktop;
application/x-extension-xhtml=userapp-google-chrome.desktop;
application/x-extension-xht=userapp-google-chrome.desktop;
image/jpeg=viewnior.desktop;gpicview.desktop;
image/png=viewnior.desktop;gpicview.desktop;
text/plain=gvim.desktop;mousepad.desktop;
x-scheme-handler/mailto=userapp-Thunderbird.desktop;
message/rfc822=userapp-Thunderbird.desktop;
application/pdf=epdfview.desktop;
application/x-bittorrent=deluge.desktop;
x-scheme-handler/rdp=org.remmina.Remmina.desktop;
x-scheme-handler/spice=org.remmina.Remmina.desktop;
x-scheme-handler/vnc=org.remmina.Remmina.desktop;
x-scheme-handler/remmina=org.remmina.Remmina.desktop;
application/x-remmina=org.remmina.Remmina.desktop;
text/x-python=gvim.desktop;

View File

@@ -0,0 +1,201 @@
# morc_menu_v1.conf
# configuration file in support of morc_menu
#
# NOTE: All definitions must begin at the beginning of a line, ie. no
# leading whitespace.
# To begin allowing you to customize the 'look' or 'skin' of the menu,
# some explanation is called for: By default, the script uses a
# low-resource front-end application called 'dmenu' to present its
# menus. In this configuration file, you are be able to change the
# parameters that the script uses to invoke 'dmenu', or you may
# replace 'dmenu' with another front-end. The script has been tested
# with front-ends 'rofi' and 'zenity', and may also work with 'yada'
# and others. The script also allows you to import 'look' and 'skin'
# data from definitions in other configuration files, to help you
# maintain a consistent 'look' across different programs.
# If you wish to import import 'look' and 'skin' data from definitions
# in other configuration files, you may need to perform that first,
# before defining how you wish to invoke your chosen front-end
# (sensible, as in that situation, the invocation will be using
# definitions from those files). You may define as many
# 'external_definition_file's as you like. They will be read in the
# order you present them here, so in a case of conflicting
# definitions, the last one 'wins'. If the file does not exist or
# can't be read, it is ignored, and the script continues. The script
# will only read lines in the form 'foo=bar'. In our default example
# we are reading a configuration file meant for 'dmenu' usage.
external_skin_definition_file=${HOME}/.dmenurc
# Customize where on the screen you wish the menu to appear. If you
# want the menu to appear at wherever the mouse pointer is resting,
# set the variable 'use_mouse_position' to 'TRUE', and you're done -
# the script will figure out the correct x and y positions at
# run-time.
# use_mouse_position=TRUE
use_mouse_position=TRUE
# Otherwise, the script will always place the menu at the 'x_position'
# and 'y_position' definitions you set below. All the numeric values
# in this block are measured in pixels.
# IMPORTANT:
# Menu positioning only works when the 'menu_cmd' definition below
# correctly uses the string literals X_POSITION, Y_POSITION, as is
# the case in the default and in the examples below. Additionally,
# MENU_LINES and MENU_WIDTH must be correctly used, as in the
# examples below, in order for dynamically positioned menus not to
# try to display beyond the screen edge, and for there not to
# display unnecessary whitespace.
x_position=300
y_position=20
# Until we learn how to directly measure font width and height, we
# need to set 'line_height', 'avg_char_width', and 'menu_width'
# manually by trial and error. If 'avg_char_width' is not zero, then
# 'menu_width' will be ignored, and the value will be calculated at
# run-time.
line_height=20
avg_char_width=9
avg_err_char_width=10
menu_width=350
err_menu_width=350
# The third and final, step in customizing the 'look' or 'skin' of the
# menu is to modify how the script invokes its menu command
# ('menu_cmd') and its error notification (error_cmd'). In general,
# the options available to you are limited by those of your chosen
# front-end, so refer to its man page and other documentation.
# Additionally, you may refer to variables defined in one of the
# 'external_skin_definition_file's you specified above, and you may
# use variables 'x_position' and 'y_position' to set where on the
# screen you want your menu. Below is the default and some examples.
# IMPORTANT:
# In order for the script to properly position the menu, these
# definitions must include parameters that correctly use the string
# literals X_POSITION, Y_POSITION, MENU_LINES, and MENU_WIDTH, as is
# the case in the default and in the examples below. Additionally,
# MENU_LINES and MENU_WIDTH must be correctly used, as in the
# examples below, in order for dynamically positioned menus not to
# try to display beyond the screen edge, and for there not to
# display unnecessary whitespace.
#
# EXAMPLE MENU COMMANDS
# =====================
# 1] The script's default, using the plain version of 'dmenu'
# menu_cmd="dmenu -i -l MENU_LINES "
# 2] Using the extra features of 'dmenu-manjaro' (or other versions
# of dmenu packaged with the official patches, eg. 'xyw')
# menu_cmd="dmenu -i -l MENU_LINES -x X_POSITION -y Y_POSITION -w MENU_WIDTH "
# 3] Using a variable defined in an external_skin_definition_file,
# in this case ${HOME}/.dmenurc
# menu_cmd="dmenu -i -l MENU_LINES -x X_POSITION -y Y_POSITION -w MENU_WIDTH ${DMENU_OPTIONS}"
# 4] Using 'zenity' and 'rofi' - Because there ought to be some
# reward for reading all this documentation, note the use of
# the embedded linux command 'uname' to set the zenity column title.
# menu_cmd="zenity --list --column=$(uname -no) "
# menu_cmd="rofi -dmenu -i "
menu_cmd="dmenu -i -l MENU_LINES "
# Customize the 'look' or 'skin' of the error messages by modifying
# the following string, which, as above for the menu command, will be
# used to invoke your choice of menu front end.
# Using 'dmenu' (the default)
#error_cmd="dmenu -i -l 40 -nb red -nf black -fn DejaVu"
error_cmd="dmenu -i -l 40 -nb red -nf black -fn DejaVu"
# Using 'dmenu-manjaro'
#error_cmd="dmenu -i -l 40 -x 500 -y 150 -w MENU_WIDTH -nb red -nf black -fn DejaVu"
# error_cmd="zenity --error "
# error_cmd="rofi -dmenu -i "
# Distinguish between an executable item and a sub-menu selection.
# WARNING: Your customizations for the combination of the following
# two variables, menu_prefix and menu_suffix, must uniquely
# distinguish a sub-menu entry from an executable, in order for the
# script to do just that. Thus, for example, if you set both variables
# to NULL, the script will think all entries are sub-menu identifiers,
# and no application entry will execute.
menu_prefix=" [menu]: "
menu_suffix=" >"
# If a 'menu_suffix' is defined, you can have the script align all
# vertically, but this only works if you are using a fixed width font,
# so if you've selected a proportional font, set 'align_suffix' to
# 'FALSE'.
align_suffix=TRUE
# Desired categories: Any single .desktop definition can include an
# arbitrarily long list of categories for itself, which would bloat
# the menu with duplicate clutter, so the following space-delimited
# variable white-lists the desired categories.
desired_categories="Favorites Settings Development Documentation Education System Network Utility Graphics Office AudioVideo"
# Category aliases: The common convention seems to be to rename some
# categories, as in the default below. We implement the renaming sing
# an associative array in which the index is the category as defined
# in the .desktop file, and the value is the desired output
declare -A category_aliases=( [Utility]=Accessories [AudioVideo]=Multimedia [Network]=Internet )
# Unwanted names, execs, and specifics: Entries with these names or
# execution statements should be black-listed from the menu, depending
# upon the value of variables 'exclude_from_static' and
# 'exclude_from_dynamic'. Note that this will NEVER be done for an xml
# input file, as the purpose of that command is to show what the
# external xml generator produces. Likewise, it will never be done for
# commands 'build usr' and 'build loc'. The lists are bash arrays, so
# all rules for that data structure apply. The array
# 'unwanted_specific' is meant for the special case in which a name or
# exec may have identical entries in multiple categories and only some
# of them are desired excluded. In such a case, place into the array
# 'unwanted_specific' an entry in the form of the script's menu txt
# file entry. ie "Category---Name---Execution_string" where "---" is
# the field delimiter, and spaces are permitted within fields when the
# entire entry is properly quoted.
unwanted_names=( )
unwanted_execs=( )
unwanted_specifics=( )
exclude_from_static="FALSE"
exclude_from_dynamic="TRUE"
# Additional entries: Force inclusion of entries on this list,
# depending upon the values of variables 'add_to_static' and
# 'add_to_dynamic'. Note that this will NEVER be done for an xml input
# file, as the purpose of that command is to show what the external
# xml generator produces. Likewise, it will never be done for commands
# 'build usr' and 'build loc'. The list is a bash array, so all rules
# for that data structure apply. Each entry is in the form of the
# script's menu txt file entries. ie
# "Category---Name---Execution_string" where "---" is the field
# delimiter, and spaces are permitted within fields when the entire
# entry is properly quoted. In order to add an entry to your list of
# 'favorites', ie. those that appear at the top of the main menu, not
# under any category, use category '000'
additional_entries=( )
add_to_static="FALSE"
add_to_dynamic="TRUE"
# Maximum number of backups to keep: because almost no one will notice
# accumulating cruft. Backups are automatically created in the user's
# ${HOME}/.config/morc_menu folder, in the form
# "morc_menu${ext}_%y-%m-%d-%T" where ${ext} is either ".txt"
# or "_xml.txt" and the suffix is a timestamp. If you want to keep a
# particular backup forever, rename it to fail a match against
# "morc_menu${ext}_*"
max_num_backups=5
# Information about the menu and how to customize it are by default
# presented in a trailng menu entry "about morc_menu". You may exclude
# presentation of that menu item by setting 'exclude_about' to TRUE
#exclude_about="TRUE"
exclude_about="FALSE"
# Reading a system-wide menu definition file: By default, if morc_menu
# finds a menu definition file at /etc/morc_menu.txt, it kind of
# cheats in that it uses that file instead of creating one
# dynamically. You may over-ride this behavior by setting
# 'ignore_system_txt='True'. The 'cheat' is supposedly in the interest
# of nominal speed and efficiency (at possible cost of accuracy), and
# the system-wide file would only exist by system-administrator action
# / consent / recklessness. Consult your sysadmin to learn how the
# system-wide definition file is created and updated in your
# particular case. Common ways are by using 'inotify' to monitor
# changes in /usr/share/applications, or by applying hooks to the
# system's package management system.
ignore_system_txt="FALSE"

View File

@@ -0,0 +1,4 @@
[xin_-1]
file=/home/dtodd/Pictures/Wallpapers/arctic-fox.jpg
mode=5
bgcolor=#002a36

View File

@@ -0,0 +1,12 @@
[geometry]
posx=-1
posy=-1
sizex=450
sizey=500
[nitrogen]
view=icon
recurse=true
sort=alpha
icon_caps=false
dirs=/home/dtodd/Pictures/Wallpapers;

View File

@@ -0,0 +1,38 @@
from ranger.api.commands import Command
class paste_as_root(Command):
def execute(self):
if self.fm.do_cut:
self.fm.execute_console('shell sudo mv %c .')
else:
self.fm.execute_console('shell sudo cp -r %c .')
class fzf_select(Command):
"""
:fzf_select
Find a file using fzf.
With a prefix argument select only directories.
See: https://github.com/junegunn/fzf
"""
def execute(self):
import subprocess
import os.path
if self.quantifier:
# match only directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -type d -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse --header='Jump to file'"
else:
# match files and directories
command="find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \
-o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m --reverse --header='Jump to filemap <C-f> fzf_select'"
fzf = self.fm.execute_command(command, universal_newlines=True, stdout=subprocess.PIPE)
stdout, stderr = fzf.communicate()
if fzf.returncode == 0:
fzf_file = os.path.abspath(stdout.rstrip('\n'))
if os.path.isdir(fzf_file):
self.fm.cd(fzf_file)
else:
self.fm.select_file(fzf_file)

View File

@@ -0,0 +1,219 @@
#!/usr/bin/python
# coding=UTF-8
# These glyphs, and the mapping of file extensions to glyphs
# has been copied from the vimscript code that is present in
# https://github.com/ryanoasis/vim-devicons
import re;
import os;
# all those glyphs will show as weird squares if you don't have the correct patched font
# My advice is to use NerdFonts which can be found here:
# https://github.com/ryanoasis/nerd-fonts
file_node_extensions = {
'7z' : '',
'ai' : '',
'apk' : '',
'avi' : '',
'bat' : '',
'bmp' : '',
'bz2' : '',
'c' : '',
'c++' : '',
'cab' : '',
'cc' : '',
'clj' : '',
'cljc' : '',
'cljs' : '',
'coffee' : '',
'conf' : '',
'cp' : '',
'cpio' : '',
'cpp' : '',
'css' : '',
'cxx' : '',
'd' : '',
'dart' : '',
'db' : '',
'deb' : '',
'diff' : '',
'dump' : '',
'edn' : '',
'ejs' : '',
'epub' : '',
'erl' : '',
'f#' : '',
'fish' : '',
'flac' : '',
'flv' : '',
'fs' : '',
'fsi' : '',
'fsscript' : '',
'fsx' : '',
'gem' : '',
'gif' : '',
'go' : '',
'gz' : '',
'gzip' : '',
'hbs' : '',
'hrl' : '',
'hs' : '',
'htm' : '',
'html' : '',
'ico' : '',
'ini' : '',
'java' : '',
'jl' : '',
'jpeg' : '',
'jpg' : '',
'js' : '',
'json' : '',
'jsx' : '',
'less' : '',
'lha' : '',
'lhs' : '',
'log' : '',
'lua' : '',
'lzh' : '',
'lzma' : '',
'markdown' : '',
'md' : '',
'mkv' : '',
'ml' : 'λ',
'mli' : 'λ',
'mov' : '',
'mp3' : '',
'mp4' : '',
'mpeg' : '',
'mpg' : '',
'mustache' : '',
'ogg' : '',
'pdf' : '',
'php' : '',
'pl' : '',
'pm' : '',
'png' : '',
'psb' : '',
'psd' : '',
'py' : '',
'pyc' : '',
'pyd' : '',
'pyo' : '',
'rar' : '',
'rb' : '',
'rc' : '',
'rlib' : '',
'rpm' : '',
'rs' : '',
'rss' : '',
'scala' : '',
'scss' : '',
'sh' : '',
'slim' : '',
'sln' : '',
'sql' : '',
'styl' : '',
'suo' : '',
't' : '',
'tar' : '',
'tgz' : '',
'ts' : '',
'twig' : '',
'vim' : '',
'vimrc' : '',
'wav' : '',
'xml' : '',
'xul' : '',
'xz' : '',
'yml' : '',
'zip' : '',
}
dir_node_exact_matches = {
# English
'.git' : '',
'Desktop' : '',
'Documents' : '',
'Downloads' : '',
'Dropbox' : '',
'Music' : '',
'Pictures' : '',
'Public' : '',
'Templates' : '',
'Videos' : '',
# French
'Bureau' : '',
'Documents' : '',
'Images' : '',
'Musique' : '',
'Publique' : '',
'Téléchargements' : '',
'Vidéos' : '',
# Portuguese
'Documentos' : '',
'Imagens' : '',
'Modelos' : '',
'Música' : '',
'Público' : '',
'Vídeos' : '',
'Área de trabalho' : '',
# Italian
'Documenti' : '',
'Immagini' : '',
'Modelli' : '',
'Musica' : '',
'Pubblici' : '',
'Scaricati' : '',
'Scrivania' : '',
'Video' : '',
# German
'Bilder' : '',
'Dokumente' : '',
'Musik' : '',
'Schreibtisch' : '',
'Vorlagen' : '',
'Öffentlich' : '',
}
file_node_exact_matches = {
'.Xdefaults' : '',
'.Xresources' : '',
'.bashprofile' : '',
'.bashrc' : '',
'.dmrc' : '',
'.ds_store' : '',
'.fasd' : '',
'.gitconfig' : '',
'.gitignore' : '',
'.jack-settings' : '',
'.mime.types' : '',
'.nvidia-settings-rc' : '',
'.pam_environment' : '',
'.profile' : '',
'.recently-used' : '',
'.selected_editor' : '',
'.vimrc' : '',
'.xinputrc' : '',
'config' : '',
'dropbox' : '',
'exact-match-case-sensitive-1.txt' : 'X1',
'exact-match-case-sensitive-2' : 'X2',
'favicon.ico' : '',
'gruntfile.coffee' : '',
'gruntfile.js' : '',
'gruntfile.ls' : '',
'gulpfile.coffee' : '',
'gulpfile.js' : '',
'gulpfile.ls' : '',
'ini' : '',
'ledger' : '',
'license' : '',
'mimeapps.list' : '',
'node_modules' : '',
'procfile' : '',
'react.jsx' : '',
'user-dirs.dirs' : '',
}
def devicon(file):
if file.is_directory: return dir_node_exact_matches.get(file.relative_path, '')
return file_node_exact_matches.get(file.relative_path, file_node_extensions.get(file.extension, ''))

View File

@@ -0,0 +1,22 @@
import os
terminal=terminal=os.getenv('TERM')
if terminal != 'linux':
import ranger.api
from ranger.core.linemode import LinemodeBase
from devicons import *
@ranger.api.register_linemode
class DevIconsLinemode(LinemodeBase):
name = "devicons"
uses_metadata = False
def filetitle(self, file, metadata):
return devicon(file) + ' ' + file.relative_path
@ranger.api.register_linemode
class DevIconsLinemodeFile(LinemodeBase):
name = "filename"
def filetitle(self, file, metadata):
return devicon(file) + ' ' + file.relative_path

619
home/.config/ranger/rc.conf Normal file
View File

@@ -0,0 +1,619 @@
# ===================================================================
# This file contains the default startup commands for ranger.
# To change them, it is recommended to create the file
# ~/.config/ranger/rc.conf and add your custom commands there.
#
# If you copy this whole file there, you may want to set the environment
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
#
# The purpose of this file is mainly to define keybindings and settings.
# For running more complex python code, please create a plugin in "plugins/" or
# a command in "commands.py".
#
# Each line is a command that will be run before the user interface
# is initialized. As a result, you can not use commands which rely
# on the UI such as :delete or :mark.
# ===================================================================
# ===================================================================
# == Options
# ===================================================================
# Which viewmode should be used? Possible values are:
# miller: Use miller columns which show multiple levels of the hierarchy
# multipane: Midnight-commander like multipane view showing all tabs next
# to each other
set viewmode miller
#set viewmode multipane
# How many columns are there, and what are their relative widths?
set column_ratios 1,3,4
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
# Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete never
# Which script is used to generate file previews?
# ranger ships with scope.sh, a script that calls external programs (see
# README.md for dependencies) to preview images, archives, etc.
set preview_script ~/.config/ranger/scope.sh
# Use the external preview script or display simple plain text or image previews?
set use_preview_script true
# Automatically count files in the directory, even before entering them?
set automatically_count_files true
# Open all images in this directory when running certain image viewers
# like feh or sxiv? You can still open selected files by marking them.
set open_all_images true
# Be aware of version control systems and display information.
set vcs_aware false
# State of the three backends git, hg, bzr. The possible states are
# disabled, local (only show local info), enabled (show local and remote
# information).
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
# Use one of the supported image preview protocols
set preview_images true
# Set the preview image method. Supported methods:
#
# * w3m (default):
# Preview images in full color with the external command "w3mimgpreview"?
# This requires the console web browser "w3m" and a supported terminal.
# It has been successfully tested with "xterm" and "urxvt" without tmux.
#
# * iterm2:
# Preview images in full color using iTerm2 image previews
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
# with image preview support.
#
# * urxvt:
# Preview images in full color using urxvt image backgrounds. This
# requires using urxvt compiled with pixbuf support.
#
# * urxvt-full:
# The same as urxvt but utilizing not only the preview pane but the
# whole terminal window.
set preview_images_method ueberzug
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis false
# Show dotfiles in the bookmark preview box?
set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default:
# default, jungle, snow, solarized
set colorscheme default
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
set preview_files true
set preview_directories true
set collapse_preview true
# Save the console history on exit?
set save_console_history true
# Draw the status bar on top of the browser window (default: bottom)
set status_bar_on_top false
# Draw a progress bar in the status bar which displays the average state of all
# currently running tasks which support progress bars?
set draw_progress_bar_in_status_bar true
# Draw borders around columns?
set draw_borders true
# Display the directory name in tabs?
set dirname_in_tabs false
# Enable the mouse support?
set mouse_enabled true
# Display the file size in the main column or status bar?
set display_size_in_main_column true
set display_size_in_status_bar true
# Display files tags in all columns or only in main column?
set display_tags_in_all_columns true
# Set a title for the window?
set update_title false
# Set the title to "ranger" in the tmux program?
set update_tmux_title false
# Shorten the title if it gets long? The number defines how many
# directories are displayed at once, 0 turns off this feature.
set shorten_title 3
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
set tilde_in_titlebar false
# How many directory-changes or console-commands should be kept in history?
set max_history_size 20
set max_console_history_size 50
# Try to keep so much space between the top/bottom border when scrolling:
set scroll_offset 8
# Flush the input after each key hit? (Noticeable when ranger lags)
set flushinput true
# Padding on the right when there's no preview?
# This allows you to click into the space to run the file.
set padding_right true
# Save bookmarks (used with mX and `X) instantly?
# This helps to synchronize bookmarks between multiple ranger
# instances but leads to *slight* performance loss.
# When false, bookmarks are saved when ranger is exited.
set autosave_bookmarks true
# You can display the "real" cumulative size of directories by using the
# command :get_cumulative_size or typing "dc". The size is expensive to
# calculate and will not be updated automatically. You can choose
# to update it automatically though by turning on this option:
set autoupdate_cumulative_size false
# Turning this on makes sense for screen readers:
set show_cursor false
# One of: size, natural, basename, atime, ctime, mtime, type, random
set sort natural
# Additional sorting options
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
set sort_unicode false
# Enable this if key combinations with the Alt Key don't work for you.
# (Especially on xterm)
set xterm_alt_key false
# Whether to include bookmarks in cd command
set cd_bookmarks true
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
# disable this feature.
set preview_max_size 0
# Add the highlighted file to the path in the titlebar
set show_selection_in_titlebar true
# The delay that ranger idly waits for user input, in milliseconds, with a
# resolution of 100ms. Lower delay reduces lag between directory updates but
# increases CPU load.
set idle_delay 2000
# When the metadata manager module looks for metadata, should it only look for
# a ".metadata.json" file in the current directory, or do a deep search and
# check all directories above the current one as well?
set metadata_deep_search false
# Clear all existing filters when leaving a directory
set clear_filters_on_dir_change false
# Disable displaying line numbers in main column
set line_numbers false
# ===================================================================
# == Local Options
# ===================================================================
# You can set local options that only affect a single directory.
# Examples:
# setlocal path=~/downloads sort mtime
# ===================================================================
# == Command Aliases in the Console
# ===================================================================
alias e edit
alias q quit
alias q! quitall
alias qa quitall
alias qall quitall
alias setl setlocal
alias filter scout -prt
alias find scout -aeit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefiklst
# ===================================================================
# == Define keys for the browser
# ===================================================================
# Basic
map Q quit!
map q quit
copymap q ZZ ZQ
map R reload_cwd
map <C-r> reset
map <C-l> redraw_window
map <C-c> abort
map <esc> change_mode normal
map ~ set viewmode!
map i display_file
map ? help
map W display_log
map w taskview_open
map S shell $SHELL
map : console
map ; console
map ! console shell%space
map @ console -p6 shell %%s
map # console shell -p%space
map s console shell%space
map r chain draw_possible_programs; console open_with%%space
#map f console find%space
map f console scout -ftsea%space
map cd console cd%space
# Change the line mode
map Mf linemode filename
map Mi linemode fileinfo
map Mm linemode mtime
map Mp linemode permissions
map Ms linemode sizemtime
map Mt linemode metatitle
# Tagging / Marking
map t tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map v mark_files all=True toggle=True
map uv mark_files all=True val=False
map V toggle_visual_mode
map uV toggle_visual_mode reverse=True
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
map <DELETE> console delete
map <INSERT> console touch%space
# VIM-like
copymap <UP> k
copymap <DOWN> j
copymap <LEFT> h
copymap <RIGHT> l
copymap <HOME> gg
copymap <END> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
# Jumping around
map H history_go -1
map L history_go 1
map ] move_parent 1
map [ move_parent -1
map } traverse
map gh cd ~
map ge cd /etc
map gu cd /usr
map gd cd /dev
map gl cd -r .
map gL cd -r %f
map go cd /opt
map gv cd /var
map gm cd /media
map gM cd /mnt
map gs cd /srv
map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g/ cd /
map g? cd /usr/share/doc/ranger
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
# Filesystem Operations
map = chmod
#map cw console rename%space
map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")
map a rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
map pp paste
map po paste overwrite=True
map pP paste append=True
map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
map pr paste_as_root
map dD console delete
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map dt cut mode=toggle
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
map yt copy mode=toggle
# Temporary workarounds
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map / console search%space
map n search_next
map N search_next forward=False
map ct search_next order=tag
map cs search_next order=size
map ci search_next order=mimetype
map cc search_next order=ctime
map cm search_next order=mtime
map ca search_next order=atime
# Tabs
map <C-n> tab_new ~
map <C-w> tab_close
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
map gt tab_move 1
map gT tab_move -1
map gn tab_new ~
map gc tab_close
map uq tab_restore
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
# Sorting
map or set sort_reverse!
map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
# Settings
map zc set collapse_preview!
map zd set sort_directories_first!
map zh set show_hidden!
map <C-h> set show_hidden!
map zI set flushinput!
map zi set preview_images!
map zm set mouse_enabled!
map zp set preview_files!
map zP set preview_directories!
map zs set sort_case_insensitive!
map zu set autoupdate_cumulative_size!
map zv set use_preview_script!
map zf console filter%space
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map m<any> set_bookmark %any
map um<any> unset_bookmark %any
map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# ===================================================================
# == Define keys for the console
# ===================================================================
# Note: Unmapped keys are passed directly to the console.
# Basic
cmap <tab> eval fm.ui.console.tab()
cmap <s-tab> eval fm.ui.console.tab(-1)
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
cmap <C-l> redraw_window
copycmap <ESC> <C-c>
copycmap <CR> <C-j>
# Move around
cmap <up> eval fm.ui.console.history_move(-1)
cmap <down> eval fm.ui.console.history_move(1)
cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
cmap <a-left> eval fm.ui.console.move_word(left=1)
cmap <a-right> eval fm.ui.console.move_word(right=1)
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
# And of course the emacs way
copycmap <up> <C-p>
copycmap <down> <C-n>
copycmap <left> <C-b>
copycmap <right> <C-f>
copycmap <home> <C-a>
copycmap <end> <C-e>
copycmap <delete> <C-d>
copycmap <backspace> <C-h>
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
# and <backspace2> (code 127). To be sure, use both.
copycmap <backspace> <backspace2>
# This special expression allows typing in numerals:
cmap <allow_quantifiers> false
# ===================================================================
# == Pager Keybindings
# ===================================================================
# Movement
pmap <down> pager_move down=1
pmap <up> pager_move up=1
pmap <left> pager_move left=4
pmap <right> pager_move right=4
pmap <home> pager_move to=0
pmap <end> pager_move to=-1
pmap <pagedown> pager_move down=1.0 pages=True
pmap <pageup> pager_move up=1.0 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <C-u> pager_move up=0.5 pages=True
copypmap <UP> k <C-p>
copypmap <DOWN> j <C-n> <CR>
copypmap <LEFT> h
copypmap <RIGHT> l
copypmap <HOME> g
copypmap <END> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
pmap <C-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
# ===================================================================
# == Taskview Keybindings
# ===================================================================
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
default_linemode devicons
# find
map <C-f> fzf_select

121
home/.config/ranger/scope.sh Executable file
View File

@@ -0,0 +1,121 @@
#!/usr/bin/env sh
# ranger supports enhanced previews. If the option "use_preview_script"
# is set to True and this file exists, this script will be called and its
# output is displayed in ranger. ANSI color codes are supported.
# NOTES: This script is considered a configuration file. If you upgrade
# ranger, it will be left untouched. (You must update it yourself.)
# Also, ranger disables STDIN here, so interactive scripts won't work properly
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | success. display stdout as preview
# 1 | no preview | failure. display no preview at all
# 2 | plain text | display the plain content of the file
# 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)
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=$(/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 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
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:
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" - && \
{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
# 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; }
try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
;; # fall back to highlight/cat if the text browsers fail
esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
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;;
# Display information about media files:
video/* | audio/*)
exiftool "$path" && exit 5
# Use sed to remove spaces so the output fits into the narrow window
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
esac
exit 1

View File

@@ -0,0 +1,27 @@
[global_config]
title_transmit_fg_color = "#161821"
title_transmit_bg_color = "#89b8c2"
title_inactive_fg_color = "#c6c8d1"
title_inactive_bg_color = "#6b7089"
enabled_plugins = APTURLHandler, LaunchpadCodeURLHandler, LaunchpadBugURLHandler
[profiles]
[[default]]
palette = "#161821:#e27878:#b4be82:#e2a478:#84a0c6:#a093c7:#89b8c2:#c6c8d1:#6b7089:#e98989:#c0ca8e:#e9b189:#91acd1:#ada0d3:#95c4ce:#d2d4de"
foreground_color = "#c6c8d1"
background_color = "#161821"
cursor_color = "#c6c8d1"
#background_darkness = 0.77
#background_type = transparent
scrollback_infinite = True
[layouts]
[[default]]
[[[child1]]]
type = Terminal
parent = window0
profile = default
[[[window0]]]
type = Window
parent = ""
[plugins]

View File

@@ -0,0 +1,19 @@
[prefs]
zoom-mode=0
fit-on-fullscreen=true
show-hidden=false
smooth-images=true
confirm-delete=true
reload-on-save=false
show-menu-bar=false
show-toolbar=true
show-scrollbar=true
start-maximized=false
slideshow-timeout=5
auto-resize=false
behavior-wheel=1
behavior-click=0
behavior-modify=0
jpeg-quality=90
png-compression=9
desktop=9

View File

@@ -0,0 +1,26 @@
[Alsa]
card=HDA Intel PCH
channel=Master
[Notification]
show_notification=true
notification_type=1
[StatusIcon]
stepsize=5
onclick=urxvt -e 'alsamixer'
theme=White Gnome
use_panel_specific_icons=true
lmb_slider=true
mmb_mute=true
use_horizontal_slider=false
show_sound_level=true
use_transparent_background=true
[Hotkeys]
up_enabled=true
down_enabled=true
mute_enabled=true
up=XF86AudioRaiseVolume
down=XF86AudioLowerVolume
mute=XF86AudioMute

22
home/.dmenurc Executable file
View File

@@ -0,0 +1,22 @@
# Configuration for D-Menu (I use rofi mostly, this is usually forgotten about)
## define the font for dmenu to be used
DMENU_FN="Source Code Pro Semibold 10.5"
## background colour for unselected menu-items
DMENU_NB="#6b7089"
## textcolour for unselected menu-items
DMENU_NF="#c6c8d1"
## background colour for selected menu-items
DMENU_SB="#89b8c2"
## textcolour for selected menu-items
DMENU_SF="#161821"
## command for the terminal application to be used:
TERMINAL_CMD="terminal -e"
## export our variables
DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"

4
home/.dmrc Normal file
View File

@@ -0,0 +1,4 @@
# LightDM configuration
[Desktop]
Session=i3

48
home/.environment Normal file
View File

@@ -0,0 +1,48 @@
# Skip all this for non-interactive shells
[[ -z "$PS1" ]] && return
# Force en_US UTF-8 environment
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
# Terminal Editor
export EDITOR=vim
# Paths
export PATH=${HOME}/bin:$PATH:/usr/lib/wine/bin:/sbin:/usr/sbin:/usr/local/bin
# Give the path to the dotfiles
export _DOTFILES="${HOME}/dotfiles"
# Allow checking for automatic updates
export ENABLE_DOTFILES_AUTO_UPDATE=true
# Set "true" to update without asking first
export DISABLE_DOTFILES_UPDATE_PROMPT=false
# Update every 2 weeks (OMZ default)
export UPDATE_DOTFILES_DAYS=13
# Whether or not to automatically connect to a TMUX session when opening the shell
export ENABLE_TMUXAC=false
# If there is not an active tmux session, we probably want one
# Otherwise, the shell will not open the session again (eg. opening tabs, new terminals)
if $(tmux list-sessions >> /dev/null 2>&1); then
export TMUXATT=true
else
export TMUXATT=false
fi
# Automatically attach tmux session "C0DE"
if [[ -z "$TMUX" && "$TMUXATT" && "$ENABLE_TMUXAC" ]]; then
tmux attach -t C0DE || tmux new -s C0DE
fi
# Enable shell-history for interactive shells
# https://github.com/pawamoy/shell-history
#if [[ $- == *i* ]] && command -v shellhistory-location &>/dev/null; then
# . $(shellhistory-location)
# shellhistory enable
#fi

91
home/.functions Normal file
View File

@@ -0,0 +1,91 @@
# Functions gathered from around the internet
# Takes 1st argument and attempts to extract them in the current directory
extract () { # Extracts most common compressed files
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Takes 1st argument and makes a .tar.gz archive
maketgz() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; }
# Takes 1st argument and makes a .zip archive
makezip() { zip -r "${1%%/}.zip" "$1" ; }
# Generate password - 1st argument is the number of characters, defaults to 20
gpass() {
local l=$1
[ "$l" == "" ] && l=20
tr -dc A-Za-z0-9-!@%^*_ < /dev/urandom | head -c ${l} | xargs
}
# Shows the current PS list for the signed in user - Not cygwin compatible
myps() { ps $@ -u $USER -o pid,%cpu,%mem,bsdtime,command ; }
# Searches the process list (ps) for 1st argument
psgrep() {
if [ ! -z $1 ] ; then
echo "Grepping for processes matching $1..."
ps aux | grep $1 | grep -v grep
else
echo "!! Need name to grep for"
fi
}
# dirsize - finds directory sizes and lists them for the current directory
dirsize (){
du -shx * .[a-zA-Z0-9_]* 2> /dev/null | \
egrep '^ *[0-9.]*[MG]' | sort -n > /tmp/list
egrep '^ *[0-9.]*M' /tmp/list
egrep '^ *[0-9.]*G' /tmp/list
rm -rf /tmp/list
}
# Usage: up <Number of directories>. Blank for up one dir.
up() {
local d=""
limit=$1
for ((i=1; i <= limit; i++)); do
d=$d/..
done
d=$(echo $d | sed 's/^\///')
if [ -z "$d" ]; then
d=..
fi
cd $d
}
# Search inside files for a string
# Usage: search <regex string>
search () {
grep -r "$1" | fzf
}
# Search for a file by its name
# Usage: ff <filename> (optional) <max depth>
ff() { #find file
if [ -z "${2}" ]; then
find . -type f -iname "*${1}*"
else
find . -type f -maxdepth "${2}" -iname "*${1}*"
fi
}
# Search for a file by its name and edit it
# Usage: vf <filename> (optional) <max depth>
vf() { vim "$(ff "$@" | fzf)"; }
# Usage: replay <number of commands> to repeat. Blank for 1
replay() {
from="${1:-2}"
to="${2:-1}"
if [ "$from" -ne "$to" ]; then
for i in `seq "$from" -1 "$(($to + 1))"`; do
printf "$(fc -ln -${i} -${i}) && "
done
fi
$(fc -ln -${to} -${to})
}

51
home/.gitconfig Normal file
View File

@@ -0,0 +1,51 @@
[core]
excludesfile = ~/.gitignore
editor = vim
whitespace = trailing-space,space-before-tab
autocrlf = false
safecrlf = true
preloadindex = 1
pager = less -R
[apply]
whitespace = fix
[color]
ui = auto
interactive = true
status = true
branch = true
diff = true
[push]
default = tracking
[alias]
lol = log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
st = status -sb
lerl = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
changelog = log --graph --pretty=format:'[%h] -%d %s (%cr) (%an)' --abbrev-commit --no-merges
df = diff
rpull = pull --rebase --stat
pullr = pull --rebase
unstage = reset
dfc = diff --cached
mergemaster = mergetool
ci = commit -v
push-with-tags = !git push && git push --tags
pull-with-submodules = !git pull && git submodule update --init
rpull-with-submodules = !git pull --rebase --stat && git submodule update --init
freeze = !git-freeze
tags = log -n1 --pretty=format:%h%d
[merge]
tool = vimdiff
[mergetool "fugitive"]
cmd = fugitive vim -f -c \"Gdiff\" \"$MERGED\"
[user]
email = dtodd@oceantech.com
name = David Todd
[include]
path = ~/.githubtokens
path = ~/.dotoverrides/gitconfig
[diff]
guitool = kdiff3
[difftool "kdiff3"]
path = /usr/bin/kdiff3
[pull]
rebase = true

139
home/.stalonetrayrc Normal file
View File

@@ -0,0 +1,139 @@
# vim:filetype=config:tw=80:et
#
# This is sample ~/.stalonetrayrc, resembling default configuration.
# Remember: command line parameters take precedence.
#
# Directives introduced in 0.8 are marked with "NEW in 0.8"
#
####################################################################
#
# stalonetray understands following directives
#
####################################################################
# background <color> # color can be specified as an HTML hex triplet or
# as a name from rgb.txt, note that '#' must be quoted
background "#6b7089"
# decorations <decspec> # set trays window decorations; possible values for
# decspec are: all, title, border, none
decorations none
# display <display name> # as usual
# dockapp_mode <mode> # set dockapp mode, which can be either simple (for
# e.g. OpenBox, wmaker for WindowMaker, or none
# (default). NEW in 0.8.
dockapp_mode none
# fuzzy_edges [<level>] # enable fuzzy edges and set fuzziness level. level
# can be from 0 (disabled) to 3; this setting works
# with tinting and/or transparent and/or pixmap
# backgrounds
fuzzy_edges 0
# geometry <geometry> # tray's geometry in standard X notation; width and
# height are specified in slot_size multiples
geometry 1x1+0+0
# grow_gravity <gravity> # one of N, S, E, W, NW, NE, SW, SE; tray will grow
# in the direction opposite to one specified by
# grow_gravity; if horizontal or vertical
# direction is not specified, tray will not grow in
# that direction
grow_gravity NW
# icon_gravity <gravity> # icon placement gravity, one of NW, NE, SW, SE
icon_gravity NW
# icon_size <int> # specifies dimensions of typical icon slot
icon_size 24
# log_level <level> # controls the amount of logging output, level can
# be err (default), info, or trace (enabled only
# when stalonetray configured with --enable-debug)
# NEW in 0.8.
log_level err
# kludges kludge[,kludge] # enable specific kludges to work around
# non-conforming WMs and/or stalonetray bugs.
# NEW in 0.8. Argument is a
# comma-separated list of
# * fix_window_pos - fix tray window position on
# erroneous moves by WM
# * force_icons_size - ignore resize events on all
# icons; force their size to be equal to
# icon_size
# * use_icon_hints - use icon window hints to
# dtermine icon size
kludges force_icons_size
# max_geometry <geometry> # maximal tray dimensions; 0 in width/height means
# no limit
max_geometry 0x0
# no_shrink [<bool>] # disables shrink-back mode
no_shrink false
# parent_bg [<bool>] # whether to use pseudo-transparency
# (looks better when reparented into smth like FvwmButtons)
parent_bg false
# pixmap_bg <path_to_xpm> # use pixmap from specified xpm file for (tiled) background
# pixmap_bg /home/user/.stalonetraybg.xpm
# scrollbars <mode> # enable/disable scrollbars; mode is either
# vertical, horizontal, all or none (default)
# NEW in 0.8.
scrollbars none
# scrollbars-size <size> # scrollbars step in pixels; default is slot_size / 4
# scrollbars-step 8
# scrollbars-step <step> # scrollbars step in pixels; default is slot_size / 2
# scrollbars-step 32
# slot_size <int> # specifies size of icon slot, defaults to
# icon_size NEW in 0.8.
# skip_taskbar [<bool>] # hide tray`s window from the taskbar
skip_taskbar true
# sticky [<bool>] # make a tray`s window sticky across the
# desktops/pages
sticky true
# tint_color <color> # set tinting color
tint_color white
# tint_level <level> # set tinting level; level ranges from 0 (disabled)
# to 255
tint_level 0
# transparent [<bool>] # whether to use root-transparency (background
# image must be set with Esetroot or compatible utility)
transparent false
# vertical [<bool>] # whether to use vertical layout (horisontal layout
# is used by default)
vertical false
# window_layer <layer> # set the EWMH-compatible window layer; one of:
# bottom, normal, top
window_layer normal
# window_strut <mode> # enable/disable window struts for tray window (to
# avoid converting of tray window by maximized
# windows); mode defines to which screen border tray
# will be attached; it can be either top, bottom,
# left, right, none or auto (default)
window_strut auto
# window_type <type> # set the EWMH-compatible window type; one of:
# desktop, dock, normal, toolbar, utility
window_type utility
# xsync [<bool>] # whether to operate on X server synchronously (SLOOOOW)
xsync false

201
home/.tmux.conf Normal file
View File

@@ -0,0 +1,201 @@
# 0 is too far from `
set -g base-index 1
# Turn on mouse stuff
set-option -g mouse off
# Turn off automatic window naming
set-option -g allow-rename off
# Unbind the Page keys as they interfere with VIM
unbind Pageup
unbind Pagedown
# Change Kill window behavior
#unbind C-&
unbind &
bind k confirm kill-pane
bind K confirm kill-window
# Change our prefix to not have to move my fingers as far
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Split with pipe and dash
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Reload with C-r
bind r source-file ~/.tmux.conf
# Switch Panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Switch windows alt+number
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
bind-key -n M-0 select-window -t 0
# Resize panes without prefix
bind -n M-< resize-pane -L 1
bind -n M-> resize-pane -R 1
# Display visual indicator about which pane is what
bind-key w display-panes
# Sets tmux scrollback history
set -g history-limit 5000
# Syncronizes keys typed in one pane across all panes, press again to disable
bind-key y setw synchronize-panes
#
#######################
#### DESIGN CHANGES ###
#######################
#
## panes
#set -g pane-border-fg black
#set -g pane-active-border-fg brightred
#
### Status bar design
## status line
#set -g status-utf8 on
#set -g status-justify left
#set -g status-bg default
#set -g status-fg colour12
#set -g status-interval 2
#
## messaging
#set -g message-fg black
#set -g message-bg yellow
#set -g message-command-fg blue
#set -g message-command-bg black
#
##window mode
#setw -g mode-bg colour6
#setw -g mode-fg colour0
#
## window status
#setw -g window-status-format " #F#I:#W#F "
#setw -g window-status-current-format " #F#I:#W#F "
#setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
#setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
#setw -g window-status-current-bg colour0
#setw -g window-status-current-fg colour11
#setw -g window-status-current-attr dim
#setw -g window-status-bg green
#setw -g window-status-fg black
#setw -g window-status-attr reverse
#
## Info on left (I don't have a session display for now)
#set -g status-left ''
#
## loud or quiet?
#set-option -g visual-activity off
#set-option -g visual-bell off
#set-option -g visual-silence off
#set-window-option -g monitor-activity off
#set-option -g bell-action none
#
## Colors
#set -g default-terminal "screen-256color"
#
## The modes {
#setw -g clock-mode-colour colour135
#setw -g mode-attr bold
#setw -g mode-fg colour196
#setw -g mode-bg colour238
#
## }
## The panes {
#
#set -g pane-border-bg colour235
#set -g pane-border-fg colour238
#set -g pane-active-border-bg colour236
#set -g pane-active-border-fg colour51
#
## }
## The statusbar {
#
#set -g status-position bottom
#set -g status-bg colour234
#set -g status-fg colour137
#set -g status-attr dim
#set -g status-left '#{prefix_highlight}'
#set -g status-right '#{net_speed} #[fg=yellow]#(hostname)#[default] #[fg=colour234,bg=colour241,bold] %m/%d #[fg=colour233,bg=colour245,bold] %H:%M:%S '
#set -g status-right-length 70
#set -g status-left-length 4
#
#setw -g window-status-current-fg colour81
#setw -g window-status-current-bg colour238
#setw -g window-status-current-attr bold
#setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
#
#setw -g window-status-fg colour138
#setw -g window-status-bg colour235
#setw -g window-status-attr none
#setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
#
#setw -g window-status-bell-attr bold
#setw -g window-status-bell-fg colour255
#setw -g window-status-bell-bg colour1
#
## }
## The messages {
#
#set -g message-attr bold
#set -g message-fg colour232
#set -g message-bg colour166
#
## }
#
# Load Iceberg theme
source-file ~/.tmux/iceberg.tmux.conf
# Iceberg-specific settings
# Powerline separators
separator_left="\ue0b0"
separator_right="\ue0b2"
subseparator_left="\ue0b1"
subseparator_right="\ue0b3"
# List your plugins here
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
# Plugin settings here
set -g @continuum-restore 'on'
# Automatically install TPM plugins (eg. first launch)
setenv -g TMUX_PLUGIN_MANAGER_PATH '$HOME/.tmux/plugins/'
# Install TPM if it does not exist
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

57
home/.vimrc Normal file
View File

@@ -0,0 +1,57 @@
" Syntax highlighting based on detected language
syntax on
" Iceberg theme - I also use this theme in VSCode
colorscheme iceberg
" Default GUI Window Geometry
if has("gui_running")
" Preferred window size
set lines=29 columns=105
endif
" Show tabs at the top of the editor
set showtabline=2
" Render newlines with '$'
" Render Tabs with '>-'
" Render Trailing Whitespace with '~'
" Extends and Precedes are for Line Wrapping
set list
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
" Turn on Line numbering
set number
" Highlight all strings that match search
set hlsearch
" Turn on Mouse Aware mode, does lots of stuff
" What we're most interested in is the fact that
" it won't let us highlight the line numbers
set mouse+=a
" Yank and Paste using the system clipboard
set clipboard=unnamedplus
" Convert tabs to spaces
" Tabs are 4 spaces wide
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
" Golang Specific stuff
" Go syntax highlighting
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_operators = 1
" Auto formatting and importing
let g:go_fmt_autosave = 1
let g:go_fmt_command = "goimports"
" Status line types/signatures
let g:go_auto_type_info = 1
execute pathogen#infect()
filetype plugin indent on

72
home/.zshrc Normal file
View File

@@ -0,0 +1,72 @@
# Include our shared environment stuff
source ~/.environment
source ~/.aliases
source ~/.functions
# History Settings
export HISTIGNORE="&:ls:[bf]g:exit:reset:clear:cd:cd ..:cd..:replay"
export HISTSIZE=25000
export HISTFILE=~/.zsh_history
export SAVEHIST=10000
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_REDUCE_BLANKS
setopt HIST_VERIFY
# Say how long a command took, if it took more than 5 seconds
export REPORTTIME=5
# Prompts for confirmation after 'rm *' etc
# Helps avoid mistakes like 'rm * o' when 'rm *.o' was intended
setopt RM_STAR_WAIT
# Background processes aren't killed on exit of shell
setopt AUTO_CONTINUE
# Dont write over existing files with >, use >! instead
setopt NOCLOBBER
# Dont nice background processes
setopt NO_BG_NICE
# Check for updates...
# Stolen and modified Oh-My-ZSH's update system
if [ "${ENABLE_DOTFILES_AUTO_UPDATE}" ]; then
env ZSH=$ZSH _DOTFILES="${_DOTFILES}" DISABLE_UPDATE_PROMPT="${DISABLE_DOTFILES_UPDATE_PROMPT}" zsh -f "${_DOTFILES}/check_for_upgrade.sh"
fi
# Oh-My-ZSH Options below this line
# Define Oh-My-ZSH root
ZSH=$HOME/.oh-my-zsh
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM=$_DOTFILES/omz
# Theme for Oh-My-ZSH
ZSH_THEME="darkblood"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git \
catimg \
fancy-ctrl-z \
emoji \
aws \
jsontools \
zsh-syntax-highlighting) # zsh-syntax-highlighting must remain the last plugin
# Load oh-my-zsh
source $ZSH/oh-my-zsh.sh

16
home/bin/build-i3-config Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
DF_PATH=${HOME}/dotfiles/.config/i3
CONFIG_PATH=${DF_PATH}/conf.d
DST_FILE=${DF_PATH}/config
echo "# This file is generated with the \`build-i3-config\` command" > ${DST_FILE}
echo "# Configuration has been broken up into the \`conf.d\` directory" >> ${DST_FILE}
cat ${CONFIG_PATH}/base.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/gaps.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/workspace.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/i3bar.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/window-classes.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/layout-keybinds.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/keybinds.conf >> ${DST_FILE}
cat ${CONFIG_PATH}/autostart.conf >> ${DST_FILE}

15
home/bin/cert_expiry Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Prints the expiration dates of all TLS Certificates in a directory
# This is usually pem, but can also be crt
if [[ -z $1 ]]; then
echo "certificate type not set, defaulting to pem"
filetype="pem"
else
filetype=$1
fi
for filename in ./*.${filetype}; do
echo -n "${filename} expires on: "
openssl x509 -noout -dates -in "${filename}" | sed -n '/notAfter/p' | sed 's/^.\{9\}//'
done

151
home/bin/git-freeze Executable file
View File

@@ -0,0 +1,151 @@
#!/bin/sh
#
# Copyright (c) 2011 Scott Moynes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
OPTIONS_SPEC="\
git freeze -l [-r] [<remote-name>]
git freeze -t <frozen-name>
git freeze -p [-d] [<remote-name>] <frozen-name>
git freeze -f [<remote-name>] <branch-name>
Archive refs to freezer.
--
h show help
Global options
r,remote operate on remotes
d,delete delete frozen branch from remotes
Command options
l,list list frozen refs
t,thaw thaw frozen ref into a branch
p,push push frozen ref to remote
f,fetch fetch frozen ref from remote
"""
SUBDIRECTORY_OK=1
. "$(git --exec-path)/git-sh-setup"
for arg; do
case "$arg" in
# Global options
-r) REMOTE_OPT=1 ; shift ;;
-a) ALL_OPT=1 ; shift ;;
-d) DELETE_OPT=1; shift ;;
# Command options
-l) LIST_COMMAND=1 ; shift ;;
-t) THAW_COMMAND=1 ; shift ;;
-p) PUSH_COMMAND=1 ; shift ;;
-f) FETCH_COMMAND=1 ; shift ;;
--) shift; break ;;
esac
done
list() {
if [ -z "$REMOTE_OPT" ]; then
git show-ref --abbrev=8 | \
sane_grep 'refs/freezer/' | \
LANG=C LC_ALL=C sed -e 's|\([0-9a-f]*\) refs/freezer/\(.*\)|\2 (\1)|'
else
git ls-remote | sane_grep 'refs/freezer/' | \
LANG=C LC_ALL=C sed -e 's|\([0-9a-f]\{8\}\).*refs/freezer/\(.*\)|\2 (\1)|'
fi
}
thaw() {
BRANCH="$1"
if [ -z "$BRANCH" ]; then
die "Frozen branch name argument required"
fi
FREEZER_REF=$(git show-ref --hash refs/freezer/$BRANCH)
echo Thawing branch: $BRANCH
git update-ref refs/heads/$BRANCH $FREEZER_REF || \
die "Error: unable to thaw ref refs/heads/$BRANCH $FREEZER_REF"
git update-ref -d refs/freezer/$BRANCH $FREEZER_REF
}
push() {
if [ -z "$2" ]; then
REMOTE=origin
BRANCH=$1
else
REMOTE=$1
BRANCH=$2
fi
if [ -z "$BRANCH" ]; then
die "Frozen branch name argument required"
fi
if [ -z "$DELETE_OPT" ]; then
git push "$REMOTE" "refs/freezer/$BRANCH:refs/freezer/$BRANCH"
else
git push "$REMOTE" ":refs/freezer/$BRANCH"
fi
}
freeze() {
BRANCH="$1"
if [ -z "$BRANCH" ]; then
die "Branch name argument is required"
fi
BRANCH_REF=$(git show-ref --hash --heads "$BRANCH")
if [ $? -ne 0 ]; then
die "Branch does not exist: $BRANCH"
fi
echo Freezing branch: $BRANCH
git update-ref refs/freezer/$BRANCH $BRANCH_REF || \
die "Error: unable to update ref refs/freezer/$BRANCH $BRANCH_REF"
git branch -D $BRANCH 2>&1 > /dev/null || die "Unable to delete branch $BRANCH"
}
fetch() {
if [ -z "$2" ]; then
REMOTE=origin
BRANCH=$1
else
REMOTE=$1
BRANCH=$2
fi
: ${BRANCH:="*"} ${REMOTE:=origin}
echo Fetching frozen branches
git fetch $REMOTE "refs/freezer/${BRANCH}:refs/freezer/${BRANCH}"
}
if [ $LIST_COMMAND ]; then
list
elif [ $THAW_COMMAND ]; then
thaw "$1"
elif [ $PUSH_COMMAND ]; then
push "$1" "$2"
elif [ $FETCH_COMMAND ]; then
fetch "$1" "$2"
else
freeze "$1"
fi

104
home/bin/i3blocks/bandwidth Executable file
View File

@@ -0,0 +1,104 @@
#!/usr/bin/env bash
#
# Copyright (C) 2015 James Murphy
# Licensed under the terms of the GNU GPL v2 only.
#
# i3blocks blocklet script to monitor bandwidth usage
iface="${BLOCK_INSTANCE}"
iface="${IFACE:-$iface}"
dt="${DT:-3}"
unit="${UNIT:-Mb}"
LABEL="${LABEL:- }" # down arrow up arrow
printf_command="${PRINTF_COMMAND:-"printf \"${LABEL}%-5.1f/%5.1f %s/s\\n\", rx, wx, unit;"}"
function default_interface {
ip route | awk '/^default via/ {print $5; exit}'
}
function check_proc_net_dev {
if [ ! -f "/proc/net/dev" ]; then
echo "/proc/net/dev not found"
exit 1
fi
}
function list_interfaces {
check_proc_net_dev
echo "Interfaces in /proc/net/dev:"
grep -o "^[^:]\\+:" /proc/net/dev | tr -d " :"
}
while getopts i:t:u:p:lh opt; do
case "$opt" in
i) iface="$OPTARG" ;;
t) dt="$OPTARG" ;;
u) unit="$OPTARG" ;;
p) printf_command="$OPTARG" ;;
l) list_interfaces && exit 0 ;;
h) printf \
"Usage: bandwidth3 [-i interface] [-t time] [-u unit] [-p printf_command] [-l] [-h]
Options:
-i\tNetwork interface to measure. Default determined using \`ip route\`.
-t\tTime interval in seconds between measurements. Default: 3
-u\tUnits to measure bytes in. Default: Mb
\tAllowed units: Kb, KB, Mb, MB, Gb, GB, Tb, TB
\tUnits may have optional it/its/yte/ytes on the end, e.g. Mbits, KByte
-p\tAwk command to be called after a measurement is made.
\tDefault: printf \"<span font='FontAwesome'> </span>%%-5.1f/%%5.1f %%s/s\\\\n\", rx, wx, unit;
\tExposed variables: rx, wx, tx, unit, iface
-l\tList available interfaces in /proc/net/dev
-h\tShow this help text
" && exit 0;;
esac
done
check_proc_net_dev
iface="${iface:-$(default_interface)}"
while [ -z "$iface" ]; do
echo No default interface
sleep "$dt"
iface=$(default_interface)
done
case "$unit" in
Kb|Kbit|Kbits) bytes_per_unit=$((1024 / 8));;
KB|KByte|KBytes) bytes_per_unit=$((1024));;
Mb|Mbit|Mbits) bytes_per_unit=$((1024 * 1024 / 8));;
MB|MByte|MBytes) bytes_per_unit=$((1024 * 1024));;
Gb|Gbit|Gbits) bytes_per_unit=$((1024 * 1024 * 1024 / 8));;
GB|GByte|GBytes) bytes_per_unit=$((1024 * 1024 * 1024));;
Tb|Tbit|Tbits) bytes_per_unit=$((1024 * 1024 * 1024 * 1024 / 8));;
TB|TByte|TBytes) bytes_per_unit=$((1024 * 1024 * 1024 * 1024));;
*) echo Bad unit "$unit" && exit 1;;
esac
scalar=$((bytes_per_unit * dt))
init_line=$(cat /proc/net/dev | grep "^[ ]*$iface:")
if [ -z "$init_line" ]; then
echo Interface not found in /proc/net/dev: "$iface"
exit 1
fi
init_received=$(awk '{print $2}' <<< $init_line)
init_sent=$(awk '{print $10}' <<< $init_line)
(while true; do cat /proc/net/dev; sleep "$dt"; done) |\
stdbuf -oL grep "^[ ]*$iface:" |\
awk -v scalar="$scalar" -v unit="$unit" -v iface="$iface" '
BEGIN{old_received='"$init_received"';old_sent='"$init_sent"'}
{
received=$2
sent=$10
rx=(received-old_received)/scalar;
wx=(sent-old_sent)/scalar;
tx=rx+wr;
old_received=received;
old_sent=sent;
if(rx >= 0 && wx >= 0){
'"$printf_command"';
fflush(stdout);
}
}
'

11
home/bin/i3blocks/clock Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
date '+%b %d (%a) %I:%M%p'
case $BLOCK_BUTTON in
1) pgrep -x dunst >/dev/null && notify-send "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "$(calcurse -d3)" ;;
2) "$TERMINAL" -e calcurse ;;
3) pgrep -x dunst >/dev/null && notify-send "<b>📅 Time/date module:</b>
- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\`
- Middle click opens calcurse if installed" ;;
esac

12
home/bin/i3blocks/cpu Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
case $BLOCK_BUTTON in
1) notify-send "<b>🖥 CPU hogs</b>:
$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;;
3) notify-send "<b>🖥 CPU module:</b>
- Shows CPU temperature.
- Click to show intensive processes.
- % is of single core." ;;
esac
sensors | awk '/temp1/ {print $2}'

BIN
home/bin/i3blocks/cpu_usage Executable file

Binary file not shown.

20
home/bin/i3blocks/disk Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
# Status bar module for disk space
# $1 should be drive mountpoint
# $2 is optional icon, otherwise mountpoint will displayed
[ -z "$1" ] && exit
icon="$2"
[ -z "$2" ] && icon="$1"
case $BLOCK_BUTTON in
1) pgrep -x dunst >/dev/null && notify-send "<b>💽 Disk space:</b>
$(df -h --output=target,used,size)" ;;
3) pgrep -x dunst >/dev/null && notify-send "<b>💽 Hard drive space remaining:</b>
- Shows used hard drive space.
- Click to show all disk info." ;;
esac
printf "%s: %s" "$icon" "$(df -h "$1" | awk ' /[0-9]/ {print $3 "/" $2}')"

67
home/bin/i3blocks/gpu-load Executable file
View File

@@ -0,0 +1,67 @@
#! /usr/bin/perl
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use utf8;
use Getopt::Long;
# default values
my $t_warn = $ENV{T_WARN} || 70;
my $t_crit = $ENV{T_CRIT} || 90;
my $gpu_usage = -1;
my $gpu_mem = -1;
my $gpu_video = -1;
my $gpu_pcie = -1;
sub help {
print "Usage: gpu-load [-w <warning>] [-c <critical>]\n";
print "-w <percent>: warning threshold to become amber\n";
print "-c <percent>: critical threshold to become red\n";
exit 0;
}
GetOptions("help|h" => \&help,
"w=i" => \$t_warn,
"c=i" => \$t_crit);
# Get GPU usage from nvidia-settings
open (NVS, 'nvidia-settings -q GPUUtilization -t |') or die;
while (<NVS>) {
if (/^[a-zA-Z]*=(\d+), [a-zA-Z]*=(\d+), [a-zA-Z]*=(\d+), [a-zA-Z]*=(\d+)$/) {
$gpu_usage = $1;
$gpu_mem = $2;
$gpu_video = $3;
$gpu_pcie = $4;
last;
}
}
close(NVS);
$gpu_usage eq -1 and die 'Can\'t find GPU information';
# Print full_text, short_text
printf "%.0f%% %.0f%% %.0f%% %.0f%%\n", $gpu_usage, $gpu_mem, $gpu_video, $gpu_pcie;
printf "%.0f%%\n", $gpu_usage;
# Print color, if needed
if ($gpu_usage >= $t_crit || $gpu_mem >= $t_crit || $gpu_video >= $t_crit || $gpu_pcie >= $t_crit) {
print "#FF0000\n";
exit 33;
} elsif ($gpu_usage >= $t_warn || $gpu_mem >= $t_warn || $gpu_video >= $t_warn || $gpu_pcie >= $t_warn) {
print "#FFBF00\n";
}
exit 0;

9
home/bin/i3blocks/internet Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
if ping -c 1 1.1.1.1 > /dev/null 2>&1; then
echo "😛"
else
echo "🤬"
echo "$(date)" >> /tmp/internet-outages
nfty send "Internet Outage"
fi

34
home/bin/i3blocks/load_average Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
load="$(cut -d ' ' -f1 /proc/loadavg)"
cpus="$(nproc)"
# full text
echo "$load"
# short text
echo "$load"
# color if load is too high
awk -v cpus=$cpus -v cpuload=$load '
BEGIN {
if (cpus <= cpuload) {
print "#FF0000";
exit 33;
}
}
'

11
home/bin/i3blocks/memory Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
case $BLOCK_BUTTON in
1) notify-send "<b>🧠 Memory hogs:</b>
$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
3) notify-send "<b>🧠 Memory module:</b>
- Shows Memory Used/Total.
- Click to show memory hogs." ;;
esac
free -h | awk '/^Mem:/ {print $3 "/" $2}'

3
home/bin/i3blocks/scratchpad Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
~/bin/i3-dstatus scratchpad

35
home/bin/i3blocks/spotify Executable file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env python
# Created by: https://github.com/firatakandere/i3blocks-spotify
import dbus
import os
import sys
try:
bus = dbus.SessionBus()
spotify = bus.get_object("org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2")
if os.environ.get('BLOCK_BUTTON'):
control_iface = dbus.Interface(spotify, 'org.mpris.MediaPlayer2.Player')
if (os.environ['BLOCK_BUTTON'] == '1'):
control_iface.Previous()
elif (os.environ['BLOCK_BUTTON'] == '2'):
control_iface.PlayPause()
elif (os.environ['BLOCK_BUTTON'] == '3'):
control_iface.Next()
spotify_iface = dbus.Interface(spotify, 'org.freedesktop.DBus.Properties')
props = spotify_iface.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
if (sys.version_info > (3, 0)):
print(str(props['xesam:artist'][0]) + " - " + str(props['xesam:title']))
else:
print(props['xesam:artist'][0] + " - " + props['xesam:title']).encode('utf-8')
exit
except dbus.exceptions.DBusException:
exit

8
home/bin/i3blocks/window Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
ACTIVE_WINDOW=$(xprop -id $(xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5) WM_NAME | cut -d '"' -f 2)
if [[ "${ACTIVE_WINDOW}" != "" ]]; then
echo "${ACTIVE_WINDOW}"
echo ""
fi

7
home/bin/music_player Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
cd ~/Music || exit
selected_song=$(ls | rofi -i -dmenu -p "Select a song to play") || exit
notify-send "Playing ${selected_song}"
mplayer "${selected_song}"

18
home/bin/screenshotter.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Simple screenshot uploader
# The web server is nginx and configured with h5ai to be a file manager
# Copyright (c) 2019 David Todd (c0de) c0de@c0defox.es
DATE=$(date +%Y-%m-%d-%s).png
FILENAME=~/Pictures/$DATE
maim -s $FILENAME&
wait $!
notify-send "Uploading Screenshot"
scp $FILENAME web.foxnet.space:/var/www/c0de.link/pics&
wait $!
echo https://i.c0de.link/$DATE | xclip -selection clipboard
notify-send "Link copied to Clipboard"

27
home/bin/wallpaper.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
shopt -s nullglob
#===change these config start===
#wallpapers directory path
path=~/Pictures/Wallpapers
#time interval
interval=5m
#===change these config end===
cd $path
while true; do
files=()
for i in *.jpg *.png; do
[[ -f $i ]] && files+=("$i")
done
range=${#files[@]}
((range)) && feh --bg-scale "${files[RANDOM % range]}"
sleep $interval
done