Probably a ton of changes tbh
This commit is contained in:
commit
3c263a9aff
|
@ -0,0 +1,85 @@
|
|||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! !!
|
||||
!! x1phosuras's .Xresources file !!
|
||||
!! !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
!! Note: use the following command to apply changes:
|
||||
!! $ xrdb ~/.Xresources
|
||||
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! Misc. settings !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
! get rid of scrollbar
|
||||
URxvt*scrollBar: false
|
||||
|
||||
! fix copy/paste BS in urxvt
|
||||
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
|
||||
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
|
||||
|
||||
! fixes Ctrl-(left or right) doing what I actually want
|
||||
URxvt.keysym.Control-Up: \033[1;5A
|
||||
URxvt.keysym.Control-Down: \033[1;5B
|
||||
URxvt.keysym.Control-Left: \033[1;5D
|
||||
URxvt.keysym.Control-Right: \033[1;5C
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! Font, colors, and transparency !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
! font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
! Alt. good font: Tamzen, size 16
|
||||
URxvt.font: xft:Terminus:pixelsize=14
|
||||
|
||||
!! color settings generated by a combination of wal and terminal.sexy
|
||||
|
||||
! Real transparency (uses the compositor)
|
||||
! (depth needs to be EXACTLY 32 for some weird reason)
|
||||
urxvt*depth: 32
|
||||
|
||||
! Fake transparency (uses the background picture supplied by feh)
|
||||
!urxvt*transparent: true
|
||||
! urxvt*shading: 30
|
||||
|
||||
! the [90] is the transparency level
|
||||
*.background: #000000
|
||||
*.foreground: #8ff6a8
|
||||
*.cursorColor: #8ff6a8
|
||||
|
||||
! Note: The below color names do not necessarily match the actual colors.
|
||||
! They represent what colors 0-15 would normally be
|
||||
! black
|
||||
*.color0: #232d25
|
||||
*.color8: #ac9764
|
||||
|
||||
! red
|
||||
*.color1: #900000
|
||||
*.color9: #ff0000
|
||||
|
||||
! green
|
||||
*.color2: #2df844
|
||||
*.color10: #2df844
|
||||
|
||||
! yellow
|
||||
*.color3: #b29b38
|
||||
*.color11: #b29b38
|
||||
|
||||
! blue
|
||||
*.color4: #218376
|
||||
*.color12: #218376
|
||||
|
||||
! magenta
|
||||
*.color5: #ff2f2f
|
||||
*.color13: #ff2f2f
|
||||
|
||||
! cyan
|
||||
*.color6: #ff7b16
|
||||
*.color14: #ff7b16
|
||||
|
||||
! white
|
||||
*.color7: #f6d98f
|
||||
*.color15: #f6d98f
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
|
||||
# autostart systemd default session on tty1
|
||||
if [[ "$(tty)" == '/dev/tty1' ]]; then
|
||||
exec startx
|
||||
fi
|
||||
|
||||
export PATH="$PATH:$HOME/.cargo/bin"
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
# Customize bash prompt
|
||||
# lolcat reference: http://apple.stackexchange.com/a/266112/216733
|
||||
# If dynamic can use literal control characters. Otherwise,
|
||||
# must use PS1 escapes or else line wrap issue.
|
||||
PROMPT_COMMAND="__prompt_command${PROMPT_COMMAND:+"; $PROMPT_COMMAND"}"
|
||||
PS1_COLORIZE_COMMAND='__ps1_lolcat'
|
||||
# shellcheck disable=SC2034
|
||||
PS1_DEBUG_COMMAND='__ps1_debug'
|
||||
|
||||
PS1_DEBUG='false'
|
||||
|
||||
__prompt_command() {
|
||||
# Save last exit code
|
||||
PS1_exit=$?
|
||||
|
||||
if [[ "$PS1_DEBUG" = 'true' ]]; then
|
||||
if [[ "$PS1" = "$PS1_DEBUG_DISABLED" ]]; then
|
||||
PS1=$PS1_DEBUG_ENABLED
|
||||
fi
|
||||
else
|
||||
if [[ "$PS1" = "$PS1_DEBUG_ENABLED" ]]; then
|
||||
PS1=$PS1_DEBUG_DISABLED
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ps1_set_debug_mode() {
|
||||
if [[ "$PS1_DEBUG" = 'true' ]]; then
|
||||
PS1=$PS1_DEBUG_ENABLED
|
||||
else
|
||||
PS1=$PS1_DEBUG_DISABLED
|
||||
fi
|
||||
}
|
||||
|
||||
TERM_DEFAULT=$(tput sgr0)
|
||||
TERM_BOLD=$(tput bold) # I added this, as of now unused
|
||||
TERM_RED=$(tput setaf 1)
|
||||
TERM_GREEN=$(tput setaf 2)
|
||||
TERM_BLUE=$(tput setaf 4)
|
||||
|
||||
ESC=$'\033'
|
||||
SOH=$'\001'
|
||||
STX=$'\002'
|
||||
|
||||
PS1_DEFAULT_LITERAL=$SOH$TERM_DEFAULT$STX
|
||||
PS1_RED_LITERAL=$SOH$TERM_RED$STX
|
||||
PS1_GREEN_LITERAL=$SOH$TERM_GREEN$STX
|
||||
PS1_BLUE_LITERAL=$SOH$TERM_BLUE$STX
|
||||
|
||||
PS1_DEFAULT_ESCAPED='\['$TERM_DEFAULT'\]'
|
||||
|
||||
# Caveat:
|
||||
# to have a literal '\' or '"' work in both $PS1_DEBUG_DISABLED and
|
||||
# $PS1_DEBUG_ENABLED, '\' must be represented with '\\\\' and
|
||||
# '"' must be represented with '\\"' or '\"' to have the proper amount of
|
||||
# escaping in both modes. PS1 seems to have an initial interpret phase where
|
||||
# it strips off one level of backslashes, then an echo phase where it strips
|
||||
# off the second level so '\\\\' =interpret> '\\' =echo> '\'
|
||||
# '\\"' =interpret> '\"' =echo> '"'
|
||||
# The following is a bit trickier. Normally, echo would treat the double quote
|
||||
# as starting a string. PS1 seems to treat it as a literal when echoing. As
|
||||
# a result, '\\"' is preferred over '\"' as it is easier to understand what is
|
||||
# happening.
|
||||
# '\"' =interpret> 'literal(")' =echo> '"'
|
||||
# In $PS1_DEBUG_ENABLED, the interpret phase is still run by PS1. The echo
|
||||
# phase is emulated by wrapping $PS1 in double quotes: ...<<<"'PS1'"...
|
||||
unset PS1
|
||||
# vvv - actually change PS1 here - vvv
|
||||
PS1_COLORLESS=$(sed 's/[[:space:]]*$//' <<<"${PS1:-[\u@\h]:\w \\$}")
|
||||
PS1_SPACING=' '
|
||||
PS1=''
|
||||
|
||||
__ps1_remove_newline() {
|
||||
tr -d '\n'
|
||||
}
|
||||
|
||||
__ps1_color_wrap_non_printing() {
|
||||
local REGEX=$ESC'\[[[:digit:];]*m'
|
||||
local REPLACE=$SOH'&'$STX
|
||||
sed "s/$REGEX/$REPLACE/g"
|
||||
}
|
||||
|
||||
# change lolcat arguments here
|
||||
__ps1_lolcat() {
|
||||
lolcat-c -f -h 1.4 | __ps1_remove_newline | __ps1_color_wrap_non_printing
|
||||
}
|
||||
PS1+='$(eval "$PS1_COLORIZE_COMMAND" <<<"'$PS1_COLORLESS'")'
|
||||
PS1+=$PS1_SPACING
|
||||
|
||||
PS1_DEBUG_DISABLED=$PS1
|
||||
# long colored prompt text that go over a line have a line wrap issue.
|
||||
# Problem occurs with literal and PS1 escaped control characters. Tried
|
||||
# escaping each individual character with perl at
|
||||
# "$SCRIPTS_DIR"'/ps1_colorize_debug.pl' but still doesn't work.
|
||||
# can't colorize debug literal text with sed because it does not have the
|
||||
# following:
|
||||
# non-greedy quantifiers to do \^B\(.*?\)\^A if running a second sed to
|
||||
# consume \^B and \^A again.
|
||||
# lookahead to do \(.*?)\(?=\^A) which wouldn't require a second sed because
|
||||
# \^A is is looked for but not consumed.
|
||||
# can use perl regex if want to colorize debug literal text.
|
||||
# sed also doesn't have non capturing groups so groups are offset.
|
||||
__ps1_colorize_debug() {
|
||||
local SOH_REGEX='(\^A)'
|
||||
local COLOR_CODE_REGEX='((\^\[\(B)?\^\[\[[[:digit:];]*m)'
|
||||
local STX_REGEX='(\^B)'
|
||||
local REGEX=$SOH_REGEX$COLOR_CODE_REGEX$STX_REGEX
|
||||
|
||||
local SOH_REPLACE=$PS1_RED_LITERAL'\1'$PS1_DEFAULT_LITERAL
|
||||
local COLOR_CODE_REPLACE=$PS1_BLUE_LITERAL'\2'$PS1_DEFAULT_LITERAL
|
||||
local STX_REPLACE=$PS1_GREEN_LITERAL'\4'$PS1_DEFAULT_LITERAL
|
||||
local REPLACE=$SOH_REPLACE$COLOR_CODE_REPLACE$STX_REPLACE
|
||||
|
||||
sed -E "s/$REGEX/$REPLACE/g"
|
||||
}
|
||||
__ps1_debug() {
|
||||
cat -v | __ps1_colorize_debug
|
||||
}
|
||||
__ps1_debug_sed() {
|
||||
sed -e 's/'$ESC'/[ESC]/g' -e 's/'$SOH'/[SOH]/g' -e 's/'$STX'/[STX]/g'
|
||||
}
|
||||
# wrap PS1 for debugging
|
||||
# shellcheck disable=SC2016
|
||||
PS1_DEBUG_ENABLED='$(eval "$PS1_DEBUG_COMMAND" <<<"'$PS1'")'
|
|
@ -0,0 +1,181 @@
|
|||
#
|
||||
# this is my ~/.bashrc
|
||||
# (Note: this _should_ be _somewhat_ OS-agnostic, at least, enough for me)
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# source global bashrc settings (turned off by default, uncomment otherwise)
|
||||
# [ -f /etc/bashrc ] && source /etc/bashrc
|
||||
|
||||
shopt -s checkwinsize # check window size after cmd, update LINES and COLUMNS
|
||||
shopt -s globstar # pattern '**' matches all files, >= 0 dir/subdirs
|
||||
|
||||
HISTCONTROL=ignoredups # ignore duplicate commands or if start with a space
|
||||
HISTSIZE=48000 # history lines stored in memory (while using bash)
|
||||
HISTFILESIZE=48000 # history lines stored in .bash_history after session
|
||||
shopt -s histappend # append to history file instead of overwriting
|
||||
|
||||
case "$(uname -s)" in # for OS-specific configuration
|
||||
Linux) operating_system='linux' ;;
|
||||
Darwin) operating_system='macOS' ;;
|
||||
FreeBSD|OpenBSD|NetBSD) operating_system='BSD' ;;
|
||||
CYGWIN*|MINGW32*|MSYS*|MINGW*) operating_system='windows' ;;
|
||||
*) operating_system='other' ;;
|
||||
esac
|
||||
|
||||
[ -f /etc/hostname ] && hostname="$(cat /etc/hostname)"
|
||||
|
||||
# apply "secret" settings (these are just settings I don't want in git)
|
||||
[ -f "$HOME"/.bashrc_secrets ] && source "$HOME"/.bashrc_secrets
|
||||
|
||||
# set PATH to something tolerable
|
||||
# NOTE: in Arch, everything's already in /usr/bin, /usr/sbin anyway
|
||||
PATH="/usr/bin:/usr/local/bin:/bin:/usr/sbin:/usr/local/sbin:/sbin" # base
|
||||
PATH="$PATH:/var/lib/snapd/snap/bin" # snapd
|
||||
PATH="$PATH:/usr/local/games:/usr/games" # base
|
||||
if [ "$hostname" = "foundryside" ]; then
|
||||
PATH="$PATH:$HOME/bin" # my own secret sauce
|
||||
PATH="$PATH:$HOME/bin/jdk-11.0.10+9/bin" # JavaTM
|
||||
PATH="$PATH:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" # BS
|
||||
fi
|
||||
export PATH
|
||||
|
||||
# use 'nvim' if it exists on system
|
||||
[ command -v nvim &> /dev/null ] && export EDITOR="nvim" || export EDITOR="vim"
|
||||
|
||||
export BROWSER="firefox"
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$operating_system" = "macOS" || "$operating_system" = "BSD" ]] ; then
|
||||
export CLICOLOR=1
|
||||
fi
|
||||
|
||||
# PS1 settings
|
||||
#Old PS1: PS1="[\u@\h]:\w\$ "
|
||||
if [[ $(id -u) -eq 0 ]]; then # if current user is root
|
||||
PS1="\[\033[41m\]\[\033[37m\][\u@\h]\[\033[00m\]:\[\033[01;31m\]\w\[\033[00m\]\$ "
|
||||
elif [[ -f ~/.bash_prompt ]]; then # not root, but ~/.bash_prompt exists
|
||||
unset color_prompt force_color_prompt
|
||||
source ~/.bash_prompt
|
||||
else # if not root, and no prompt config
|
||||
PS1="\[\033[1;37m\][\u@\h]\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]$ "
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01: quote=01'
|
||||
export GCC_COLORS
|
||||
|
||||
|
||||
# find-keyword [directory path] [keyword]: find and list files with keyword in
|
||||
# the filename
|
||||
find-keyword() {
|
||||
if [ "$#" -ne 2 ]; then # if not given 2 arguments
|
||||
echo "Usage: find-keyword [directory path] [keyword]"
|
||||
else
|
||||
find $1 -name "*$2*" -ls
|
||||
fi
|
||||
}
|
||||
|
||||
# find-string [string] [directory path]: find and list files containing the
|
||||
# provided string (and list all occurences/line numbers of the string)
|
||||
find-string() {
|
||||
if [ "$#" -ne 2 ]; then # if not given 2 arguments
|
||||
echo "Usage: find-string [string] [directory path]"
|
||||
else
|
||||
grep -nR "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# Note to self: alias substitution is recursive AS LONG AS each expanded alias
|
||||
# ends in a space character (allowing for multiple aliases to be used on one
|
||||
# line). This is a POSIX specification. You do not know how long it took me to
|
||||
# figure this out.
|
||||
|
||||
# miscellaneous aliases
|
||||
alias cl='clear '
|
||||
alias e='exit '
|
||||
alias q='exit '
|
||||
alias DIE='shutdown now '
|
||||
alias cp='cp -i' # confirm before overwriting a file
|
||||
alias fucking='sudo '
|
||||
alias goddammit=' '
|
||||
alias bottom='top '
|
||||
alias bc='bc -l ' # makes bc use 'scale=20' by default
|
||||
alias grep='grep --color '
|
||||
alias vim="$EDITOR "
|
||||
alias i3config="$EDITOR ~/.config/i3/config && i3-msg reload && i3-msg restart"
|
||||
alias bashrc="$EDITOR ~/.bashrc"
|
||||
alias vimrc="$EDITOR ~/.vimrc"
|
||||
alias nanorc="nano ~/.config/nano/nanorc" # just for fun!
|
||||
alias spellcheck='aspell check '
|
||||
alias rot13="tr 'A-Za-z' 'N-ZA-Mn-za-m' "
|
||||
not_in_vim="echo -e \"You're not in vim doofus!\""
|
||||
alias :wq="$not_in_vim" ; alias :q="$not_in_vim" ; alias :x="$not_in_vim"
|
||||
alias ZZ="$not_in_vim"
|
||||
|
||||
alias rager='ranger '; alias anger='ranger '; alias range='ranger '
|
||||
alias rangre='ranger '; alias rangr='ranger ' # <<<-^^^-: common ranger typos
|
||||
|
||||
alias gdb='gdb -q ' # muzzle gdb
|
||||
|
||||
if [[ "$operating_system" = "macOS" ]]; then
|
||||
alias ls='ls -C '
|
||||
alias l='ls -C '
|
||||
alias ll='ls -lh '
|
||||
alias la='ls -A '
|
||||
alias lla='ls -lhA '
|
||||
elif [[ "$operating_system" = "BSD" ]]; then
|
||||
alias ls='ls --color=auto '
|
||||
alias l='ls --color=auto '
|
||||
alias ll='ls -lh --color=auto '
|
||||
alias la='ls -A --color=auto '
|
||||
alias lla='ls -lhA --color=auto '
|
||||
else # assume GNU ls (should work on _most_ Linuxes)
|
||||
alias ls='ls -C --color=auto '
|
||||
alias l='ls -C --color=auto '
|
||||
alias ll='ls -lh --color=auto '
|
||||
alias la='ls -A --color=auto '
|
||||
alias lla='ls -lhA --color=auto '
|
||||
fi
|
||||
|
||||
|
||||
# enable programmable completion features (possibly already enabled by
|
||||
# /etc/bash.bashrc or /etc/profile).
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
source /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
if [ "$operating_system" = "macOS" ]; then
|
||||
if [ -f /usr/local/etc/bash_completion ]; then # for macOS
|
||||
source /usr/local/etc/bash_completion
|
||||
elif [ -d /usr/local/etc/bash_completion.d ]; then # also for macOS
|
||||
for file in /usr/local/etc/bash_completion.d/* ; do
|
||||
source "$file"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
complete -cf sudo # so sudo actually has tab autocompletion
|
||||
bind 'set completion-ignore-case on' # case-insensitive tab autocompletion
|
||||
|
|
@ -0,0 +1,624 @@
|
|||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
env:
|
||||
# TERM variable
|
||||
#
|
||||
# This value is used to set the `$TERM` environment variable for
|
||||
# each instance of Alacritty. If it is not present, alacritty will
|
||||
# check the local terminfo database and use `alacritty` if it is
|
||||
# available, otherwise `xterm-256color` is used.
|
||||
TERM: xterm-256color
|
||||
|
||||
window:
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Specified in number of columns/lines, not pixels.
|
||||
# If both are `0`, this setting is ignored.
|
||||
# dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
# Specified in number of pixels.
|
||||
# If the position is not set, the window manager will handle the placement.
|
||||
#position:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Window padding (changes require restart)
|
||||
#
|
||||
# Blank space added around the window in pixels. This padding is scaled
|
||||
# by DPI and the specified value is always added at both opposing sides.
|
||||
padding:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
dynamic_padding: false
|
||||
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
dynamic_title: true
|
||||
|
||||
# Window decorations
|
||||
#
|
||||
# Values for `decorations`:
|
||||
# - full: Borders and title bar
|
||||
# - none: Neither borders nor title bar
|
||||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background, but no title bar buttons
|
||||
decorations: full
|
||||
|
||||
# Startup Mode (changes require restart)
|
||||
#
|
||||
# Values for `startup_mode`:
|
||||
# - Windowed
|
||||
# - Maximized
|
||||
# - Fullscreen
|
||||
#
|
||||
# Values for `startup_mode` (macOS only):
|
||||
# - SimpleFullscreen
|
||||
startup_mode: Windowed
|
||||
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
|
||||
# Window class (Linux only):
|
||||
#class: Alacritty
|
||||
|
||||
scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
history: 10000
|
||||
|
||||
# Number of lines the viewport will move for every line scrolled when
|
||||
# scrollback is enabled (history > 0).
|
||||
multiplier: 3
|
||||
|
||||
# Font configuration (changes require restart)
|
||||
font:
|
||||
# Normal (roman) font face
|
||||
normal:
|
||||
# Font family
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) Menlo
|
||||
# - (Linux) monospace
|
||||
# - (Windows) Consolas
|
||||
#family: Inconsolata
|
||||
family: monospace
|
||||
family: TerminessTTF Nerd Font
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
||||
# Bold font face
|
||||
#bold:
|
||||
# Font family
|
||||
#
|
||||
# If the bold family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold
|
||||
|
||||
# Italic font face
|
||||
#italic:
|
||||
# Font family
|
||||
#
|
||||
# If the italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Italic
|
||||
|
||||
# Point size
|
||||
size: 8.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||
offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increasing `x` moves the glyph to the right,
|
||||
# increasing `y` moves the glyph upwards.
|
||||
glyph_offset:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
# Thin stroke font rendering (macOS only)
|
||||
#
|
||||
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||
# it is recommended to set `use_thin_strokes` to `false`
|
||||
#
|
||||
# macOS >= 10.14.x:
|
||||
#
|
||||
# If the font quality on non-retina display looks bad then set
|
||||
# `use_thin_strokes` to `true` and enable font smoothing by running the
|
||||
# following command:
|
||||
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
|
||||
#
|
||||
# This is a global setting and will require a log out or restart to take
|
||||
# effect.
|
||||
use_thin_strokes: true
|
||||
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
draw_bold_text_with_bright_colors: true
|
||||
|
||||
# Colors (Tomorrow Night Bright)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x1e1e1e'
|
||||
foreground: '0xeaeaea'
|
||||
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not present.
|
||||
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||
# is `false`, the normal foreground color will be used.
|
||||
#dim_foreground: '0x9a9a9a'
|
||||
#bright_foreground: '0xffffff'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||
# the cursor color will be the inverse of the cell color.
|
||||
#cursor:
|
||||
# text: '0x000000'
|
||||
# cursor: '0xffffff'
|
||||
|
||||
# Selection colors
|
||||
#
|
||||
# Colors which should be used to draw the selection area. If selection
|
||||
# background is unset, selection color will be the inverse of the cell colors.
|
||||
# If only text is unset the cell text color will remain the same.
|
||||
#selection:
|
||||
# text: '0xeaeaea'
|
||||
# background: '0x404040'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x000000'
|
||||
red: '0xd54e53'
|
||||
green: '0xb9ca4a'
|
||||
yellow: '0xe6c547'
|
||||
blue: '0x7aa6da'
|
||||
magenta: '0xc397d8'
|
||||
cyan: '0x70c0ba'
|
||||
white: '0xeaeaea'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x666666'
|
||||
red: '0xff3334'
|
||||
green: '0x9ec400'
|
||||
yellow: '0xe7c547'
|
||||
blue: '0x7aa6da'
|
||||
magenta: '0xb77ee0'
|
||||
cyan: '0x54ced6'
|
||||
white: '0xffffff'
|
||||
|
||||
# Dim colors
|
||||
#
|
||||
# If the dim colors are not set, they will be calculated automatically based
|
||||
# on the `normal` colors.
|
||||
#dim:
|
||||
# black: '0x000000'
|
||||
# red: '0x8c3336'
|
||||
# green: '0x7a8530'
|
||||
# yellow: '0x97822e'
|
||||
# blue: '0x506d8f'
|
||||
# magenta: '0x80638e'
|
||||
# cyan: '0x497e7a'
|
||||
# white: '0x9a9a9a'
|
||||
|
||||
# Indexed Colors
|
||||
#
|
||||
# The indexed colors include all colors from 16 to 256.
|
||||
# When these are not set, they're filled with sensible defaults.
|
||||
#
|
||||
# Example:
|
||||
# `- { index: 16, color: '0xff00ff' }`
|
||||
#
|
||||
indexed_colors: []
|
||||
|
||||
# Visual Bell
|
||||
#
|
||||
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||
# rung, the terminal background will be set to white and transition back to the
|
||||
# default background color. You can control the rate of this transition by
|
||||
# setting the `duration` property (represented in milliseconds). You can also
|
||||
# configure the transition function by setting the `animation` property.
|
||||
#
|
||||
# Values for `animation`:
|
||||
# - Ease
|
||||
# - EaseOut
|
||||
# - EaseOutSine
|
||||
# - EaseOutQuad
|
||||
# - EaseOutCubic
|
||||
# - EaseOutQuart
|
||||
# - EaseOutQuint
|
||||
# - EaseOutExpo
|
||||
# - EaseOutCirc
|
||||
# - Linear
|
||||
#
|
||||
# Specifying a `duration` of `0` will disable the visual bell.
|
||||
bell:
|
||||
animation: EaseOut
|
||||
duration: 0
|
||||
color: '0xffffff'
|
||||
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
#background_opacity: 0.94
|
||||
background_opacity: 1
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Available fields:
|
||||
# - mouse
|
||||
# - action
|
||||
# - mods (optional)
|
||||
#
|
||||
# Values for `mouse`:
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# All available `mods` and `action` values are documented in the key binding
|
||||
# section.
|
||||
mouse_bindings:
|
||||
- { mouse: Middle, action: PasteSelection }
|
||||
|
||||
mouse:
|
||||
# Click settings
|
||||
#
|
||||
# The `double_click` and `triple_click` settings control the time
|
||||
# alacritty should wait for accepting multiple clicks as one double
|
||||
# or triple click.
|
||||
double_click: { threshold: 300 }
|
||||
triple_click: { threshold: 300 }
|
||||
|
||||
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||
hide_when_typing: false
|
||||
|
||||
url:
|
||||
# URL launcher
|
||||
#
|
||||
# This program is executed when clicking on a text which is recognized as a URL.
|
||||
# The URL is always added to the command as the last parameter.
|
||||
#
|
||||
# When set to `None`, URL launching will be disabled completely.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) open
|
||||
# - (Linux) xdg-open
|
||||
# - (Windows) explorer
|
||||
launcher:
|
||||
program: None
|
||||
# program: xdg-open
|
||||
# args: []
|
||||
|
||||
# URL modifiers
|
||||
#
|
||||
# These are the modifiers that need to be held down for opening URLs when clicking
|
||||
# on them. The available modifiers are documented in the key binding section.
|
||||
modifiers: None
|
||||
|
||||
selection:
|
||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>"
|
||||
|
||||
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||
save_to_clipboard: true
|
||||
|
||||
cursor:
|
||||
# Cursor style
|
||||
#
|
||||
# Values for `style`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
style: Block
|
||||
|
||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||
# window is not focused.
|
||||
unfocused_hollow: true
|
||||
|
||||
# Live config reload (changes require restart)
|
||||
live_config_reload: true
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) /bin/bash --login
|
||||
# - (Linux) user login shell
|
||||
# - (Windows) powershell
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
|
||||
# Startup directory
|
||||
#
|
||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||
# directory of the parent process will be used.
|
||||
working_directory: None
|
||||
|
||||
# Windows 10 ConPTY backend (Windows only)
|
||||
#
|
||||
# This will enable better color support and may resolve other issues,
|
||||
# however this API and its implementation is still young and so is
|
||||
# disabled by default, as stability may not be as good as the winpty
|
||||
# backend.
|
||||
#
|
||||
# Alacritty will fall back to the WinPTY automatically if the ConPTY
|
||||
# backend cannot be initialized.
|
||||
enable_experimental_conpty_backend: false
|
||||
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
alt_send_esc: true
|
||||
|
||||
debug:
|
||||
# Display the time it takes to redraw each frame.
|
||||
render_timer: false
|
||||
|
||||
# Keep the log file after quitting Alacritty.
|
||||
persistent_logging: false
|
||||
|
||||
# Log level
|
||||
#
|
||||
# Values for `log_level`:
|
||||
# - None
|
||||
# - Error
|
||||
# - Warn
|
||||
# - Info
|
||||
# - Debug
|
||||
# - Trace
|
||||
log_level: Warn
|
||||
|
||||
# Print all received window events.
|
||||
print_events: false
|
||||
|
||||
# Record all characters and escape sequences as test data.
|
||||
ref_test: false
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Key bindings are specified as a list of objects. Each binding will specify a
|
||||
# key and modifiers required to trigger it, terminal modes where the binding is
|
||||
# applicable, and what should be done when the key binding fires. It can either
|
||||
# send a byte sequence to the running application (`chars`), execute a
|
||||
# predefined action (`action`) or fork and execute a specified command plus
|
||||
# arguments (`command`).
|
||||
#
|
||||
# Bindings are always filled by default, but will be replaced when a new binding
|
||||
# with the same triggers is defined. To unset a default binding, it can be
|
||||
# mapped to the `None` action.
|
||||
#
|
||||
# Example:
|
||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||
#
|
||||
# Available fields:
|
||||
# - key
|
||||
# - mods (optional)
|
||||
# - chars | action | command (exactly one required)
|
||||
# - mode (optional)
|
||||
#
|
||||
# Values for `key`:
|
||||
# - `A` -> `Z`
|
||||
# - `F1` -> `F12`
|
||||
# - `Key1` -> `Key0`
|
||||
#
|
||||
# A full list with available key codes can be found here:
|
||||
# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants
|
||||
#
|
||||
# Instead of using the name of the keys, the `key` field also supports using
|
||||
# the scancode of the desired key. Scancodes have to be specified as a
|
||||
# decimal number.
|
||||
# This command will allow you to display the hex scancodes for certain keys:
|
||||
# `showkey --scancodes`
|
||||
#
|
||||
# Values for `mods`:
|
||||
# - Command
|
||||
# - Control
|
||||
# - Option
|
||||
# - Super
|
||||
# - Shift
|
||||
# - Alt
|
||||
#
|
||||
# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`.
|
||||
# Whitespace and capitalization is relevant and must match the example.
|
||||
#
|
||||
# Values for `chars`:
|
||||
# The `chars` field writes the specified string to the terminal. This makes
|
||||
# it possible to pass escape sequences.
|
||||
# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run
|
||||
# the command `showkey -a` outside of tmux.
|
||||
# Note that applications use terminfo to map escape sequences back to
|
||||
# keys. It is therefore required to update the terminfo when
|
||||
# changing an escape sequence.
|
||||
#
|
||||
# Values for `action`:
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - Copy
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# - Hide
|
||||
# - Quit
|
||||
# - ClearLogNotice
|
||||
# - SpawnNewInstance
|
||||
# - ToggleFullscreen
|
||||
# - None
|
||||
#
|
||||
# Values for `action` (macOS only):
|
||||
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||
#
|
||||
# Values for `command`:
|
||||
# The `command` field must be a map containing a `program` string and
|
||||
# an `args` array of command line parameter strings.
|
||||
#
|
||||
# Example:
|
||||
# `command: { program: "alacritty", args: ["-e", "vttest"] }`
|
||||
#
|
||||
# Values for `mode`:
|
||||
# - ~AppCursor
|
||||
# - AppCursor
|
||||
# - ~AppKeypad
|
||||
# - AppKeypad
|
||||
key_bindings:
|
||||
# (Windows/Linux only)
|
||||
#- { key: V, mods: Control|Shift, action: Paste }
|
||||
#- { key: C, mods: Control|Shift, action: Copy }
|
||||
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||
|
||||
# (macOS only)
|
||||
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||
#- { key: K, mods: Command, action: ClearHistory }
|
||||
#- { key: K, mods: Command, chars: "\x0c" }
|
||||
#- { key: V, mods: Command, action: Paste }
|
||||
#- { key: C, mods: Command, action: Copy }
|
||||
#- { key: H, mods: Command, action: Hide }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
|
||||
- { key: Paste, action: Paste }
|
||||
- { key: Copy, action: Copy }
|
||||
- { key: L, mods: Control, action: ClearLogNotice }
|
||||
- { key: L, mods: Control, chars: "\x0c" }
|
||||
- { key: Home, mods: Alt, chars: "\x1b[1;3H" }
|
||||
- { key: Home, chars: "\x1bOH", mode: AppCursor }
|
||||
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
|
||||
- { key: End, mods: Alt, chars: "\x1b[1;3F" }
|
||||
- { key: End, chars: "\x1bOF", mode: AppCursor }
|
||||
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
|
||||
- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
|
||||
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt }
|
||||
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
|
||||
- { key: PageUp, mods: Alt, chars: "\x1b[5;3~" }
|
||||
- { key: PageUp, chars: "\x1b[5~" }
|
||||
- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
|
||||
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt }
|
||||
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
|
||||
- { key: PageDown, mods: Alt, chars: "\x1b[6;3~" }
|
||||
- { key: PageDown, chars: "\x1b[6~" }
|
||||
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
|
||||
- { key: Back, chars: "\x7f" }
|
||||
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
|
||||
- { key: Insert, chars: "\x1b[2~" }
|
||||
- { key: Delete, chars: "\x1b[3~" }
|
||||
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
|
||||
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
|
||||
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
|
||||
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
|
||||
- { key: Left, chars: "\x1bOD", mode: AppCursor }
|
||||
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
|
||||
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
|
||||
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
|
||||
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
|
||||
- { key: Right, chars: "\x1bOC", mode: AppCursor }
|
||||
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
|
||||
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
|
||||
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
|
||||
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
|
||||
- { key: Up, chars: "\x1bOA", mode: AppCursor }
|
||||
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
|
||||
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
|
||||
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
|
||||
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
|
||||
- { key: Down, chars: "\x1bOB", mode: AppCursor }
|
||||
- { key: F1, chars: "\x1bOP" }
|
||||
- { key: F2, chars: "\x1bOQ" }
|
||||
- { key: F3, chars: "\x1bOR" }
|
||||
- { key: F4, chars: "\x1bOS" }
|
||||
- { key: F5, chars: "\x1b[15~" }
|
||||
- { key: F6, chars: "\x1b[17~" }
|
||||
- { key: F7, chars: "\x1b[18~" }
|
||||
- { key: F8, chars: "\x1b[19~" }
|
||||
- { key: F9, chars: "\x1b[20~" }
|
||||
- { key: F10, chars: "\x1b[21~" }
|
||||
- { key: F11, chars: "\x1b[23~" }
|
||||
- { key: F12, chars: "\x1b[24~" }
|
||||
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
|
||||
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
|
||||
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
|
||||
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
|
||||
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
|
||||
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
|
||||
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
|
||||
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
|
||||
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
|
||||
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
|
||||
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
|
||||
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
|
||||
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
|
||||
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
|
||||
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
|
||||
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
|
||||
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
|
||||
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
|
||||
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
|
||||
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
|
||||
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
|
||||
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
|
||||
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
|
||||
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
|
||||
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
|
||||
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
|
||||
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
|
||||
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
|
||||
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
|
||||
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
|
||||
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
|
||||
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
|
||||
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
|
||||
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
|
||||
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
|
||||
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
|
||||
- { key: F1, mods: Super, chars: "\x1b[1;3P" }
|
||||
- { key: F2, mods: Super, chars: "\x1b[1;3Q" }
|
||||
- { key: F3, mods: Super, chars: "\x1b[1;3R" }
|
||||
- { key: F4, mods: Super, chars: "\x1b[1;3S" }
|
||||
- { key: F5, mods: Super, chars: "\x1b[15;3~" }
|
||||
- { key: F6, mods: Super, chars: "\x1b[17;3~" }
|
||||
- { key: F7, mods: Super, chars: "\x1b[18;3~" }
|
||||
- { key: F8, mods: Super, chars: "\x1b[19;3~" }
|
||||
- { key: F9, mods: Super, chars: "\x1b[20;3~" }
|
||||
- { key: F10, mods: Super, chars: "\x1b[21;3~" }
|
||||
- { key: F11, mods: Super, chars: "\x1b[23;3~" }
|
||||
- { key: F12, mods: Super, chars: "\x1b[24;3~" }
|
||||
- { key: NumpadEnter, chars: "\n" }
|
|
@ -0,0 +1,573 @@
|
|||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
#env:
|
||||
# TERM variable
|
||||
#
|
||||
# This value is used to set the `$TERM` environment variable for
|
||||
# each instance of Alacritty. If it is not present, alacritty will
|
||||
# check the local terminfo database and use `alacritty` if it is
|
||||
# available, otherwise `xterm-256color` is used.
|
||||
#TERM: xterm-256color
|
||||
|
||||
#window:
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Specified in number of columns/lines, not pixels.
|
||||
# If both are `0`, this setting is ignored.
|
||||
#dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
# Specified in number of pixels.
|
||||
# If the position is not set, the window manager will handle the placement.
|
||||
#position:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Window padding (changes require restart)
|
||||
#
|
||||
# Blank space added around the window in pixels. This padding is scaled
|
||||
# by DPI and the specified value is always added at both opposing sides.
|
||||
#padding:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
#dynamic_padding: false
|
||||
|
||||
# Window decorations
|
||||
#
|
||||
# Values for `decorations`:
|
||||
# - full: Borders and title bar
|
||||
# - none: Neither borders nor title bar
|
||||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background, but no title bar buttons
|
||||
#decorations: full
|
||||
|
||||
# Startup Mode (changes require restart)
|
||||
#
|
||||
# Values for `startup_mode`:
|
||||
# - Windowed
|
||||
# - Maximized
|
||||
# - Fullscreen
|
||||
#
|
||||
# Values for `startup_mode` (macOS only):
|
||||
# - SimpleFullscreen
|
||||
#startup_mode: Windowed
|
||||
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
|
||||
# Window class (Linux/BSD only):
|
||||
#class:
|
||||
# Application instance name
|
||||
#instance: Alacritty
|
||||
# General application class
|
||||
#general: Alacritty
|
||||
|
||||
# GTK theme variant (Linux/BSD only)
|
||||
#
|
||||
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
|
||||
# Set this to `None` to use the default theme variant.
|
||||
#gtk_theme_variant: None
|
||||
|
||||
#scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
#history: 10000
|
||||
|
||||
# Number of lines the viewport will move for every line scrolled when
|
||||
# scrollback is enabled (history > 0).
|
||||
#multiplier: 3
|
||||
|
||||
# Spaces per Tab (changes require restart)
|
||||
#
|
||||
# This setting defines the width of a tab in cells.
|
||||
#
|
||||
# Some applications, like Emacs, rely on knowing about the width of a tab.
|
||||
# To prevent unexpected behavior in these applications, it's also required to
|
||||
# change the `it` value in terminfo when altering this setting.
|
||||
#tabspaces: 8
|
||||
|
||||
# Font configuration
|
||||
#font:
|
||||
# Normal (roman) font face
|
||||
#normal:
|
||||
# Font family
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
||||
# Bold font face
|
||||
#bold:
|
||||
# Font family
|
||||
#
|
||||
# If the bold family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold
|
||||
|
||||
# Italic font face
|
||||
#italic:
|
||||
# Font family
|
||||
#
|
||||
# If the italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Italic
|
||||
|
||||
# Bold italic font face
|
||||
#bold_italic:
|
||||
# Font family
|
||||
#
|
||||
# If the bold italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
#size: 11.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||
#offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increasing `x` moves the glyph to the right,
|
||||
# increasing `y` moves the glyph upwards.
|
||||
#glyph_offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Thin stroke font rendering (macOS only)
|
||||
#
|
||||
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||
# it is recommended to set `use_thin_strokes` to `false`
|
||||
#
|
||||
# macOS >= 10.14.x:
|
||||
#
|
||||
# If the font quality on non-retina display looks bad then set
|
||||
# `use_thin_strokes` to `true` and enable font smoothing by running the
|
||||
# following command:
|
||||
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
|
||||
#
|
||||
# This is a global setting and will require a log out or restart to take
|
||||
# effect.
|
||||
#use_thin_strokes: true
|
||||
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: false
|
||||
|
||||
# Colors (Tomorrow Night Bright)
|
||||
#colors:
|
||||
# Default colors
|
||||
#primary:
|
||||
# background: '0x000000'
|
||||
# foreground: '0xeaeaea'
|
||||
|
||||
# Bright and dim foreground colors
|
||||
#
|
||||
# The dimmed foreground color is calculated automatically if it is not present.
|
||||
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||
# is `false`, the normal foreground color will be used.
|
||||
#dim_foreground: '0x9a9a9a'
|
||||
#bright_foreground: '0xffffff'
|
||||
|
||||
# Cursor colors
|
||||
#
|
||||
# Colors which should be used to draw the terminal cursor. If these are unset,
|
||||
# the cursor color will be the inverse of the cell color.
|
||||
#cursor:
|
||||
# text: '0x000000'
|
||||
# cursor: '0xffffff'
|
||||
|
||||
# Selection colors
|
||||
#
|
||||
# Colors which should be used to draw the selection area. If selection
|
||||
# background is unset, selection color will be the inverse of the cell colors.
|
||||
# If only text is unset the cell text color will remain the same.
|
||||
#selection:
|
||||
# text: '0xeaeaea'
|
||||
# background: '0x404040'
|
||||
|
||||
# Normal colors
|
||||
#normal:
|
||||
# black: '0x000000'
|
||||
# red: '0xd54e53'
|
||||
# green: '0xb9ca4a'
|
||||
# yellow: '0xe6c547'
|
||||
# blue: '0x7aa6da'
|
||||
# magenta: '0xc397d8'
|
||||
# cyan: '0x70c0ba'
|
||||
# white: '0xeaeaea'
|
||||
|
||||
# Bright colors
|
||||
#bright:
|
||||
# black: '0x666666'
|
||||
# red: '0xff3334'
|
||||
# green: '0x9ec400'
|
||||
# yellow: '0xe7c547'
|
||||
# blue: '0x7aa6da'
|
||||
# magenta: '0xb77ee0'
|
||||
# cyan: '0x54ced6'
|
||||
# white: '0xffffff'
|
||||
|
||||
# Dim colors
|
||||
#
|
||||
# If the dim colors are not set, they will be calculated automatically based
|
||||
# on the `normal` colors.
|
||||
#dim:
|
||||
# black: '0x000000'
|
||||
# red: '0x8c3336'
|
||||
# green: '0x7a8530'
|
||||
# yellow: '0x97822e'
|
||||
# blue: '0x506d8f'
|
||||
# magenta: '0x80638e'
|
||||
# cyan: '0x497e7a'
|
||||
# white: '0x9a9a9a'
|
||||
|
||||
# Indexed Colors
|
||||
#
|
||||
# The indexed colors include all colors from 16 to 256.
|
||||
# When these are not set, they're filled with sensible defaults.
|
||||
#
|
||||
# Example:
|
||||
# `- { index: 16, color: '0xff00ff' }`
|
||||
#
|
||||
#indexed_colors: []
|
||||
|
||||
# Visual Bell
|
||||
#
|
||||
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||
# rung, the terminal background will be set to white and transition back to the
|
||||
# default background color. You can control the rate of this transition by
|
||||
# setting the `duration` property (represented in milliseconds). You can also
|
||||
# configure the transition function by setting the `animation` property.
|
||||
#
|
||||
# Values for `animation`:
|
||||
# - Ease
|
||||
# - EaseOut
|
||||
# - EaseOutSine
|
||||
# - EaseOutQuad
|
||||
# - EaseOutCubic
|
||||
# - EaseOutQuart
|
||||
# - EaseOutQuint
|
||||
# - EaseOutExpo
|
||||
# - EaseOutCirc
|
||||
# - Linear
|
||||
#
|
||||
# Specifying a `duration` of `0` will disable the visual bell.
|
||||
#visual_bell:
|
||||
# animation: EaseOutExpo
|
||||
# duration: 0
|
||||
# color: '0xffffff'
|
||||
|
||||
# Background opacity
|
||||
#
|
||||
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||
#background_opacity: 1.0
|
||||
|
||||
#selection:
|
||||
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||
|
||||
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||
#save_to_clipboard: false
|
||||
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
#dynamic_title: true
|
||||
|
||||
#cursor:
|
||||
# Cursor style
|
||||
#
|
||||
# Values for `style`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
#style: Block
|
||||
|
||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||
# window is not focused.
|
||||
#unfocused_hollow: true
|
||||
|
||||
# Live config reload (changes require restart)
|
||||
#live_config_reload: true
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) /bin/bash --login
|
||||
# - (Linux/BSD) user login shell
|
||||
# - (Windows) powershell
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
|
||||
# Startup directory
|
||||
#
|
||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||
# directory of the parent process will be used.
|
||||
#working_directory: None
|
||||
|
||||
# WinPTY backend (Windows only)
|
||||
#
|
||||
# Alacritty defaults to using the newer ConPTY backend if it is available,
|
||||
# since it resolves a lot of bugs and is quite a bit faster. If it is not
|
||||
# available, the the WinPTY backend will be used instead.
|
||||
#
|
||||
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
|
||||
# even if the ConPTY backend is available.
|
||||
#winpty_backend: false
|
||||
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
|
||||
#debug:
|
||||
# Display the time it takes to redraw each frame.
|
||||
#render_timer: false
|
||||
|
||||
# Keep the log file after quitting Alacritty.
|
||||
#persistent_logging: false
|
||||
|
||||
# Log level
|
||||
#
|
||||
# Values for `log_level`:
|
||||
# - None
|
||||
# - Error
|
||||
# - Warn
|
||||
# - Info
|
||||
# - Debug
|
||||
# - Trace
|
||||
#log_level: Warn
|
||||
|
||||
# Print all received window events.
|
||||
#print_events: false
|
||||
|
||||
# Record all characters and escape sequences as test data.
|
||||
#ref_test: false
|
||||
|
||||
#mouse:
|
||||
# Click settings
|
||||
#
|
||||
# The `double_click` and `triple_click` settings control the time
|
||||
# alacritty should wait for accepting multiple clicks as one double
|
||||
# or triple click.
|
||||
#double_click: { threshold: 300 }
|
||||
#triple_click: { threshold: 300 }
|
||||
|
||||
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||
#hide_when_typing: false
|
||||
|
||||
#url:
|
||||
# URL launcher
|
||||
#
|
||||
# This program is executed when clicking on a text which is recognized as a URL.
|
||||
# The URL is always added to the command as the last parameter.
|
||||
#
|
||||
# When set to `None`, URL launching will be disabled completely.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) open
|
||||
# - (Linux/BSD) xdg-open
|
||||
# - (Windows) explorer
|
||||
#launcher:
|
||||
# program: xdg-open
|
||||
# args: []
|
||||
|
||||
# URL modifiers
|
||||
#
|
||||
# These are the modifiers that need to be held down for opening URLs when clicking
|
||||
# on them. The available modifiers are documented in the key binding section.
|
||||
#modifiers: None
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Mouse bindings are specified as a list of objects, much like the key
|
||||
# bindings further below.
|
||||
#
|
||||
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
|
||||
# `Shift` modifier is automatically added as a requirement.
|
||||
#
|
||||
# Each mouse binding will specify a:
|
||||
#
|
||||
# - `mouse`:
|
||||
#
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# - `action` (see key bindings)
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods` (see key bindings)
|
||||
#mouse_bindings:
|
||||
# - { mouse: Middle, action: PasteSelection }
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Key bindings are specified as a list of objects. For example, this is the
|
||||
# default paste binding:
|
||||
#
|
||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||
#
|
||||
# Each key binding will specify a:
|
||||
#
|
||||
# - `key`: Identifier of the key pressed
|
||||
#
|
||||
# - A-Z
|
||||
# - F1-F24
|
||||
# - Key0-Key9
|
||||
#
|
||||
# A full list with available key codes can be found here:
|
||||
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||
#
|
||||
# Instead of using the name of the keys, the `key` field also supports using
|
||||
# the scancode of the desired key. Scancodes have to be specified as a
|
||||
# decimal number. This command will allow you to display the hex scancodes
|
||||
# for certain keys:
|
||||
#
|
||||
# `showkey --scancodes`.
|
||||
#
|
||||
# Then exactly one of:
|
||||
#
|
||||
# - `chars`: Send a byte sequence to the running application
|
||||
#
|
||||
# The `chars` field writes the specified string to the terminal. This makes
|
||||
# it possible to pass escape sequences. To find escape codes for bindings
|
||||
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||
# to keys. It is therefore required to update the terminfo when changing an
|
||||
# escape sequence.
|
||||
#
|
||||
# - `action`: Execute a predefined action
|
||||
#
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - PasteSelection
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# - Hide
|
||||
# - Minimize
|
||||
# - Quit
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# - ClearLogNotice
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# (macOS only):
|
||||
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||
#
|
||||
# - `command`: Fork and execute a specified command plus arguments
|
||||
#
|
||||
# The `command` field must be a map containing a `program` string and an
|
||||
# `args` array of command line parameter strings. For example:
|
||||
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods`: Key modifiers to filter binding actions
|
||||
#
|
||||
# - Command
|
||||
# - Control
|
||||
# - Option
|
||||
# - Super
|
||||
# - Shift
|
||||
# - Alt
|
||||
#
|
||||
# Multiple `mods` can be combined using `|` like this:
|
||||
# `mods: Control|Shift`.
|
||||
# Whitespace and capitalization are relevant and must match the example.
|
||||
#
|
||||
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||
#
|
||||
# This is mainly used to send applications the correct escape sequences
|
||||
# when in different modes.
|
||||
#
|
||||
# - AppCursor
|
||||
# - AppKeypad
|
||||
# - Alt
|
||||
#
|
||||
# A `~` operator can be used before a mode to apply the binding whenever
|
||||
# the mode is *not* active, e.g. `~Alt`.
|
||||
#
|
||||
# Bindings are always filled by default, but will be replaced when a new
|
||||
# binding with the same triggers is defined. To unset a default binding, it can
|
||||
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||
# a no-op if you do not wish to receive input characters for that binding.
|
||||
#
|
||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||
# at once.
|
||||
#key_bindings:
|
||||
# (Windows, Linux, and BSD only)
|
||||
#- { key: V, mods: Control|Shift, action: Paste }
|
||||
#- { key: C, mods: Control|Shift, action: Copy }
|
||||
#- { key: Insert, mods: Shift, action: PasteSelection }
|
||||
#- { key: Key0, mods: Control, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||
#- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||
#- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||
|
||||
# (Windows only)
|
||||
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||
|
||||
# (macOS only)
|
||||
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Add, mods: Command, action: IncreaseFontSize }
|
||||
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||
#- { key: K, mods: Command, action: ClearHistory }
|
||||
#- { key: K, mods: Command, chars: "\x0c" }
|
||||
#- { key: V, mods: Command, action: Paste }
|
||||
#- { key: C, mods: Command, action: Copy }
|
||||
#- { key: H, mods: Command, action: Hide }
|
||||
#- { key: M, mods: Command, action: Minimize }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
|
||||
#- { key: Paste, action: Paste }
|
||||
#- { key: Copy, action: Copy }
|
||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||
#- { key: L, mods: Control, chars: "\x0c" }
|
||||
#- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
|
||||
#- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
|
||||
#- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt }
|
||||
#- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt }
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
# Copyright (c) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
|
||||
# Copyright (c) 2017-present Sven Greb <code@svengreb.de>
|
||||
|
||||
# Project: Nord Alacritty
|
||||
# Version: 0.1.0
|
||||
# Repository: https://github.com/arcticicestudio/nord-alacritty
|
||||
# License: MIT
|
||||
# References:
|
||||
# https://github.com/jwilm/alacritty
|
||||
|
||||
colors:
|
||||
primary:
|
||||
background: '0x2E3440'
|
||||
foreground: '0xD8DEE9'
|
||||
cursor:
|
||||
text: '0x2E3440'
|
||||
cursor: '0xD8DEE9'
|
||||
normal:
|
||||
black: '0x3B4252'
|
||||
red: '0xBF616A'
|
||||
green: '0xA3BE8C'
|
||||
yellow: '0xEBCB8B'
|
||||
blue: '0x81A1C1'
|
||||
magenta: '0xB48EAD'
|
||||
cyan: '0x88C0D0'
|
||||
white: '0xE5E9F0'
|
||||
bright:
|
||||
black: '0x4C566A'
|
||||
red: '0xBF616A'
|
||||
green: '0xA3BE8C'
|
||||
yellow: '0xEBCB8B'
|
||||
blue: '0x81A1C1'
|
||||
magenta: '0xB48EAD'
|
||||
cyan: '0x8FBCBB'
|
||||
white: '0xECEFF4'
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
||||
; mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
||||
autosens = 0
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. Autosens must be turned off for this to take effect.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
sensitivity = 100
|
||||
|
||||
# The number of bars (0-200). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
; bars = 0
|
||||
; bar_width = 2
|
||||
; bar_spacing = 1
|
||||
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'.
|
||||
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
method = pulse
|
||||
source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'.
|
||||
# 'noncurses' is for systems that does not suport ncurses.
|
||||
# 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
; method = ncurses
|
||||
|
||||
# Visual channels. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' averages both channels and outputs left to right lowest to highest frequencies.
|
||||
; channels = stereo
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
|
||||
|
||||
[color]
|
||||
|
||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a
|
||||
# terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
; background = black
|
||||
foreground = cyan
|
||||
|
||||
# Gradient mode, only hex defined colors are supported, background must also be defined in hex
|
||||
# or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will
|
||||
# not able to restore color definitions on exit, simply restart your terminal to restore colors.
|
||||
; gradient = 0
|
||||
; gradient_color_1 = '#0099ff'
|
||||
; gradient_color_2 = '#ff3399'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
; integral = 70
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
||||
; monstercat = 1
|
||||
; waves = 0;
|
||||
|
||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
||||
; gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
; ignore = 0
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
; 1 = 1 # bass
|
||||
; 2 = 1
|
||||
; 3 = 1 # midtone
|
||||
; 4 = 1
|
||||
; 5 = 1 # treble
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
||||
; mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
; framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. Autosens must be turned off for this to take effect.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-200). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
; bars = 0
|
||||
; bar_width = 2
|
||||
; bar_spacing = 1
|
||||
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'.
|
||||
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
; method = pulse
|
||||
; source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'.
|
||||
# 'noncurses' is for systems that does not suport ncurses.
|
||||
# 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
; method = ncurses
|
||||
|
||||
# Visual channels. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' averages both channels and outputs left to right lowest to highest frequencies.
|
||||
; channels = stereo
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
|
||||
|
||||
[color]
|
||||
|
||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a
|
||||
# terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
; background = black
|
||||
; foreground = cyan
|
||||
|
||||
# Gradient mode, only hex defined colors are supported, background must also be defined in hex
|
||||
# or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will
|
||||
# not able to restore color definitions on exit, simply restart your terminal to restore colors.
|
||||
; gradient = 0
|
||||
; gradient_color_1 = '#0099ff'
|
||||
; gradient_color_2 = '#ff3399'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
||||
# Higher values means smoother, but less precise. 0 to disable.
|
||||
; integral = 70
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
||||
; monstercat = 1
|
||||
; waves = 0;
|
||||
|
||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
||||
; gravity = 100
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
; ignore = 0
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
; 1 = 1 # bass
|
||||
; 2 = 1
|
||||
; 3 = 1 # midtone
|
||||
; 4 = 1
|
||||
; 5 = 1 # treble
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
# Thank you code_nomad: http://9m.no/ꪯ鵞
|
||||
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
|
||||
|
||||
#################################
|
||||
#
|
||||
# Backend
|
||||
#
|
||||
#################################
|
||||
|
||||
# Backend to use: "xrender" or "glx".
|
||||
# GLX backend is typically much faster but depends on a sane driver.
|
||||
backend = "glx";
|
||||
|
||||
#################################
|
||||
#
|
||||
# GLX backend
|
||||
#
|
||||
#################################
|
||||
|
||||
glx-no-stencil = true;
|
||||
|
||||
# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all.
|
||||
# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified,
|
||||
# but a 20% increase when only 1/4 is.
|
||||
# My tests on nouveau show terrible slowdown.
|
||||
glx-copy-from-front = false;
|
||||
|
||||
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update.
|
||||
# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated.
|
||||
# May break VSync and is not available on some drivers.
|
||||
# Overrides --glx-copy-from-front.
|
||||
# glx-use-copysubbuffermesa = true;
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
|
||||
# Recommended if it works.
|
||||
# glx-no-rebind-pixmap = true;
|
||||
|
||||
# GLX backend: GLX buffer swap method we assume.
|
||||
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
|
||||
# undefined is the slowest and the safest, and the default value.
|
||||
# copy is fastest, but may fail on some drivers,
|
||||
# 2-6 are gradually slower but safer (6 is still faster than 0).
|
||||
# Usually, double buffer means 2, triple buffer means 3.
|
||||
# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers.
|
||||
# Useless with --glx-use-copysubbuffermesa.
|
||||
# Partially breaks --resize-damage.
|
||||
# Defaults to undefined.
|
||||
#glx-swap-method = "undefined";
|
||||
|
||||
#################################
|
||||
#
|
||||
# Shadows
|
||||
#
|
||||
#################################
|
||||
|
||||
# Enabled client-side shadows on windows.
|
||||
shadow = true;
|
||||
# The blur radius for shadows. (default 12)
|
||||
shadow-radius = 8;
|
||||
# The left offset for shadows. (default -15)
|
||||
shadow-offset-x = -8;
|
||||
# The top offset for shadows. (default -15)
|
||||
shadow-offset-y = -8;
|
||||
# The translucency for shadows. (default .75)
|
||||
shadow-opacity = 0.5;
|
||||
|
||||
# Set if you want different colour shadows
|
||||
# shadow-red = 0.0;
|
||||
# shadow-green = 0.0;
|
||||
# shadow-blue = 0.0;
|
||||
|
||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
|
||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
|
||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
|
||||
shadow-exclude = [
|
||||
"! name~=''",
|
||||
"name = 'Notification'",
|
||||
"name = 'Plank'",
|
||||
"name = 'Docky'",
|
||||
"name = 'Kupfer'",
|
||||
"name = 'xfce4-notifyd'",
|
||||
"name *= 'VLC'",
|
||||
"name *= 'compton'",
|
||||
"name *= 'Chromium'",
|
||||
"name *= 'Chrome'",
|
||||
"class_g = 'Firefox' && argb",
|
||||
"class_g = 'Conky'",
|
||||
"class_g = 'Kupfer'",
|
||||
"class_g = 'Synapse'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g ?= 'Cairo-dock'",
|
||||
"class_g ?= 'Xfce4-notifyd'",
|
||||
"class_g ?= 'Xfce4-power-manager'",
|
||||
"_GTK_FRAME_EXTENTS@:c",
|
||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||
];
|
||||
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
|
||||
shadow-ignore-shaped = false;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Opacity
|
||||
#
|
||||
#################################
|
||||
|
||||
inactive-opacity = 1;
|
||||
active-opacity = 1;
|
||||
frame-opacity = 1;
|
||||
inactive-opacity-override = false;
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0)
|
||||
# inactive-dim = 0.2;
|
||||
# Do not let dimness adjust based on window opacity.
|
||||
# inactive-dim-fixed = true;
|
||||
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||
# blur-background = true;
|
||||
# Blur background of opaque windows with transparent frames as well.
|
||||
# blur-background-frame = true;
|
||||
# Do not let blur radius adjust based on window opacity.
|
||||
blur-background-fixed = false;
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'"
|
||||
];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Fading
|
||||
#
|
||||
#################################
|
||||
|
||||
# Fade windows during opacity changes.
|
||||
fading = false;
|
||||
# The time between steps in a fade in milliseconds. (default 10).
|
||||
fade-delta = 1;
|
||||
# Opacity change between steps while fading in. (default 0.028).
|
||||
fade-in-step = 0.03;
|
||||
# Opacity change between steps while fading out. (default 0.03).
|
||||
fade-out-step = 0.03;
|
||||
# Fade windows in/out when opening/closing
|
||||
no-fading-openclose = true;
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
fade-exclude = [ ];
|
||||
|
||||
#################################
|
||||
#
|
||||
# Other
|
||||
#
|
||||
#################################
|
||||
|
||||
# Try to detect WM windows and mark them as active.
|
||||
mark-wmwin-focused = true;
|
||||
# Mark all non-WM but override-redirect windows active (e.g. menus).
|
||||
mark-ovredir-focused = true;
|
||||
# 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.
|
||||
use-ewmh-active-win = true;
|
||||
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
|
||||
# This prevents opacity being ignored for some apps.
|
||||
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Specify refresh rate of the screen.
|
||||
# If not specified or 0, compton will try detecting this with X RandR extension.
|
||||
refresh-rate = 0;
|
||||
|
||||
# Vertical synchronization: match the refresh rate of the monitor
|
||||
vsync = true;
|
||||
|
||||
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
|
||||
# Reported to have no effect, though.
|
||||
dbe = false;
|
||||
|
||||
# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance.
|
||||
# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already,
|
||||
# unless you wish to specify a lower refresh rate than the actual value.
|
||||
#sw-opti = true;
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
|
||||
# Known to cause flickering when redirecting/unredirecting windows.
|
||||
unredir-if-possible = false;
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
focus-exclude = [ ];
|
||||
|
||||
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
|
||||
detect-transient = true;
|
||||
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
|
||||
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
|
||||
detect-client-leader = true;
|
||||
|
||||
#################################
|
||||
#
|
||||
# Window type settings
|
||||
#
|
||||
#################################
|
||||
|
||||
wintypes:
|
||||
{
|
||||
tooltip =
|
||||
{
|
||||
# fade: Fade the particular type of windows.
|
||||
fade = true;
|
||||
# shadow: Give those windows shadow
|
||||
shadow = false;
|
||||
# opacity: Default opacity for the type of windows.
|
||||
opacity = 0.85;
|
||||
# focus: Whether to always consider windows of this type focused.
|
||||
focus = true;
|
||||
};
|
||||
};
|
||||
|
||||
######################
|
||||
#
|
||||
# XSync
|
||||
# See: https://github.com/yshui/compton/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d
|
||||
#
|
||||
######################
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users.
|
||||
xrender-sync-fence = true;
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
# brightness.sh: this script exists because, on my ThinkPad X1 Yoga, as the
|
||||
# screen brightness _value_ increases/decreases linearly, actual brightness
|
||||
# does NOT increase/decrease linearly, so I had to make a hack that would
|
||||
# inc/dec the value accordingly
|
||||
|
||||
current_brightness="$(xbacklight -get | cut -f1 -d'.')" # convert float->int
|
||||
level=2 # default level
|
||||
|
||||
if [ "$current_brightness" -lt "1" ]; then # brightness < 1
|
||||
level=0.2
|
||||
elif [ "$current_brightness" -lt "5" ]; then # brightness < 5
|
||||
level=0.8
|
||||
elif [ "$current_brightness" -lt "11" ]; then # brightness < 11
|
||||
level=1.5
|
||||
elif [ "$current_brightness" -lt "21" ]; then # brightness < 21
|
||||
level=3
|
||||
elif [ "$current_brightness" -lt "51" ]; then # brightness < 51
|
||||
level=6
|
||||
else # brightness >= 50
|
||||
level=10
|
||||
fi
|
||||
|
||||
if [ "$1" == "inc" ]; then
|
||||
xbacklight -inc "$level"
|
||||
elif [ "$1" == "dec" ]; then
|
||||
xbacklight -dec "$level"
|
||||
fi
|
||||
|
|
@ -0,0 +1,255 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
|
||||
# i3 config file (v4)
|
||||
|
||||
##############
|
||||
# defaults #
|
||||
##############
|
||||
|
||||
# Note: to get a list of available keys (keysyms) for use in key combos, run
|
||||
# `xmodmap -pke`
|
||||
|
||||
# get current user (because I don't 100% trust '~' in this config)
|
||||
#set_from_resource $user echo "$USER"
|
||||
|
||||
# set modifier key to "Windows" key
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec alacritty
|
||||
|
||||
# start alternate terminal
|
||||
#bindsym $mod+Shift+Return exec urxvt
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
#bindsym $mod+d exec dmenu_run
|
||||
|
||||
# start Rofi (my dmenu replacement)
|
||||
bindsym $mod+d exec --no-startup-id rofi -show run
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
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"
|
||||
set $ws10 "10"
|
||||
set $ws11 "11"
|
||||
set $ws12 "12"
|
||||
|
||||
# switch to 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
|
||||
bindsym $mod+0 workspace $ws10
|
||||
bindsym $mod+minus workspace $ws11
|
||||
bindsym $mod+equal workspace $ws12
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
bindsym $mod+Shift+minus move container to workspace $ws11
|
||||
bindsym $mod+Shift+equal move container to workspace $ws12
|
||||
|
||||
# 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'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym j resize shrink width 2 px or 2 ppt
|
||||
bindsym k resize grow height 2 px or 2 ppt
|
||||
bindsym l resize shrink height 2 px or 2 ppt
|
||||
bindsym semicolon resize grow width 2 px or 2 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 2 px or 2 ppt
|
||||
bindsym Down resize grow height 2 px or 2 ppt
|
||||
bindsym Up resize shrink height 2 px or 2 ppt
|
||||
bindsym Right resize grow width 2 px or 2 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
#bar {
|
||||
# status_command i3status
|
||||
# position top
|
||||
# height 25
|
||||
#}
|
||||
|
||||
exec_always --no-startup-id ~/.config/polybar/launch.sh
|
||||
|
||||
|
||||
############################
|
||||
# window border settings #
|
||||
############################
|
||||
|
||||
# sets border for default windows, not floating
|
||||
# default_border pixel 2
|
||||
default_border pixel 1
|
||||
# floating windows get a 'normal' border
|
||||
default_floating_border normal
|
||||
# class border backgr indicator-text
|
||||
#client.focused #888888 #888888 #111111
|
||||
#client.unfocused #222222 #222222 #bbbbbb
|
||||
#client.focused_inactive #111111 #111111 #bbbbbb
|
||||
#client.urgent #383a3b #383a3b #ee0000
|
||||
|
||||
|
||||
######################
|
||||
# i3 gaps settings #
|
||||
######################
|
||||
|
||||
# sets gap size in between individual windows
|
||||
gaps inner 20
|
||||
# sets gap size in between windows and the edge of the monitor
|
||||
gaps outer 2
|
||||
|
||||
# remove/add gaps
|
||||
bindsym $mod+g gaps inner all toggle 20
|
||||
|
||||
#######################
|
||||
# set screenlocking #
|
||||
#######################
|
||||
|
||||
# starts xautolock, which forks to background and listens for user inactivity.
|
||||
# If inactivity after '-time' minutes, execute '-locker' string as a command
|
||||
# note: I'm still not sure if this line does anything. I think you might
|
||||
# just have to run the command by itself one in the shell.
|
||||
exec xautolock -detectsleep -noclose -time 12 -locker "$HOME/.config/i3/screenlocker.sh"
|
||||
|
||||
# locks the screen after pressing Mod+Q (Windows + Q in my setup)
|
||||
bindsym $mod+q exec "$HOME/.config/i3/screenlocker.sh"
|
||||
|
||||
#######################################
|
||||
# use feh to set desktop background #
|
||||
#######################################
|
||||
|
||||
# 'desktop' background changed below
|
||||
exec_always feh --bg-fill "$HOME/Library/Images/Wallpapers/rainbow/stripes/minimal-rainbow-wallpaper.jpg"
|
||||
# runs compositor, needed for effects, (really for st transparency)
|
||||
exec --no-startup-id compton -b --config ~/.config/compton/compton.conf
|
||||
|
||||
#####################################################
|
||||
# set ThinkPad X1 Yoga volume/brightness controls #
|
||||
#####################################################
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
bindsym XF86MonBrightnessUp exec "$HOME/.config/i3/brightness.sh inc"
|
||||
bindsym XF86MonBrightnessDown exec "$HOME/.config/i3/brightness.sh dec"
|
||||
|
||||
|
||||
#############################
|
||||
# start KDEConnect daemon #
|
||||
#############################
|
||||
|
||||
exec /usr/lib/kdeconnectd
|
||||
|
||||
|
||||
########################
|
||||
# moar to be done... #
|
||||
########################
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# battlemode.sh
|
||||
# written by x1phosura
|
||||
#
|
||||
# This shell script merely switches i3 configs and restarts i3 to apply the
|
||||
# changes, but one of the configs is a so-called "battlemode," which is
|
||||
# sorta exciting I guess. I completely stole this idea from my friend Ethan,
|
||||
# a fellow Arch i3 dweeb, and I'm really only writing this (besides it being
|
||||
# cool) because I wanna beat him to it, in case he hasn't implemented his own
|
||||
# yet.
|
||||
|
||||
# This battlemode script is also totally expandable in the future. One could
|
||||
# add multiple different modes, each with their own file, and other stuff too
|
||||
#
|
||||
# Note: there is no 'include' directive or other way to include configurations
|
||||
# from other files in i3. Technically there's a thing for Xresources, but
|
||||
# that limits you to Xresources, and is still somewhat limiting. So while this
|
||||
# isn't the ideal way to implement a "battle mode," it's the most elegant
|
||||
# solution I could think of given i3's limitation on sourcing configs
|
||||
# elsewhere.
|
||||
|
||||
|
||||
# directory where i3 configs are stored
|
||||
I3CONFDIR="/home/$HOME/.config/i3"
|
||||
|
||||
# perform the 'ol switcheroo
|
||||
if [ -e "$I3CONFDIR"/config ]; then
|
||||
mv "$I3CONFDIR"/config "$I3CONFDIR"/config.temp
|
||||
|
||||
if [ -e "$I3CONFDIR"/config.other ]; then
|
||||
mv "$I3CONFDIR"/config.other "$I3CONFDIR"/config
|
||||
mv "$I3CONFDIR"/config.temp "$I3CONFDIR"/config.other
|
||||
else
|
||||
mv "$I3CONFDIR"/config.temp "$I3CONFDIR"/config
|
||||
fi
|
||||
|
||||
# reloads and restarts i3
|
||||
i3-msg reload
|
||||
i3-msg restart
|
||||
fi
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
|
||||
# i3 config file (v4)
|
||||
|
||||
# get current user
|
||||
set_from_resource $user echo "$USER"
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec st
|
||||
bindsym $mod+Shift+Return exec urxvt
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
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"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to 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
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
# 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'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s 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 5 px or 5 ppt
|
||||
bindsym Down resize grow height 5 px or 5 ppt
|
||||
bindsym Up resize shrink height 5 px or 5 ppt
|
||||
bindsym Right resize grow width 5 px or 5 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
position top
|
||||
height 25
|
||||
font pango:DejaVu Sans Mono 9
|
||||
colors {
|
||||
background #1a1a1a
|
||||
}
|
||||
}
|
||||
|
||||
##############################
|
||||
# window border settings #
|
||||
##############################
|
||||
|
||||
# sets border for default windows, not floating
|
||||
default_border pixel 2
|
||||
# floating windows get a 'normal' border
|
||||
default_floating_border normal
|
||||
# class border backgr indicator-text
|
||||
client.focused #888888 #888888 #111111
|
||||
client.unfocused #222222 #222222 #bbbbbb
|
||||
client.focused_inactive #111111 #111111 #bbbbbb
|
||||
client.urgent #383a3b #383a3b #ee0000
|
||||
|
||||
|
||||
#########################
|
||||
# i3 gaps settings #
|
||||
#########################
|
||||
|
||||
# sets gap size in between individual windows
|
||||
gaps inner 20
|
||||
# sets gap size in between windows and the edge of the monitor
|
||||
gaps outer 2
|
||||
|
||||
|
||||
#########################################
|
||||
# use feh to set desktop background #
|
||||
#########################################
|
||||
|
||||
# 'desktop' background changed below
|
||||
#exec_always feh --bg-fill '/home/$user/Pictures/Backgrounds/rainbow/rainbow-stripe-DARK.jpg'
|
||||
exec_always feh --bg-fill '/home/$user/Pictures/Wallpapers/rainbow/rainbow-triangles1.jpg'
|
||||
# runs compositor, needed for effects, (really for st transparency)
|
||||
exec compton
|
||||
|
||||
|
||||
#############################
|
||||
# Pulse Audio controls #
|
||||
#############################
|
||||
|
||||
# increase sound volume
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||
# decrease sound volume
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||
# mute sound
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
|
||||
|
||||
########################
|
||||
# Screen-locking #
|
||||
########################
|
||||
|
||||
# starts xautolock, which forks to background and listens for user inactivity.
|
||||
# If inactivity after '-time' minutes, execute '-locker' string as a command
|
||||
# note: I'm still not sure if this line does anything. I think you might
|
||||
# just have to run the command by itself one in the shell.
|
||||
exec xautolock -detectsleep -noclose -time 12 -locker "$HOME/.config/i3/screenlocker.sh"
|
||||
|
||||
# locks the screen after pressing Mod+Q (Windows + Q in my setup)
|
||||
bindsym $mod+q exec "$HOME/.config/i3/screenlocker.sh"
|
||||
|
||||
|
||||
#####################
|
||||
# "Battle mode" #
|
||||
#####################
|
||||
|
||||
# runs a shell script, which switches the i3 config file and restarts i3,
|
||||
# putting it into "battle mode." To go back, run "battle" mode again,
|
||||
# which will run the script again and switch configs
|
||||
bindsym XF86Launch1 exec --no-startup-id "$HOME/.config/i3/battlemode.sh"
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
|
||||
# i3 config file (v4)
|
||||
|
||||
# get current user
|
||||
set_from_resource $user echo "$USER"
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec st
|
||||
bindsym $mod+Shift+Return exec urxvt
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
|
||||
# change focus
|
||||
bindsym $mod+j focus left
|
||||
bindsym $mod+k focus down
|
||||
bindsym $mod+l focus up
|
||||
bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+j move left
|
||||
bindsym $mod+Shift+k move down
|
||||
bindsym $mod+Shift+l move up
|
||||
bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
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"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to 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
|
||||
bindsym $mod+0 workspace $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||
|
||||
# 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'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s 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 5 px or 5 ppt
|
||||
bindsym Down resize grow height 5 px or 5 ppt
|
||||
bindsym Up resize shrink height 5 px or 5 ppt
|
||||
bindsym Right resize grow width 5 px or 5 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
position top
|
||||
height 25
|
||||
font pango:DejaVu Sans Mono 9
|
||||
colors {
|
||||
background #1a1a1a
|
||||
}
|
||||
}
|
||||
|
||||
##############################
|
||||
# window border settings #
|
||||
##############################
|
||||
|
||||
# sets border for default windows, not floating
|
||||
default_border pixel 2
|
||||
# floating windows get a 'normal' border
|
||||
default_floating_border normal
|
||||
# class border backgr indicator-text
|
||||
client.focused #888888 #888888 #111111
|
||||
client.unfocused #222222 #222222 #bbbbbb
|
||||
client.focused_inactive #111111 #111111 #bbbbbb
|
||||
client.urgent #383a3b #383a3b #ee0000
|
||||
|
||||
|
||||
#########################
|
||||
# i3 gaps settings #
|
||||
#########################
|
||||
|
||||
# sets gap size in between individual windows
|
||||
gaps inner 20
|
||||
# sets gap size in between windows and the edge of the monitor
|
||||
gaps outer 2
|
||||
|
||||
|
||||
#########################################
|
||||
# use feh to set desktop background #
|
||||
#########################################
|
||||
|
||||
# 'desktop' background changed below
|
||||
exec_always feh --bg-fill '/home/$user/Pictures/Wallpapers/rainbow/rainbow-stripe-DARK.jpg'
|
||||
#exec_always feh --bg-fill '/home/$user/Pictures/Backgrounds/rainbow/rainbow-triangles1.jpg'
|
||||
# runs compositor, needed for effects, (really for st transparency)
|
||||
exec compton
|
||||
|
||||
|
||||
#############################
|
||||
# Pulse Audio controls #
|
||||
#############################
|
||||
|
||||
# increase sound volume
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
||||
# decrease sound volume
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
||||
# mute sound
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
||||
|
||||
|
||||
########################
|
||||
# Screen-locking #
|
||||
########################
|
||||
|
||||
# starts xautolock, which forks to background and listens for user inactivity.
|
||||
# If inactivity after '-time' minutes, execute '-locker' string as a command
|
||||
# note: I'm still not sure if this line does anything. I think you might
|
||||
# just have to run the command by itself one in the shell.
|
||||
exec xautolock -detectsleep -noclose -time 12 -locker "$HOME/.config/i3/screenlocker.sh"
|
||||
|
||||
# locks the screen after pressing Mod+Q (Windows + Q in my setup)
|
||||
bindsym $mod+q exec "$HOME/.config/i3/screenlocker.sh"
|
||||
|
||||
|
||||
#####################
|
||||
# "Battle mode" #
|
||||
#####################
|
||||
|
||||
# runs a shell script, which switches the i3 config file and restarts i3,
|
||||
# putting it into "battle mode." To go back, run "battle" mode again,
|
||||
# which will run the script again and switch configs
|
||||
bindsym XF86Launch1 exec --no-startup-id "$HOME/.config/i3/battlemode.sh"
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1,60 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# script for locking my screen on Arch using i3lock
|
||||
# thanks to http://www.michaelabrahamsen.com/posts/custom-lockscreen-i3lock/
|
||||
|
||||
# set icon and temporary photo location
|
||||
icon="$HOME/.config/i3/icon.png"
|
||||
tmpbg='/tmp/screenshot-temp.png'
|
||||
|
||||
# cleans up if screenshot already exists because scrot won't overwrite
|
||||
rm -f $tmpbg
|
||||
|
||||
# takes a screenshot of the current screen
|
||||
scrot "$tmpbg"
|
||||
|
||||
# blur the screenshot by resizing and scaling back up
|
||||
convert "$tmpbg" -filter Gaussian -thumbnail 20% -sample 500% "$tmpbg"
|
||||
|
||||
# overlay the icon onto the temporary screenshot
|
||||
convert "$tmpbg" "$icon" -gravity center -composite "$tmpbg"
|
||||
|
||||
|
||||
# thank you to https://github.com/PandorasFox/i3lock-color/blob/master/lock.sh
|
||||
|
||||
# colors for i3lock-color
|
||||
B='#00000000' # blank or 'nothing'
|
||||
D='#aaaaaacc' # default
|
||||
W='#dd0000ff' # wrong red
|
||||
V='#22bb88ff' # verifying
|
||||
|
||||
# lock the screen with the blurred picture AND lock icon settings
|
||||
i3lock \
|
||||
--insidevercolor=$V \
|
||||
--ringvercolor=$V \
|
||||
\
|
||||
--insidewrongcolor=$W \
|
||||
--ringwrongcolor=$W \
|
||||
\
|
||||
--insidecolor=$B \
|
||||
--ringcolor=$D \
|
||||
--linecolor=$B \
|
||||
--separatorcolor=$D \
|
||||
\
|
||||
--timecolor=$B \
|
||||
--datecolor=$B \
|
||||
\
|
||||
--verifcolor=$B \
|
||||
--wrongcolor=$B \
|
||||
--keyhlcolor='4466ccff' \
|
||||
--bshlcolor='000000ff' \
|
||||
\
|
||||
--screen 1 \
|
||||
--indicator \
|
||||
--indpos="x+40:h-840" \
|
||||
--verif-align 1 \
|
||||
--wrong-align 1 \
|
||||
--radius=25 \
|
||||
--ring-width=4 \
|
||||
-i "$tmpbg"
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sleep_lock_service_file="/etc/systemd/system/screenlocker.service"
|
||||
|
||||
if [ "$1" = "set" ]
|
||||
then
|
||||
touch "$sleep_lock_service_file"
|
||||
|
||||
echo "[Unit]
|
||||
Description=Starts i3lock on suspend
|
||||
Before=sleep.target
|
||||
|
||||
[Service]
|
||||
User=$USER
|
||||
Type=forking
|
||||
Environment=DISPLAY=:0
|
||||
ExecStart=/home/$USER/.config/i3/screenlocker.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=sleep.target" > "$sleep_lock_service_file"
|
||||
systemctl enable screenlocker.service
|
||||
printf "Screenlocking upon closed lid enabled.\n"
|
||||
elif [ "$1" = "unset" ]
|
||||
then
|
||||
systemctl disable screenlocker.service
|
||||
rm $sleep_lock_service_file
|
||||
printf "Screenlocking upon closed lid disabled.\n"
|
||||
|
||||
else
|
||||
printf "Invalid arguments. Use 'set' or 'unset'.\n"
|
||||
fi
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# script for locking my screen on Arch using i3lock
|
||||
# x1phosura
|
||||
# thanks to http://www.michaelabrahamsen.com/posts/custom-lockscreen-i3lock/
|
||||
|
||||
# set icon and temporary photo location
|
||||
icon="$HOME/.config/i3/icon.png"
|
||||
tmpbg='/tmp/screenshot-temp.png'
|
||||
|
||||
# cleans up if screenshot already exists because scrot won't overwrite
|
||||
rm -f $tmpbg
|
||||
|
||||
# takes a screenshot of the current screen (relies on 'scrot' package)
|
||||
scrot "$tmpbg"
|
||||
|
||||
# blur the screenshot by resizing and scaling back up (relies on 'imagemagick')
|
||||
convert "$tmpbg" -filter Gaussian -thumbnail 20% -sample 500% "$tmpbg"
|
||||
|
||||
# overlay the icon onto the temporary screenshot
|
||||
convert "$tmpbg" "$icon" -gravity center -composite "$tmpbg"
|
||||
|
||||
|
||||
# thank you to https://github.com/PandorasFox/i3lock-color/blob/master/lock.sh
|
||||
|
||||
# colors for i3lock-color
|
||||
B='#00000000' # blank or 'nothing'
|
||||
D='#aaaaaacc' # default
|
||||
W='#dd0000ff' # wrong red
|
||||
V='#22bb88ff' # verifying
|
||||
|
||||
# lock the screen with the blurred picture AND lock icon settings
|
||||
i3lock \
|
||||
--insidevercolor=$V \
|
||||
--ringvercolor=$V \
|
||||
\
|
||||
--insidewrongcolor=$W \
|
||||
--ringwrongcolor=$W \
|
||||
\
|
||||
--insidecolor=$B \
|
||||
--ringcolor=$D \
|
||||
--linecolor=$B \
|
||||
--separatorcolor=$D \
|
||||
\
|
||||
--timecolor=$B \
|
||||
--datecolor=$B \
|
||||
\
|
||||
--verifcolor=$B \
|
||||
--wrongcolor=$B \
|
||||
--keyhlcolor='4466ccff' \
|
||||
--bshlcolor='000000ff' \
|
||||
\
|
||||
--screen 1 \
|
||||
--indicator \
|
||||
--indpos="x+1280:h-710" \
|
||||
--verif-align 1 \
|
||||
--wrong-align 1 \
|
||||
--radius=100 \
|
||||
--ring-width=4 \
|
||||
-i "$tmpbg"
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sleep_lock_service_file="/etc/systemd/system/screenlocker.service"
|
||||
|
||||
screenlocker_file_contents="[Unit]
|
||||
Description=Starts i3lock on suspend
|
||||
Before=sleep.target
|
||||
|
||||
[Service]
|
||||
User=$USER
|
||||
Type=forking
|
||||
Environment=DISPLAY=:0
|
||||
ExecStart=/home/$USER/.config/i3/screenlocker.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=sleep.target"
|
||||
|
||||
|
||||
if [ "$1" = "set" ]; then
|
||||
touch "$sleep_lock_service_file"
|
||||
echo "$screenlocker_file_contents" > "$sleep_lock_service_file"
|
||||
systemctl enable screenlocker.service
|
||||
printf "Screenlocking upon closed lid enabled.\n"
|
||||
elif [ "$1" = "unset" ]; then
|
||||
systemctl disable screenlocker.service
|
||||
rm "$sleep_lock_service_file"
|
||||
printf "Screenlocking upon closed lid disabled.\n"
|
||||
|
||||
else
|
||||
printf "Invalid arguments. Use 'set' or 'unset'.\n"
|
||||
fi
|
||||
|
Binary file not shown.
|
@ -0,0 +1,76 @@
|
|||
|
||||
#####################
|
||||
## My nanorc ##
|
||||
#####################
|
||||
|
||||
# Note: this file works on NANO VERSION > 5.0. If you aren't using the latest
|
||||
# nano, you're uncool, and you should quit being uncool and get yourself a new
|
||||
# nano. I mean, seriously, it's FREE, you have no excuse!
|
||||
|
||||
# Cheat Sheet (bc I'm actually vim user lol)
|
||||
# For more, see (https://www.nano-editor.org/dist/latest/cheatsheet.html)
|
||||
# Read in-editor help screen: Ctrl+g (open help guide)
|
||||
# Save current buffer: Ctrl+S (obviously I guess, idk, I'm dumb and used to :w)
|
||||
# Select text: Ctrl+^ (select, then you can copy/cut, Ctrl+^ again to unselect)
|
||||
# Copy/cut selected text: Alt+^ (copy), Ctrl+K (cut)
|
||||
# Paste text: Ctrl+U
|
||||
# Delete text: Ctrl+Del (delete right word), Ctrl+Shift+Del (delete left word)
|
||||
# Delete text (continued): Alt+Del (delete current line)
|
||||
# Undo/redo: Alt+U (undo), Alt+E (redo)
|
||||
# Go to top/bottom of file: Alt+\ (top of file), Alt+/ (bottom of file)
|
||||
# (Un)comment line: Alt+3 (comment or uncomment current line)
|
||||
# Fun Fact: Some Emacs navigation shortcuts Ctrl+P/N/F/B/E/A) actually work!
|
||||
# TODO: add more hints
|
||||
|
||||
|
||||
## Editor appearance/interface
|
||||
set linenumbers
|
||||
set titlecolor magenta,black
|
||||
set statuscolor magenta
|
||||
set keycolor magenta,black
|
||||
set functioncolor magenta
|
||||
set numbercolor magenta
|
||||
set indicator # AKA "scrollbar"
|
||||
set guidestripe 80 # vertical bar on right
|
||||
set stripecolor black,magenta
|
||||
unset emptyline
|
||||
# unset whitespacedisplay # this setting doesn't exist, which is REALLY DUMB!
|
||||
|
||||
|
||||
## Editor behavior
|
||||
set autoindent
|
||||
set smooth
|
||||
set softwrap
|
||||
set tabsize 8
|
||||
#set tabstospaces # will automatically replace TAB w/ spaces, disabled
|
||||
set mouse
|
||||
set nonewlines # I usually add a '\n' anyway, nano's not my babysitter
|
||||
|
||||
|
||||
## Syntax highlighting
|
||||
include "/usr/share/nano/asm.nanorc"
|
||||
include "/usr/share/nano/c.nanorc"
|
||||
include "/usr/share/nano/css.nanorc"
|
||||
include "/usr/share/nano/default.nanorc"
|
||||
include "/usr/share/nano/elisp.nanorc"
|
||||
include "/usr/share/nano/go.nanorc"
|
||||
include "/usr/share/nano/guile.nanorc"
|
||||
include "/usr/share/nano/html.nanorc"
|
||||
include "/usr/share/nano/java.nanorc"
|
||||
include "/usr/share/nano/javascript.nanorc"
|
||||
include "/usr/share/nano/json.nanorc"
|
||||
include "/usr/share/nano/lua.nanorc"
|
||||
include "/usr/share/nano/makefile.nanorc"
|
||||
include "/usr/share/nano/markdown.nanorc"
|
||||
include "/usr/share/nano/nanorc.nanorc"
|
||||
include "/usr/share/nano/patch.nanorc"
|
||||
include "/usr/share/nano/perl.nanorc"
|
||||
include "/usr/share/nano/php.nanorc"
|
||||
include "/usr/share/nano/puthon.nanorc"
|
||||
include "/usr/share/nano/ruby.nanorc"
|
||||
include "/usr/share/nano/rust.nanorc"
|
||||
include "/usr/share/nano/sh.nanorc"
|
||||
include "/usr/share/nano/sql.nanorc"
|
||||
include "/usr/share/nano/tex.nanorc"
|
||||
include "/usr/share/nano/xml.nanorc"
|
||||
include "/usr/share/nano/extra/fortran.nanorc" # MEME ALERT!!!
|
|
@ -0,0 +1,764 @@
|
|||
# See this wiki page for more info:
|
||||
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
|
||||
print_info() {
|
||||
info title
|
||||
info underline
|
||||
|
||||
info "OS" distro
|
||||
info "Host" model
|
||||
info "Kernel" kernel
|
||||
info "Uptime" uptime
|
||||
info "Packages" packages
|
||||
info "Shell" shell
|
||||
info "Resolution" resolution
|
||||
info "DE" de
|
||||
info "WM" wm
|
||||
info "WM Theme" wm_theme
|
||||
info "Theme" theme
|
||||
info "Icons" icons
|
||||
info "Terminal" term
|
||||
info "Terminal Font" term_font
|
||||
info "CPU" cpu
|
||||
info "GPU" gpu
|
||||
info "Memory" memory
|
||||
|
||||
# info "GPU Driver" gpu_driver # Linux/macOS only
|
||||
# info "CPU Usage" cpu_usage
|
||||
# info "Disk" disk
|
||||
# info "Battery" battery
|
||||
# info "Font" font
|
||||
# info "Song" song
|
||||
# [[ "$player" ]] && prin "Music Player" "$player"
|
||||
# info "Local IP" local_ip
|
||||
# info "Public IP" public_ip
|
||||
# info "Users" users
|
||||
# info "Locale" locale # This only works on glibc systems.
|
||||
|
||||
info cols
|
||||
}
|
||||
|
||||
|
||||
# Kernel
|
||||
|
||||
|
||||
# Shorten the output of the kernel function.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --kernel_shorthand
|
||||
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
|
||||
#
|
||||
# Example:
|
||||
# on: '4.8.9-1-ARCH'
|
||||
# off: 'Linux 4.8.9-1-ARCH'
|
||||
kernel_shorthand="on"
|
||||
|
||||
|
||||
# Distro
|
||||
|
||||
|
||||
# Shorten the output of the distro function
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'tiny', 'off'
|
||||
# Flag: --distro_shorthand
|
||||
# Supports: Everything except Windows and Haiku
|
||||
distro_shorthand="off"
|
||||
|
||||
# Show/Hide OS Architecture.
|
||||
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --os_arch
|
||||
#
|
||||
# Example:
|
||||
# on: 'Arch Linux x86_64'
|
||||
# off: 'Arch Linux'
|
||||
os_arch="on"
|
||||
|
||||
|
||||
# Uptime
|
||||
|
||||
|
||||
# Shorten the output of the uptime function
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'tiny', 'off'
|
||||
# Flag: --uptime_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: '2 days, 10 hours, 3 mins'
|
||||
# tiny: '2d 10h 3m'
|
||||
# off: '2 days, 10 hours, 3 minutes'
|
||||
uptime_shorthand="on"
|
||||
|
||||
|
||||
# Memory
|
||||
|
||||
|
||||
# Show memory pecentage in output.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --memory_percent
|
||||
#
|
||||
# Example:
|
||||
# on: '1801MiB / 7881MiB (22%)'
|
||||
# off: '1801MiB / 7881MiB'
|
||||
memory_percent="off"
|
||||
|
||||
|
||||
# Packages
|
||||
|
||||
|
||||
# Show/Hide Package Manager names.
|
||||
#
|
||||
# Default: 'tiny'
|
||||
# Values: 'on', 'tiny' 'off'
|
||||
# Flag: --package_managers
|
||||
#
|
||||
# Example:
|
||||
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
|
||||
# tiny: '908 (pacman, flatpak, snap)'
|
||||
# off: '908'
|
||||
package_managers="on"
|
||||
|
||||
|
||||
# Shell
|
||||
|
||||
|
||||
# Show the path to $SHELL
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --shell_path
|
||||
#
|
||||
# Example:
|
||||
# on: '/bin/bash'
|
||||
# off: 'bash'
|
||||
shell_path="off"
|
||||
|
||||
# Show $SHELL version
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --shell_version
|
||||
#
|
||||
# Example:
|
||||
# on: 'bash 4.4.5'
|
||||
# off: 'bash'
|
||||
shell_version="on"
|
||||
|
||||
|
||||
# CPU
|
||||
|
||||
|
||||
# CPU speed type
|
||||
#
|
||||
# Default: 'bios_limit'
|
||||
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
|
||||
# Flag: --speed_type
|
||||
# Supports: Linux with 'cpufreq'
|
||||
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
|
||||
speed_type="bios_limit"
|
||||
|
||||
# CPU speed shorthand
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'.
|
||||
# Flag: --speed_shorthand
|
||||
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
|
||||
#
|
||||
# Example:
|
||||
# on: 'i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'i7-6500U (4) @ 3.100GHz'
|
||||
speed_shorthand="off"
|
||||
|
||||
# Enable/Disable CPU brand in output.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_brand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U'
|
||||
# off: 'i7-6500U (4)'
|
||||
cpu_brand="on"
|
||||
|
||||
# CPU Speed
|
||||
# Hide/Show CPU speed.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --cpu_speed
|
||||
#
|
||||
# Example:
|
||||
# on: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
# off: 'Intel i7-6500U (4)'
|
||||
cpu_speed="on"
|
||||
|
||||
# CPU Cores
|
||||
# Display CPU cores in output
|
||||
#
|
||||
# Default: 'logical'
|
||||
# Values: 'logical', 'physical', 'off'
|
||||
# Flag: --cpu_cores
|
||||
# Support: 'physical' doesn't work on BSD.
|
||||
#
|
||||
# Example:
|
||||
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
|
||||
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
|
||||
# off: 'Intel i7-6500U @ 3.1GHz'
|
||||
cpu_cores="logical"
|
||||
|
||||
# CPU Temperature
|
||||
# Hide/Show CPU temperature.
|
||||
# Note the temperature is added to the regular CPU function.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'C', 'F', 'off'
|
||||
# Flag: --cpu_temp
|
||||
# Supports: Linux, BSD
|
||||
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
|
||||
# coretemp kernel module. This only supports newer Intel processors.
|
||||
#
|
||||
# Example:
|
||||
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
|
||||
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
|
||||
# off: 'Intel i7-6500U (4) @ 3.1GHz'
|
||||
cpu_temp="off"
|
||||
|
||||
|
||||
# GPU
|
||||
|
||||
|
||||
# Enable/Disable GPU Brand
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gpu_brand
|
||||
#
|
||||
# Example:
|
||||
# on: 'AMD HD 7950'
|
||||
# off: 'HD 7950'
|
||||
gpu_brand="on"
|
||||
|
||||
# Which GPU to display
|
||||
#
|
||||
# Default: 'all'
|
||||
# Values: 'all', 'dedicated', 'integrated'
|
||||
# Flag: --gpu_type
|
||||
# Supports: Linux
|
||||
#
|
||||
# Example:
|
||||
# all:
|
||||
# GPU1: AMD HD 7950
|
||||
# GPU2: Intel Integrated Graphics
|
||||
#
|
||||
# dedicated:
|
||||
# GPU1: AMD HD 7950
|
||||
#
|
||||
# integrated:
|
||||
# GPU1: Intel Integrated Graphics
|
||||
gpu_type="all"
|
||||
|
||||
|
||||
# Resolution
|
||||
|
||||
|
||||
# Display refresh rate next to each monitor
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --refresh_rate
|
||||
# Supports: Doesn't work on Windows.
|
||||
#
|
||||
# Example:
|
||||
# on: '1920x1080 @ 60Hz'
|
||||
# off: '1920x1080'
|
||||
refresh_rate="off"
|
||||
|
||||
|
||||
# Gtk Theme / Icons / Font
|
||||
|
||||
|
||||
# Shorten output of GTK Theme / Icons / Font
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix, Adwaita'
|
||||
# off: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
gtk_shorthand="off"
|
||||
|
||||
|
||||
# Enable/Disable gtk2 Theme / Icons / Font
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk2
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
# off: 'Adwaita [GTK3]'
|
||||
gtk2="on"
|
||||
|
||||
# Enable/Disable gtk3 Theme / Icons / Font
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --gtk3
|
||||
#
|
||||
# Example:
|
||||
# on: 'Numix [GTK2], Adwaita [GTK3]'
|
||||
# off: 'Numix [GTK2]'
|
||||
gtk3="on"
|
||||
|
||||
|
||||
# IP Address
|
||||
|
||||
|
||||
# Website to ping for the public IP
|
||||
#
|
||||
# Default: 'http://ident.me'
|
||||
# Values: 'url'
|
||||
# Flag: --ip_host
|
||||
public_ip_host="http://ident.me"
|
||||
|
||||
# Public IP timeout.
|
||||
#
|
||||
# Default: '2'
|
||||
# Values: 'int'
|
||||
# Flag: --ip_timeout
|
||||
public_ip_timeout=2
|
||||
|
||||
|
||||
# Disk
|
||||
|
||||
|
||||
# Which disks to display.
|
||||
# The values can be any /dev/sdXX, mount point or directory.
|
||||
# NOTE: By default we only show the disk info for '/'.
|
||||
#
|
||||
# Default: '/'
|
||||
# Values: '/', '/dev/sdXX', '/path/to/drive'.
|
||||
# Flag: --disk_show
|
||||
#
|
||||
# Example:
|
||||
# disk_show=('/' '/dev/sdb1'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
|
||||
#
|
||||
# disk_show=('/'):
|
||||
# 'Disk (/): 74G / 118G (66%)'
|
||||
#
|
||||
disk_show=('/')
|
||||
|
||||
# Disk subtitle.
|
||||
# What to append to the Disk subtitle.
|
||||
#
|
||||
# Default: 'mount'
|
||||
# Values: 'mount', 'name', 'dir'
|
||||
# Flag: --disk_subtitle
|
||||
#
|
||||
# Example:
|
||||
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
|
||||
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
|
||||
#
|
||||
# mount: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
|
||||
#
|
||||
# dir: 'Disk (/): 74G / 118G (66%)'
|
||||
# 'Disk (Local Disk): 74G / 118G (66%)'
|
||||
# 'Disk (Videos): 74G / 118G (66%)'
|
||||
disk_subtitle="mount"
|
||||
|
||||
|
||||
# Song
|
||||
|
||||
|
||||
# Manually specify a music player.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'player-name'
|
||||
# Flag: --music_player
|
||||
#
|
||||
# Available values for 'player-name':
|
||||
#
|
||||
# amarok
|
||||
# audacious
|
||||
# banshee
|
||||
# bluemindo
|
||||
# clementine
|
||||
# cmus
|
||||
# deadbeef
|
||||
# deepin-music
|
||||
# dragon
|
||||
# elisa
|
||||
# exaile
|
||||
# gnome-music
|
||||
# gmusicbrowser
|
||||
# gogglesmm
|
||||
# guayadeque
|
||||
# iTunes
|
||||
# juk
|
||||
# lollypop
|
||||
# mocp
|
||||
# mopidy
|
||||
# mpd
|
||||
# netease-cloud-music
|
||||
# pogo
|
||||
# pragha
|
||||
# qmmp
|
||||
# quodlibet
|
||||
# rhythmbox
|
||||
# sayonara
|
||||
# smplayer
|
||||
# spotify
|
||||
# strawberry
|
||||
# tomahawk
|
||||
# vlc
|
||||
# xmms2d
|
||||
# xnoise
|
||||
# yarock
|
||||
music_player="auto"
|
||||
|
||||
# Format to display song information.
|
||||
#
|
||||
# Default: '%artist% - %album% - %title%'
|
||||
# Values: '%artist%', '%album%', '%title%'
|
||||
# Flag: --song_format
|
||||
#
|
||||
# Example:
|
||||
# default: 'Song: Jet - Get Born - Sgt Major'
|
||||
song_format="%artist% - %album% - %title%"
|
||||
|
||||
# Print the Artist, Album and Title on separate lines
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --song_shorthand
|
||||
#
|
||||
# Example:
|
||||
# on: 'Artist: The Fratellis'
|
||||
# 'Album: Costello Music'
|
||||
# 'Song: Chelsea Dagger'
|
||||
#
|
||||
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
|
||||
song_shorthand="off"
|
||||
|
||||
# 'mpc' arguments (specify a host, password etc).
|
||||
#
|
||||
# Default: ''
|
||||
# Example: mpc_args=(-h HOST -P PASSWORD)
|
||||
mpc_args=()
|
||||
|
||||
|
||||
# Text Colors
|
||||
|
||||
|
||||
# Text Colors
|
||||
#
|
||||
# Default: 'distro'
|
||||
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
|
||||
# Flag: --colors
|
||||
#
|
||||
# Each number represents a different part of the text in
|
||||
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
|
||||
#
|
||||
# Example:
|
||||
# colors=(distro) - Text is colored based on Distro colors.
|
||||
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
|
||||
colors=(distro)
|
||||
|
||||
|
||||
# Text Options
|
||||
|
||||
|
||||
# Toggle bold text
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --bold
|
||||
bold="on"
|
||||
|
||||
# Enable/Disable Underline
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --underline
|
||||
underline_enabled="on"
|
||||
|
||||
# Underline character
|
||||
#
|
||||
# Default: '-'
|
||||
# Values: 'string'
|
||||
# Flag: --underline_char
|
||||
underline_char="-"
|
||||
|
||||
|
||||
# Info Separator
|
||||
# Replace the default separator with the specified string.
|
||||
#
|
||||
# Default: ':'
|
||||
# Flag: --separator
|
||||
#
|
||||
# Example:
|
||||
# separator="->": 'Shell-> bash'
|
||||
# separator=" =": 'WM = dwm'
|
||||
separator=":"
|
||||
|
||||
|
||||
# Color Blocks
|
||||
|
||||
|
||||
# Color block range
|
||||
# The range of colors to print.
|
||||
#
|
||||
# Default: '0', '15'
|
||||
# Values: 'num'
|
||||
# Flag: --block_range
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# Display colors 0-7 in the blocks. (8 colors)
|
||||
# neofetch --block_range 0 7
|
||||
#
|
||||
# Display colors 0-15 in the blocks. (16 colors)
|
||||
# neofetch --block_range 0 15
|
||||
block_range=(0 15)
|
||||
|
||||
# Toggle color blocks
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --color_blocks
|
||||
color_blocks="on"
|
||||
|
||||
# Color block width in spaces
|
||||
#
|
||||
# Default: '3'
|
||||
# Values: 'num'
|
||||
# Flag: --block_width
|
||||
block_width=3
|
||||
|
||||
# Color block height in lines
|
||||
#
|
||||
# Default: '1'
|
||||
# Values: 'num'
|
||||
# Flag: --block_height
|
||||
block_height=1
|
||||
|
||||
|
||||
# Progress Bars
|
||||
|
||||
|
||||
# Bar characters
|
||||
#
|
||||
# Default: '-', '='
|
||||
# Values: 'string', 'string'
|
||||
# Flag: --bar_char
|
||||
#
|
||||
# Example:
|
||||
# neofetch --bar_char 'elapsed' 'total'
|
||||
# neofetch --bar_char '-' '='
|
||||
bar_char_elapsed="-"
|
||||
bar_char_total="="
|
||||
|
||||
# Toggle Bar border
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --bar_border
|
||||
bar_border="on"
|
||||
|
||||
# Progress bar length in spaces
|
||||
# Number of chars long to make the progress bars.
|
||||
#
|
||||
# Default: '15'
|
||||
# Values: 'num'
|
||||
# Flag: --bar_length
|
||||
bar_length=15
|
||||
|
||||
# Progress bar colors
|
||||
# When set to distro, uses your distro's logo colors.
|
||||
#
|
||||
# Default: 'distro', 'distro'
|
||||
# Values: 'distro', 'num'
|
||||
# Flag: --bar_colors
|
||||
#
|
||||
# Example:
|
||||
# neofetch --bar_colors 3 4
|
||||
# neofetch --bar_colors distro 5
|
||||
bar_color_elapsed="distro"
|
||||
bar_color_total="distro"
|
||||
|
||||
|
||||
# Info display
|
||||
# Display a bar with the info.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'bar', 'infobar', 'barinfo', 'off'
|
||||
# Flags: --cpu_display
|
||||
# --memory_display
|
||||
# --battery_display
|
||||
# --disk_display
|
||||
#
|
||||
# Example:
|
||||
# bar: '[---=======]'
|
||||
# infobar: 'info [---=======]'
|
||||
# barinfo: '[---=======] info'
|
||||
# off: 'info'
|
||||
cpu_display="off"
|
||||
memory_display="off"
|
||||
battery_display="off"
|
||||
disk_display="off"
|
||||
|
||||
|
||||
# Backend Settings
|
||||
|
||||
|
||||
# Image backend.
|
||||
#
|
||||
# Default: 'ascii'
|
||||
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
|
||||
# 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
|
||||
# Flag: --backend
|
||||
image_backend="ascii"
|
||||
|
||||
# Image Source
|
||||
#
|
||||
# Which image or ascii file to display.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
|
||||
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
|
||||
# Flag: --source
|
||||
#
|
||||
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
|
||||
# In ascii mode, distro ascii art will be used and in an image mode, your
|
||||
# wallpaper will be used.
|
||||
image_source="auto"
|
||||
|
||||
|
||||
# Ascii Options
|
||||
|
||||
|
||||
# Ascii distro
|
||||
# Which distro's ascii art to display.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', 'distro_name'
|
||||
# Flag: --ascii_distro
|
||||
#
|
||||
# NOTE: Arch and Ubuntu have 'old' logo variants.
|
||||
# Change this to 'arch_old' or 'ubuntu_old' to use the old logos.
|
||||
# NOTE: Ubuntu has flavor variants.
|
||||
# Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.
|
||||
# NOTE: Arch, Crux and Gentoo have a smaller logo variant.
|
||||
# Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.
|
||||
ascii_distro="auto"
|
||||
|
||||
# Ascii Colors
|
||||
#
|
||||
# Default: 'distro'
|
||||
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
|
||||
# Flag: --ascii_colors
|
||||
#
|
||||
# Example:
|
||||
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
|
||||
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
|
||||
ascii_colors=(distro)
|
||||
|
||||
# Bold ascii logo
|
||||
# Whether or not to bold the ascii logo.
|
||||
#
|
||||
# Default: 'on'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --ascii_bold
|
||||
ascii_bold="on"
|
||||
|
||||
|
||||
# Image Options
|
||||
|
||||
|
||||
# Image loop
|
||||
# Setting this to on will make neofetch redraw the image constantly until
|
||||
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
|
||||
#
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
# Flag: --loop
|
||||
image_loop="off"
|
||||
|
||||
# Thumbnail directory
|
||||
#
|
||||
# Default: '~/.cache/thumbnails/neofetch'
|
||||
# Values: 'dir'
|
||||
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
|
||||
|
||||
# Crop mode
|
||||
#
|
||||
# Default: 'normal'
|
||||
# Values: 'normal', 'fit', 'fill'
|
||||
# Flag: --crop_mode
|
||||
#
|
||||
# See this wiki page to learn about the fit and fill options.
|
||||
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
|
||||
crop_mode="normal"
|
||||
|
||||
# Crop offset
|
||||
# Note: Only affects 'normal' crop mode.
|
||||
#
|
||||
# Default: 'center'
|
||||
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
|
||||
# 'east', 'southwest', 'south', 'southeast'
|
||||
# Flag: --crop_offset
|
||||
crop_offset="center"
|
||||
|
||||
# Image size
|
||||
# The image is half the terminal width by default.
|
||||
#
|
||||
# Default: 'auto'
|
||||
# Values: 'auto', '00px', '00%', 'none'
|
||||
# Flags: --image_size
|
||||
# --size
|
||||
image_size="auto"
|
||||
|
||||
# Gap between image and text
|
||||
#
|
||||
# Default: '3'
|
||||
# Values: 'num', '-num'
|
||||
# Flag: --gap
|
||||
gap=3
|
||||
|
||||
# Image offsets
|
||||
# Only works with the w3m backend.
|
||||
#
|
||||
# Default: '0'
|
||||
# Values: 'px'
|
||||
# Flags: --xoffset
|
||||
# --yoffset
|
||||
yoffset=0
|
||||
xoffset=0
|
||||
|
||||
# Image background color
|
||||
# Only works with the w3m backend.
|
||||
#
|
||||
# Default: ''
|
||||
# Values: 'color', 'blue'
|
||||
# Flag: --bg_color
|
||||
background_color=
|
||||
|
||||
|
||||
# Misc Options
|
||||
|
||||
# Stdout mode
|
||||
# Turn off all colors and disables image backend (ASCII/Image).
|
||||
# Useful for piping into another command.
|
||||
# Default: 'off'
|
||||
# Values: 'on', 'off'
|
||||
stdout="off"
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
|
||||
let &packpath = &runtimepath
|
||||
source ~/.vimrc
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; x1phosura's polybar ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; preconfigured modules in /usr/share/doc/polybar/config
|
||||
|
||||
[bar/top]
|
||||
;width = 90%
|
||||
height = 3%
|
||||
;offset-x = 20%
|
||||
;offset-y = 20%
|
||||
fixed-center = false
|
||||
|
||||
font-0 = "Inconsolata:size=16;0"
|
||||
; font-1 = "Inconsolata:size=16;0"
|
||||
|
||||
modules-left = i3
|
||||
modules-right = cpu wireless-network battery date time
|
||||
module-margin = 1
|
||||
|
||||
scroll-up = "#i3.prev"
|
||||
scroll-down = "#i3.next"
|
||||
wm-restack = i3
|
||||
|
||||
|
||||
;;;;;;;;;;;;;
|
||||
; modules ;
|
||||
;;;;;;;;;;;;;
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
pin-workspaces = true
|
||||
;index-sort = true
|
||||
; clicking and scrolling features of i3 module
|
||||
enable-click = true
|
||||
; false because scroll handler defined in bar/top, so the whole bar is affected
|
||||
enable-scroll = false
|
||||
; true would make this annoying, trust me
|
||||
wrapping-scroll = false
|
||||
|
||||
; still working on this part of the config...
|
||||
;label-dimmed-underline = #ffffff
|
||||
label-focused = "%name%"
|
||||
label-focused-foreground = #000000
|
||||
label-focused-background = #68c0e0
|
||||
;label-focused-underline = #${colors.accent}
|
||||
label-focused-underline = #000000
|
||||
label-focused-padding = 1
|
||||
label-unfocused = "%name%"
|
||||
;label-unfocused-underline = #555555
|
||||
label-unfocused-padding = 1
|
||||
label-urgent = "%name%"
|
||||
label-urgent-foreground = #000000
|
||||
label-urgent-background = #bd2c40
|
||||
;label-urgent-underline = #9b0a20
|
||||
label-urgent-padding = 1
|
||||
label-visible = "%name%"
|
||||
label-visible-foreground = #55ffff
|
||||
label-visible-padding = 1
|
||||
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
label = CPU %percentage%%
|
||||
|
||||
|
||||
;; placeholder for RAM
|
||||
;; [module/memory]
|
||||
;; type = internal/memory
|
||||
;; interval = 4
|
||||
;; format = <label> <bar-used>
|
||||
;; label = RAM %gb_used%/%gb_free%
|
||||
|
||||
|
||||
;; wireless device
|
||||
[module/wireless-network]
|
||||
type = internal/network
|
||||
interface = wlp4s0
|
||||
interval = 1
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
label-connected = [%signal%] %essid% (%local_ip%) %downspeed% v, %upspeed% ^
|
||||
label-disconnected = not connected
|
||||
|
||||
|
||||
;; placeholder for ethernet device
|
||||
; [module/wired-network]
|
||||
; type = internal/network
|
||||
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 100
|
||||
label-charging = CHRG %percentage%%
|
||||
label-discharging = BATT %percentage%%
|
||||
format-charging = <label-charging>
|
||||
format-discharging = <label-discharging>
|
||||
; format-full =
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %b %e, %Y
|
||||
|
||||
|
||||
[module/time]
|
||||
type = internal/date
|
||||
interval = 5.0
|
||||
date = %H:%M:%S
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
|
||||
[bar/top]
|
||||
monitor = eDP-1
|
||||
width = 50%
|
||||
height = 5%
|
||||
offset-x = 25%
|
||||
offset-y = 2%
|
||||
fixed-center = false
|
||||
bottom = false
|
||||
wm-restack = i3
|
||||
|
||||
background = #ffffff
|
||||
foreground = #000000
|
||||
linecolor = #1b00f2
|
||||
|
||||
spacing = 1
|
||||
lineheight = 1
|
||||
padding = 4%
|
||||
|
||||
font-0 = artwiz lime:pixelsize=10:antialias=false;1
|
||||
font-1 = DejaVuSans Mono for Powerline:pixelsize=10:antialias=false;1
|
||||
font-2 = FontAwesome:pixelsize=10:antialias=false;1
|
||||
|
||||
modules-left = volume
|
||||
modules-right = battery memory cpu
|
||||
modules-center = date
|
||||
|
||||
module-margin = 2
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
label = CPU %percentage%
|
||||
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
label = RAM %percentage_used%
|
||||
|
||||
|
||||
[module/volume]
|
||||
type = internal/alsa
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = "VOL"
|
||||
label-volume-foreground = #90233f
|
||||
|
||||
format-muted-foreground = #90233f
|
||||
format-muted = <label-muted> <bar-volume>
|
||||
label-muted = "MUT"
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #635370
|
||||
bar-volume-foreground-1 = #635370
|
||||
bar-volume-foreground-2 = #7E6B8E
|
||||
bar-volume-foreground-3 = #9C83AF
|
||||
bar-volume-foreground-4 = #B195C6
|
||||
bar-volume-foreground-5 = #C5A6DD
|
||||
bar-volume-foreground-6 = #E1BDFC
|
||||
bar-volume-gradient = true
|
||||
bar-volume-indicator =
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = •
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ·
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = #666666
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
full-at = 98
|
||||
|
||||
format-charging = <label-charging>
|
||||
format-discharging = <label-discharging>
|
||||
format-full =
|
||||
|
||||
label-charging = BATT %percentage%
|
||||
label-discharging = BATT %percentage%
|
||||
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
date = %m-%d-%Y %H:%M
|
||||
interval = 5
|
|
@ -0,0 +1,423 @@
|
|||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/jaagr/polybar
|
||||
;
|
||||
; The README contains alot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[colors]
|
||||
;background = ${xrdb:color0:#222}
|
||||
background = #222
|
||||
background-alt = #444
|
||||
;foreground = ${xrdb:color7:#222}
|
||||
foreground = #dfdfdf
|
||||
foreground-alt = #555
|
||||
primary = #ffb52a
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
|
||||
[bar/example]
|
||||
;monitor = ${env:MONITOR:HDMI-1}
|
||||
width = 100%
|
||||
height = 27
|
||||
;offset-x = 1%
|
||||
;offset-y = 1%
|
||||
radius = 6.0
|
||||
fixed-center = false
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
border-size = 4
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
font-0 = fixed:pixelsize=10;1
|
||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||
font-2 = siji:pixelsize=10;1
|
||||
|
||||
modules-left = bspwm i3
|
||||
modules-center =
|
||||
modules-right = filesystem xbacklight alsa pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
;tray-background = #0063ff
|
||||
|
||||
;wm-restack = bspwm
|
||||
;wm-restack = i3
|
||||
|
||||
;override-redirect = true
|
||||
|
||||
;scroll-up = bspwm-desknext
|
||||
;scroll-down = bspwm-deskprev
|
||||
|
||||
;scroll-up = i3wm-wsnext
|
||||
;scroll-down = i3wm-wsprev
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:30:...%
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-prefix-underline = ${colors.secondary}
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-underline = ${colors.secondary}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-background = ${colors.secondary}
|
||||
label-indicator-underline = ${colors.secondary}
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
|
||||
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||
label-unmounted = %mountpoint% not mounted
|
||||
label-unmounted-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline= ${colors.primary}
|
||||
label-focused-padding = 2
|
||||
|
||||
label-occupied = %index%
|
||||
label-occupied-padding = 2
|
||||
|
||||
label-urgent = %index%!
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
label-empty = %index%
|
||||
label-empty-foreground = ${colors.foreground-alt}
|
||||
label-empty-padding = 2
|
||||
|
||||
; Separator in between workspaces
|
||||
; label-separator = |
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
|
||||
; Only show workspaces on the same output as the bar
|
||||
;pin-workspaces = true
|
||||
|
||||
label-mode-padding = 2
|
||||
label-mode-foreground = #000
|
||||
label-mode-background = ${colors.primary}
|
||||
|
||||
; focused = Active workspace on focused monitor
|
||||
label-focused = %index%
|
||||
label-focused-background = ${module/bspwm.label-focused-background}
|
||||
label-focused-underline = ${module/bspwm.label-focused-underline}
|
||||
label-focused-padding = ${module/bspwm.label-focused-padding}
|
||||
|
||||
; unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = %index%
|
||||
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
|
||||
|
||||
; visible = Active workspace on unfocused monitor
|
||||
label-visible = %index%
|
||||
label-visible-background = ${self.label-focused-background}
|
||||
label-visible-underline = ${self.label-focused-underline}
|
||||
label-visible-padding = ${self.label-focused-padding}
|
||||
|
||||
; urgent = Workspace with urgency hint set
|
||||
label-urgent = %index%
|
||||
label-urgent-background = ${module/bspwm.label-urgent-background}
|
||||
label-urgent-padding = ${module/bspwm.label-urgent-padding}
|
||||
|
||||
; Separator in between workspaces
|
||||
; label-separator = |
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
|
||||
|
||||
icon-prev =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label> <bar>
|
||||
label = BL
|
||||
|
||||
bar-width = 10
|
||||
bar-indicator = |
|
||||
bar-indicator-foreground = #fff
|
||||
bar-indicator-font = 2
|
||||
bar-fill = ─
|
||||
bar-fill-font = 2
|
||||
bar-fill-foreground = #9f78e1
|
||||
bar-empty = ─
|
||||
bar-empty-font = 2
|
||||
bar-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/backlight-acpi]
|
||||
inherit = module/xbacklight
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #f90000
|
||||
label = %percentage:2%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #4bffdc
|
||||
label = %percentage_used%%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp3s0
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
format-connected-underline = #9f78e1
|
||||
label-connected = %essid%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp0s31f6
|
||||
interval = 3.0
|
||||
|
||||
format-connected-underline = #55aa55
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.foreground-alt}
|
||||
label-connected = %local_ip%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
date =
|
||||
date-alt = " %Y-%m-%d"
|
||||
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #0a6cf5
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = VOL %percentage%%
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
label-muted = 🔇 muted
|
||||
label-muted-foreground = #666
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/alsa]
|
||||
type = internal/alsa
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = VOL
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
format-muted-prefix = " "
|
||||
format-muted-foreground = ${colors.foreground-alt}
|
||||
label-muted = sound muted
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = #ffb52a
|
||||
|
||||
format-discharging = <animation-discharging> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = ${colors.foreground-alt}
|
||||
animation-charging-framerate = 750
|
||||
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-foreground = ${colors.foreground-alt}
|
||||
animation-discharging-framerate = 750
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
thermal-zone = 0
|
||||
warn-temperature = 60
|
||||
|
||||
format = <ramp> <label>
|
||||
format-underline = #f50a4d
|
||||
format-warn = <ramp> <label-warn>
|
||||
format-warn-underline = ${self.format-underline}
|
||||
|
||||
label = %temperature-c%
|
||||
label-warn = %temperature-c%
|
||||
label-warn-foreground = ${colors.secondary}
|
||||
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
expand-right = true
|
||||
|
||||
format-spacing = 1
|
||||
|
||||
label-open =
|
||||
label-open-foreground = ${colors.secondary}
|
||||
label-close = cancel
|
||||
label-close-foreground = ${colors.secondary}
|
||||
label-separator = |
|
||||
label-separator-foreground = ${colors.foreground-alt}
|
||||
|
||||
menu-0-0 = reboot
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-1 = power off
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
menu-1-0 = cancel
|
||||
menu-1-0-exec = menu-open-0
|
||||
menu-1-1 = reboot
|
||||
menu-1-1-exec = sudo reboot
|
||||
|
||||
menu-2-0 = power off
|
||||
menu-2-0-exec = sudo poweroff
|
||||
menu-2-1 = cancel
|
||||
menu-2-1-exec = menu-open-0
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
;compositing-background = xor
|
||||
;compositing-background = screen
|
||||
;compositing-foreground = source
|
||||
;compositing-border = over
|
||||
;pseudo-transparency = false
|
||||
|
||||
[global/wm]
|
||||
margin-top = 5
|
||||
margin-bottom = 5
|
||||
|
||||
; vim:ft=dosini
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# stolen from Arch wiki
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch polybar
|
||||
polybar top &
|
||||
|
||||
echo "Polybar launched..."
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
# x1phosura's radare2rc
|
||||
|
||||
|
||||
# Show comments at right of disassembly if they fit in screen
|
||||
e asm.cmt.right=true
|
||||
|
||||
# Solarized theme
|
||||
eco pink
|
||||
|
||||
# Use UTF-8 to show cool arrows that do not look like crap :)
|
||||
e scr.utf8 = true
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# This is a sample commands.py. You can add your own commands here.
|
||||
#
|
||||
# Please refer to commands_full.py for all the default commands and a complete
|
||||
# documentation. Do NOT add them all here, or you may end up with defunct
|
||||
# commands when upgrading ranger.
|
||||
|
||||
# A simple command for demonstration purposes follows.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
# You can import any python module as needed.
|
||||
import os
|
||||
|
||||
# You always need to import ranger.api.commands here to get the Command class:
|
||||
from ranger.api.commands import Command
|
||||
|
||||
|
||||
# Any class that is a subclass of "Command" will be integrated into ranger as a
|
||||
# command. Try typing ":my_edit<ENTER>" in ranger!
|
||||
class my_edit(Command):
|
||||
# The so-called doc-string of the class will be visible in the built-in
|
||||
# help that is accessible by typing "?c" inside ranger.
|
||||
""":my_edit <filename>
|
||||
|
||||
A sample command for demonstration purposes that opens a file in an editor.
|
||||
"""
|
||||
|
||||
# The execute method is called when you run this command in ranger.
|
||||
def execute(self):
|
||||
# self.arg(1) is the first (space-separated) argument to the function.
|
||||
# This way you can write ":my_edit somefilename<ENTER>".
|
||||
if self.arg(1):
|
||||
# self.rest(1) contains self.arg(1) and everything that follows
|
||||
target_filename = self.rest(1)
|
||||
else:
|
||||
# self.fm is a ranger.core.filemanager.FileManager object and gives
|
||||
# you access to internals of ranger.
|
||||
# self.fm.thisfile is a ranger.container.file.File object and is a
|
||||
# reference to the currently selected file.
|
||||
target_filename = self.fm.thisfile.path
|
||||
|
||||
# This is a generic function to print text in ranger.
|
||||
self.fm.notify("Let's edit the file " + target_filename + "!")
|
||||
|
||||
# Using bad=True in fm.notify allows you to print error messages:
|
||||
if not os.path.exists(target_filename):
|
||||
self.fm.notify("The given file does not exist!", bad=True)
|
||||
return
|
||||
|
||||
# This executes a function from ranger.core.acitons, a module with a
|
||||
# variety of subroutines that can help you construct commands.
|
||||
# Check out the source, or run "pydoc ranger.core.actions" for a list.
|
||||
self.fm.edit_file(target_filename)
|
||||
|
||||
# The tab method is called when you press tab, and should return a list of
|
||||
# suggestions that the user will tab through.
|
||||
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
|
||||
def tab(self, tabnum):
|
||||
# This is a generic tab-completion function that iterates through the
|
||||
# content of the current directory.
|
||||
return self._tab_directory_content()
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,662 @@
|
|||
# ===================================================================
|
||||
# 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 multiple
|
||||
|
||||
# Use non-default path for file preview script?
|
||||
# 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 true
|
||||
|
||||
# State of the four backends git, hg, bzr, svn. 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
|
||||
set vcs_backend_svn 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.
|
||||
#
|
||||
# This feature relies on the dimensions of the terminal's font. By default, a
|
||||
# width of 8 and height of 11 are used. To use other values, set the options
|
||||
# iterm2_font_width and iterm2_font_height to the desired values.
|
||||
#
|
||||
# * 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 w3m
|
||||
|
||||
# Default iTerm2 font size (see: preview_images_method: iterm2)
|
||||
set iterm2_font_width 8
|
||||
set iterm2_font_height 11
|
||||
|
||||
# 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
|
||||
|
||||
# Show hostname in titlebar?
|
||||
set hostname_in_titlebar true
|
||||
|
||||
# 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
|
||||
|
||||
# Save the "`" bookmark to disk. This can be used to switch to the last
|
||||
# directory by typing "``".
|
||||
set save_backtick_bookmark 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
|
||||
|
||||
# Changes case sensitivity for the cd command tab completion
|
||||
set cd_tab_case sensitive
|
||||
|
||||
# Use fuzzy tab completion with the "cd" command. For example,
|
||||
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
|
||||
set cd_tab_fuzzy false
|
||||
|
||||
# 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
|
||||
|
||||
# Start line numbers from 1 instead of 0
|
||||
set one_indexed false
|
||||
|
||||
# Save tabs on exit
|
||||
set save_tabs_on_exit false
|
||||
|
||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
||||
# the top and vice versa.
|
||||
set wrap_scroll false
|
||||
|
||||
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
||||
# directories, files and symlinks respectively.
|
||||
set global_inode_type_filter
|
||||
|
||||
# ===================================================================
|
||||
# == 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! quit!
|
||||
alias qa quitall
|
||||
alias qa! quitall!
|
||||
alias qall 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 -aefklst
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the browser
|
||||
# ===================================================================
|
||||
|
||||
# Basic
|
||||
map Q quitall
|
||||
map q quit
|
||||
copymap q ZZ ZQ
|
||||
|
||||
map R reload_cwd
|
||||
map F set freeze_files!
|
||||
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 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 <F2> rename_append
|
||||
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 ) jump_non
|
||||
|
||||
map gh cd ~
|
||||
map ge cd /etc
|
||||
map gu cd /usr
|
||||
map gd cd ~/Documents
|
||||
map gw cd ~/Desktop/class-workspace
|
||||
map g77 cd ~/73h4x
|
||||
map g7c cd ~/73h4x/code
|
||||
map g7p cd ~/73h4x/projects
|
||||
map gll cd ~/Library
|
||||
map gli cd ~/Library/Images
|
||||
map glv cd ~/Library/Video
|
||||
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 gp cd /tmp
|
||||
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 yank path
|
||||
map yd yank dir
|
||||
map yn yank name
|
||||
|
||||
# Filesystem Operations
|
||||
map = chmod
|
||||
|
||||
map cw console rename%space
|
||||
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 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
|
||||
copymap zf zz
|
||||
|
||||
# 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>
|
|
@ -0,0 +1,229 @@
|
|||
#
|
||||
# This is the configuration file of "rifle", ranger's file executor/opener.
|
||||
# Each line consists of conditions and a command. For each line the conditions
|
||||
# are checked and if they are met, the respective command is run.
|
||||
#
|
||||
# Syntax:
|
||||
# <condition1> , <condition2> , ... = command
|
||||
#
|
||||
# The command can contain these environment variables:
|
||||
# $1-$9 | The n-th selected file
|
||||
# $@ | All selected files
|
||||
#
|
||||
# If you use the special command "ask", rifle will ask you what program to run.
|
||||
#
|
||||
# Prefixing a condition with "!" will negate its result.
|
||||
# These conditions are currently supported:
|
||||
# match <regexp> | The regexp matches $1
|
||||
# ext <regexp> | The regexp matches the extension of $1
|
||||
# mime <regexp> | The regexp matches the mime type of $1
|
||||
# name <regexp> | The regexp matches the basename of $1
|
||||
# path <regexp> | The regexp matches the absolute path of $1
|
||||
# has <program> | The program is installed (i.e. located in $PATH)
|
||||
# env <variable> | The environment variable "variable" is non-empty
|
||||
# file | $1 is a file
|
||||
# directory | $1 is a directory
|
||||
# number <n> | change the number of this command to n
|
||||
# terminal | stdin, stderr and stdout are connected to a terminal
|
||||
# X | $DISPLAY is not empty (i.e. Xorg runs)
|
||||
#
|
||||
# There are also pseudo-conditions which have a "side effect":
|
||||
# flag <flags> | Change how the program is run. See below.
|
||||
# label <label> | Assign a label or name to the command so it can
|
||||
# | be started with :open_with <label> in ranger
|
||||
# | or `rifle -p <label>` in the standalone executable.
|
||||
# else | Always true.
|
||||
#
|
||||
# Flags are single characters which slightly transform the command:
|
||||
# f | Fork the program, make it run in the background.
|
||||
# | New command = setsid $command >& /dev/null &
|
||||
# r | Execute the command with root permissions
|
||||
# | New command = sudo $command
|
||||
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
||||
# | rifle will attempt to extract it from $TERM.
|
||||
# | New command = $TERMCMD -e $command
|
||||
# Note: The "New command" serves only as an illustration, the exact
|
||||
# implementation may differ.
|
||||
# Note: When using rifle in ranger, there is an additional flag "c" for
|
||||
# only running the current file even if you have marked multiple files.
|
||||
|
||||
#-------------------------------------------
|
||||
# Websites
|
||||
#-------------------------------------------
|
||||
# Rarely installed browsers get higher priority; It is assumed that if you
|
||||
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
|
||||
# other hand are often only installed as fallback browsers.
|
||||
#ext x?html?, has surf, X, flag f = surf -- file://"$1"
|
||||
#ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
|
||||
#ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
|
||||
#ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
||||
#ext x?html?, has dwb, X, flag f = dwb -- "$@"
|
||||
#ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
|
||||
#ext x?html?, has luakit, X, flag f = luakit -- "$@"
|
||||
#ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
|
||||
#ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
||||
#ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
||||
#ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
||||
#ext x?html?, has midori, X, flag f = midori -- "$@"
|
||||
#ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||
#ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||
#ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||
#ext x?html?, has opera, X, flag f = opera -- "$@"
|
||||
#ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
||||
#ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
||||
#ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
||||
#ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
||||
#ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
||||
#ext x?html?, has elinks, terminal = elinks "$@"
|
||||
#ext x?html?, has links2, terminal = links2 "$@"
|
||||
#ext x?html?, has links, terminal = links "$@"
|
||||
#ext x?html?, has lynx, terminal = lynx -- "$@"
|
||||
#ext x?html?, has w3m, terminal = w3m "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
# Define the "editor" for text files as first action
|
||||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
||||
mime ^text, label pager = "$PAGER" -- "$@"
|
||||
!mime ^text, label editor, ext htmllxml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
!mime ^text, label pager, ext html|xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
ext 1 = man "$1"
|
||||
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
||||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
|
||||
ext nes, has fceux, X = fceux "$1"
|
||||
ext exe = wine "$1"
|
||||
name ^[mM]akefile$ = ${VISUAL:-$EDITOR} -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Code
|
||||
#-------------------------------------------
|
||||
ext py = python -- "$1"
|
||||
ext pl = perl -- "$1"
|
||||
ext rb = ruby -- "$1"
|
||||
ext js = node -- "$1"
|
||||
ext sh = sh -- "$1"
|
||||
ext php = php -- "$1"
|
||||
|
||||
#--------------------------------------------
|
||||
# Audio without X
|
||||
#-------------------------------------------
|
||||
mime ^audio|ogg$, terminal, has mpv = mpv --no-audio-display -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
|
||||
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video/Audio with a GUI
|
||||
#-------------------------------------------
|
||||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
||||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
||||
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video without X:
|
||||
#-------------------------------------------
|
||||
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Documents
|
||||
#-------------------------------------------
|
||||
ext pdf, has llpp, X, flag f = llpp "$@"
|
||||
ext pdf, has evince, X, flag f = evince -- "$@"
|
||||
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
||||
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
||||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
||||
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
|
||||
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
|
||||
ext pdf, has atril, X, flag f = atril -- "$@"
|
||||
ext pdf, has okular, X, flag f = okular -- "$@"
|
||||
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
|
||||
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
|
||||
ext pdf, has open, X, flat f = open "$@"
|
||||
|
||||
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
|
||||
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
|
||||
|
||||
ext djvu, has zathura,X, flag f = zathura -- "$@"
|
||||
ext djvu, has evince, X, flag f = evince -- "$@"
|
||||
ext djvu, has atril, X, flag f = atril -- "$@"
|
||||
|
||||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Image Viewing:
|
||||
#-------------------------------------------
|
||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||
mime ^image/gif, has eog, X, flag f = eog -- "$@"
|
||||
# mime ^image/gif, has gthumb, X, flag f = gthumb -- "$@"
|
||||
# works for gifs, makes SURE they repeat
|
||||
mime ^image/gif, has mpv, X, flag f = mpv --loop=inf -- "$@"
|
||||
|
||||
mime ^image, has eog, X, flag f = eog -- "$@"
|
||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
||||
mime ^image, has eom, X, flag f = eom -- "$@"
|
||||
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
||||
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||
ext xcf, X, flag f = gimp -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Archives
|
||||
#-------------------------------------------
|
||||
|
||||
# avoid password prompt by providing empty password
|
||||
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
|
||||
# This requires atool
|
||||
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
||||
|
||||
# Listing and extracting archives without atool:
|
||||
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
|
||||
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
||||
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
||||
ext zip, has unzip = unzip -l "$1" | less
|
||||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
||||
ext ace, has unace = unace l "$1" | less
|
||||
ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
||||
ext rar, has unrar = unrar l "$1" | less
|
||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
||||
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
||||
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
||||
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||
|
||||
# Define the editor for non-text files + pager as last action
|
||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
# The very last action, so that it's never triggered accidentally, is to execute a program:
|
||||
mime application/x-executable = "$1"
|
|
@ -0,0 +1,178 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o noclobber -o noglob -o nounset -o pipefail
|
||||
IFS=$'\n'
|
||||
|
||||
# If the option `use_preview_script` is set to `true`,
|
||||
# then this script will be called and its output will be displayed in ranger.
|
||||
# ANSI color codes are supported.
|
||||
# STDIN is disabled, so interactive scripts won't work properly
|
||||
|
||||
# This script is considered a configuration file and must be updated manually.
|
||||
# It will be left untouched if you upgrade ranger.
|
||||
|
||||
# Meanings of exit codes:
|
||||
# code | meaning | action of ranger
|
||||
# -----+------------+-------------------------------------------
|
||||
# 0 | success | Display stdout as preview
|
||||
# 1 | no preview | Display no preview at all
|
||||
# 2 | plain text | Display the plain content of the file
|
||||
# 3 | fix width | Don't reload when width changes
|
||||
# 4 | fix height | Don't reload when height changes
|
||||
# 5 | fix both | Don't ever reload
|
||||
# 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
||||
# 7 | image | Display the file directly as an image
|
||||
|
||||
# Script arguments
|
||||
FILE_PATH="${1}" # Full path of the highlighted file
|
||||
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
|
||||
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
|
||||
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
|
||||
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
|
||||
|
||||
FILE_EXTENSION="${FILE_PATH##*.}"
|
||||
FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=8
|
||||
HIGHLIGHT_STYLE='pablo'
|
||||
PYGMENTIZE_STYLE='autumn'
|
||||
|
||||
|
||||
handle_extension() {
|
||||
case "${FILE_EXTENSION_LOWER}" in
|
||||
# Archive
|
||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||
atool --list -- "${FILE_PATH}" && exit 5
|
||||
bsdtar --list --file "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
rar)
|
||||
# Avoid password prompt by providing empty password
|
||||
unrar lt -p- -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
7z)
|
||||
# Avoid password prompt by providing empty password
|
||||
7z l -p -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# PDF
|
||||
pdf)
|
||||
# Preview as text conversion
|
||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# BitTorrent
|
||||
torrent)
|
||||
transmission-show -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# OpenDocument
|
||||
odt|ods|odp|sxw)
|
||||
# Preview as text conversion
|
||||
odt2txt "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# HTML
|
||||
htm|html|xhtml)
|
||||
# Preview as text conversion
|
||||
w3m -dump "${FILE_PATH}" && exit 5
|
||||
lynx -dump -- "${FILE_PATH}" && exit 5
|
||||
elinks -dump "${FILE_PATH}" && exit 5
|
||||
;; # Continue with next handler on failure
|
||||
esac
|
||||
}
|
||||
|
||||
handle_image() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
# SVG
|
||||
# image/svg+xml)
|
||||
# convert "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# exit 1;;
|
||||
|
||||
# Image
|
||||
image/*)
|
||||
local orientation
|
||||
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
|
||||
# If orientation data is present and the image actually
|
||||
# needs rotating ("1" means no rotation)...
|
||||
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
|
||||
# ...auto-rotate the image according to the EXIF data.
|
||||
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
|
||||
fi
|
||||
|
||||
# `w3mimgdisplay` will be called for all images (unless overriden as above),
|
||||
# but might fail for unsupported types.
|
||||
exit 7;;
|
||||
|
||||
# Video
|
||||
# video/*)
|
||||
# # Thumbnail
|
||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# exit 1;;
|
||||
# PDF
|
||||
# application/pdf)
|
||||
# pdftoppm -f 1 -l 1 \
|
||||
# -scale-to-x 1920 \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_mime() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
# Text
|
||||
text/* | */xml)
|
||||
# Syntax highlight
|
||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
if [[ "$( tput colors )" -ge 256 ]]; then
|
||||
local pygmentize_format='terminal256'
|
||||
local highlight_format='xterm256'
|
||||
else
|
||||
local pygmentize_format='terminal'
|
||||
local highlight_format='ansi'
|
||||
fi
|
||||
highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
|
||||
--style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" && exit 5
|
||||
# pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}" -- "${FILE_PATH}" && exit 5
|
||||
exit 2;;
|
||||
|
||||
# Image
|
||||
image/*)
|
||||
# Preview as text conversion
|
||||
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
# Video and audio
|
||||
video/* | audio/*)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_fallback() {
|
||||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
||||
handle_image "${MIMETYPE}"
|
||||
fi
|
||||
handle_extension
|
||||
handle_mime "${MIMETYPE}"
|
||||
handle_fallback
|
||||
|
||||
exit 1
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
[manual]
|
||||
; approx. lattitude/longitude fro Rochester, NY
|
||||
lat=43
|
||||
lon=77
|
||||
|
||||
; TODO: comment out other lattitude/longitudes to use
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
* Black Theme (modified Pop-Dark)
|
||||
* Original author: Primetoxinz
|
||||
*/
|
||||
|
||||
* {
|
||||
text-color: #f2f2f2;
|
||||
background-color: #141414;
|
||||
lightbg: #534c48;
|
||||
red: #f15d22;
|
||||
orange: #faa41a;
|
||||
blue: #48b9c7;
|
||||
|
||||
font: "Inconsolata 16";
|
||||
|
||||
selected-normal-foreground: @background-color;
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: @background;
|
||||
selected-urgent-foreground: @foreground;
|
||||
urgent-foreground: @foreground;
|
||||
alternate-urgent-background: @background;
|
||||
active-foreground: @foreground;
|
||||
selected-active-foreground: @foreground;
|
||||
alternate-normal-foreground: @foreground;
|
||||
alternate-active-background: @blue;
|
||||
bordercolor: @foreground;
|
||||
normal-background: @background;
|
||||
selected-normal-background: @blue;
|
||||
separatorcolor: @orange;
|
||||
spacing: 2;
|
||||
urgent-background: @red;
|
||||
alternate-urgent-foreground: @foreground;
|
||||
selected-urgent-background: @red;
|
||||
alternate-active-foreground: @foreground;
|
||||
selected-active-background: @blue;
|
||||
active-background: @orange;
|
||||
}
|
||||
#window {
|
||||
border: 0;
|
||||
width: 24%; /* control size of window */
|
||||
text-color: @foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
padding: 5;
|
||||
text-color: @bordercolor;
|
||||
background-color: @background;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
text-color: @separatorcolor;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px 0px 0px ;
|
||||
padding: 2px 0px 0px ;
|
||||
text-color: @separatorcolor;
|
||||
}
|
||||
#element {
|
||||
border: 0;
|
||||
}
|
||||
#element.normal.normal {
|
||||
text-color: @normal-foreground;
|
||||
background-color: @normal-background;
|
||||
}
|
||||
#element.normal.urgent {
|
||||
text-color: @urgent-foreground;
|
||||
background-color: @urgent-background;
|
||||
}
|
||||
#element.normal.active {
|
||||
text-color: @active-foreground;
|
||||
background-color: @active-background;
|
||||
}
|
||||
#element.selected.normal {
|
||||
text-color: @selected-normal-foreground;
|
||||
background-color: @selected-normal-background;
|
||||
}
|
||||
#element.selected.urgent {
|
||||
text-color: @selected-urgent-foreground;
|
||||
background-color: @selected-urgent-background;
|
||||
}
|
||||
#element.selected.active {
|
||||
text-color: @selected-active-foreground;
|
||||
background-color: @selected-active-background;
|
||||
}
|
||||
#element.alternate.normal {
|
||||
text-color: @alternate-normal-foreground;
|
||||
background-color: @alternate-normal-background;
|
||||
}
|
||||
#element.alternate.urgent {
|
||||
text-color: @alternate-urgent-foreground;
|
||||
background-color: @alternate-urgent-background;
|
||||
}
|
||||
#element.alternate.active {
|
||||
text-color: @alternate-active-foreground;
|
||||
background-color: @alternate-active-background;
|
||||
}
|
||||
#sidebar {
|
||||
border: 1px dash 0px 0px ;
|
||||
}
|
||||
#button selected {
|
||||
text-color: @selected-normal-foreground;
|
||||
background-color: @selected-normal-background;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
border: 0px ;
|
||||
}
|
||||
#button normal {
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
* {
|
||||
active-background: #718C53;
|
||||
active-foreground: @foreground;
|
||||
normal-background: @background;
|
||||
normal-foreground: @foreground;
|
||||
urgent-background: #877763;
|
||||
urgent-foreground: @foreground;
|
||||
|
||||
alternate-active-background: @background;
|
||||
alternate-active-foreground: @foreground;
|
||||
alternate-normal-background: @background;
|
||||
alternate-normal-foreground: @foreground;
|
||||
alternate-urgent-background: @background;
|
||||
alternate-urgent-foreground: @foreground;
|
||||
|
||||
selected-active-background: #877763;
|
||||
selected-active-foreground: @foreground;
|
||||
selected-normal-background: #718C53;
|
||||
selected-normal-foreground: @foreground;
|
||||
selected-urgent-background: #91B234;
|
||||
selected-urgent-foreground: @foreground;
|
||||
|
||||
background-color: @background;
|
||||
background: #1b1910;
|
||||
foreground: #c7c9c6;
|
||||
border-color: @background;
|
||||
spacing: 2;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 0;
|
||||
padding: 2.5ch;
|
||||
}
|
||||
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#message {
|
||||
border: 2px 0px 0px;
|
||||
border-color: @border-color;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px 0px 0px;
|
||||
border-color: @border-color;
|
||||
spacing: 2px;
|
||||
scrollbar: true;
|
||||
padding: 2px 0px 0px;
|
||||
}
|
||||
|
||||
#element {
|
||||
border: 0;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#scrollbar {
|
||||
width: 4px;
|
||||
border: 0;
|
||||
handle-width: 8px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
border: 2px 0px 0px;
|
||||
border-color: @border-color;
|
||||
}
|
||||
|
||||
#button {
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
#button.selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
#rofi.theme: colors-rofi-dark
|
||||
rofi.theme: BlackTheme
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=KDEConnect Daemon
|
||||
StartLimitIntervalSec=200
|
||||
StartLimitBurst=15
|
||||
|
||||
[Service]
|
||||
Environment=DISPLAY=:0
|
||||
ExecStart=/usr/lib/kdeconnectd
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -0,0 +1,30 @@
|
|||
#000000
|
||||
#111111
|
||||
#222222
|
||||
#333333
|
||||
#555555
|
||||
#666666
|
||||
#777777
|
||||
#888888
|
||||
#999999
|
||||
#AAAAAA
|
||||
#BBBBBB
|
||||
#CCCCCC
|
||||
#DDDDDD
|
||||
#EEEEEE
|
||||
#FFFFFF
|
||||
#F65525
|
||||
#F94C2B
|
||||
#FE2A4D
|
||||
#FE2456
|
||||
#F20B81
|
||||
#D901AC
|
||||
#D501B2
|
||||
#B007D6
|
||||
#AA09DA
|
||||
#7C21F4
|
||||
#6D2DF9
|
||||
#5541FE
|
||||
#3E58FE
|
||||
#2A70F9
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#4040ff
|
||||
#2c56fc
|
||||
#2a59fc
|
||||
#1180ed
|
||||
#04a6d5
|
||||
#02abd1
|
||||
#03d2aa
|
||||
#04d6a5
|
||||
#12ee7f
|
||||
#2bfc58
|
||||
#2dfc55
|
||||
#56fc2d
|
||||
#59fc2a
|
||||
#80ed11
|
||||
#a6d503
|
||||
#abd103
|
||||
#d2aa03
|
||||
#d6a504
|
||||
#ee7f12
|
||||
#fc582b
|
||||
#fc552d
|
||||
#fc2c56
|
||||
#fc2a58
|
||||
#ed1180
|
||||
#d503a6
|
||||
#d102ab
|
||||
#aa03d2
|
||||
#a504d6
|
||||
#7f12ee
|
||||
#582bfc
|
||||
#552dfc
|
|
@ -0,0 +1,2 @@
|
|||
gradient=false
|
||||
green
|
|
@ -0,0 +1,30 @@
|
|||
#1F80F3
|
||||
#08ADD8
|
||||
#06B3D4
|
||||
#01D7AF
|
||||
#01DBA9
|
||||
#0DF47E
|
||||
#26FE53
|
||||
#2CFF4B
|
||||
#4FF829
|
||||
#58F522
|
||||
#83DE0B
|
||||
#8FD506
|
||||
#ADBB01
|
||||
#BEAA01
|
||||
#D78C07
|
||||
#E27C0D
|
||||
#F65525
|
||||
#F94C2B
|
||||
#FE2A4D
|
||||
#FE2456
|
||||
#F20B81
|
||||
#D901AC
|
||||
#D501B2
|
||||
#B007D6
|
||||
#AA09DA
|
||||
#7C21F4
|
||||
#6D2DF9
|
||||
#5541FE
|
||||
#3E58FE
|
||||
#2A70F9
|
|
@ -0,0 +1,77 @@
|
|||
#Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
|
||||
visualizer.fps=60
|
||||
|
||||
#Defaults to "/tmp/mpd.fifo"
|
||||
mpd.fifo.path
|
||||
|
||||
#If set to false the visualizers will use mono mode instead of stereo. Some visualizers will
|
||||
#behave differently when mono is enabled. For example, spectrum show two sets of bars.
|
||||
audio.stereo.enabled=false
|
||||
|
||||
#Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
|
||||
visualizer.rotation.secs=0
|
||||
|
||||
#Configures the samples rate and the cutoff frequencies.
|
||||
audio.sampling.frequency=44100
|
||||
audio.high.cutoff.frequency=22100
|
||||
# audio.low.cutoff.frequency=0.00
|
||||
|
||||
#Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
|
||||
#Defaults to spectrum,ellipse,lorenz
|
||||
visualizers=spectrum
|
||||
|
||||
|
||||
#Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
visualizer.spectrum.character=
|
||||
|
||||
#Spectrum bar width. Defaults to 1.
|
||||
visualizer.spectrum.bar.width=1
|
||||
|
||||
#The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to zero to have no space between bars
|
||||
visualizer.spectrum.bar.spacing=0
|
||||
|
||||
#Available smoothing options are monstercat, sgs, none. Defaults to sgs.
|
||||
visualizer.spectrum.smoothing.mode=sgs
|
||||
|
||||
#This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
|
||||
#Defaults to "fill"
|
||||
visualizer.spectrum.falloff.mode=fill
|
||||
|
||||
#Configures how fast the falloff character falls. This is an exponential falloff so values usually look
|
||||
#best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95
|
||||
visualizer.spectrum.falloff.weight=0.95
|
||||
|
||||
#Margins in percent of total screen for spectrum visualizer. All margins default to 0
|
||||
visualizer.spectrum.top.margin=0.0
|
||||
visualizer.spectrum.bottom.margin=0.0
|
||||
visualizer.spectrum.right.margin=0.0
|
||||
visualizer.spectrum.left.margin=0.0
|
||||
|
||||
#Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.
|
||||
visualizer.spectrum.reversed=false
|
||||
|
||||
#Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
|
||||
#Currently available ones are "mpd", "pulse", and "alsa". Defaults to "mpd".
|
||||
audio.sources=pulse
|
||||
|
||||
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
|
||||
#If pulse audio is not working with vis try switching the audio source. A list can be found by running the
|
||||
#command pacmd list-sinks | grep -e 'name:' -e 'index'
|
||||
audio.pulse.source=0
|
||||
|
||||
#This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
|
||||
#effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=2.
|
||||
visualizer.sgs.smoothing.points=4
|
||||
visualizer.sgs.smoothing.passes=2
|
||||
|
||||
|
||||
#Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
#visualizer.ellipse.character=" "
|
||||
|
||||
#The radius of each color ring in the ellipse visualizer. Defaults to 2.
|
||||
visualizer.ellipse.radius=2
|
||||
|
||||
#Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. Default is "colors"
|
||||
#colors.scheme=purple
|
|
@ -0,0 +1,85 @@
|
|||
#Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
|
||||
visualizer.fps=20
|
||||
|
||||
#Defaults to "/tmp/mpd.fifo"
|
||||
mpd.fifo.path
|
||||
|
||||
#If set to false the visualizers will use mono mode instead of stereo. Some visualizers will
|
||||
#behave differently when mono is enabled. For example, spectrum show two sets of bars.
|
||||
audio.stereo.enabled=false
|
||||
|
||||
#Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
|
||||
visualizer.rotation.secs=10
|
||||
|
||||
#Configures the samples rate and the cutoff frequencies.
|
||||
audio.sampling.frequency=44100
|
||||
audio.low.cutoff.frequency=22050
|
||||
audio.high.cutoff.frequency=30
|
||||
|
||||
##Applies scaling factor to both lorenz and ellipse visualizers. This is useful when the system audio is set
|
||||
#to a low volume.
|
||||
#visualizer.scaling.multiplier=1.0
|
||||
|
||||
#Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
|
||||
#Defaults to spectrum,ellipse,lorenz
|
||||
visualizers=spectrum,ellipse,lorenz
|
||||
|
||||
|
||||
#Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
visualizer.spectrum.character=#
|
||||
|
||||
#Spectrum bar width. Defaults to 1.
|
||||
visualizer.spectrum.bar.width=2
|
||||
|
||||
#The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to
|
||||
#zero to have no space between bars
|
||||
visualizer.spectrum.bar.spacing=1
|
||||
|
||||
#Available smoothing options are monstercat, sgs, none. Defaults to sgs.
|
||||
visualizer.spectrum.smoothing.mode=monstercat
|
||||
|
||||
#This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
|
||||
#Defaults to "fill"
|
||||
visualizer.spectrum.falloff.mode=fill
|
||||
|
||||
#Configures how fast the falloff character falls. This is an exponential falloff so values usually look
|
||||
#best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95
|
||||
visualizer.spectrum.falloff.weight=0.95
|
||||
|
||||
#Margins in percent of total screen for spectrum visualizer. All margins default to 0
|
||||
visualizer.spectrum.top.margin=0.0
|
||||
visualizer.spectrum.bottom.margin=0.0
|
||||
visualizer.spectrum.right.margin=0.0
|
||||
visualizer.spectrum.left.margin=0.0
|
||||
|
||||
#Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.
|
||||
visualizer.spectrum.reversed=false
|
||||
|
||||
#Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
|
||||
#Currently available ones are "mpd", "pulse", and "alsa". Defaults to "mpd".
|
||||
audio.sources=pulse
|
||||
|
||||
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
|
||||
#If pulse audio is not working with vis try switching the audio source. A list can be found by running the
|
||||
#command pacmd list-sinks | grep -e 'name:' -e 'index'
|
||||
audio.pulse.source=0
|
||||
|
||||
#This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
|
||||
#effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=2.
|
||||
visualizer.sgs.smoothing.points=3
|
||||
visualizer.sgs.smoothing.passes=2
|
||||
|
||||
|
||||
#Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
visualizer.ellipse.character=#
|
||||
|
||||
#The radius of each color ring in the ellipse visualizer. Defaults to 2.
|
||||
visualizer.ellipse.radius=2
|
||||
|
||||
## Turns off overriding the user's terminal colors
|
||||
#colors.override.terminal=false
|
||||
|
||||
#Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. Default is "colors"
|
||||
colors.scheme=rainbow
|
|
@ -0,0 +1,77 @@
|
|||
#Refresh rate of the visualizers. A really high refresh rate may cause screen tearing. Default is 20.
|
||||
visualizer.fps=60
|
||||
|
||||
#Defaults to "/tmp/mpd.fifo"
|
||||
mpd.fifo.path
|
||||
|
||||
#If set to false the visualizers will use mono mode instead of stereo. Some visualizers will
|
||||
#behave differently when mono is enabled. For example, spectrum show two sets of bars.
|
||||
audio.stereo.enabled=false
|
||||
|
||||
#Specifies how often the visualizer will change in seconds. 0 means do not rotate. Default is 0.
|
||||
visualizer.rotation.secs=0
|
||||
|
||||
#Configures the samples rate and the cutoff frequencies.
|
||||
audio.sampling.frequency=44100
|
||||
audio.high.cutoff.frequency=22100
|
||||
# audio.low.cutoff.frequency=0.00
|
||||
|
||||
#Configures the visualizers and the order they are in. Available visualizers are spectrum,lorenz,ellipse.
|
||||
#Defaults to spectrum,ellipse,lorenz
|
||||
visualizers=spectrum
|
||||
|
||||
|
||||
#Configures what character the spectrum visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
visualizer.spectrum.character=
|
||||
|
||||
#Spectrum bar width. Defaults to 1.
|
||||
visualizer.spectrum.bar.width=1
|
||||
|
||||
#The amount of space between each bar in the spectrum visualizer. Defaults to 1. It's possible to set this to zero to have no space between bars
|
||||
visualizer.spectrum.bar.spacing=0
|
||||
|
||||
#Available smoothing options are monstercat, sgs, none. Defaults to sgs.
|
||||
visualizer.spectrum.smoothing.mode=sgs
|
||||
|
||||
#This configures the falloff effect on the spectrum visualizer. Available falloff options are fill,top,none.
|
||||
#Defaults to "fill"
|
||||
visualizer.spectrum.falloff.mode=fill
|
||||
|
||||
#Configures how fast the falloff character falls. This is an exponential falloff so values usually look
|
||||
#best 0.9+ and small changes in this value can have a large effect. Defaults to 0.95
|
||||
visualizer.spectrum.falloff.weight=0.95
|
||||
|
||||
#Margins in percent of total screen for spectrum visualizer. All margins default to 0
|
||||
visualizer.spectrum.top.margin=0.0
|
||||
visualizer.spectrum.bottom.margin=0.0
|
||||
visualizer.spectrum.right.margin=0.0
|
||||
visualizer.spectrum.left.margin=0.0
|
||||
|
||||
#Reverses the direction of the spectrum so that high freqs are first and low freqs last. Defaults to false.
|
||||
visualizer.spectrum.reversed=false
|
||||
|
||||
#Sets the audio sources to use. Currently available ones are "mpd" and "alsa"Sets the audio sources to use.
|
||||
#Currently available ones are "mpd", "pulse", and "alsa". Defaults to "mpd".
|
||||
audio.sources=pulse
|
||||
|
||||
##vis tries to find the correct pulseaudio sink, however this will not work on all systems.
|
||||
#If pulse audio is not working with vis try switching the audio source. A list can be found by running the
|
||||
#command pacmd list-sinks | grep -e 'name:' -e 'index'
|
||||
audio.pulse.source=0
|
||||
|
||||
#This configures the sgs smoothing effect on the spectrum visualizer. More points spreads out the smoothing
|
||||
#effect and increasing passes runs the smoother multiple times on reach run. Defaults are points=3 and passes=2.
|
||||
visualizer.sgs.smoothing.points=4
|
||||
visualizer.sgs.smoothing.passes=2
|
||||
|
||||
|
||||
#Configures what character the ellipse visualizer will use. Specifying a space (e.g " ") means the
|
||||
#background will be colored instead of the character. Defaults to " ".
|
||||
#visualizer.ellipse.character=" "
|
||||
|
||||
#The radius of each color ring in the ellipse visualizer. Defaults to 2.
|
||||
visualizer.ellipse.radius=2
|
||||
|
||||
#Specifies the color scheme. The color scheme must be in ~/.config/vis/colors/ directory. Default is "colors"
|
||||
#colors.scheme=purple
|
|
@ -0,0 +1,26 @@
|
|||
# my gdbinit file
|
||||
|
||||
# Useful features:
|
||||
#
|
||||
### To define a custom "function" of commands to run, use 'define'. ex:
|
||||
# (gdb) define func_name
|
||||
# > print varname
|
||||
# > continue
|
||||
# > end
|
||||
# (gdb)
|
||||
#
|
||||
|
||||
# remove duplicate lines in command history
|
||||
set history remove-duplicates unlimited
|
||||
|
||||
# makes assembly syntax actually good
|
||||
set disassembly-flavor intel
|
||||
|
||||
# outputs "next" instruction to execute after each step/next (stop)
|
||||
set disassemble-next-line on
|
||||
|
||||
# switch to child process if fork/vfork called, default is 'parent' (useful)
|
||||
#set follow-fork-mode child
|
||||
|
||||
alias e=quit
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
# ignore these filetypes
|
||||
*.o
|
||||
|
||||
# ignore st executable
|
||||
st-*
|
||||
!st-*/config.h
|
||||
|
||||
# super secret contents
|
||||
.bashrc_secrets
|
||||
.ssh
|
||||
etc
|
||||
|
||||
bin/jdk-11*
|
||||
bin/ghidra*
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
# x1phosura's .lynxrc file
|
||||
|
||||
# SHOW_CURSOR controls whether or not the cursor is hidden or appears
|
||||
# over the current link in documents or the current option in popups.
|
||||
# Showing the cursor is handy if you are a sighted user with a poor
|
||||
# terminal that can't do bold and reverse video at the same time or
|
||||
# at all. It also can be useful to blind users, as an alternative
|
||||
# or supplement to setting LINKS_AND_FIELDS_ARE_NUMBERED or
|
||||
# LINKS_ARE_NUMBERED.
|
||||
# The default defined here or in userdefs.h can be changed via the
|
||||
# 'o'ptions menu and saved in the RC file, and always can be toggled
|
||||
# via the -show_cursor command line switch.
|
||||
show_cursor=true
|
||||
|
||||
# UNDERLINE_LINKS controls whether links are underlined by default, or shown
|
||||
# in bold. Normally this default is set from the configure script.
|
||||
underline_links=true
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
# x1phosura's tmux config
|
||||
# (there's really not too much interesting here)
|
||||
|
||||
# Notes to future self:
|
||||
# to apply tmux configs on the fly while it's running, type Ctrl-b, then run
|
||||
# :source ~/.tmux.conf
|
||||
# Changes will be applied within the current session (bc they take place on the
|
||||
# server).
|
||||
# Also, tmux salved selected text in "buffers." Use: `tmux deleteb` to delete
|
||||
# the most recently saved buffer
|
||||
|
||||
|
||||
####################### Misc. configuration ########################
|
||||
|
||||
# Refresh status line every 5 sec (good for updating time, playing music, etc)
|
||||
set -g status-interval 5
|
||||
|
||||
set-option -g status "on"
|
||||
|
||||
# Use vi-like bindings for stuff
|
||||
set -g mode-keys vi
|
||||
|
||||
# enables mouse mode (for tmux version > 2.1)
|
||||
set -g mouse on
|
||||
|
||||
# fixed REALLY DUMB tmux crash in the past (probably unnecessary now)
|
||||
#set-option -g default-shell /bin/bash
|
||||
|
||||
|
||||
####################### Key bindings ########################
|
||||
# Note: to output current key bindings, run the following in the shell:
|
||||
# `tmux list-keys` or `tmux lsk`
|
||||
|
||||
# Hold 'Alt' to access vi-like pane switching
|
||||
bind -n M-h select-pane -L
|
||||
bind -n M-j select-pane -D
|
||||
bind -n M-k select-pane -U
|
||||
bind -n M-l select-pane -R
|
||||
|
||||
# Use 'Slt-Shift' to access vi-like pane switching
|
||||
bind -n M-H resize-pane -L 2
|
||||
bind -n M-J resize-pane -D 2
|
||||
bind -n M-K resize-pane -U 2
|
||||
bind -n M-L resize-pane -R 2
|
||||
|
||||
|
||||
####################### Color configuration ########################
|
||||
|
||||
# variables (personal)
|
||||
accent1=colour127
|
||||
accent2=colour133
|
||||
|
||||
# variables (work)
|
||||
#accent1=colour63
|
||||
#accent2=colour33
|
||||
|
||||
lightfg=colour7
|
||||
palefg=colour223
|
||||
darkfg=colour236
|
||||
lessdarkfg=colour239
|
||||
|
||||
# Fixes color stuff in tmux/vim
|
||||
set -g default-terminal "screen-256color"
|
||||
|
||||
# Default statusbar color
|
||||
set-option -g status-style bg=$accent1,fg=$lightfg
|
||||
|
||||
# Active window title colors
|
||||
set-window-option -g window-status-current-style bg=$accent2,fg=$lightfg
|
||||
|
||||
# Set active pane border color
|
||||
set-option -g pane-active-border-style fg=$accent1
|
||||
# Set inactive pane border color
|
||||
set-option -g pane-border-style fg=$lessdarkfg
|
||||
|
||||
# Message info
|
||||
set-option -g message-style bg=$lessdarkfg,fg=$palefg
|
||||
|
||||
# Writing commands inactive
|
||||
set-option -g message-command-style bg=$lessdarkfg,fg=$lightfg
|
||||
|
||||
# Pane number display
|
||||
set-option -g display-panes-active-colour $accent1
|
||||
set-option -g display-panes-colour $darkfg
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" x1phosura's .vimrc "
|
||||
" "
|
||||
" This is my basic .vimrc. I'm not a power user, but I like settings. "
|
||||
" "
|
||||
" note to self: vim navigates logical lines. To navigate a long paragraph up "
|
||||
" and down when the paragraph is all on one line, use gj and gk. "
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" enable truecolors if available
|
||||
"if has('nvim') || has('termguicolors')
|
||||
" set termguicolors
|
||||
"endif
|
||||
|
||||
" TODO: check _if_ mypeachpuff exists, if not, use peachpuff
|
||||
colorscheme mypeachpuff
|
||||
syntax on
|
||||
|
||||
set guicursor= "force using block cursor (for neovim)
|
||||
set hlsearch " highlights search targets
|
||||
set mouse= " disables mouse support, re-enable by 'set mouse=a'
|
||||
set colorcolumn=80 " creates vertical line at column 80
|
||||
set cursorline " underlines currently selected line
|
||||
" below sets CursorLine colors (233 assumes 256-bit color, more specific black)
|
||||
hi CursorLine ctermbg=235
|
||||
hi ColorColumn ctermbg=235
|
||||
|
||||
"set number relativenumber " use "hybrid" numbering (both number and relative)
|
||||
set number " note to self: tun off with 'set nonumber'
|
||||
set ruler " ???
|
||||
|
||||
set shortmess+=I " Don't show splash screen
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
""" statusline
|
||||
|
||||
set noshowmode " don't show vim mode below statusline
|
||||
set laststatus=2 " set 'laststatus' bar (neovim default)
|
||||
|
||||
let g:currentmode={ 'n' : 'Normal ', 'no' : 'N-Operator Pending ',
|
||||
\ 'v' : 'Visual ', 'V' : 'V-Line ', '^V' : 'V-Block ',
|
||||
\ 's' : 'Select ', 'S': 'S-Line ', '^S' : 'S-Block ',
|
||||
\ 'i' : 'Insert ', 'R' : 'Replace ', 'Rv' : 'V-Replace ',
|
||||
\ 'c' : 'Command ', 'cv' : 'Vim Ex ', 'ce' : 'Ex ',
|
||||
\ 'r' : 'Prompt ', 'rm' : 'More ', 'r?' : 'Confirm ',
|
||||
\ '!' : 'Shell ', 't' : 'Terminal '}
|
||||
|
||||
" get the current mode for display in vim statusline
|
||||
function! ModeCurrent() abort
|
||||
let l:modecurrent = mode()
|
||||
" use get() -> fails safely, since ^V doesn't seem to register
|
||||
" 3rd arg is used when return of mode() == 0, which is case with ^V
|
||||
" thus, ^V fails -> returns 0 -> replaced with 'V Block'
|
||||
let l:modelist = toupper(get(g:currentmode, l:modecurrent, 'V-Block '))
|
||||
let l:current_status_mode = l:modelist
|
||||
return l:current_status_mode
|
||||
endfunction
|
||||
|
||||
" black on purple
|
||||
highlight StatusHighlight term=bold ctermfg=0 ctermbg=13
|
||||
|
||||
" start building statusline
|
||||
set statusline=%#StatusHighlight# " change background color to purple
|
||||
set statusline+=\ %{ModeCurrent()} " put current mode here
|
||||
set statusline+=%#ColorColumn#\ " change background color to ColorColumn
|
||||
set statusline+=\ \[%n\] " show which vim buffer
|
||||
"set statusline+=%* " switch back to normal statusline
|
||||
|
||||
set statusline+=\ %.30f " filename (truncate to 30 chars)
|
||||
set statusline+=\ %m " modified flag
|
||||
|
||||
set statusline+=%= " format right side of statusline
|
||||
set statusline+=\ %{&ff}, " unix or dos
|
||||
set statusline+=%{&fileencoding?&fileencoding:&encoding}\ " File encoding
|
||||
"set statusline+=\ %y " show filetype
|
||||
set statusline+=%#StatusHighlight# " highlight purple
|
||||
set statusline+=\ %l/%L: " current line/Total lines
|
||||
set statusline+=%c%V " column number(-virtual column number)
|
||||
"set statusline+=\ (%p%%) " percentage
|
||||
set statusline+=%*
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
let g:netrw_liststyle = 3 " change netrw file manager view style
|
||||
|
||||
setlocal ff=unix " Changes file format to unix (changes line endings)
|
||||
|
||||
" Indentation settings according to personal preference, including
|
||||
" settings for using 4 spaces instead of tabs.
|
||||
" Do not change 'tabstop' from its default value of 8 with this setup.
|
||||
set shiftwidth=4 " TODO: explain
|
||||
set softtabstop=4 " TODO: explain
|
||||
set expandtab " can re-enable typing tabs with 'set noexpandtab' or 'set noet'
|
||||
set autoindent " should automatically indent
|
||||
|
||||
set noeol " make vim _not_ automatically append newline to files after exiting
|
||||
|
||||
" makes words not get cut off and split weirdly at end of border
|
||||
setlocal linebreak
|
||||
|
||||
" autocmd stuff (note: 'au' == 'autocmd')
|
||||
" includes language/filetype-specific settings
|
||||
if has("autocmd")
|
||||
" applies columns rule even when vim is resized (caused by terminal resizing)
|
||||
au VimResized * | set columns=84
|
||||
|
||||
" set markdown notes to "wordwrap" kinda
|
||||
au BufRead,BufNewFile *.md setlocal columns=84
|
||||
|
||||
" turns off tabs-to-spaces conversion for makefiles
|
||||
au FileType make setlocal shiftwidth=8 softtabstop=8 tabstop=8 noexpandtab
|
||||
|
||||
au FileType c setlocal shiftwidth=8 softtabstop=8 tabstop=8 noexpandtab
|
||||
au FileType sh setlocal shiftwidth=4 softtabstop=4 tabstop=4 expandtab
|
||||
|
||||
au BufRead,BufNewFile *.rkt,*.rktl set filetype=scheme
|
||||
au FileType scheme setlocal equalprg=scmindent.rkt " not sure if works
|
||||
endif
|
||||
|
||||
let c_syntax_for_h=1 " assume header files are going to be C, not C++
|
||||
|
||||
" maps SHIFT-TAB to insert a real live tab character (in INSERT mode)
|
||||
:inoremap <S-Tab> <C-V><Tab>
|
||||
|
||||
" double-<Esc> clears search highlights
|
||||
"nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
|
||||
|
||||
" makes vim scroll fast (unnecesary for neovim)
|
||||
set ttyfast
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# load .Xresources for current X session
|
||||
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
|
||||
|
||||
# turn off annoying beep
|
||||
xset b off
|
||||
|
||||
# change touchpad sensitivity (1st and 5th values of coord. transform. matrix)
|
||||
xinput --set-prop 'SynPS/2 Synaptics TouchPad' 'Coordinate Transformation Matrix' 2.4 0 0 0 2.4 0 0 0 1
|
||||
|
||||
exec i3
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
# x1phosura's dotfiles
|
||||
|
||||
Just a collection of some of my configs and such for personal use. Some of them are minimally/unchanged, but others are very customized. Some files are very much inspired by others, some are purely my own.
|
||||
|
||||
I will probably add more to this description at a later date, but for now feel free to peruse if reading my dotfiles seems like your idea of a fun time.
|
||||
|
||||
Note: previously my dotfiles were managed horribly through an awful bash script manually copying files. I've decided creating symlinks is less awful, and I feel comfortable with this solution for now.
|
||||
|
||||
Note: dotfile symlink script should now actually be idempotent (YAY!)
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# by AAAAAAAA
|
||||
|
||||
# assumes that mp3 files-to-be-tagged are named accordingly:
|
||||
# Track # - Artist - Title.mp3
|
||||
#
|
||||
# TODO: get semi-working
|
||||
# TODO: run shellcheck on this file once it works
|
||||
# TODO: use mutagen/mid3v2 because it's better and more up-to-date
|
||||
#
|
||||
|
||||
# sets tag $TAG for every .mp3 file in the currecnt directory
|
||||
set_tag() {
|
||||
echo "Type in the field name _exactly_: "
|
||||
read "FIELD"
|
||||
for i in *.mp3 ; do ${TAGEDITOR} ${TAG} ${FIELD} "$i"; done
|
||||
}
|
||||
|
||||
# reads song titles from textfile, as well as ARTIST and ALBUM variables,
|
||||
# assumes song title order in file matches up with filename order in current
|
||||
# directory, then renames accordingly
|
||||
rename_mp3s() {
|
||||
MP3FILELIST="$(ls -1)"
|
||||
while LINE= read -r line
|
||||
do
|
||||
# something with $line
|
||||
done < $INPUTFILE
|
||||
|
||||
}
|
||||
|
||||
# sets variables for command and flags for the id3 tag editor of choice
|
||||
TAGEDITOR="id3tag" # id3tag comes with id3v2, which is in the Arch repo
|
||||
ALBUM_FLAG="-A"
|
||||
ARTIST_FLAG="-a"
|
||||
YEAR_FLAG="-y"
|
||||
TRACK_NUM_FLAG="-t"
|
||||
TITLE_FLAG="-s"
|
||||
|
||||
WELCOME="mp3-tag-setter.sh Version 0.2\n \
|
||||
This script applies to every .mp3 file in the current directory.\n \
|
||||
Note: actions with (*) require the files to be named accordingly:\n \
|
||||
Track# - Artist - Title.mp3\n \
|
||||
Would you like to:\n \
|
||||
1) Set the album\n \
|
||||
2) Set the artist\n \
|
||||
3) Set the year\n \
|
||||
4) Set track numbers (*)\n \
|
||||
5) Set track titles (*)\n \
|
||||
6) Mass rename of files according to pre-defined textfile (is own thing)\n"
|
||||
|
||||
echo -e $WELCOME
|
||||
read "ACTION"
|
||||
|
||||
case $ACTION in
|
||||
1)
|
||||
TAG="$ALBUM_FLAG"
|
||||
set_flag()
|
||||
;;
|
||||
2)
|
||||
TAG="$ARTIST_FLAG"
|
||||
set_flag()
|
||||
;;
|
||||
3)
|
||||
TAG="$YEAR_FLAG"
|
||||
set_flag()
|
||||
;;
|
||||
4)
|
||||
# set track numbers from filename
|
||||
#
|
||||
;;
|
||||
5)
|
||||
# set track titles from filename
|
||||
#
|
||||
;;
|
||||
6)
|
||||
# renames a set of .mp3s IN ORDER according to ordered list in a textfile
|
||||
# echo an explanation as to how this works
|
||||
#
|
||||
echo "Type in the name of a textfile with song titles: "
|
||||
read INPUTFILE
|
||||
rename_mp3s()
|
||||
;;
|
||||
*)
|
||||
echo "Invalid action. Please type 1, 2, 3 or 4."
|
||||
;;
|
||||
esac
|
||||
|
||||
# sets titles in metadata
|
||||
#for i in *.mp3; do TITLE="$(echo $i | awk 'BEGIN{FS="-"} {print $3}' | sed 's/.mp3//g')"; id3tag -s "$TITLE" "$i" ; done
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wpa-bruteforce.sh
|
||||
# Attempts to connect to an SSID given a password list, uses wpa_supplicant
|
||||
# DOES NOT WORK YET!
|
||||
# by AAAAAAAA
|
||||
|
||||
|
||||
# TODO: change so that wordlist is read from a file
|
||||
wordlist="blueberry blackberry chocolate compassion delightful delighted \
|
||||
equality espresso exciting fabulous fantastic generous peppermint pleasure \
|
||||
wonderful"
|
||||
|
||||
wint="wlp4s0" # wireless networking interface
|
||||
|
||||
echo "Enter the wpa/2 SSID you're trying to connect to: "
|
||||
read ssid
|
||||
|
||||
for pass in $wordlist; do
|
||||
echo "Trying to connect to $ssid using password $pass"
|
||||
wpa_supplicant -B -i "$wint" -c <(wpa_passphrase "$ssid" "$pass")
|
||||
# sudo dhcpcd "$wint" # needed if systemd dhcpcd service not used
|
||||
done
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# by x1phosura
|
||||
|
||||
# Synchronizes the destination to the source, preserving metadata (owner,
|
||||
# group, permissions, timestamps, etc...) and symbolic links. It also skips
|
||||
# replacing files based on a calculated checksum, which can save a lot of time
|
||||
# with backups! ssh is used for encryption, and the script displays the sync
|
||||
# progress with what SHOULD be human-readable numbers.
|
||||
#
|
||||
# Does NOT need to be run with sudo (and shouldn't).
|
||||
|
||||
echo "Enter the username for the remote machine: "
|
||||
read ruser
|
||||
echo "Enter the hostname (if DNS) or IPv4 address for the remote machine: "
|
||||
read rhost
|
||||
|
||||
# '-a' preserves attributes like permissions, owner/group, and more, '-v' is
|
||||
# verbose, '-h' is "human readable", and '-c' compares files to-be synced/
|
||||
# transfered, if already existing, by checksum (rather than by filesize or
|
||||
# modified time). '-e' specifies the remote shell to use, which here is ssh
|
||||
# '--stats' and '--progress' simply show a lot of info about the file transfers
|
||||
options="-avhc -e ssh --stats --progress"
|
||||
|
||||
echo "Delete files at destination not present in source directories? (y/n):"
|
||||
read del_remote
|
||||
|
||||
if [ "$del_remote" = "y" ]; then # TEST THIS OPTION OUT BEFORE USE!!
|
||||
# '--delete' deletes files at the destination that are NOT present from the
|
||||
# source. USE CAREFULLY!! '--force' modifies '--delete' to handle something
|
||||
# do to with non-empty directories being deleted or overridden, so I'm
|
||||
# guessing I want it
|
||||
echo "Extraneous files found in destination will be deleted."
|
||||
options="$options --delete --force"
|
||||
elif [ "$del_remote" = "n" ]; then
|
||||
echo "Extraneous files found in destination will be kept."
|
||||
else
|
||||
echo "Error: expected 'y' or 'n' character as input. Aborting for safety..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Note: as they currently stand, DO NOT add trailing slashes to these
|
||||
# filenames!! Why? Here is the best explanation I've seen as to how trailing
|
||||
# slashes work in rsync:
|
||||
# Without a slash on the source directory means copy both the source
|
||||
# directory, and the contents (recursively if specified) to the destination
|
||||
# directory while adding a trailing slash means only copy the contents of
|
||||
# the source directory, recursively if specified, to the destination.
|
||||
# TODO: auto-generate paths (or read from textfile) instead of hardcoding
|
||||
filelist="$HOME/73h4x \
|
||||
$HOME/Documents \
|
||||
$HOME/Downloads \
|
||||
$HOME/OSes \
|
||||
$HOME/Library \
|
||||
$HOME/Subgenius \
|
||||
$HOME/temp"
|
||||
|
||||
# Command structure:
|
||||
# rsync $options src/dir1 src/dir2... "$ruser"@"$rhost":dest/dir/
|
||||
|
||||
# copy from here TO a remote destination
|
||||
rsync $options $filelist "$ruser"@"$rhost":~/
|
||||
|
||||
# copy from a remote destination TO here (TODO)
|
||||
|
|
@ -0,0 +1,385 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
from argparse import ArgumentParser, Namespace
|
||||
from atexit import register
|
||||
from enum import Enum
|
||||
from itertools import chain, count, cycle, islice, repeat
|
||||
from math import pi, sin
|
||||
from os import environ
|
||||
from platform import system
|
||||
from random import choice, randint
|
||||
from shutil import get_terminal_size
|
||||
from sys import stdin
|
||||
from typing import Callable, Dict, Iterator, List, Optional, Tuple, cast
|
||||
from unicodedata import east_asian_width
|
||||
|
||||
|
||||
class ColourSpace(Enum):
|
||||
EIGHT = "8"
|
||||
TRUE = "24"
|
||||
|
||||
|
||||
class Gradient(Enum):
|
||||
D1 = "1d"
|
||||
D2 = "2d"
|
||||
|
||||
|
||||
class Flags(Enum):
|
||||
LES = 1
|
||||
GAY = 2
|
||||
BI = 3
|
||||
TRANS = 4
|
||||
ACE = 5
|
||||
PAN = 6
|
||||
NB = 7
|
||||
GQ = 8
|
||||
|
||||
|
||||
HexColour = str
|
||||
RGB = Tuple[int, int, int]
|
||||
RawPalette = List[HexColour]
|
||||
Palette = List[RGB]
|
||||
|
||||
WINDOWS = system() == "Windows"
|
||||
COLS, ROWS = get_terminal_size((80, 80))
|
||||
|
||||
UNICODE_WIDTH_LOOKUP = {
|
||||
"W": 2, # CJK
|
||||
"N": 0, # Non printable
|
||||
}
|
||||
|
||||
ASPECT_RATIO = (3, 5)
|
||||
FLAG_SPECS: Dict[Flags, RawPalette] = {
|
||||
Flags.LES: ["#D62E02", "#FD9855", "#FFFFFF", "#D161A2", "#A20160"],
|
||||
Flags.GAY: ["#FF0018", "#FFA52C", "#FFFF41", "#008018", "#0000F9", "#86007D"],
|
||||
Flags.BI: ["#D60270", "#D60270", "#9B4F96", "#0038A8", "#0038A8"],
|
||||
Flags.TRANS: ["#55CDFC", "#F7A8B8", "#FFFFFF", "#F7A8B8", "#55CDFC"],
|
||||
Flags.ACE: ["#000000", "#A4A4A4", "#FFFFFF", "#810081"],
|
||||
Flags.PAN: ["#FF1B8D", "#FFDA00", "#1BB3FF"],
|
||||
Flags.NB: ["#FFF430", "#FFFFFF", "#9C59D1", "#000000"],
|
||||
Flags.GQ: ["#B77FDD", "#FFFFFF", "#48821E"],
|
||||
}
|
||||
|
||||
|
||||
def parse_args() -> Namespace:
|
||||
rand_flag = choice(tuple(f for f in Flags))
|
||||
rand_interpolation = choice(tuple(i.value for i in Gradient))
|
||||
colour_space = (
|
||||
ColourSpace.TRUE
|
||||
if environ.get("COLORTERM") in {"truecolor", "24bit"}
|
||||
else ColourSpace.EIGHT
|
||||
)
|
||||
namespace = Namespace(flag=rand_flag)
|
||||
parser = ArgumentParser()
|
||||
|
||||
mode_group = parser.add_argument_group()
|
||||
mode_group.add_argument("-f", "--flag", dest="flag_only", action="store_true")
|
||||
|
||||
flag_group = parser.add_argument_group()
|
||||
flag_group.add_argument(
|
||||
"-l", "--les", "--lesbian", action="store_const", dest="flag", const=Flags.LES,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"-g", "--gay", action="store_const", dest="flag", const=Flags.GAY,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"-b", "--bi", "--bisexual", action="store_const", dest="flag", const=Flags.BI,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"-t",
|
||||
"--trans",
|
||||
"--transgender",
|
||||
action="store_const",
|
||||
dest="flag",
|
||||
const=Flags.TRANS,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"-a", "--ace", "--asexual", action="store_const", dest="flag", const=Flags.ACE,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"-p",
|
||||
"--pan",
|
||||
"--pansexual",
|
||||
action="store_const",
|
||||
dest="flag",
|
||||
const=Flags.PAN,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"-n", "--nb", "--non-binary", action="store_const", dest="flag", const=Flags.NB,
|
||||
)
|
||||
flag_group.add_argument(
|
||||
"--gq", "--gender-queer", action="store_const", dest="flag", const=Flags.GQ,
|
||||
)
|
||||
|
||||
opt_group = parser.add_argument_group()
|
||||
opt_group.add_argument(
|
||||
"-c",
|
||||
"--colour",
|
||||
choices=tuple(c.value for c in ColourSpace),
|
||||
default=colour_space.value,
|
||||
)
|
||||
opt_group.add_argument(
|
||||
"-i",
|
||||
"--interpolation",
|
||||
choices=tuple(i.value for i in Gradient),
|
||||
default=rand_interpolation,
|
||||
)
|
||||
opt_group.add_argument("--period", type=lambda i: max(abs(int(i)), 1))
|
||||
opt_group.add_argument(
|
||||
"--tabs", "--tab-width", type=lambda i: max(abs(int(i)), 1), default=4
|
||||
)
|
||||
|
||||
return parser.parse_args(namespace=namespace)
|
||||
|
||||
|
||||
def trap_sig() -> None:
|
||||
if not WINDOWS:
|
||||
from signal import SIG_DFL, SIGPIPE, signal
|
||||
|
||||
signal(SIGPIPE, SIG_DFL)
|
||||
|
||||
|
||||
def on_exit() -> None:
|
||||
print("\033[0m", end="", flush=True)
|
||||
|
||||
|
||||
def stdin_stream() -> Iterator[str]:
|
||||
while True:
|
||||
size = COLS * 4
|
||||
line = stdin.read(size)
|
||||
if line:
|
||||
yield from line
|
||||
else:
|
||||
break
|
||||
|
||||
|
||||
def normalize_width(tab_width: int, stream: Iterator[str]) -> Iterator[str]:
|
||||
for char in stream:
|
||||
if char == "\t":
|
||||
yield from repeat(" ", tab_width)
|
||||
else:
|
||||
yield char
|
||||
|
||||
|
||||
def unicode_width(stream: Iterator[str]) -> Iterator[Tuple[int, str]]:
|
||||
def char_width(char: str) -> int:
|
||||
try:
|
||||
code = east_asian_width(char)
|
||||
return UNICODE_WIDTH_LOOKUP.get(code, 1)
|
||||
except Exception:
|
||||
return 1
|
||||
|
||||
for char in stream:
|
||||
yield char_width(char), char
|
||||
|
||||
|
||||
def parse_raw_palette(raw: RawPalette) -> Palette:
|
||||
def parse_colour(colour: HexColour) -> RGB:
|
||||
hexc = colour[1:]
|
||||
it = iter(hexc)
|
||||
parsed = tuple(
|
||||
int(f"{h1}{h2}", 16) for h1, h2 in iter(lambda: tuple(islice(it, 2)), ())
|
||||
)
|
||||
return cast(RGB, parsed)
|
||||
|
||||
return [parse_colour(p) for p in raw]
|
||||
|
||||
|
||||
DecorateChar = Callable[[RGB], Iterator[str]]
|
||||
DecorateReset = Callable[[], Iterator[str]]
|
||||
|
||||
|
||||
def decor_for(space: ColourSpace) -> Tuple[DecorateChar, DecorateChar, DecorateReset]:
|
||||
def reset() -> Iterator[str]:
|
||||
yield "\033[0m"
|
||||
|
||||
def decor_8(rgb: RGB) -> Iterator[str]:
|
||||
r, g, b = map(lambda c: int(round(c / 255 * 5)), rgb)
|
||||
yield ";"
|
||||
yield str(16 + 36 * r + 6 * g + b)
|
||||
|
||||
def decor_24(rgb: RGB) -> Iterator[str]:
|
||||
yield from chain(*zip(repeat(";"), map(str, rgb)))
|
||||
|
||||
if space == ColourSpace.EIGHT:
|
||||
|
||||
def fg(colour: RGB) -> Iterator[str]:
|
||||
yield "\033[38;5"
|
||||
yield from decor_8(colour)
|
||||
yield "m"
|
||||
|
||||
def bg(colour: RGB) -> Iterator[str]:
|
||||
yield "\033[48;5"
|
||||
yield from decor_8(colour)
|
||||
yield "m"
|
||||
|
||||
return fg, bg, reset
|
||||
elif space == ColourSpace.TRUE:
|
||||
|
||||
def fg(colour: RGB) -> Iterator[str]:
|
||||
yield "\033[38;2"
|
||||
yield from decor_24(colour)
|
||||
yield "m"
|
||||
|
||||
def bg(colour: RGB) -> Iterator[str]:
|
||||
yield "\033[48;2"
|
||||
yield from decor_24(colour)
|
||||
yield "m"
|
||||
|
||||
return fg, bg, reset
|
||||
else:
|
||||
raise ValueError()
|
||||
|
||||
|
||||
def paint_flag(colour_space: ColourSpace, palette: Palette) -> Iterator[str]:
|
||||
r, c = ASPECT_RATIO
|
||||
_, bg, reset = decor_for(colour_space)
|
||||
height = len(palette)
|
||||
ratio = r / c * 0.5
|
||||
multiplier = max(int(min((ROWS - 4) / height, COLS / height * ratio)), 1)
|
||||
line = " " * COLS
|
||||
for colour in palette:
|
||||
for _ in range(multiplier):
|
||||
yield from bg(colour)
|
||||
yield line
|
||||
yield from reset()
|
||||
yield "\n"
|
||||
|
||||
|
||||
def enumerate_lines(stream: Iterator[str]) -> Iterator[Tuple[bool, int, str]]:
|
||||
|
||||
l_stream = unicode_width(stream)
|
||||
prev: Optional[Tuple[int, str]] = next(l_stream, None)
|
||||
x = 0 if prev is None else 1
|
||||
|
||||
def drain(ret: bool) -> Iterator[Tuple[bool, int, str]]:
|
||||
nonlocal prev
|
||||
if prev is not None:
|
||||
yield (ret, *prev)
|
||||
prev = None
|
||||
|
||||
for width, char in l_stream:
|
||||
new = x + width
|
||||
if new > COLS:
|
||||
yield from drain(True)
|
||||
prev = (width, char)
|
||||
x = width
|
||||
elif new == COLS or char == "\n":
|
||||
yield from drain(False)
|
||||
yield True, width, char
|
||||
x = 0
|
||||
else:
|
||||
yield from drain(False)
|
||||
prev = (width, char)
|
||||
x = new
|
||||
|
||||
yield from drain(False)
|
||||
|
||||
|
||||
def lerp(c1: RGB, c2: RGB, mix: float) -> RGB:
|
||||
lhs = map(lambda c: c * mix, c1)
|
||||
rhs = map(lambda c: c * (1 - mix), c2)
|
||||
new = map(lambda c: int(round(sum(c))), zip(lhs, rhs))
|
||||
return cast(RGB, tuple(new))
|
||||
|
||||
|
||||
def sine_wave(t: float) -> float:
|
||||
period = pi * pi
|
||||
x = t * period
|
||||
return (sin(x / pi + pi / 2) + 1) / 2
|
||||
|
||||
|
||||
def interpolate_1d(palette: Palette, rep: int) -> Iterator[Iterator[RGB]]:
|
||||
colours = cycle(palette)
|
||||
|
||||
def once() -> Iterator[RGB]:
|
||||
prev = next(colours)
|
||||
while True:
|
||||
curr = next(colours)
|
||||
for t in range(rep + 1):
|
||||
mix = sine_wave(t / rep)
|
||||
yield lerp(prev, curr, mix)
|
||||
prev = curr
|
||||
|
||||
yield from repeat(once())
|
||||
|
||||
|
||||
# contributed by https://github.com/nshepperd
|
||||
# https://github.com/ms-jpq/gay/issues/2
|
||||
def interpolate_2d(palette: Palette, rep: int) -> Iterator[Iterator[RGB]]:
|
||||
num = len(palette)
|
||||
|
||||
for y in count():
|
||||
|
||||
def line() -> Iterator[RGB]:
|
||||
for x in count():
|
||||
p = (x + 1.5 * y) / rep
|
||||
i = int(p)
|
||||
prev = palette[i % num]
|
||||
curr = palette[(i + 1) % num]
|
||||
mix = sine_wave(p - i)
|
||||
yield lerp(prev, curr, mix)
|
||||
|
||||
yield line()
|
||||
|
||||
|
||||
def interpolation_for(
|
||||
mode: Gradient, palette: Palette, rep: Optional[int]
|
||||
) -> Iterator[Iterator[RGB]]:
|
||||
if mode == Gradient.D1:
|
||||
period = rep or randint(10, 20)
|
||||
return interpolate_1d(palette, period)
|
||||
if mode == Gradient.D2:
|
||||
period = rep or randint(10, 15)
|
||||
return interpolate_2d(palette, period)
|
||||
else:
|
||||
raise ValueError()
|
||||
|
||||
|
||||
def colourize(
|
||||
colour_space: ColourSpace, rgb_gen: Iterator[Iterator[RGB]], stream: Iterator[str],
|
||||
) -> Iterator[str]:
|
||||
fg, _, reset = decor_for(colour_space)
|
||||
colour_gen = next(rgb_gen)
|
||||
for new_line, width, char in enumerate_lines(stream):
|
||||
if width:
|
||||
colour = next(colour_gen)
|
||||
yield from fg(colour)
|
||||
yield char
|
||||
if new_line:
|
||||
yield from reset()
|
||||
colour_gen = next(rgb_gen)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
trap_sig()
|
||||
args = parse_args()
|
||||
register(on_exit)
|
||||
colour_space = ColourSpace(args.colour)
|
||||
palette = parse_raw_palette(FLAG_SPECS[args.flag])
|
||||
|
||||
if args.flag_only:
|
||||
flag_stripes = paint_flag(colour_space=colour_space, palette=palette)
|
||||
print(*flag_stripes, sep="", end="")
|
||||
else:
|
||||
stream = stdin_stream()
|
||||
normalized_stream = normalize_width(args.tabs, stream)
|
||||
interpolation = Gradient(args.interpolation)
|
||||
|
||||
rgb_gen = interpolation_for(
|
||||
mode=interpolation, palette=palette, rep=args.period
|
||||
)
|
||||
gen = colourize(
|
||||
colour_space=colour_space, rgb_gen=rgb_gen, stream=normalized_stream,
|
||||
)
|
||||
for chunk in iter(lambda: tuple(islice(gen, COLS)), ()):
|
||||
print(*chunk, sep="", end="")
|
||||
|
||||
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
exit(130)
|
||||
except BrokenPipeError:
|
||||
exit(13)
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO: add other options in case icanhazip.com goes down
|
||||
curl 'http://icanhazip.com/'
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
# Shell rainbow. Happy pride month!
|
||||
# For best results, run in full-screened terminal (Mod+f in i3)
|
||||
yes "$(seq 231 -1 16)" | while read i; do printf "\x1b[48;5;${i}m\n"; sleep .02; done
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
# redscript: uses redshift to change screen color temperature to reduce blue
|
||||
# light, set it back to default, or even manually set it.
|
||||
# x1phosura
|
||||
|
||||
# redshift -P -O <temperature number>
|
||||
# Note: temperature 1000 - 25000, default is 6500
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
redshift -P -O 6500 # default: revert back to neutral color temperature
|
||||
elif [ "$1" = "MID" ]; then
|
||||
redshift -P -O 4200
|
||||
elif [ "$1" = "LOW" ]; then
|
||||
redshift -P -O 3000
|
||||
elif [ "$1" = "SET" ]; then
|
||||
redshift -P -O "$2" # set color temperature manually
|
||||
else
|
||||
printf "Options:\n"
|
||||
printf " <nothing>\n MID\n LOW\n SET <number 1000-25000>\n"
|
||||
fi
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# because I'll probably forget the actual command
|
||||
|
||||
sudo lpinfo -v
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
#! /usr/bin/env racket
|
||||
|
||||
#lang racket/base
|
||||
|
||||
;Dorai Sitaram
|
||||
;Oct 8, 1999
|
||||
;last change 2020-11-14
|
||||
|
||||
;This script takes lines of Scheme or Lisp code from its
|
||||
;stdin and produces an indented version thereof on its
|
||||
;stdout.
|
||||
|
||||
(define *lisp-keywords* '())
|
||||
|
||||
(define (set-lisp-indent-number sym num-of-subforms-to-be-indented-wide)
|
||||
(let* ((x (symbol->string sym))
|
||||
(c (assf (lambda (a) (string-ci=? x a)) *lisp-keywords*)))
|
||||
(unless c
|
||||
(set! c (cons x (box 0)))
|
||||
(set! *lisp-keywords* (cons c *lisp-keywords*)))
|
||||
(set-box! (cdr c) num-of-subforms-to-be-indented-wide)))
|
||||
|
||||
(define (read-home-lispwords)
|
||||
(let ([init-file (or (getenv "LISPWORDS")
|
||||
(build-path (find-system-path 'home-dir) ".lispwords"))])
|
||||
(when (file-exists? init-file)
|
||||
(call-with-input-file init-file
|
||||
(lambda (i)
|
||||
(let loop ()
|
||||
(let ([w (read i)])
|
||||
(unless (eof-object? w)
|
||||
(let ([a (car w)])
|
||||
(cond [(number? a)
|
||||
(for-each (lambda (x) (set-lisp-indent-number x a)) (cdr w))]
|
||||
[(list? a)
|
||||
(let ([n (cadr w)])
|
||||
(for-each (lambda (x) (set-lisp-indent-number x n)) a))]
|
||||
[else
|
||||
(set-lisp-indent-number a (cadr w))]))
|
||||
(loop)))))))))
|
||||
|
||||
(define (past-next-atom s i n)
|
||||
(let loop ((i i))
|
||||
(if (>= i n) n
|
||||
(let ((c (string-ref s i)))
|
||||
(cond ((char=? c #\\) (loop (+ i 2)))
|
||||
((memv c '(#\space #\tab #\( #\) #\[ #\] #\" #\' #\` #\, #\;))
|
||||
i)
|
||||
(else (loop (+ i 1))))))))
|
||||
|
||||
(define (get-lisp-indent-number s)
|
||||
(let ((c (assf (lambda (a) (string-ci=? s a)) *lisp-keywords*)))
|
||||
(cond (c (unbox (cdr c)))
|
||||
((and (>= (string-length s) 3)
|
||||
(string-ci=? (substring s 0 3) "def")) 0)
|
||||
(else -1))))
|
||||
|
||||
(define (literal-token? s)
|
||||
(let ((x (let ((i (open-input-string s)))
|
||||
(begin0 (read i) (close-input-port i)))))
|
||||
(or (char? x) (number? x) (string? x))))
|
||||
|
||||
(define (calc-subindent s i n)
|
||||
(let* ((j (past-next-atom s i n))
|
||||
(lisp-indent-num -1)
|
||||
(delta-indent
|
||||
(if (= j i) 0
|
||||
(let ((w (substring s i j)))
|
||||
(if (and (>= i 2)
|
||||
(memv (string-ref s (- i 2)) '(#\' #\`)))
|
||||
0
|
||||
(begin
|
||||
(set! lisp-indent-num (get-lisp-indent-number w))
|
||||
(case lisp-indent-num
|
||||
((-2) 0)
|
||||
((-1) (if (< j n) (+ (- j i) 1) 1))
|
||||
(else 1))))))))
|
||||
(values delta-indent lisp-indent-num j)))
|
||||
|
||||
(define (num-leading-spaces s)
|
||||
(let ((n (string-length s)))
|
||||
(let loop ((i 0) (j 0))
|
||||
(if (>= i n) 0
|
||||
(case (string-ref s i)
|
||||
((#\space) (loop (+ i 1) (+ j 1)))
|
||||
((#\tab) (loop (+ i 1) (+ j 8)))
|
||||
(else j))))))
|
||||
|
||||
(define (string-trim-blanks s)
|
||||
(let ((n (string-length s)))
|
||||
(let ((j (let loop ((j 0))
|
||||
(if (or (>= j n)
|
||||
(not (char-whitespace? (string-ref s j))))
|
||||
j
|
||||
(loop (+ j 1))))))
|
||||
(if (>= j n) ""
|
||||
(let ((k (let loop ((k (- n 1)))
|
||||
(if (or (< k 0)
|
||||
(not (char-whitespace? (string-ref s k))))
|
||||
(+ k 1)
|
||||
(loop (- k 1))))))
|
||||
(substring s j k))))))
|
||||
|
||||
(define-struct lparen
|
||||
(spaces-before lisp-indent-num num-finished-subforms)
|
||||
#:mutable)
|
||||
|
||||
(define (indent-lines)
|
||||
(let ((default-left-i -1) (left-i 0) (paren-stack '()) (inside-string? #f))
|
||||
(let line-loop ()
|
||||
(let ((curr-line (read-line)))
|
||||
(unless (eof-object? curr-line)
|
||||
(let* ((leading-spaces (num-leading-spaces curr-line))
|
||||
(curr-left-i
|
||||
(cond (inside-string? leading-spaces)
|
||||
((null? paren-stack)
|
||||
(when (= left-i 0)
|
||||
(when (= default-left-i -1)
|
||||
(set! default-left-i leading-spaces))
|
||||
(set! left-i default-left-i))
|
||||
left-i)
|
||||
(else (let* ((lp (car paren-stack))
|
||||
(lin (lparen-lisp-indent-num lp))
|
||||
(nfs (lparen-num-finished-subforms lp))
|
||||
(extra-w 0))
|
||||
(when (< nfs lin)
|
||||
(set! extra-w 2))
|
||||
(+ (lparen-spaces-before lp) extra-w))))))
|
||||
(set! curr-line (string-trim-blanks curr-line))
|
||||
(unless (string=? curr-line "")
|
||||
(do ((i 0 (+ i 1)))
|
||||
((= i curr-left-i))
|
||||
(write-char #\space))
|
||||
(display curr-line))
|
||||
(newline)
|
||||
;
|
||||
(let ((n (string-length curr-line))
|
||||
(escape? #f)
|
||||
(token-interstice? #f))
|
||||
(let ((incr-finished-subforms (lambda ()
|
||||
(unless token-interstice?
|
||||
(cond ((and (pair? paren-stack)
|
||||
(car paren-stack)) =>
|
||||
(lambda (lp)
|
||||
(let ((nfs (lparen-num-finished-subforms lp)))
|
||||
(set-lparen-num-finished-subforms!
|
||||
lp (+ nfs 1))))))
|
||||
(set! token-interstice? #t)))))
|
||||
(let loop ((i 0))
|
||||
(unless (>= i n)
|
||||
(let ((c (string-ref curr-line i)))
|
||||
(cond (escape? (set! escape? #f) (loop (+ i 1)))
|
||||
((char=? c #\\)
|
||||
(set! token-interstice? #f)
|
||||
(set! escape? #t) (loop (+ i 1)))
|
||||
(inside-string?
|
||||
(when (char=? c #\")
|
||||
(set! inside-string? #f)
|
||||
(incr-finished-subforms))
|
||||
(loop (+ i 1)))
|
||||
((char=? c #\;)
|
||||
(incr-finished-subforms)
|
||||
'break-loop)
|
||||
((char=? c #\")
|
||||
(incr-finished-subforms)
|
||||
(set! inside-string? #t)
|
||||
(loop (+ i 1)))
|
||||
((memv c '(#\space #\tab))
|
||||
(incr-finished-subforms)
|
||||
(loop (+ i 1)))
|
||||
((memv c '(#\( #\[))
|
||||
(incr-finished-subforms)
|
||||
(let-values (((delta-indent lisp-indent-num j)
|
||||
(calc-subindent curr-line (+ i 1) n)))
|
||||
(set! paren-stack
|
||||
(cons (make-lparen (+ 1 i curr-left-i delta-indent)
|
||||
lisp-indent-num
|
||||
-1)
|
||||
paren-stack))
|
||||
(set! token-interstice? #t)
|
||||
(let ((inext (+ i 1)))
|
||||
(when (> j inext)
|
||||
(set! inext j)
|
||||
(set! token-interstice? #f))
|
||||
(loop inext))))
|
||||
((memv c '(#\) #\]))
|
||||
(set! token-interstice? #f)
|
||||
(cond ((pair? paren-stack)
|
||||
(set! paren-stack (cdr paren-stack)))
|
||||
(else (set! left-i 0)))
|
||||
(loop (+ i 1)))
|
||||
(else (set! token-interstice? #f)
|
||||
(loop (+ i 1)))))))
|
||||
(incr-finished-subforms))))
|
||||
(line-loop))))))
|
||||
|
||||
(read-home-lispwords)
|
||||
|
||||
(indent-lines)
|
||||
|
||||
;eof
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/sh
|
||||
|
||||
sh -c '"/home/$USER/tor-browser_en-US/Browser/start-tor-browser" --detach || ([ ! -x "/home/$USER/tor-browser_en-US/Browser/start-tor-browser" ] && "$(dirname "$*")"/Browser/start-tor-browser --detach)' dummy %k
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# prints all of the 256-bit color values in their associated color
|
||||
for i in {0..255}; do
|
||||
printf "\x1b[38;5;${i}mcolor%-5i\x1b[0m" $i
|
||||
if ! (( ($i + 1 ) % 8 )); then
|
||||
echo
|
||||
fi
|
||||
done
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Use this script to test if you have true color support in your terminal.
|
||||
# Usage: ./truecolor.sh
|
||||
# If the color ramp is perfectly smooth, true color is supported.
|
||||
#
|
||||
# Source: https://gist.github.com/XVilka/8346728
|
||||
#
|
||||
# old 's':
|
||||
#s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
|
||||
|
||||
awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{
|
||||
s="/\\";
|
||||
for (colnum = 0; colnum<term_cols; colnum++) {
|
||||
r = 255-(colnum*255/term_cols);
|
||||
g = (colnum*510/term_cols);
|
||||
b = (colnum*255/term_cols);
|
||||
if (g>255) g = 510-g;
|
||||
printf "\033[48;2;%d;%d;%dm", r,g,b;
|
||||
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
|
||||
printf "%s\033[0m", substr(s,colnum%2+1,1);
|
||||
}
|
||||
printf "\n";
|
||||
}'
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# web-backup.sh: tar backup web directory on a server w/ date-time in name
|
||||
# by x1phosura
|
||||
|
||||
# path to web directory to backup (CHANGE ME if different webserver!!!)
|
||||
# vvv- below for FreeBSD webserver
|
||||
WEBDIR=/usr/local/www/nginx
|
||||
BACKUPDIR=~/web-backups
|
||||
|
||||
if [ $# -ne 1 ] ; then # if 0 or >1 command line args
|
||||
sudo tar -cvzf $BACKUPDIR/webdir-$(date +"%F%N").tar.gz $WEBDIR
|
||||
else # if 1 command line arg
|
||||
sudo tar -cvzf $BACKUPDIR/webdir-$(date +"%F%N").tar.gz $1
|
||||
fi
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
watch -n 1 cat /proc/net/wireless
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wpa-connect.sh
|
||||
# Dumb wpa_supplicant wrapper to connect to wifi or create a new wpa profile
|
||||
# Depends on wpa_supplicant and iw
|
||||
#
|
||||
# by x1phosura
|
||||
|
||||
# If the script fails, you can always run the following AS ROOT:
|
||||
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase profile_name passphrase) # && dhcpcd
|
||||
|
||||
# wireless networking interface
|
||||
wint="wlp4s0"
|
||||
|
||||
# where wpa_supplicant config files are stored on the system
|
||||
wpa_conf_path="/etc/wpa_supplicant"
|
||||
# list of profiles in the wpa_supplicant config path
|
||||
# shellcheck disable=SC2012
|
||||
profile_list="$(ls /etc/wpa_supplicant | sed 's/.conf//g')" # strips the conf
|
||||
|
||||
default="# to get the psk, do wpa_passphrase \\\"profile_name\\\" \\\"passphrase\\\"\n"
|
||||
|
||||
sudo_validate() {
|
||||
if [[ $(id -u) != 0 ]]; then # if not already root
|
||||
sudo -v
|
||||
fi
|
||||
}
|
||||
|
||||
print_usage() {
|
||||
echo -ne \
|
||||
"Usage: "$(basename $0)" [ -dshln ] [ -c profile_name ]\n\n" \
|
||||
"Options:\n" \
|
||||
"-d --disconnect\n" \
|
||||
" Kill current wpa_supplicant process and disconnect\n" \
|
||||
"-s --scan\n" \
|
||||
" Scan for and list nearby SSIDS\n" \
|
||||
"-h --help\n" \
|
||||
" Displau this message\n" \
|
||||
"-l --list --list-profiles\n" \
|
||||
" List current available WPA/2 profiles\n" \
|
||||
"-n --new\n" \
|
||||
" Create a new wpa_supplicant profile (BETA feature)\n" \
|
||||
"-c --connect [profile_name]\n" \
|
||||
" Connect to the provided WPA/2 profile 'profile_name'\n"
|
||||
}
|
||||
|
||||
make_new_wpa_profile() {
|
||||
printf "BETA feature!: Currently assumes a basic home WPA/2 setup (just "
|
||||
printf "requires a password to log in).\n"
|
||||
echo "Enter the config file's name (usually NetworkName.conf): "
|
||||
read wpa_profile_name
|
||||
echo "Enter the network's name (SSID) unescaped: "
|
||||
read ssid
|
||||
echo "Does the network need a password (PSK)? [y/N]: "
|
||||
read has_psk
|
||||
|
||||
sudo_validate
|
||||
sudo touch "$wpa_conf_path"/"$wpa_profile_name"
|
||||
|
||||
if [[ "$has_psk" != "" && $(printf "${has_psk:0:1}" | tr Y y) = "y" ]] ; then
|
||||
echo "Enter the network's password (psk): "
|
||||
read pass
|
||||
sudo sh -c "echo -e \"$default\" > \"$wpa_conf_path\"/\"$wpa_profile_name\""
|
||||
sudo sh -c "wpa_passphrase \"$ssid\" \"$pass\" >> \"$wpa_conf_path\"/\"$wpa_profile_name\""
|
||||
sudo sh -c "chmod 660 \"$wpa_conf_path\"/\"$wpa_profile_name\""
|
||||
else # else unsecured network, connect with no password
|
||||
sudo sh -c "cat > \"$wpa_conf_path\"/\"$wpa_profile_name\" << EOF
|
||||
network={
|
||||
ssid=\"$ssid\"
|
||||
key_mgmt=NONE
|
||||
}
|
||||
EOF"
|
||||
fi
|
||||
|
||||
echo "Profile made. Would you like to connect to your new profile? [y/N]"
|
||||
read connect_new
|
||||
|
||||
if [[ "$connect_new" != "" && $(printf "${connect_new:0:1}" | tr Y y) = "y" ]]
|
||||
then
|
||||
profile=$(printf "$wpa_profile_name" | sed 's/.conf//g') # get profile
|
||||
connect_to_profile
|
||||
fi
|
||||
}
|
||||
|
||||
connect_to_profile() {
|
||||
sudo_validate
|
||||
|
||||
[ "$(pgrep wpa_supplicant)" != "" ] && sudo killall wpa_supplicant
|
||||
sleep 1 # necessary for some reason, I forget why
|
||||
|
||||
#systemctl stop {wicd,netctl} && \
|
||||
sudo wpa_supplicant -B -i "$wint" -c /etc/wpa_supplicant/"$profile".conf
|
||||
# sudo dhcpcd "$wint" # needed if systemd dhcpcd service not used
|
||||
}
|
||||
|
||||
|
||||
profile=""
|
||||
|
||||
if [ $# -lt 1 ] ; then # if less than 1 argument (no args) provided...
|
||||
print_usage ; exit 1
|
||||
fi
|
||||
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
-d|--disconnect)
|
||||
sudo_validate
|
||||
sudo killall wpa_supplicant ; break ;;
|
||||
-s|--scan)
|
||||
sudo_validate
|
||||
# Note: `iw dev $wint scan | less` gives more verbose info in output
|
||||
sudo iw dev $wint scan | grep 'SSID: ' \
|
||||
| sed -E 's/[[:space:]]+SSID: //g'
|
||||
break ;;
|
||||
-h|--help)
|
||||
print_usage ; break ;;
|
||||
-l|--list|--list-profiles)
|
||||
printf "%s\n\n%s\n\n" \
|
||||
"Current profiles to choose from:" \
|
||||
"$profile_list " ; break ;;
|
||||
-n|--new)
|
||||
sudo_validate
|
||||
make_new_wpa_profile # create a new wpa_supplicant profile
|
||||
break ;;
|
||||
-c|--connect)
|
||||
profile="$2"
|
||||
if [ "$profile" = "" ]; then
|
||||
echo -ne "$(basename $0): -c, --connect take an argument " \
|
||||
"'profile_name'\n\n"
|
||||
print_usage
|
||||
else
|
||||
sudo_validate
|
||||
connect_to_profile # connect to existing profile
|
||||
fi
|
||||
shift
|
||||
break ;;
|
||||
*)
|
||||
print_usage ; exit 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
|
||||
x1phosura="
|
||||
|
||||
##########
|
||||
## ##
|
||||
## ## ## ##
|
||||
## ##
|
||||
## ## ## ##
|
||||
## ########## ##
|
||||
#### ####
|
||||
## ## ## ## ##
|
||||
## ##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
##
|
||||
|
||||
"
|
||||
|
||||
exists_truecolor='true' # TODO: detect if have truecolor support
|
||||
|
||||
fg_purple_true="\x1b[38;2;156;39;176m" # foreground is RGB 156,39,176 (#9C27B0)
|
||||
bg_black_true="\x1b[48;2;0;0;0m" # background is black
|
||||
fg_purple_16="\033[01;35m" # foreground is boring bold purple
|
||||
ansi_bold="\033[1m"
|
||||
ansi_end="\x1b[0m\n" # resets/clears ANSI colors to default
|
||||
|
||||
if [ "$exists_truecolor" = "true" ]; then
|
||||
#output="$ansi_bold$fg_purple_true$bg_black_true$x1phosura$ansi_end"
|
||||
output="$ansi_bold$fg_purple_true$x1phosura$ansi_end"
|
||||
else
|
||||
# If '24-bit' true color not supported, revert to classic '4-bit' 16 colors
|
||||
# I'm too lazy to figure out what this would be in 256 colors
|
||||
output="$fg_purple_16$x1phosura$ansi_end"
|
||||
fi
|
||||
|
||||
printf "$output"
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
|
||||
# place-dotfiles.sh: simple script to create symlinks from many of my dotfiles
|
||||
# by x1phosura
|
||||
|
||||
dotfiles_root="$HOME"/73h4x/dotfiles/x1yoga # where dotfiles live
|
||||
#dotfiles_root="$PWD" # alternative (for testing)
|
||||
dest="$HOME" # destination (usually $HOME)
|
||||
|
||||
if [[ "$(realpath $dotfiles_root)" = "$(realpath $dest)" ]] ; then
|
||||
echo " ERROR: dotfiles_root and dest are the same directory! Aborting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dotfile_home_list=".bashrc \
|
||||
.bashrc_secrets \
|
||||
.bash_prompt \
|
||||
.bash_profile \
|
||||
.vimrc \
|
||||
.gdbinit \
|
||||
.tmux.conf \
|
||||
.xinitrc \
|
||||
.Xresources"
|
||||
|
||||
config_dir_list="alacritty \
|
||||
cava \
|
||||
compton \
|
||||
i3 \
|
||||
nano \
|
||||
neofetch \
|
||||
nvim \
|
||||
polybar \
|
||||
ranger \
|
||||
radare2 \
|
||||
redshift \
|
||||
systemd \
|
||||
rofi \
|
||||
vis"
|
||||
|
||||
# link dotfiles in home directory
|
||||
for file in $dotfile_home_list ; do
|
||||
# TODO: only link after checking file's existence in dotfiles_root
|
||||
ln -svfn "$dotfiles_root"/"$file" "$dest"/"$file"
|
||||
done
|
||||
|
||||
# link dotfiles in .config
|
||||
# Note: I directly symlink items to .config instead of symlinking .config itself
|
||||
# because I don't want to preserve everything that programs create there
|
||||
mkdir -p "$dest"/.config
|
||||
for file in $config_dir_list; do
|
||||
# TODO: only link after checking file's existence in config_dir_list
|
||||
ln -svfn "$dotfiles_root"/.config/"$file" "$dest"/.config/"$file"
|
||||
done
|
||||
|
||||
# link personal /bin directory (ex. contains scripts, java, etc...)
|
||||
ln -svfn "$dotfiles_root"/bin "$dest"/bin
|
||||
|
||||
# link scripts (not used anymore, now served by $HOME/bin)
|
||||
# mkdir -p "$dest"/73h4x
|
||||
#ln -svfn "$dotfiles_root"/scripts "$dest"/73h4x/scripts
|
||||
|
||||
# link /etc dotfiles (some of these HAVE to be in /etc)
|
||||
#sudo ln -svf "$dotfiles_root"/etc/default/tlp /etc/default/tlp # tlp dir
|
||||
# TODO: /etc/pacman.conf
|
||||
|
Loading…
Reference in New Issue