@@ -0,0 +1,327 @@ | |||||
# ~/.bashrc: executed by bash(1) for non-login shells. | |||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |||||
# for examples | |||||
# If not running interactively, don't do anything | |||||
case $- in | |||||
*i*) ;; | |||||
*) return;; | |||||
esac | |||||
# don't put duplicate lines or lines starting with space in the history. | |||||
# See bash(1) for more options | |||||
HISTCONTROL=ignoreboth | |||||
# append to the history file, don't overwrite it | |||||
shopt -s histappend | |||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |||||
HISTSIZE=1000 | |||||
HISTFILESIZE=2000 | |||||
# check the window size after each command and, if necessary, | |||||
# update the values of LINES and COLUMNS. | |||||
shopt -s checkwinsize | |||||
# If set, the pattern "**" used in a pathname expansion context will | |||||
# match all files and zero or more directories and subdirectories. | |||||
#shopt -s globstar | |||||
# make less more friendly for non-text input files, see lesspipe(1) | |||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |||||
# set variable identifying the chroot you work in (used in the prompt below) | |||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |||||
debian_chroot=$(cat /etc/debian_chroot) | |||||
fi | |||||
# set a fancy prompt (non-color, unless we know we "want" color) | |||||
case "$TERM" in | |||||
xterm-color|*-256color) color_prompt=yes;; | |||||
esac | |||||
# 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 [ "$color_prompt" = yes ]; then | |||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[\033[01;34m\]\W §\[\033[00m\] ' | |||||
PS4='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[\033[01;34m\]\W §\[\033[00m\] ' | |||||
# PROMPT_DIRTRIM=3 | |||||
else | |||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |||||
fi | |||||
unset color_prompt force_color_prompt | |||||
# If this is an xterm set the title to user@host:dir | |||||
case "$TERM" in | |||||
xterm*|rxvt*) | |||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | |||||
;; | |||||
*) | |||||
;; | |||||
esac | |||||
# enable color support of ls and also add handy aliases | |||||
if [ -x /usr/bin/dircolors ]; then | |||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |||||
alias ls='ls --color=auto' | |||||
#alias dir='dir --color=auto' | |||||
#alias vdir='vdir --color=auto' | |||||
#alias grep='grep --color=auto' | |||||
#alias fgrep='fgrep --color=auto' | |||||
#alias egrep='egrep --color=auto' | |||||
fi | |||||
# colored GCC warnings and errors | |||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | |||||
# some more ls aliases | |||||
#alias ll='ls -l' | |||||
#alias la='ls -A' | |||||
#alias l='ls -CF' | |||||
# Alias definitions. | |||||
# You may want to put all your additions into a separate file like | |||||
# ~/.bash_aliases, instead of adding them here directly. | |||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | |||||
if [ -f ~/.bash_aliases ]; then | |||||
. ~/.bash_aliases | |||||
fi | |||||
# enable programmable completion features (you don't need to enable | |||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |||||
# sources /etc/bash.bashrc). | |||||
if ! shopt -oq posix; then | |||||
if [ -f /usr/share/bash-completion/bash_completion ]; then | |||||
. /usr/share/bash-completion/bash_completion | |||||
elif [ -f /etc/bash_completion ]; then | |||||
. /etc/bash_completion | |||||
fi | |||||
fi | |||||
#Special Settings | |||||
set -o vi | |||||
#Directory changes | |||||
alias cdn='cd $HOME/Notes/; vim "+CtrlP"' | |||||
alias cdd='cd $HOME/Downloads/' | |||||
alias cdo='cd $HOME/Source/' | |||||
alias cdc='cd $HOME/.config/' | |||||
alias cd-projects='cd $HOME/Projects/' | |||||
alias cd-x='cd $HOME/Encrypted/x/' | |||||
alias cd-vim='cd /usr/share/vim/vim82/pack/my-plugins/start' | |||||
#General | |||||
alias v='vim' | |||||
alias yt='youtube-dl' | |||||
alias ytb='youtube-dl --no-progress' | |||||
alias depth='echo $SHLVL' | |||||
alias lsg='ls -la | grep' #Determines if a file or folder with a name containing a sequence of characters is in the current directory | |||||
alias show='apt show' | |||||
alias lynx='lynx -vikeys' | |||||
alias lsa='ls -laF' | |||||
alias doihave='apt list --installed' | |||||
#Utilities | |||||
alias ins='sudo apt-get install' | |||||
alias uns='sudo apt-get purge' | |||||
alias update='sudo apt-get update; sudo apt-get upgrade;' | |||||
alias rn='ranger' | |||||
alias nnn='nnn -xE' | |||||
alias util-dropdown="st -c 'DROPDOWN_TERM' -e 'tmux' &" | |||||
#Programming | |||||
alias py='ipython3 --TerminalInteractiveShell.editing_mode=vi' | |||||
alias gc='git clone' | |||||
# Edit config and system files | |||||
alias edit-bashrc='vim $HOME/.bashrc' | |||||
alias edit-profile='vim $HOME/.profile' | |||||
alias edit-vimrc='sudo vim /etc/vim/vimrc.local' | |||||
alias edit-xkb='vim $HOME/.config/xkb/custom.xkb' | |||||
alias edit-xr='vim ~/.config/xfiles/Xresources' | |||||
alias edit-sources='sudo vim /etc/apt/sources.list' | |||||
alias edit-tmux='vim $HOME/.config/tmux/tmux.conf' | |||||
alias load-xr='xrdb ~/.config/xfiles/Xresources' | |||||
alias load-xkb='xkbcomp $HOME/.config/xkb/custom.xkb $DISPLAY' | |||||
alias load-xt='xrdb $HOME/.config/Xresources' | |||||
alias load-profile='source $HOME/.profile' | |||||
alias lo='load-profile' | |||||
alias betterXev="xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf \"%-3s %s\\n\", $5, $8 }'" | |||||
#Encryption | |||||
alias mntx='encfs $HOME/Encrypted/.x/ $HOME/Encrypted/x/' | |||||
alias umntx='encfs -u $HOME/Encrypted/x/' | |||||
#Applications | |||||
alias scan='sudo arp-scan 192.168.0.1/24' | |||||
alias weechat='weechat -d "$XDG_CONFIG_HOME"/weechat' | |||||
#BASE16_SHELL="$HOME/.config/base16-shell/" | |||||
# [ -n "$PS1" ] && \ | |||||
# [ -s "$BASE16_SHELL/profile_helper.sh" ] && \ | |||||
# eval "$("$BASE16_SHELL/profile_helper.sh")" | |||||
#Special functions! :D | |||||
search () { | |||||
apt search $@ | less | |||||
} | |||||
clean () { | |||||
#Check if there is too many arguments | |||||
if [ "$#" -gt "1" ] | |||||
then | |||||
echo "Too many arguments. There are $#." | |||||
return | |||||
fi | |||||
case "$1" in | |||||
'') | |||||
;; | |||||
soft) | |||||
history -c ;; | |||||
hard) | |||||
history -c | |||||
rm -r $HOME/tmp/; mkdir $HOME/tmp/ ;; | |||||
*) | |||||
echo "Invalid arguments"; return ;; | |||||
esac | |||||
echo "History clear" | |||||
sudo apt-get autoremove #Cleanup packages | |||||
echo "Clean complete" | |||||
} | |||||
wall(){ | |||||
if [ "$#" -gt "1" ] | |||||
then | |||||
echo "Too many arguments. There are $#." | |||||
return | |||||
fi | |||||
case "$1" in | |||||
on) | |||||
sudo iptables -F | |||||
#Allows lo, allows SSH in, allows packets related to connections established with output | |||||
sudo iptables -A walkin -i lo -j ACCEPT | |||||
sudo iptables -A walkin -p tcp --dport 22 -j ACCEPT | |||||
sudo iptables -A walkin -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |||||
#Allows lo, allows ssh out, allows connections out that are owned by root, allows vpn | |||||
sudo iptables -A walkout -o lo -j ACCEPT | |||||
sudo iptables -A walkout -p tcp --dport 22 -j ACCEPT | |||||
sudo iptables -A walkout -m owner --uid-owner root -j ACCEPT | |||||
sudo iptables -A walkout -o tun0 -j ACCEPT | |||||
sudo iptables -A INPUT -j walkin | |||||
sudo iptables -A INPUT -j DROP | |||||
sudo iptables -A OUTPUT -j walkout | |||||
sudo iptables -A OUTPUT -j DROP | |||||
#Not needed | |||||
sudo iptables -P INPUT DROP | |||||
sudo iptables -P OUTPUT DROP | |||||
echo "Firewall is on" | |||||
;; | |||||
off) | |||||
sudo iptables -F | |||||
sudo iptables -P INPUT ACCEPT | |||||
sudo iptables -P OUTPUT ACCEPT | |||||
echo "Firewall is off" | |||||
;; | |||||
*) | |||||
echo "Invalid arguments"; return ;; | |||||
esac | |||||
} | |||||
#adb commands for moving files between the desktop and an android. | |||||
apull () { | |||||
adb shell ls '/storage/self/primary/Download/'$1 | tr -d '\r' | xargs -n1 adb pull | |||||
} | |||||
als(){ | |||||
adb shell ls /storage/self/primary/Download/$1 | |||||
} | |||||
apush() { | |||||
adb push "$1" /storage/self/primary/Download; | |||||
} | |||||
poly() { | |||||
# 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 | |||||
cp -r $XDG_CONFIG_HOME/polybar/bars/polybar-$1/* $XDG_CONFIG_HOME/polybar/ | |||||
cp -r $XDG_CONFIG_HOME/polybar/fonts/* ~/.local/share/fonts | |||||
fc-cache | |||||
$XDG_CONFIG_HOME/polybar/launch.sh | |||||
} | |||||
vpn() { | |||||
nmcli connect $1 $2.protonvpn.com.udp | |||||
} | |||||
define() { | |||||
dict $1 | less; | |||||
} | |||||
n () { | |||||
# Block nesting of nnn in subshells | |||||
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then | |||||
echo "nnn is already running" | |||||
return | |||||
fi | |||||
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set) | |||||
# To cd on quit only on ^G, remove the "export" as in: | |||||
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" | |||||
# NOTE: NNN_TMPFILE is fixed, should not be modified | |||||
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" | |||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn | |||||
# stty start undef | |||||
# stty stop undef | |||||
# stty lwrap undef | |||||
# stty lnext undef | |||||
nnn "$@" | |||||
if [ -f "$NNN_TMPFILE" ]; then | |||||
. "$NNN_TMPFILE" | |||||
rm -f "$NNN_TMPFILE" > /dev/null | |||||
fi | |||||
} | |||||
compare() { | |||||
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative $1..$2; | |||||
} | |||||
blaunch() { | |||||
BASE16_SHELL="$HOME/.config/base16-shell/" | |||||
[ -n "$PS1" ] && \ | |||||
[ -s "$BASE16_SHELL/profile_helper.sh" ] && \ | |||||
eval "$("$BASE16_SHELL/profile_helper.sh")" | |||||
} | |||||
@@ -0,0 +1,36 @@ | |||||
# ~/.profile: executed by the command interpreter for login shells. | |||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | |||||
# exists. | |||||
# see /usr/share/doc/bash/examples/startup-files for examples. | |||||
# the files are located in the bash-doc package. | |||||
# the default umask is set in /etc/profile; for setting the umask | |||||
# for ssh logins, install and configure the libpam-umask package. | |||||
#umask 022 | |||||
# if running bash | |||||
if [ -n "$BASH_VERSION" ]; then | |||||
# include .bashrc if it exists | |||||
if [ -f "$HOME/.bashrc" ]; then | |||||
. "$HOME/.bashrc" | |||||
fi | |||||
fi | |||||
# set PATH so it includes user's private bin if it exists | |||||
if [ -d "$HOME/bin" ] ; then | |||||
PATH="$HOME/bin:$PATH" | |||||
fi | |||||
export PATH="$HOME/Macros:$HOME/go/bin:/usr/lib/go/bin:$PATH" | |||||
export GOPATH="$HOME/go" | |||||
export GO111MODULE=on | |||||
export VISUAL='ewrap' | |||||
export EDITOR='vim' | |||||
export PAGER='less' | |||||
export NNN_BMS='h:~/;c:~/.config;n:~/Notes;' | |||||
export NNN_FIFO=/tmp/nnn.fifo | |||||
export NNN_PLUG='p:preview-tui;c:x2sel;i:imgview' | |||||
export USE_PISTOL=0 | |||||
export XDG_CONFIG_HOME=$HOME/.config | |||||
export XDG_CACHE_HOME=$HOME/.cache | |||||
export XDG_DATA_HOME=$HOME/.local/share |
@@ -0,0 +1,206 @@ | |||||
set aaa_mode=all | |||||
set altformat_current= %F | |||||
set altformat_playlist= %f%= %d | |||||
set altformat_title=%f | |||||
set altformat_trackwin= %f%= %d | |||||
set auto_expand_albums_follow=true | |||||
set auto_expand_albums_search=true | |||||
set auto_expand_albums_selcur=true | |||||
set auto_reshuffle=true | |||||
set buffer_seconds=10 | |||||
set color_cmdline_attr=default | |||||
set color_cmdline_bg=default | |||||
set color_cmdline_fg=default | |||||
set color_cur_sel_attr=default | |||||
set color_error=124 | |||||
set color_info=172 | |||||
set color_separator=246 | |||||
set color_statusline_attr=default | |||||
set color_statusline_bg=237 | |||||
set color_statusline_fg=72 | |||||
set color_titleline_attr=default | |||||
set color_titleline_bg=236 | |||||
set color_titleline_fg=142 | |||||
set color_trackwin_album_attr=bold | |||||
set color_trackwin_album_bg=default | |||||
set color_trackwin_album_fg=default | |||||
set color_win_attr=default | |||||
set color_win_bg=default | |||||
set color_win_cur=175 | |||||
set color_win_cur_attr=default | |||||
set color_win_cur_sel_attr=default | |||||
set color_win_cur_sel_bg=237 | |||||
set color_win_cur_sel_fg=175 | |||||
set color_win_dir=229 | |||||
set color_win_fg=default | |||||
set color_win_inactive_cur_sel_attr=default | |||||
set color_win_inactive_cur_sel_bg=236 | |||||
set color_win_inactive_cur_sel_fg=175 | |||||
set color_win_inactive_sel_attr=default | |||||
set color_win_inactive_sel_bg=236 | |||||
set color_win_inactive_sel_fg=229 | |||||
set color_win_sel_attr=default | |||||
set color_win_sel_bg=237 | |||||
set color_win_sel_fg=229 | |||||
set color_win_title_attr=default | |||||
set color_win_title_bg=246 | |||||
set color_win_title_fg=235 | |||||
set confirm_run=true | |||||
set continue=true | |||||
set device=/dev/cdrom | |||||
set display_artist_sort_name=false | |||||
set dsp.alsa.device= | |||||
set dsp.ao.buffer_size=16384 | |||||
set dsp.ao.device_interface= | |||||
set dsp.ao.driver= | |||||
set dsp.ao.wav_counter=1 | |||||
set dsp.ao.wav_dir=/home/immanuel | |||||
set dsp.jack.resampling_quality=2 | |||||
set dsp.jack.server_name= | |||||
set follow=false | |||||
set format_current= %a - %l -%3n. %t%= %y | |||||
set format_playlist= %-21%a %3n. %t%= %y %d %{?X!=0?%3X ? } | |||||
set format_playlist_va= %-21%A %3n. %t (%a)%= %y %d %{?X!=0?%3X ? } | |||||
set format_statusline= %{status} %{?show_playback_position?%{position} %{?duration?/ %{duration} }?%{?duration?%{duration} }}- %{total} %{?bpm>0?at %{bpm} BPM }%{?volume>=0?vol: %{?lvolume!=rvolume?%{lvolume},%{rvolume} ?%{volume} }}%{?stream?buf: %{buffer} }%{?show_current_bitrate & bitrate>=0? %{bitrate} kbps }%=%{?repeat_current?repeat current?%{?play_library?%{playlist_mode} from %{?play_sorted?sorted }library?playlist}} | %1{continue}%1{follow}%1{repeat}%1{shuffle} | |||||
set format_title=%a - %l - %t (%y) | |||||
set format_trackwin=%3n. %t%= %y %d | |||||
set format_trackwin_album= %l | |||||
set format_trackwin_va=%3n. %t (%a)%= %y %d | |||||
set format_treewin= %l | |||||
set format_treewin_artist=%a | |||||
set icecast_default_charset=ISO-8859-1 | |||||
set id3_default_charset=ISO-8859-1 | |||||
set input.aac.priority=50 | |||||
set input.cdio.cddb_url=freedb.freedb.org:8880 | |||||
set input.cdio.priority=50 | |||||
set input.cue.priority=50 | |||||
set input.ffmpeg.priority=30 | |||||
set input.flac.priority=50 | |||||
set input.mad.priority=55 | |||||
set input.modplug.priority=50 | |||||
set input.mpc.priority=50 | |||||
set input.opus.priority=50 | |||||
set input.vorbis.priority=50 | |||||
set input.wav.priority=50 | |||||
set input.wavpack.priority=50 | |||||
set lib_add_filter= | |||||
set lib_sort=albumartist date album discnumber tracknumber title filename play_count | |||||
set mixer.alsa.channel= | |||||
set mixer.alsa.device= | |||||
set mixer.pulse.restore_volume=1 | |||||
set mouse=false | |||||
set mpris=true | |||||
set output_plugin=pulse | |||||
set passwd= | |||||
set pl_sort= | |||||
set play_library=true | |||||
set play_sorted=false | |||||
set repeat=true | |||||
set repeat_current=false | |||||
set replaygain=disabled | |||||
set replaygain_limit=true | |||||
set replaygain_preamp=0.000000 | |||||
set resume=false | |||||
set rewind_offset=5 | |||||
set scroll_offset=2 | |||||
set set_term_title=true | |||||
set show_all_tracks=true | |||||
set show_current_bitrate=false | |||||
set show_hidden=false | |||||
set show_playback_position=true | |||||
set show_remaining_time=true | |||||
set shuffle=false | |||||
set skip_track_info=false | |||||
set smart_artist_sort=true | |||||
set softvol=false | |||||
set softvol_state=0 0 | |||||
set start_view=tree | |||||
set status_display_program= | |||||
set time_show_leading_zero=true | |||||
set wrap_search=true | |||||
bind browser backspace browser-up | |||||
bind browser i toggle show_hidden | |||||
bind browser space win-activate | |||||
bind browser u win-update | |||||
bind common ! push shell | |||||
bind common + vol +10% | |||||
bind common , seek -1m | |||||
bind common - vol -10% | |||||
bind common . seek +1m | |||||
bind common 1 view tree | |||||
bind common 2 view sorted | |||||
bind common 3 view playlist | |||||
bind common 4 view queue | |||||
bind common 5 view browser | |||||
bind common 6 view filters | |||||
bind common 7 view settings | |||||
bind common = vol +10% | |||||
bind common C toggle continue | |||||
bind common D win-remove | |||||
bind common E win-add-Q | |||||
bind common F push filter | |||||
bind common G win-bottom | |||||
bind common I echo {} | |||||
bind common L push live-filter | |||||
bind common M toggle play_library | |||||
bind common N search-prev | |||||
bind common P win-mv-before | |||||
bind common U win-update-cache | |||||
bind common [ vol +1% +0 | |||||
bind common ] vol +0 +1% | |||||
bind common ^B win-page-up | |||||
bind common ^C echo Type :quit<enter> to exit cmus. | |||||
bind common ^E win-scroll-down | |||||
bind common ^F win-page-down | |||||
bind common ^L refresh | |||||
bind common ^R toggle repeat_current | |||||
bind common ^Y win-scroll-up | |||||
bind common a win-add-l | |||||
bind common b player-next | |||||
bind common c player-pause | |||||
bind common delete win-remove | |||||
bind common down win-down | |||||
bind common e win-add-q | |||||
bind common end win-bottom | |||||
bind common enter win-activate | |||||
bind common f toggle follow | |||||
bind common g win-top | |||||
bind common h seek -5 | |||||
bind common home win-top | |||||
bind common i win-sel-cur | |||||
bind common j win-down | |||||
bind common k win-up | |||||
bind common l seek +5 | |||||
bind common left seek -5 | |||||
bind common m toggle aaa_mode | |||||
bind common mlb_click_selected win-activate | |||||
bind common mouse_scroll_down win-down | |||||
bind common mouse_scroll_up win-up | |||||
bind common n search-next | |||||
bind common o toggle play_sorted | |||||
bind common p win-mv-after | |||||
bind common page_down win-page-down | |||||
bind common page_up win-page-up | |||||
bind common q quit -i | |||||
bind common r toggle repeat | |||||
bind common right seek +5 | |||||
bind common s toggle shuffle | |||||
bind common space win-toggle | |||||
bind common t toggle show_remaining_time | |||||
bind common tab win-next | |||||
bind common u update-cache | |||||
bind common up win-up | |||||
bind common v player-stop | |||||
bind common x player-play | |||||
bind common y win-add-p | |||||
bind common z player-prev | |||||
bind common { vol -1% -0 | |||||
bind common } vol -0 -1% | |||||
fset 90s=date>=1990&date<2000 | |||||
fset classical=genre="Classical" | |||||
fset missing-tag=!stream&(artist=""|album=""|title=""|tracknumber=-1|date=-1) | |||||
fset mp3=filename="*.mp3" | |||||
fset ogg=filename="*.ogg" | |||||
fset ogg-or-mp3=ogg|mp3 | |||||
fset unheard=play_count=0 | |||||
factivate |
@@ -0,0 +1,18 @@ | |||||
colorscheme | |||||
colo | |||||
live-filter | |||||
live-filter el hu | |||||
help | |||||
colorscheme gruvbox | |||||
cd ~ | |||||
pl-create night | |||||
colorscheme dracula | |||||
quit | |||||
delete ALL | |||||
delete all | |||||
qa | |||||
refresh | |||||
add . | |||||
add | |||||
load | |||||
import |
@@ -0,0 +1,10 @@ | |||||
/home/immanuel/Music/02 Kevin Gates - Change Lanes.mp3 | |||||
/home/immanuel/Music/Kevin Gates - Really Really.webm | |||||
/home/immanuel/Music/Roy Woods - Say Less (2017) Mp3 (320kbps) [Hunter]/Roy Woods - Say Less (2017)/04 Take Time (feat. 24Hrs).mp3 | |||||
/home/immanuel/Music/Lil Baby and Drake - Yes Indeed (CDQ).mp3 | |||||
/home/immanuel/Music/Rae Sremmurd - Look Alive (Radio Rip).mp3 | |||||
/home/immanuel/Music/01 Unforgettable (feat. Swae Lee).mp3 | |||||
/home/immanuel/Music/Pop Smoke - Dior (Official Audio)-goYgHnsQdtY.webm | |||||
/home/immanuel/Music/Lil Durk - Gucci Gucci feat. Gunna (Official Audio)-HE4ZfIRMVOg.webm | |||||
/home/immanuel/Music/POP SMOKE - DIOR (REMIX) ft. Gunna (Official Audio)-YlRxTNDh4A4.webm | |||||
/home/immanuel/Music/01 Mi Gente.mp3 |
@@ -0,0 +1,8 @@ | |||||
/home/immanuel/Music/Pop Smoke - Dior (Official Audio)-goYgHnsQdtY.webm | |||||
/home/immanuel/Music/Lil Durk - Gucci Gucci feat. Gunna (Official Audio)-HE4ZfIRMVOg.webm | |||||
/home/immanuel/Music/POP SMOKE - DIOR (REMIX) ft. Gunna (Official Audio)-YlRxTNDh4A4.webm | |||||
/home/immanuel/Music/Future - Life Is Good (Audio) ft. Drake-ZBOoVj6IW3s.webm | |||||
/home/immanuel/Music/Ghetto Sage - Häagen Dazs-kgKzFC_zd2Y.webm | |||||
/home/immanuel/Music/SAINt JHN - 'Roses' Imanbek Remix (Official Audio)-ele2DMU49Jk.webm | |||||
/home/immanuel/Music/ROSALÍA, J Balvin - Con Altura (Official Video) ft. El Guincho-p7bfOZek9t4.webm | |||||
/home/immanuel/Music/SAINt JHN - 'Roses' Imanbek Remix (Official Audio)-ele2DMU49Jk.webm |
@@ -0,0 +1,100 @@ | |||||
two ano | |||||
two | |||||
el hue | |||||
el | |||||
denni | |||||
take time | |||||
take time | |||||
hel h | |||||
make | |||||
gucci | |||||
roy woo | |||||
El Huer | |||||
el h | |||||
TFN | |||||
Full | |||||
Full N | |||||
Full Nerd | |||||
Full ner | |||||
full | |||||
full nerd | |||||
full ner | |||||
econ | |||||
econo// | |||||
darj | |||||
daijj | |||||
?44 | |||||
44 | |||||
funk | |||||
mati | |||||
wann | |||||
mem | |||||
tomor | |||||
home | |||||
Bal | |||||
iman | |||||
denn | |||||
make it ra | |||||
el huervo | |||||
el d | |||||
make it | |||||
make | |||||
mus | |||||
guc | |||||
wave | |||||
all | |||||
styl | |||||
No | |||||
no sy | |||||
riv | |||||
river | |||||
groove | |||||
life | |||||
con | |||||
Con | |||||
altur | |||||
con alt | |||||
mala | |||||
alad | |||||
ala | |||||
dior | |||||
gucc | |||||
durk | |||||
pop | |||||
kam | |||||
kame | |||||
yes in | |||||
yes | |||||
young | |||||
MA | |||||
BIG | |||||
lif | |||||
toos | |||||
toosie | |||||
sund | |||||
surfac | |||||
tick | |||||
WHO | |||||
life | |||||
Life | |||||
pi | |||||
mine | |||||
jax | |||||
hag | |||||
pic | |||||
mann | |||||
Manis | |||||
Manish | |||||
manish | |||||
Man | |||||
manis | |||||
pict | |||||
ashan | |||||
bab | |||||
shor | |||||
travis | |||||
boy | |||||
the boy | |||||
slid | |||||
pictu | |||||
haa |
@@ -0,0 +1,35 @@ | |||||
backend = "glx"; | |||||
glx-no-stencil = true; | |||||
vsync = true; | |||||
unredir-if-possible = true; | |||||
# Shadow | |||||
shadow = true; # Enabled client-side shadows on windows. | |||||
shadow-radius = 7; # The blur radius for shadows. (default 12) | |||||
shadow-offset-x = -7; # The left offset for shadows. (default -15) | |||||
shadow-offset-y = -7; # The top offset for shadows. (default -15) | |||||
shadow-exclude = [ | |||||
"n:e:Notification", | |||||
"n:e:Docky", | |||||
"g:e:Synapse", | |||||
"g:e:Conky", | |||||
"n:w:*Firefox*", | |||||
"n:w:*Chromium*", | |||||
"n:w:*dockbarx*", | |||||
"class_g ?= 'Cairo-dock'", | |||||
"class_g ?= 'Xfce4-notifyd'", | |||||
"class_g ?= 'Xfce4-power-manager'", | |||||
"class_g ?= 'Notify-osd'", | |||||
"_GTK_FRAME_EXTENTS@:c" | |||||
]; | |||||
# Opacity | |||||
detect-client-opacity = true; | |||||
# Window type settings | |||||
wintypes: | |||||
{ | |||||
dock = { shadow = false; }; | |||||
dnd = { shadow = false; }; | |||||
tooltip = { shadow = false; }; | |||||
}; |
@@ -0,0 +1,73 @@ | |||||
<?xml version="1.0"?> | |||||
<opml version="1.0"> | |||||
<head> | |||||
<title>Liferea Feed List Export</title> | |||||
</head> | |||||
<body> | |||||
<outline title="Example Feeds" text="Example Feeds" description="Example Feeds" type="folder" id="ftwxcvr" sortColumn="time" expanded="true"> | |||||
<outline title="Music Blogs" text="Music Blogs" description="Music Blogs" type="folder" id="eojsqse" sortColumn="time" collapsed="true"> | |||||
<outline title="Free Music Archive" text="Free Music Archive" description="Free Music Archive" type="atom" id="grwqrth" sortColumn="time" xmlUrl="https://freemusicarchive.org/recent.atom" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Gorilla vs. Bear" text="Gorilla vs. Bear" description="Gorilla vs. Bear" type="rss" id="qlthvor" sortColumn="time" xmlUrl="https://www.gorillavsbear.net/category/mp3/feed/" htmlUrl="https://www.gorillavsbear.net" updateInterval="-1" collapsed="true"/> | |||||
<outline title="KEXP" text="KEXP" description="KEXP" id="ividqvs" sortColumn="time" xmlUrl="https://www.kexp.org/read/kexp/songoftheday/" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Fluxblog" text="Fluxblog" description="Fluxblog" type="rss" id="ywlfjmf" sortColumn="time" xmlUrl="http://www.fluxblog.org/feed/" htmlUrl="http://www.fluxblog.org" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
</outline> | |||||
<outline title="Unread" text="Unread" description="Unread" type="vfolder" id="wrdkgnf" sortColumn="time" matchType="any" collapsed="true"> | |||||
<outline type="rule" text="Read status" rule="unread" value="" additive="true"/> | |||||
</outline> | |||||
<outline title="Important" text="Important" description="Important" type="vfolder" id="gptkwpb" sortColumn="time" matchType="any" collapsed="true"> | |||||
<outline type="rule" text="Flag status" rule="flagged" value="" additive="true"/> | |||||
</outline> | |||||
<outline title="Podcasts" text="Podcasts" description="Podcasts" type="folder" id="xlrmdwu" sortColumn="time" expanded="true"> | |||||
<outline title="EscapePod" text="EscapePod" description="EscapePod" type="atom" id="qvymrig" sortColumn="time" xmlUrl="https://escapepod.org/feed/atom/" htmlUrl="https://escapepod.org/feed/atom/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Reply All" text="Reply All" description="Reply All" type="rss" id="vpeidch" sortColumn="time" xmlUrl="http://feeds.megaphone.fm/GLT6865004529" htmlUrl="http://gimletmedia.com/shows/reply-all" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Gaming On Linux Podcasts" text="Gaming On Linux Podcasts" description="Gaming On Linux Podcasts" type="rss" id="ldtbvtw" sortColumn="time" xmlUrl="https://www.gamingonlinux.com/podcast_rss_mp3.php" htmlUrl="http://www.gamingonlinux.com/" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Comics" text="Comics" description="Comics" type="folder" id="devsajl" sortColumn="time" expanded="true"> | |||||
<outline title="xkcd" text="xkcd" description="xkcd" type="atom" id="nnxnsff" sortColumn="time" xmlUrl="https://xkcd.com/atom.xml" htmlUrl="https://xkcd.com/" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Favorites" text="Favorites" description="Favorites" type="folder" id="hkvxljw" sortColumn="time" expanded="true"> | |||||
<outline title="Wired" text="Wired" description="Wired" type="rss" id="mgjptmb" sortColumn="time" xmlUrl="https://www.wired.com/feed/rss" htmlUrl="https://www.wired.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="NYT > Top Stories" text="NYT > Top Stories" description="NYT > Top Stories" type="rss" id="sktjqbn" sortColumn="time" xmlUrl="https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml" htmlUrl="https://www.nytimes.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Politics – FiveThirtyEight" text="Politics – FiveThirtyEight" description="Politics – FiveThirtyEight" type="rss" id="ysorjyn" sortColumn="time" xmlUrl="https://fivethirtyeight.com/politics/feed/" htmlUrl="https://fivethirtyeight.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Foreign Affairs Feed" text="Foreign Affairs Feed" description="Foreign Affairs Feed" type="rss" id="jeccrun" sortColumn="time" xmlUrl="https://www.foreignaffairs.com/rss.xml" htmlUrl="https://www.foreignaffairs.com/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="The Latest from Luke" text="The Latest from Luke" description="The Latest from Luke" type="rss" id="uxkoheo" sortColumn="time" xmlUrl="https://lukesmith.xyz/rss.xml" htmlUrl="https://lukesmith.xyz/rss.xml" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Luke Smith" text="Luke Smith" description="Luke Smith" type="atom" id="savvrcl" sortColumn="time" xmlUrl="https://lukesmith.xyz/youtube.xml" htmlUrl="https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Not Related! A Big-Braned Podcast" text="Not Related! A Big-Braned Podcast" description="Not Related! A Big-Braned Podcast" type="rss" id="wkormra" sortColumn="time" xmlUrl="https://notrelated.libsyn.com/rss" htmlUrl="http://notrelated.libsyn.com/website" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Features – FiveThirtyEight" text="Features – FiveThirtyEight" description="Features – FiveThirtyEight" type="rss" id="gbmlbav" sortColumn="time" xmlUrl="https://fivethirtyeight.com/features/feed/" htmlUrl="https://fivethirtyeight.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="ITS Tactical" text="ITS Tactical" description="ITS Tactical" type="rss" id="uoguveg" sortColumn="time" xmlUrl="https://www.itstactical.com/feed/" htmlUrl="https://www.itstactical.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Michael Shermer" text="Michael Shermer" description="Michael Shermer" type="rss" id="eoegpmr" sortColumn="time" xmlUrl="https://michaelshermer.com/feed/" htmlUrl="https://michaelshermer.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Recent News" text="Recent News" description="Recent News" type="rss" id="dskpfiq" sortColumn="time" xmlUrl="https://www.rasmussenreports.com/rss/most_recent" htmlUrl="https://www.rasmussenreports.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Politics, Policy, Political News Top Stories" text="Politics, Policy, Political News Top Stories" description="Politics, Policy, Political News Top Stories" type="rss" id="bymuntj" sortColumn="time" xmlUrl="https://www.politico.com/rss/politicopicks.xml" htmlUrl="https://www.politico.com/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="gHacks Technology News" text="gHacks Technology News" description="gHacks Technology News" type="rss" id="emqlvgh" sortColumn="time" xmlUrl="https://www.ghacks.net/feed/" htmlUrl="https://www.ghacks.net" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Open Source" text="Open Source" description="Open Source" type="folder" id="fkfpokk" sortColumn="time" expanded="true"> | |||||
<outline title="Planet GNU" text="Planet GNU" description="Planet GNU" type="atom" id="wbvyonm" sortColumn="time" xmlUrl="https://planet.gnu.org/atom.xml" htmlUrl="https://planet.gnu.org/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Purism" text="Purism" description="Purism" type="rss" id="aodllhr" sortColumn="time" xmlUrl="https://puri.sm/feed/" htmlUrl="https://puri.sm/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Linux Journal News" text="Linux Journal News" description="Linux Journal News" type="rss" id="bguijxq" sortColumn="time" xmlUrl="https://www.linuxjournal.com/news/feed" htmlUrl="https://www.linuxjournal.com/news/feed" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Containers" text="Containers" description="Containers" type="rss" id="otdhtmv" sortColumn="time" xmlUrl="https://www.linuxjournal.com/taxonomy/term/978/feed" htmlUrl="https://www.linuxjournal.com/tag/containers" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Networking" text="Networking" description="Networking" type="rss" id="mivleas" sortColumn="time" xmlUrl="https://www.linuxjournal.com/taxonomy/term/256/feed" htmlUrl="https://www.linuxjournal.com/tag/networking" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Privacy" text="Privacy" description="Privacy" type="rss" id="cpbdnhm" sortColumn="time" xmlUrl="https://www.linuxjournal.com/taxonomy/term/352/feed" htmlUrl="https://www.linuxjournal.com/tag/privacy" updateInterval="-1" collapsed="true"/> | |||||
<outline title="PCWorld" text="PCWorld" description="PCWorld" type="rss" id="ogccxnf" sortColumn="time" xmlUrl="https://www.pcworld.com/index.rss" htmlUrl="https://www.pcworld.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Best Podcasts" text="Best Podcasts" description="Best Podcasts" type="rss" id="wyuxngk" sortColumn="time" xmlUrl="https://bestpodcasts.com/feed/" htmlUrl="https://bestpodcasts.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Phoronix" text="Phoronix" description="Phoronix" type="rss" id="rkectec" sortColumn="time" xmlUrl="https://www.phoronix.com/rss.php" htmlUrl="https://www.phoronix.com/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="New Subscription" text="New Subscription" description="New Subscription" id="ajgwruo" sortColumn="time" xmlUrl="https://theintelligence.economist.com/" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="r/Privacy" text="r/Privacy" description="r/Privacy" type="atom" id="jeededm" sortColumn="time" xmlUrl="https://www.reddit.com/r/privacy.rss" htmlUrl="https://www.reddit.com/r/privacy" updateInterval="-1" collapsed="true"/> | |||||
<outline title="PCWorld The Full Nerd" text="PCWorld The Full Nerd" description="PCWorld The Full Nerd" type="rss" id="thvldva" sortColumn="time" xmlUrl="https://www.pcworld.com/column/the-full-nerd/index.rss" htmlUrl="https://www.pcworld.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="New Subscription" text="New Subscription" description="New Subscription" id="odfwlom" sortColumn="time" xmlUrl="https://www.technologyreview.com/" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Planet Debian" text="Planet Debian" description="Planet Debian" type="rss" id="oyviimx" sortColumn="time" xmlUrl="https://planet.debian.org/rss20.xml" htmlUrl="https://planet.debian.org/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Liferea Blog" text="Liferea Blog" description="Liferea Blog" type="atom" id="pwiblpi" sortColumn="time" xmlUrl="http://feeds.feedburner.com/LifereaBlog" htmlUrl="http://feeds.feedburner.com/LifereaBlog" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Planet GNOME" text="Planet GNOME" description="Planet GNOME" type="atom" id="yodrgab" sortColumn="time" xmlUrl="http://planet.gnome.org/atom.xml" htmlUrl="https://planet.gnome.org/" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="News" text="News" description="News" type="folder" id="etncpql" sortColumn="time" expanded="true"> | |||||
<outline title="Ars Technica" text="Ars Technica" description="Ars Technica" type="rss" id="ueiuccq" sortColumn="time" xmlUrl="http://feeds.arstechnica.com/arstechnica/index" htmlUrl="https://arstechnica.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Slashdot" text="Slashdot" description="Slashdot" type="rss" id="oepdafo" sortColumn="time" xmlUrl="http://rss.slashdot.org/Slashdot/slashdot" htmlUrl="https://slashdot.org/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="BBC" text="BBC" description="BBC" type="rss" id="mrckhom" sortColumn="time" xmlUrl="http://feeds.bbci.co.uk/news/rss.xml?edition=int" htmlUrl="https://www.bbc.co.uk/news/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Science News" text="Science News" description="Science News" type="rss" id="bvqutio" sortColumn="time" xmlUrl="https://www.sciencenews.org/feed" htmlUrl="https://www.sciencenews.org" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Articles and Investigations - ProPublica" text="Articles and Investigations - ProPublica" description="Articles and Investigations - ProPublica" type="rss" id="rmavaij" sortColumn="time" xmlUrl="http://feeds.propublica.org/propublica/main" htmlUrl="https://www.propublica.org/feeds/54Ghome" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Media Bias/Fact Check" text="Media Bias/Fact Check" description="Media Bias/Fact Check" type="rss" id="wxhugyp" sortColumn="time" xmlUrl="https://mediabiasfactcheck.com/feed/" htmlUrl="https://mediabiasfactcheck.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Brookings" text="Brookings" description="Brookings" type="rss" id="wbbbfct" sortColumn="time" xmlUrl="https://www.brookings.edu/feed/" htmlUrl="https://www.brookings.edu" updateInterval="-1" collapsed="true"/> | |||||
<outline title="The Independent" text="The Independent" description="The Independent" type="rss" id="ujnssve" sortColumn="time" xmlUrl="http://www.independent.co.uk/rss" htmlUrl="http://www.independent.co.uk/rss" updateInterval="-1" collapsed="true"/> | |||||
</body> | |||||
</opml> |
@@ -0,0 +1,73 @@ | |||||
<?xml version="1.0"?> | |||||
<opml version="1.0"> | |||||
<head> | |||||
<title>Liferea Feed List Export</title> | |||||
</head> | |||||
<body> | |||||
<outline title="Example Feeds" text="Example Feeds" description="Example Feeds" type="folder" id="ftwxcvr" sortColumn="time" expanded="true"> | |||||
<outline title="Music Blogs" text="Music Blogs" description="Music Blogs" type="folder" id="eojsqse" sortColumn="time" collapsed="true"> | |||||
<outline title="Free Music Archive" text="Free Music Archive" description="Free Music Archive" type="atom" id="grwqrth" sortColumn="time" xmlUrl="https://freemusicarchive.org/recent.atom" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Gorilla vs. Bear" text="Gorilla vs. Bear" description="Gorilla vs. Bear" type="rss" id="qlthvor" sortColumn="time" xmlUrl="https://www.gorillavsbear.net/category/mp3/feed/" htmlUrl="https://www.gorillavsbear.net" updateInterval="-1" collapsed="true"/> | |||||
<outline title="KEXP" text="KEXP" description="KEXP" id="ividqvs" sortColumn="time" xmlUrl="https://www.kexp.org/read/kexp/songoftheday/" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Fluxblog" text="Fluxblog" description="Fluxblog" type="rss" id="ywlfjmf" sortColumn="time" xmlUrl="http://www.fluxblog.org/feed/" htmlUrl="http://www.fluxblog.org" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
</outline> | |||||
<outline title="Unread" text="Unread" description="Unread" type="vfolder" id="wrdkgnf" sortColumn="time" matchType="any" collapsed="true"> | |||||
<outline type="rule" text="Read status" rule="unread" value="" additive="true"/> | |||||
</outline> | |||||
<outline title="Important" text="Important" description="Important" type="vfolder" id="gptkwpb" sortColumn="time" matchType="any" collapsed="true"> | |||||
<outline type="rule" text="Flag status" rule="flagged" value="" additive="true"/> | |||||
</outline> | |||||
<outline title="Podcasts" text="Podcasts" description="Podcasts" type="folder" id="xlrmdwu" sortColumn="time" expanded="true"> | |||||
<outline title="EscapePod" text="EscapePod" description="EscapePod" type="atom" id="qvymrig" sortColumn="time" xmlUrl="https://escapepod.org/feed/atom/" htmlUrl="https://escapepod.org/feed/atom/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Reply All" text="Reply All" description="Reply All" type="rss" id="vpeidch" sortColumn="time" xmlUrl="http://feeds.megaphone.fm/GLT6865004529" htmlUrl="http://gimletmedia.com/shows/reply-all" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Gaming On Linux Podcasts" text="Gaming On Linux Podcasts" description="Gaming On Linux Podcasts" type="rss" id="ldtbvtw" sortColumn="time" xmlUrl="https://www.gamingonlinux.com/podcast_rss_mp3.php" htmlUrl="http://www.gamingonlinux.com/" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Comics" text="Comics" description="Comics" type="folder" id="devsajl" sortColumn="time" expanded="true"> | |||||
<outline title="xkcd" text="xkcd" description="xkcd" type="atom" id="nnxnsff" sortColumn="time" xmlUrl="https://xkcd.com/atom.xml" htmlUrl="https://xkcd.com/" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Favorites" text="Favorites" description="Favorites" type="folder" id="hkvxljw" sortColumn="time" expanded="true"> | |||||
<outline title="Wired" text="Wired" description="Wired" type="rss" id="mgjptmb" sortColumn="time" xmlUrl="https://www.wired.com/feed/rss" htmlUrl="https://www.wired.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="NYT > Top Stories" text="NYT > Top Stories" description="NYT > Top Stories" type="rss" id="sktjqbn" sortColumn="time" xmlUrl="https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml" htmlUrl="https://www.nytimes.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Politics – FiveThirtyEight" text="Politics – FiveThirtyEight" description="Politics – FiveThirtyEight" type="rss" id="ysorjyn" sortColumn="time" xmlUrl="https://fivethirtyeight.com/politics/feed/" htmlUrl="https://fivethirtyeight.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Foreign Affairs Feed" text="Foreign Affairs Feed" description="Foreign Affairs Feed" type="rss" id="jeccrun" sortColumn="time" xmlUrl="https://www.foreignaffairs.com/rss.xml" htmlUrl="https://www.foreignaffairs.com/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="The Latest from Luke" text="The Latest from Luke" description="The Latest from Luke" type="rss" id="uxkoheo" sortColumn="time" xmlUrl="https://lukesmith.xyz/rss.xml" htmlUrl="https://lukesmith.xyz/rss.xml" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Luke Smith" text="Luke Smith" description="Luke Smith" type="atom" id="savvrcl" sortColumn="time" xmlUrl="https://lukesmith.xyz/youtube.xml" htmlUrl="https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Not Related! A Big-Braned Podcast" text="Not Related! A Big-Braned Podcast" description="Not Related! A Big-Braned Podcast" type="rss" id="wkormra" sortColumn="time" xmlUrl="https://notrelated.libsyn.com/rss" htmlUrl="http://notrelated.libsyn.com/website" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Features – FiveThirtyEight" text="Features – FiveThirtyEight" description="Features – FiveThirtyEight" type="rss" id="gbmlbav" sortColumn="time" xmlUrl="https://fivethirtyeight.com/features/feed/" htmlUrl="https://fivethirtyeight.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="ITS Tactical" text="ITS Tactical" description="ITS Tactical" type="rss" id="uoguveg" sortColumn="time" xmlUrl="https://www.itstactical.com/feed/" htmlUrl="https://www.itstactical.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Michael Shermer" text="Michael Shermer" description="Michael Shermer" type="rss" id="eoegpmr" sortColumn="time" xmlUrl="https://michaelshermer.com/feed/" htmlUrl="https://michaelshermer.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Recent News" text="Recent News" description="Recent News" type="rss" id="dskpfiq" sortColumn="time" xmlUrl="https://www.rasmussenreports.com/rss/most_recent" htmlUrl="https://www.rasmussenreports.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Politics, Policy, Political News Top Stories" text="Politics, Policy, Political News Top Stories" description="Politics, Policy, Political News Top Stories" type="rss" id="bymuntj" sortColumn="time" xmlUrl="https://www.politico.com/rss/politicopicks.xml" htmlUrl="https://www.politico.com/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="gHacks Technology News" text="gHacks Technology News" description="gHacks Technology News" type="rss" id="emqlvgh" sortColumn="time" xmlUrl="https://www.ghacks.net/feed/" htmlUrl="https://www.ghacks.net" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Open Source" text="Open Source" description="Open Source" type="folder" id="fkfpokk" sortColumn="time" expanded="true"> | |||||
<outline title="Planet GNU" text="Planet GNU" description="Planet GNU" type="atom" id="wbvyonm" sortColumn="time" xmlUrl="https://planet.gnu.org/atom.xml" htmlUrl="https://planet.gnu.org/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Purism" text="Purism" description="Purism" type="rss" id="aodllhr" sortColumn="time" xmlUrl="https://puri.sm/feed/" htmlUrl="https://puri.sm/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Linux Journal News" text="Linux Journal News" description="Linux Journal News" type="rss" id="bguijxq" sortColumn="time" xmlUrl="https://www.linuxjournal.com/news/feed" htmlUrl="https://www.linuxjournal.com/news/feed" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Containers" text="Containers" description="Containers" type="rss" id="otdhtmv" sortColumn="time" xmlUrl="https://www.linuxjournal.com/taxonomy/term/978/feed" htmlUrl="https://www.linuxjournal.com/tag/containers" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Networking" text="Networking" description="Networking" type="rss" id="mivleas" sortColumn="time" xmlUrl="https://www.linuxjournal.com/taxonomy/term/256/feed" htmlUrl="https://www.linuxjournal.com/tag/networking" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Privacy" text="Privacy" description="Privacy" type="rss" id="cpbdnhm" sortColumn="time" xmlUrl="https://www.linuxjournal.com/taxonomy/term/352/feed" htmlUrl="https://www.linuxjournal.com/tag/privacy" updateInterval="-1" collapsed="true"/> | |||||
<outline title="PCWorld" text="PCWorld" description="PCWorld" type="rss" id="ogccxnf" sortColumn="time" xmlUrl="https://www.pcworld.com/index.rss" htmlUrl="https://www.pcworld.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Best Podcasts" text="Best Podcasts" description="Best Podcasts" type="rss" id="wyuxngk" sortColumn="time" xmlUrl="https://bestpodcasts.com/feed/" htmlUrl="https://bestpodcasts.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Phoronix" text="Phoronix" description="Phoronix" type="rss" id="rkectec" sortColumn="time" xmlUrl="https://www.phoronix.com/rss.php" htmlUrl="https://www.phoronix.com/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="New Subscription" text="New Subscription" description="New Subscription" id="ajgwruo" sortColumn="time" xmlUrl="https://theintelligence.economist.com/" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="r/Privacy" text="r/Privacy" description="r/Privacy" type="atom" id="jeededm" sortColumn="time" xmlUrl="https://www.reddit.com/r/privacy.rss" htmlUrl="https://www.reddit.com/r/privacy" updateInterval="-1" collapsed="true"/> | |||||
<outline title="PCWorld The Full Nerd" text="PCWorld The Full Nerd" description="PCWorld The Full Nerd" type="rss" id="thvldva" sortColumn="time" xmlUrl="https://www.pcworld.com/column/the-full-nerd/index.rss" htmlUrl="https://www.pcworld.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="New Subscription" text="New Subscription" description="New Subscription" id="odfwlom" sortColumn="time" xmlUrl="https://www.technologyreview.com/" htmlUrl="" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Planet Debian" text="Planet Debian" description="Planet Debian" type="rss" id="oyviimx" sortColumn="time" xmlUrl="https://planet.debian.org/rss20.xml" htmlUrl="https://planet.debian.org/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Liferea Blog" text="Liferea Blog" description="Liferea Blog" type="atom" id="pwiblpi" sortColumn="time" xmlUrl="http://feeds.feedburner.com/LifereaBlog" htmlUrl="http://feeds.feedburner.com/LifereaBlog" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Planet GNOME" text="Planet GNOME" description="Planet GNOME" type="atom" id="yodrgab" sortColumn="time" xmlUrl="http://planet.gnome.org/atom.xml" htmlUrl="https://planet.gnome.org/" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="News" text="News" description="News" type="folder" id="etncpql" sortColumn="time" expanded="true"> | |||||
<outline title="Ars Technica" text="Ars Technica" description="Ars Technica" type="rss" id="ueiuccq" sortColumn="time" xmlUrl="http://feeds.arstechnica.com/arstechnica/index" htmlUrl="https://arstechnica.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Slashdot" text="Slashdot" description="Slashdot" type="rss" id="oepdafo" sortColumn="time" xmlUrl="http://rss.slashdot.org/Slashdot/slashdot" htmlUrl="https://slashdot.org/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="BBC" text="BBC" description="BBC" type="rss" id="mrckhom" sortColumn="time" xmlUrl="http://feeds.bbci.co.uk/news/rss.xml?edition=int" htmlUrl="https://www.bbc.co.uk/news/" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Science News" text="Science News" description="Science News" type="rss" id="bvqutio" sortColumn="time" xmlUrl="https://www.sciencenews.org/feed" htmlUrl="https://www.sciencenews.org" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Articles and Investigations - ProPublica" text="Articles and Investigations - ProPublica" description="Articles and Investigations - ProPublica" type="rss" id="rmavaij" sortColumn="time" xmlUrl="http://feeds.propublica.org/propublica/main" htmlUrl="https://www.propublica.org/feeds/54Ghome" updateInterval="-1" collapsed="true"/> | |||||
</outline> | |||||
<outline title="Media Bias/Fact Check" text="Media Bias/Fact Check" description="Media Bias/Fact Check" type="rss" id="wxhugyp" sortColumn="time" xmlUrl="https://mediabiasfactcheck.com/feed/" htmlUrl="https://mediabiasfactcheck.com" updateInterval="-1" collapsed="true"/> | |||||
<outline title="Brookings" text="Brookings" description="Brookings" type="rss" id="wbbbfct" sortColumn="time" xmlUrl="https://www.brookings.edu/feed/" htmlUrl="https://www.brookings.edu" updateInterval="-1" collapsed="true"/> | |||||
<outline title="The Independent" text="The Independent" description="The Independent" type="rss" id="ujnssve" sortColumn="time" xmlUrl="http://www.independent.co.uk/rss" htmlUrl="http://www.independent.co.uk/rss" updateInterval="-1" collapsed="true"/> | |||||
</body> | |||||
</opml> |
@@ -0,0 +1,115 @@ | |||||
/** | |||||
This is a template file which you can use to redefine the Liferea | |||||
CSS definitions use to render items. Below you find empty class | |||||
definitions including comments describing what they are used for. | |||||
Before you start customizing... | |||||
Reloading: | |||||
========== | |||||
For performance reasons Liferea will read this CSS file only | |||||
on startup. So when you modify it please restart Liferea for | |||||
changes to take effect. | |||||
About Font Definitions: | |||||
======================= | |||||
You should avoid setting absolute font sizes. This allows Liferea | |||||
to follow the GNOME font and font size. Use relative definitions | |||||
instead (e.g. "1.2em" or "0.8em"). | |||||
Color Definitions: | |||||
================== | |||||
Try to reuse GTK theme colors. Liferea uses the following definitions | |||||
and will be replace them on the fly: | |||||
GTK-COLOR-FG | |||||
GTK-COLOR-BG | |||||
GTK-COLOR-LIGHT | |||||
GTK-COLOR-DARK | |||||
GTK-COLOR-MID | |||||
GTK-COLOR-BASE | |||||
GTK-COLOR-TEXT | |||||
GTK-COLOR-NORMAL-LINK | |||||
GTK-COLOR-VISITED-LINK | |||||
Inspecting the HTML: | |||||
==================== | |||||
If the definitions below do not help you, run Liferea with | |||||
the parameter "--debug-html". Then Liferea will dump HTML | |||||
into | |||||
~/.cache/liferea/output.xhtml | |||||
each time it renders an item or a feed. So you can check for | |||||
style classes and the layout you want to affect. | |||||
*/ | |||||
/* Item display rendering header table (with title, categories...) */ | |||||
// table.itemhead { } | |||||
/* Feed display rendering header table (with title, categories...) */ | |||||
// table.feedhead { } | |||||
/* Left <td> of feed/item table display containing favicon */ | |||||
// td.headleft { } | |||||
// a.favicon { } | |||||
// a.favicon img { } | |||||
/* Right <td> of feed/item table display containing title */ | |||||
// td.headright { } | |||||
/* Metadata display table (inside header table) */ | |||||
// table.headmeta { } | |||||
/* 2 pane mode: Item menu definitions */ | |||||
// .itemmenu { } | |||||
// .itemmenu a { } | |||||
// .itemmenu a:hover { } | |||||
// .itemmenu * span { } | |||||
// .itemmenu * img { } | |||||
/* Header table fields to different item metadata */ | |||||
// .author, .categories, .source { } | |||||
// .date { } | |||||
/* Item/feed description */ | |||||
// div.content { } | |||||
/* Comment rendering */ | |||||
// div.comment { } | |||||
// div.comment_body { } | |||||
// div.comment_title { } | |||||
/* Styles for the HTTP error box at the beginning | |||||
of the feed description and for item comment feeds */ | |||||
// #errors, #commentFeedError { } | |||||
// #parseError, #filterError, #updateError { } | |||||
// div.xmlparseroutput { } | |||||
// span.details, span.detaillink { } | |||||
// span.details { } | |||||
// span.showmore { } | |||||
/* namespace specific styles */ | |||||
// div.blogchanneltitle { } | |||||
// div.photoheader { } | |||||
/* Gravatar embedding */ | |||||
// img.gravatar { } | |||||
/* OpenStreeMap embedded map*/ | |||||
// #map img { } | |||||
/* Slashdot Header */ | |||||
// .slash { } | |||||
// .slashSection, .slashDepartment { } | |||||
// .slashValue { } | |||||
@@ -0,0 +1,2 @@ | |||||
<?xml version="1.0"?> | |||||
<types/> |
@@ -0,0 +1,7 @@ | |||||
game: | |||||
appid: sandbox-interactive_com-albiononline_1 | |||||
args: '' | |||||
exe: /home/immanuel/albiononline/Albion-Online | |||||
linux: {} | |||||
system: | |||||
disable_runtime: true |
@@ -0,0 +1,7 @@ | |||||
game: | |||||
appid: wesnoth-1.14 | |||||
args: '' | |||||
exe: /usr/games/wesnoth-1.14-nolog | |||||
linux: {} | |||||
system: | |||||
disable_runtime: true |
@@ -0,0 +1,7 @@ | |||||
game: | |||||
appid: gog_com-Dead_Cells_1 | |||||
args: '""' | |||||
exe: /home/immanuel/Games/Dead Cells/start.sh | |||||
linux: {} | |||||
system: | |||||
disable_runtime: true |
@@ -0,0 +1,4 @@ | |||||
game: | |||||
exe: /home/immanuel/Games/Enter the Gungeon/EtG.exe | |||||
system: {} | |||||
wine: {} |
@@ -0,0 +1,17 @@ | |||||
game: | |||||
exe: /home/immanuel/Games/Forager.v2.0.2/Forager.exe | |||||
system: | |||||
disable_runtime: false | |||||
prefer_system_libs: true | |||||
terminal: false | |||||
vk_icd: '' | |||||
wine: | |||||
ShowCrashDialog: true | |||||
StrictDrawOrdering: disabled | |||||
UseGLSL: enabled | |||||
autoconf_joypad: true | |||||
d9vk: false | |||||
dxvk: false | |||||
dxvk_version: 1.2.3 | |||||
esync: false | |||||
version: system |
@@ -0,0 +1,2 @@ | |||||
game: | |||||
exe: start.sh |
@@ -0,0 +1,4 @@ | |||||
game: | |||||
exe: /home/immanuel/Games/Rise to Ruins/RtR64.exe | |||||
system: {} | |||||
wine: {} |
@@ -0,0 +1,21 @@ | |||||
[lutris] | |||||
migration_version = 5 | |||||
filter_installed = False | |||||
view_type = grid | |||||
dont-support-lutris = True | |||||
width = 991 | |||||
height = 600 | |||||
maximized = False | |||||
runners_manager_width = 800 | |||||
runners_manager_height = 800 | |||||
show_advanced_options = True | |||||
[list view] | |||||
name_column_width = 200 | |||||
year_column_width = 60 | |||||
runner_column_width = 120 | |||||
platform_column_width = 120 | |||||
lastplayed_column_width = 120 | |||||
installedat_column_width = 120 | |||||
playtime_column_width = 100 | |||||
@@ -0,0 +1,5 @@ | |||||
# increase subtitle font size | |||||
ALT+k add sub-scale +0.1 | |||||
# decrease subtitle font size | |||||
ALT+j add sub-scale -0.1 |
@@ -0,0 +1 @@ | |||||
start=2347.679000 |
@@ -0,0 +1,3 @@ | |||||
start=1460.333333 | |||||
pause=yes | |||||
fullscreen=yes |
@@ -0,0 +1,17 @@ | |||||
#!/usr/bin/env sh | |||||
# Description: View thumbnail of an image or a directory of images with lsix | |||||
# | |||||
# Shell: POSIX compliant | |||||
# Author: Arun Prakash Jana | |||||
if ! [ -z "$1" ]; then | |||||
if [ -d "$1" ]; then | |||||
lsix "$1"/* | |||||
else | |||||
lsix "$1" | |||||
fi | |||||
printf "Press any key to exit..." | |||||
read -r _ | |||||
fi |
@@ -0,0 +1,60 @@ | |||||
#!/usr/bin/env sh | |||||
# Description: Open images in hovered directory and thumbnails | |||||
# open hovered image in sxiv or viu and browse other images in the directory | |||||
# Dependencies: imv (https://github.com/eXeC64/imv) or, | |||||
# sxiv (https://github.com/muennich/sxiv) or, | |||||
# viu (https://github.com/atanunq/viu), less | |||||
# | |||||
# Shell: POSIX compliant | |||||
# Author: Arun Prakash Jana | |||||
abspath() { | |||||
case "$1" in | |||||
/*) printf "%s\n" "$1";; | |||||
*) printf "%s\n" "$PWD/$1";; | |||||
esac | |||||
} | |||||
listimages() { | |||||
find -L "$(dirname "$target")" -maxdepth 1 -type f -iregex \ | |||||
'.*\(jpe?g\|bmp\|webp\|png\|gif\)$' -print0 | sort -z | |||||
} | |||||
view_dir() { | |||||
target="$(abspath "$2")" | |||||
count="$(listimages | grep -a -m 1 -ZznF "$target" | cut -d: -f1)" | |||||
if [ -n "$count" ]; then | |||||
listimages | xargs -0 "$1" -n "$count" -- | |||||
else | |||||
shift | |||||
"$1" -- "$@" # fallback | |||||
fi | |||||
} | |||||
if [ -z "$1" ] || ! [ -s "$1" ]; then | |||||
printf "empty file" | |||||
read -r _ | |||||
exit 1 | |||||
fi | |||||
if command -v imvr >/dev/null 2>&1; then | |||||
if [ -f "$1" ]; then | |||||
view_dir imvr "$1" >/dev/null 2>&1 & | |||||
elif [ -d "$1" ] || [ -h "$1" ]; then | |||||
imvr "$1" >/dev/null 2>&1 & | |||||
fi | |||||
elif command -v sxiv >/dev/null 2>&1; then | |||||
if [ -f "$1" ]; then | |||||
view_dir sxiv "$1" >/dev/null 2>&1 & | |||||
elif [ -d "$1" ] || [ -h "$1" ]; then | |||||
sxiv -qt "$1" >/dev/null 2>&1 & | |||||
fi | |||||
elif command -v viu >/dev/null 2>&1; then | |||||
viu -n "$1" | less -R | |||||
else | |||||
printf "install imv/sxiv/viu" | |||||
read -r _ | |||||
exit 2 | |||||
fi |
@@ -0,0 +1,229 @@ | |||||
#!/usr/bin/env sh | |||||
# Description: Terminal based file previewer | |||||
# | |||||
# Note: This plugin needs a "NNN_FIFO" to work. See man. | |||||
# | |||||
# Dependencies: | |||||
# - Supports 3 independent methods to preview with: | |||||
# - tmux (>=3.0), or | |||||
# - kitty with allow_remote_control on, or | |||||
# - $TERMINAL set to a terminal (it's xterm by default). | |||||
# - less or $PAGER | |||||
# - tree or exa or ls | |||||
# - mediainfo or file | |||||
# - unzip | |||||
# - tar | |||||
# - man | |||||
# - optional: bat for code syntax highlighting | |||||
# - optional: kitty terminal or catimg for images | |||||
# - optional: scope.sh file viewer from ranger. | |||||
# To use: | |||||
# 1. drop scope.sh executable in $PATH | |||||
# 2. set/export $USE_SCOPE as 1 | |||||
# - optional: pistol file viewer (https://github.com/doronbehar/pistol). | |||||
# To use: | |||||
# 1. install pistol | |||||
# 2. set/export $USE_PISTOL as 1 | |||||
# | |||||
# Usage: | |||||
# You need to set a NNN_FIFO path and a key for the plugin with NNN_PLUG, | |||||
# then start `nnn`: | |||||
# | |||||
# $ nnn -a | |||||
# | |||||
# or | |||||
# | |||||
# $ NNN_FIFO=/tmp/nnn.fifo nnn | |||||
# | |||||
# Then in `nnn`, launch the `preview-tui` plugin. | |||||
# | |||||
# If you provide the same NNN_FIFO to all nnn instances, there will be a | |||||
# single common preview window. I you provide different FIFO path (e.g. | |||||
# with -a), they will be independent. | |||||
# | |||||
# The previews will be shown in a tmux split. If that isn't possible, it | |||||
# will try to use a kitty terminal split. And as a final fallback, a | |||||
# different terminal window will be used ($TERMINAL). | |||||
# | |||||
# Tmux and kitty users can configure $SPLIT to either "h" or "v" to set a | |||||
# 'h'orizontal split or a 'v'ertical split (as in, the line that splits the | |||||
# windows will be horizontal or vertical). | |||||
# | |||||
# Kitty users need `allow_remote_control` set to `yes`. To customize the | |||||
# window split, `enabled_layouts` has to be set to `all` or `splits` (the | |||||
# former is the default value). This terminal is also able to show images | |||||
# without extra dependencies. | |||||
# | |||||
# Shell: POSIX compliant | |||||
# Authors: Todd Yamakawa, Léo Villeveygoux, @Recidiviste, Mario Ortiz Manero | |||||
SPLIT="$SPLIT" # you can set a permanent split here | |||||
TERMINAL="$TERMINAL" # same goes for the terminal | |||||
USE_SCOPE="${USE_SCOPE:-0}" | |||||
USE_PISTOL="${USE_PISTOL:-0}" | |||||
PAGER="${PAGER:-less -R}" | |||||
if [ -e "${TMUX%%,*}" ] && tmux -V | grep -q '[ -][3456789]\.'; then | |||||
TERMINAL=tmux | |||||
elif [ -n "$KITTY_WINDOW_ID" ] && kitty @ ls >/dev/null 2>&1; then | |||||
TERMINAL=kitty | |||||
else | |||||
TERMINAL="${TERMINAL:-xterm}" | |||||
fi | |||||
if [ -z "$SPLIT" ] && [ $(($(tput lines) * 2)) -gt "$(tput cols)" ]; then | |||||
SPLIT='h' | |||||
elif [ "$SPLIT" != 'h' ]; then | |||||
SPLIT='v' | |||||
fi | |||||
exists() { | |||||
command -v "$1" >/dev/null 2>&1 | |||||
} | |||||
fifo_pager() { | |||||
cmd="$1" | |||||
shift | |||||
# We use a FIFO to access $PAGER PID in jobs control | |||||
tmpfifopath="${TMPDIR:-/tmp}/nnn-preview-tui-fifo.$$" | |||||
mkfifo "$tmpfifopath" || return | |||||
$PAGER < "$tmpfifopath" & | |||||
( | |||||
exec > "$tmpfifopath" | |||||
"$cmd" "$@" & | |||||
) | |||||
rm "$tmpfifopath" | |||||
} | |||||
# Binary file: show file info inside the pager | |||||
print_bin_info() { | |||||
printf -- "-------- \033[1;31mBinary file\033[0m --------\n" | |||||
if exists mediainfo; then | |||||
mediainfo "$1" 2>/dev/null | |||||
else | |||||
file -b "$1" | |||||
fi | |||||
} | |||||
preview_file () { | |||||
kill %- %+ 2>/dev/null && wait %- %+ 2>/dev/null | |||||
clear | |||||
# Trying to use pistol if it's available. | |||||
if [ "$USE_PISTOL" -ne 0 ] && exists pistol; then | |||||
fifo_pager pistol "$1" | |||||
return | |||||
fi | |||||
# Trying to use scope.sh if it's available. | |||||
if [ "$USE_SCOPE" -ne 0 ] && exists scope.sh; then | |||||
fifo_pager scope.sh "$1" "$cols" "$lines" "$(mktemp -d)" \ | |||||
"True" 2>/dev/null | |||||
return | |||||
fi | |||||
# Detecting the exact type of the file: the encoding, mime type, and | |||||
# extension in lowercase. | |||||
encoding="$(file -Lb --mime-encoding -- "$1")" | |||||
mimetype="$(file -Lb --mime-type -- "$1")" | |||||
ext="${1##*.}" | |||||
if [ -n "$ext" ]; then | |||||
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')" | |||||
fi | |||||
lines=$(($(tput lines)-1)) | |||||
cols=$(tput cols) | |||||
# Otherwise, falling back to the defaults. | |||||
if [ -d "$1" ]; then | |||||
cd "$1" || return | |||||
if exists tree; then | |||||
fifo_pager tree -L 3 -F | |||||
elif exists exa; then | |||||
fifo_pager exa -G --colour=always 2>/dev/null | |||||
else | |||||
fifo_pager ls --color=always | |||||
fi | |||||
elif [ "$encoding" = "binary" ]; then | |||||
if [ "${mimetype%%/*}" = "image" ] ; then | |||||
if [ "$TERMINAL" = "kitty" ]; then | |||||
# Kitty terminal users can use the native image preview method. | |||||
kitty +kitten icat --silent --transfer-mode=stream --stdin=no \ | |||||
"$1" & | |||||
elif exists catimg; then | |||||
catimg "$1" | |||||
elif exists viu; then | |||||
viu -t "$1" | |||||
else | |||||
fifo_pager print_bin_info "$1" | |||||
fi | |||||
elif [ "$mimetype" = "application/zip" ] ; then | |||||
fifo_pager unzip -l "$1" | |||||
elif [ "$ext" = "gz" ] || [ "$ext" = "bz2" ] ; then | |||||
fifo_pager tar -tvf "$1" | |||||
else | |||||
fifo_pager print_bin_info "$1" | |||||
fi | |||||
elif [ "$mimetype" = "text/troff" ] ; then | |||||
fifo_pager man -Pcat -l "$1" | |||||
else | |||||
if exists bat; then | |||||
fifo_pager bat --paging=never --decorations=always --color=always \ | |||||
"$1" 2>/dev/null | |||||
else | |||||
$PAGER "$1" & | |||||
fi | |||||
fi | |||||
} | |||||
if [ "$PREVIEW_MODE" ] ; then | |||||
if [ ! -r "$NNN_FIFO" ] ; then | |||||
echo "No FIFO available! (\$NNN_FIFO='$NNN_FIFO')" >&2 | |||||
read -r | |||||
exit 1 | |||||
fi | |||||
preview_file "$1" | |||||
# use cat instead of 'exec <' to avoid issues with dash shell | |||||
# shellcheck disable=SC2002 | |||||
cat "$NNN_FIFO" |\ | |||||
while read -r selection ; do | |||||
preview_file "$selection" | |||||
done | |||||
# Restoring the previous layout for kitty users. This will only work for | |||||
# kitty >= 0.18.0. | |||||
if [ "$TERMINAL" = "kitty" ]; then | |||||
kitty @ last-used-layout --no-response >/dev/null 2>&1 | |||||
fi | |||||
exit 0 | |||||
fi | |||||
if [ "$TERMINAL" = "tmux" ]; then | |||||
# tmux splits are inverted | |||||
if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi | |||||
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -d"$SPLIT" "$0" "$1" | |||||
elif [ "$TERMINAL" = "kitty" ]; then | |||||
# Setting the layout for the new window. It will be restored after the | |||||
# script ends. | |||||
kitty @ goto-layout splits >/dev/null | |||||
# Trying to use kitty's integrated window management as the split window. | |||||
# All environmental variables that will be used in the new window must | |||||
# be explicitly passed. | |||||
kitty @ launch --no-response --title "nnn preview" --keep-focus \ | |||||
--cwd "$PWD" --env "PATH=$PATH" --env "NNN_FIFO=$NNN_FIFO" \ | |||||
--env "PREVIEW_MODE=1" --env "PAGER=$PAGER" \ | |||||
--env "USE_SCOPE=$USE_SCOPE" --env "SPLIT=$SPLIT" \ | |||||
--env "USE_PISTOL=$USE_PISTOL" \ | |||||
--location "${SPLIT}split" "$0" "$1" >/dev/null | |||||
else | |||||
PREVIEW_MODE=1 $TERMINAL -e "$0" "$1" & | |||||
fi |
@@ -0,0 +1,58 @@ | |||||
#!/usr/bin/env sh | |||||
# Description: Copy system clipboard newline-separated file list to selection | |||||
# Dependencies: | |||||
# - tr | |||||
# - xclip/xsel (Linux) | |||||
# - pbpaste (macOS) | |||||
# - termux-clipboard-get (Termux) | |||||
# - powershell (WSL) | |||||
# - cygwim's /dev/clipboard (Cygwin) | |||||
# - wl-paste (Wayland) | |||||
# | |||||
# Limitation: breaks if a filename has newline in it | |||||
# | |||||
# Shell: POSIX compliant | |||||
# Author: Léo Villeveygoux, after Arun Prakash Jana's .cbcp | |||||
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n | |||||
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} | |||||
getclip () { | |||||
if which xsel >/dev/null 2>&1; then | |||||
# Linux | |||||
xsel -bo | |||||
elif which xclip >/dev/null 2>&1; then | |||||
# Linux | |||||
xclip -sel clip -o | |||||
elif which pbpaste >/dev/null 2>&1; then | |||||
# macOS | |||||
pbpaste | |||||
elif which termux-clipboard-get >/dev/null 2>&1; then | |||||
# Termux | |||||
termux-clipboard-get | |||||
elif which powershell.exe >/dev/null 2>&1; then | |||||
# WSL | |||||
powershell.exe Get-Clipboard | |||||
elif [ -r /dev/clipboard ] ; then | |||||
# Cygwin | |||||
cat /dev/clipboard | |||||
elif which wl-paste >/dev/null 2>&1; then | |||||
# Wayland | |||||
wl-paste | |||||
fi | |||||
} | |||||
CLIPBOARD=$(getclip) | |||||
# Check if clipboard actually contains a file list | |||||
for file in $CLIPBOARD ; do | |||||
if [ ! -e "$file" ] ; then | |||||
exit 1; | |||||
fi | |||||
done | |||||
printf "%s" "$CLIPBOARD" | tr '\n' '\0' > "$selection" |
@@ -0,0 +1,28 @@ | |||||
#!/bin/sh | |||||
# | |||||
# These things are run when an Openbox X Session is started. | |||||
# You may place a similar script in $HOME/.config/openbox/autostart | |||||
# to run user-specific things. | |||||
# | |||||
# If you want to use GNOME config tools... | |||||
# | |||||
#if test -x /usr/lib/x86_64-linux-gnu/gnome-settings-daemon >/dev/null; then | |||||
# /usr/lib/x86_64-linux-gnu/gnome-settings-daemon & | |||||
#elif which gnome-settings-daemon >/dev/null 2>&1; then | |||||
# gnome-settings-daemon & | |||||
#fi | |||||
# If you want to use XFCE config tools... | |||||
# | |||||
#xfce-mcs-manager & | |||||
#XDG_CONFIG_HOME="/home/immanuel/.config" | |||||
#HOME="/home/immanuel" | |||||
#source $XDG_CONFIG_HOME/openbox/environment | |||||
source $HOME/.profile | |||||
xrdb /home/immanuel/.config/Xresources | |||||
feh --bg-fill $HOME/Pictures/Wallpapers/$WALLPAPER | |||||
compton -b & | |||||
xkbcomp $XDG_CONFIG_HOME/xkb/custom.xkb :0 & | |||||
st -c 'DROPDOWN_TERM' -e 'tmux' & |
@@ -0,0 +1,14 @@ | |||||
#!/bin/sh | |||||
# | |||||
# Set system-wide environment variables here for Openbox | |||||
# User-specific variables should be placed in $HOME/.config/openbox/environment | |||||
# | |||||
# To set your language for displaying messages and time/date formats, use the following: | |||||
#LANG=en_CA.UTF8 | |||||
# To set your keyboard layout, you need to modify your X config: | |||||
# http://www.google.com/search?q=how+to+set+keyboard+layout+xorg | |||||
export WALLPAPER=lamp.jpg | |||||
export XDG_CONFIG_HOME=/home/immanuel/.config | |||||
export HOME=/home/immanuel |
@@ -0,0 +1,35 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<openbox_menu xmlns="http://openbox.org/" | |||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
xsi:schemaLocation="http://openbox.org/ | |||||
file:///usr/share/openbox/menu.xsd"> | |||||
<menu id="root-menu" label="Openbox 3"> | |||||
<item label="Terminal emulator"> | |||||
<action name="Execute"><execute>x-terminal-emulator</execute></action> | |||||
</item> | |||||
<item label="Web browser"> | |||||
<action name="Execute"><execute>x-www-browser</execute></action> | |||||
</item> | |||||
<!-- This requires the presence of the 'obamenu' package to work --> | |||||
<menu id="/Debian" /> | |||||
<separator /> | |||||
<menu id="applications-menu" label="Applications" execute="/usr/bin/obamenu"/> | |||||
<separator /> | |||||
<item label="ObConf"> | |||||
<action name="Execute"><execute>obconf</execute></action> | |||||
</item> | |||||
<item label="Reconfigure"> | |||||
<action name="Reconfigure" /> | |||||
</item> | |||||
<item label="Restart"> | |||||
<action name="Restart" /> | |||||
</item> | |||||
<separator /> | |||||
<item label="Exit"> | |||||
<action name="Exit" /> | |||||
</item> | |||||
</menu> | |||||
</openbox_menu> |
@@ -0,0 +1,914 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<!-- Do not edit this file, it will be overwritten on install. | |||||
Copy the file to $HOME/.config/openbox/ instead. --> | |||||
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> | |||||
<resistance> | |||||
<strength>10</strength> | |||||
<screen_edge_strength>20</screen_edge_strength> | |||||
</resistance> | |||||
<focus> | |||||
<focusNew>yes</focusNew> | |||||
<!-- always try to focus new windows when they appear. other rules do | |||||
apply --> | |||||
<followMouse>no</followMouse> | |||||
<!-- move focus to a window when you move the mouse into it --> | |||||
<focusLast>yes</focusLast> | |||||
<!-- focus the last used window when changing desktops, instead of the one | |||||
under the mouse pointer. when followMouse is enabled --> | |||||
<underMouse>no</underMouse> | |||||
<!-- move focus under the mouse, even when the mouse is not moving --> | |||||
<focusDelay>200</focusDelay> | |||||
<!-- when followMouse is enabled, the mouse must be inside the window for | |||||
this many milliseconds (1000 = 1 sec) before moving focus to it --> | |||||
<raiseOnFocus>no</raiseOnFocus> | |||||
<!-- when followMouse is enabled, and a window is given focus by moving the | |||||
mouse into it, also raise the window --> | |||||
</focus> | |||||
<placement> | |||||
<policy>Smart</policy> | |||||
<!-- 'Smart' or 'UnderMouse' --> | |||||
<center>yes</center> | |||||
<!-- whether to place windows in the center of the free area found or | |||||
the top left corner --> | |||||
<monitor>Primary</monitor> | |||||
<!-- with Smart placement on a multi-monitor system, try to place new windows | |||||
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where | |||||
the active window is, 'Primary' - only on the primary monitor --> | |||||
<primaryMonitor>1</primaryMonitor> | |||||
<!-- The monitor where Openbox should place popup dialogs such as the | |||||
focus cycling popup, or the desktop switch popup. It can be an index | |||||
from 1, specifying a particular monitor. Or it can be one of the | |||||
following: 'Mouse' - where the mouse is, or | |||||
'Active' - where the active window is --> | |||||
</placement> | |||||
<theme> | |||||
<name>Nightmare-02</name> | |||||
<titleLayout>NLIMC</titleLayout> | |||||
<!-- | |||||
available characters are NDSLIMC, each can occur at most once. | |||||
N: window icon | |||||
L: window label (AKA title). | |||||
I: iconify | |||||
M: maximize | |||||
C: close | |||||
S: shade (roll up/down) | |||||
D: omnipresent (on all desktops). | |||||
--> | |||||
<keepBorder>yes</keepBorder> | |||||
<animateIconify>yes</animateIconify> | |||||
<font place="ActiveWindow"> | |||||
<name>sans</name> | |||||
<size>8</size> | |||||
<!-- font size in points --> | |||||
<weight>bold</weight> | |||||
<!-- 'bold' or 'normal' --> | |||||
<slant>normal</slant> | |||||
<!-- 'italic' or 'normal' --> | |||||
</font> | |||||
<font place="InactiveWindow"> | |||||
<name>sans</name> | |||||
<size>8</size> | |||||
<!-- font size in points --> | |||||
<weight>bold</weight> | |||||
<!-- 'bold' or 'normal' --> | |||||
<slant>normal</slant> | |||||
<!-- 'italic' or 'normal' --> | |||||
</font> | |||||
<font place="MenuHeader"> | |||||
<name>sans</name> | |||||
<size>9</size> | |||||
<!-- font size in points --> | |||||
<weight>normal</weight> | |||||
<!-- 'bold' or 'normal' --> | |||||
<slant>normal</slant> | |||||
<!-- 'italic' or 'normal' --> | |||||
</font> | |||||
<font place="MenuItem"> | |||||
<name>sans</name> | |||||
<size>9</size> | |||||
<!-- font size in points --> | |||||
<weight>normal</weight> | |||||
<!-- 'bold' or 'normal' --> | |||||
<slant>normal</slant> | |||||
<!-- 'italic' or 'normal' --> | |||||
</font> | |||||
<font place="ActiveOnScreenDisplay"> | |||||
<name>Sans</name> | |||||
<size>9</size> | |||||
<!-- font size in points --> | |||||
<weight>Normal</weight> | |||||
<!-- 'bold' or 'normal' --> | |||||
<slant>Normal</slant> | |||||
<!-- 'italic' or 'normal' --> | |||||
</font> | |||||
<font place="InactiveOnScreenDisplay"> | |||||
<name>DejaVu Sans</name> | |||||
<size>9</size> | |||||
<!-- font size in points --> | |||||
<weight>Bold</weight> | |||||
<!-- 'bold' or 'normal' --> | |||||
<slant>Normal</slant> | |||||
<!-- 'italic' or 'normal' --> | |||||
</font> | |||||
</theme> | |||||
<desktops> | |||||
<!-- this stuff is only used at startup, pagers allow you to change them | |||||
during a session | |||||
these are default values to use when other ones are not already set | |||||
by other applications, or saved in your session | |||||
use obconf if you want to change these without having to log out | |||||
and back in --> | |||||
<number>4</number> | |||||
<firstdesk>1</firstdesk> | |||||
<names> | |||||
<!-- set names up here if you want to, like this: | |||||
<name>desktop 1</name> | |||||
<name>desktop 2</name> | |||||
--> | |||||
</names> | |||||
<popupTime>875</popupTime> | |||||
<!-- The number of milliseconds to show the popup for when switching | |||||
desktops. Set this to 0 to disable the popup. --> | |||||
</desktops> | |||||
<resize> | |||||
<drawContents>no</drawContents> | |||||
<popupShow>Nonpixel</popupShow> | |||||
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) --> | |||||
<popupPosition>Center</popupPosition> | |||||
<!-- 'Center', 'Top', or 'Fixed' --> | |||||
<popupFixedPosition> | |||||
<!-- these are used if popupPosition is set to 'Fixed' --> | |||||
<x>10</x> | |||||
<!-- positive number for distance from left edge, negative number for | |||||
distance from right edge, or 'Center' --> | |||||
<y>10</y> | |||||
<!-- positive number for distance from top edge, negative number for | |||||
distance from bottom edge, or 'Center' --> | |||||
</popupFixedPosition> | |||||
</resize> | |||||
<!-- You can reserve a portion of your screen where windows will not cover when | |||||
they are maximized, or when they are initially placed. | |||||
Many programs reserve space automatically, but you can use this in other | |||||
cases. --> | |||||
<margins> | |||||
<top>0</top> | |||||
<bottom>0</bottom> | |||||
<left>0</left> | |||||
<right>0</right> | |||||
</margins> | |||||
<dock> | |||||
<position>TopLeft</position> | |||||
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating --> | |||||
<floatingX>0</floatingX> | |||||
<floatingY>0</floatingY> | |||||
<noStrut>no</noStrut> | |||||
<stacking>Above</stacking> | |||||
<!-- 'Above', 'Normal', or 'Below' --> | |||||
<direction>Vertical</direction> | |||||
<!-- 'Vertical' or 'Horizontal' --> | |||||
<autoHide>no</autoHide> | |||||
<hideDelay>300</hideDelay> | |||||
<!-- in milliseconds (1000 = 1 second) --> | |||||
<showDelay>300</showDelay> | |||||
<!-- in milliseconds (1000 = 1 second) --> | |||||
<moveButton>Middle</moveButton> | |||||
<!-- 'Left', 'Middle', 'Right' --> | |||||
</dock> | |||||
<keyboard> | |||||
<chainQuitKey>C-g</chainQuitKey> | |||||
<!-- Keybindings for desktop switching --> | |||||
<keybind key="F9"> | |||||
<action class='DROPDOWN_TERM' name="Focus"></action> | |||||
<action class='DROPDOWN_TERM' name="Focus"></action> | |||||
</keybind> | |||||
<keybind key="F10"> | |||||
<action name="Iconify"></action> | |||||
</keybind> | |||||
<keybind key="F11"> | |||||
<action name="Execute"> | |||||
<command>wmctrl -x -b 'toggle,hidden' -r 'DROPDOWN_TERM'</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="F12"> | |||||
<action name="Execute"> | |||||
<command>wmctrl -xa 'DROPDOWN_TERM'</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="XF86AudioMute"> | |||||
<action name="Execute"> | |||||
<command>amixer -q sset Master toggle</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="XF86AudioLowerVolume"> | |||||
<action name="Execute"> | |||||
<command>amixer -q sset Master 3%-</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="XF86AudioRaiseVolume"> | |||||
<action name="Execute"> | |||||
<command>amixer -q sset Master 3%+</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="XF86MonBrightnessUp"> | |||||
<action name="Execute"> | |||||
<startupnotify> | |||||
<enabled>true</enabled> | |||||
<name>BrightnessDown</name> | |||||
</startupnotify> | |||||
<command>xbacklight -inc 10</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="XF86MonBrightnessDown"> | |||||
<action name="Execute"> | |||||
<startupnotify> | |||||
<enabled>true</enabled> | |||||
<name>BrightnessDown</name> | |||||
</startupnotify> | |||||
<command>xbacklight -dec 10</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Super_L"> | |||||
<action name="Execute"> | |||||
<enabled>true</enabled> | |||||
<name>Run</name> | |||||
<command>dmenu_run</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key='Mod5-space'> | |||||
<action name="Execute"> | |||||
<command>guake --hide</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key='Mod5-g'> | |||||
<action name="Execute"> | |||||
<command>guake -t</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-p"> | |||||
<action name="Execute"> | |||||
<startupnotify> | |||||
<enabled>true</enabled> | |||||
<name>Run</name> | |||||
</startupnotify> | |||||
<command>xpad -t</command> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="C-A-Left"> | |||||
<action name="GoToDesktop"> | |||||
<to>left</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="C-A-Right"> | |||||
<action name="GoToDesktop"> | |||||
<to>right</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="C-A-Up"> | |||||
<action name="GoToDesktop"> | |||||
<to>up</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="C-A-Down"> | |||||
<action name="GoToDesktop"> | |||||
<to>down</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="S-A-Left"> | |||||
<action name="SendToDesktop"> | |||||
<to>left</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="S-A-Right"> | |||||
<action name="SendToDesktop"> | |||||
<to>right</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="S-A-Up"> | |||||
<action name="SendToDesktop"> | |||||
<to>up</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="S-A-Down"> | |||||
<action name="SendToDesktop"> | |||||
<to>down</to> | |||||
<wrap>no</wrap> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-F1"> | |||||
<action name="GoToDesktop"> | |||||
<to>1</to> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-F2"> | |||||
<action name="GoToDesktop"> | |||||
<to>2</to> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-F3"> | |||||
<action name="GoToDesktop"> | |||||
<to>3</to> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-F4"> | |||||
<action name="GoToDesktop"> | |||||
<to>4</to> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-d"> | |||||
<action name="ToggleShowDesktop"/> | |||||
</keybind> | |||||
<!-- Keybindings for windows --> | |||||
<keybind key="A-F4, Mod5-x"> | |||||
<action name="Close"/> | |||||
</keybind> | |||||
<keybind key="A-Escape"> | |||||
<action name="Lower"/> | |||||
<action name="FocusToBottom"/> | |||||
<action name="Unfocus"/> | |||||
</keybind> | |||||
<keybind key="A-space"> | |||||
<action name="ShowMenu"> | |||||
<menu>client-menu</menu> | |||||
</action> | |||||
</keybind> | |||||
<!-- Take a screenshot of the current window with scrot when Alt+Print are pressed --> | |||||
<keybind key="A-Print"> | |||||
<action name="Execute"> | |||||
<command>scrot -s</command> | |||||
</action> | |||||
</keybind> | |||||
<!-- Keybindings for window switching --> | |||||
<keybind key="A-Tab"> | |||||
<action name="NextWindow"> | |||||
<finalactions> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</finalactions> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="A-S-Tab"> | |||||
<action name="PreviousWindow"> | |||||
<finalactions> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</finalactions> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="C-A-Tab"> | |||||
<action name="NextWindow"> | |||||
<panels>yes</panels> | |||||
<desktop>yes</desktop> | |||||
<finalactions> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</finalactions> | |||||
</action> | |||||
</keybind> | |||||
<!-- Keybindings for window switching with the arrow keys --> | |||||
<keybind key="Mod5-S-Right"> | |||||
<action name="DirectionalCycleWindows"> | |||||
<direction>right</direction> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-S-Left"> | |||||
<action name="DirectionalCycleWindows"> | |||||
<direction>left</direction> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-S-Up"> | |||||
<action name="DirectionalCycleWindows"> | |||||
<direction>up</direction> | |||||
</action> | |||||
</keybind> | |||||
<keybind key="Mod5-S-Down"> | |||||
<action name="DirectionalCycleWindows"> | |||||
<direction>down</direction> | |||||
</action> | |||||
</keybind> | |||||
<!-- Keybindings for running applications --> | |||||
<keybind key="Mod5-e"> | |||||
<action name="Execute"> | |||||
<startupnotify> | |||||
<enabled>true</enabled> | |||||
<name>Konqueror</name> | |||||
</startupnotify> | |||||
<command>kfmclient openProfile filemanagement</command> | |||||
</action> | |||||
</keybind> | |||||
<!-- Launch scrot when Print is pressed --> | |||||
<keybind key="Print"> | |||||
<action name="Execute"> | |||||
<command>scrot</command> | |||||
</action> | |||||
</keybind> | |||||
</keyboard> | |||||
<mouse> | |||||
<dragThreshold>1</dragThreshold> | |||||
<!-- number of pixels the mouse must move before a drag begins --> | |||||
<doubleClickTime>500</doubleClickTime> | |||||
<!-- in milliseconds (1000 = 1 second) --> | |||||
<screenEdgeWarpTime>400</screenEdgeWarpTime> | |||||
<!-- Time before changing desktops when the pointer touches the edge of the | |||||
screen while moving a window, in milliseconds (1000 = 1 second). | |||||
Set this to 0 to disable warping --> | |||||
<screenEdgeWarpMouse>false</screenEdgeWarpMouse> | |||||
<!-- Set this to TRUE to move the mouse pointer across the desktop when | |||||
switching due to hitting the edge of the screen --> | |||||
<context name="Frame"> | |||||
<mousebind button="A-Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
<mousebind button="A-Left" action="Click"> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="A-Left" action="Drag"> | |||||
<action name="Move"/> | |||||
</mousebind> | |||||
<mousebind button="A-Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="A-Right" action="Drag"> | |||||
<action name="Resize"/> | |||||
</mousebind> | |||||
<mousebind button="A-Middle" action="Press"> | |||||
<action name="Lower"/> | |||||
<action name="FocusToBottom"/> | |||||
<action name="Unfocus"/> | |||||
</mousebind> | |||||
<mousebind button="A-Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="C-A-Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="C-A-Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-S-Up" action="Click"> | |||||
<action name="SendToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-S-Down" action="Click"> | |||||
<action name="SendToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Titlebar"> | |||||
<mousebind button="Left" action="Drag"> | |||||
<action name="Move"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="DoubleClick"> | |||||
<action name="ToggleMaximize"/> | |||||
</mousebind> | |||||
<mousebind button="Up" action="Click"> | |||||
<action name="if"> | |||||
<shaded>no</shaded> | |||||
<then> | |||||
<action name="Shade"/> | |||||
<action name="FocusToBottom"/> | |||||
<action name="Unfocus"/> | |||||
<action name="Lower"/> | |||||
</then> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Down" action="Click"> | |||||
<action name="if"> | |||||
<shaded>yes</shaded> | |||||
<then> | |||||
<action name="Unshade"/> | |||||
<action name="Raise"/> | |||||
</then> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Middle" action="Press"> | |||||
<action name="Lower"/> | |||||
<action name="FocusToBottom"/> | |||||
<action name="Unfocus"/> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="ShowMenu"> | |||||
<menu>client-menu</menu> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Top"> | |||||
<mousebind button="Left" action="Drag"> | |||||
<action name="Resize"> | |||||
<edge>top</edge> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Left"> | |||||
<mousebind button="Left" action="Drag"> | |||||
<action name="Resize"> | |||||
<edge>left</edge> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Right"> | |||||
<mousebind button="Left" action="Drag"> | |||||
<action name="Resize"> | |||||
<edge>right</edge> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Bottom"> | |||||
<mousebind button="Left" action="Drag"> | |||||
<action name="Resize"> | |||||
<edge>bottom</edge> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="ShowMenu"> | |||||
<menu>client-menu</menu> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="TRCorner BRCorner TLCorner BLCorner"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Drag"> | |||||
<action name="Resize"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Client"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
<mousebind button="Middle" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Icon"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
<action name="ShowMenu"> | |||||
<menu>client-menu</menu> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="ShowMenu"> | |||||
<menu>client-menu</menu> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="AllDesktops"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Click"> | |||||
<action name="ToggleOmnipresent"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Shade"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Click"> | |||||
<action name="ToggleShade"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Iconify"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Click"> | |||||
<action name="Iconify"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Maximize"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Middle" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Click"> | |||||
<action name="ToggleMaximize"/> | |||||
</mousebind> | |||||
<mousebind button="Middle" action="Click"> | |||||
<action name="ToggleMaximize"> | |||||
<direction>vertical</direction> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Click"> | |||||
<action name="ToggleMaximize"> | |||||
<direction>horizontal</direction> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Close"> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
<action name="Unshade"/> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Click"> | |||||
<action name="Close"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Desktop"> | |||||
<mousebind button="Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="C-A-Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="C-A-Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Left" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="Focus"/> | |||||
<action name="Raise"/> | |||||
</mousebind> | |||||
</context> | |||||
<context name="Root"> | |||||
<!-- Menus --> | |||||
<mousebind button="Middle" action="Press"> | |||||
<action name="ShowMenu"> | |||||
<menu>client-list-combined-menu</menu> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Right" action="Press"> | |||||
<action name="ShowMenu"> | |||||
<menu>root-menu</menu> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
<context name="MoveResize"> | |||||
<mousebind button="Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-Up" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>previous</to> | |||||
</action> | |||||
</mousebind> | |||||
<mousebind button="A-Down" action="Click"> | |||||
<action name="GoToDesktop"> | |||||
<to>next</to> | |||||
</action> | |||||
</mousebind> | |||||
</context> | |||||
</mouse> | |||||
<menu> | |||||
<!-- You can specify more than one menu file in here and they are all loaded, | |||||
just don't make menu ids clash or, well, it'll be kind of pointless --> | |||||
<!-- default menu file (or custom one in $HOME/.config/openbox/) --> | |||||
<!-- system menu files on Debian systems --> | |||||
<file>/var/lib/openbox/debian-menu.xml</file> | |||||
<file>menu.xml</file> | |||||
<hideDelay>200</hideDelay> | |||||
<!-- if a press-release lasts longer than this setting (in milliseconds), the | |||||
menu is hidden again --> | |||||
<middle>no</middle> | |||||
<!-- center submenus vertically about the parent entry --> | |||||
<submenuShowDelay>100</submenuShowDelay> | |||||
<!-- time to delay before showing a submenu after hovering over the parent | |||||
entry. | |||||
if this is a negative value, then the delay is infinite and the | |||||
submenu will not be shown until it is clicked on --> | |||||
<submenuHideDelay>400</submenuHideDelay> | |||||
<!-- time to delay before hiding a submenu when selecting another | |||||
entry in parent menu | |||||
if this is a negative value, then the delay is infinite and the | |||||
submenu will not be hidden until a different submenu is opened --> | |||||
<showIcons>yes</showIcons> | |||||
<!-- controls if icons appear in the client-list-(combined-)menu --> | |||||
<manageDesktops>yes</manageDesktops> | |||||
<!-- show the manage desktops section in the client-list-(combined-)menu --> | |||||
</menu> | |||||
<applications> | |||||
<!-- | |||||
# this is an example with comments through out. use these to make your | |||||
# own rules, but without the comments of course. | |||||
# you may use one or more of the name/class/role/title/type rules to specify | |||||
# windows to match | |||||
<application name="the window's _OB_APP_NAME property (see obxprop)" | |||||
class="the window's _OB_APP_CLASS property (see obxprop)" | |||||
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)" | |||||
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)" | |||||
role="the window's _OB_APP_ROLE property (see obxprop)" | |||||
title="the window's _OB_APP_TITLE property (see obxprop)" | |||||
type="the window's _OB_APP_TYPE property (see obxprob).. | |||||
(if unspecified, then it is 'dialog' for child windows)"> | |||||
# you may set only one of name/class/role/title/type, or you may use more | |||||
# than one together to restrict your matches. | |||||
# the name, class, role, and title use simple wildcard matching such as those | |||||
# used by a shell. you can use * to match any characters and ? to match | |||||
# any single character. | |||||
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock, | |||||
# or desktop | |||||
# when multiple rules match a window, they will all be applied, in the | |||||
# order that they appear in this list | |||||
# each rule element can be left out or set to 'default' to specify to not | |||||
# change that attribute of the window | |||||
<decor>yes</decor> | |||||
# enable or disable window decorations | |||||
<shade>no</shade> | |||||
# make the window shaded when it appears, or not | |||||
<position force="no"> | |||||
# the position is only used if both an x and y coordinate are provided | |||||
# (and not set to 'default') | |||||
# when force is "yes", then the window will be placed here even if it | |||||
# says you want it placed elsewhere. this is to override buggy | |||||
# applications who refuse to behave | |||||
<x>center</x> | |||||
# a number like 50, or 'center' to center on screen. use a negative number | |||||
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from | |||||
# the right edge (or bottom). use 'default' to specify using value | |||||
# provided by the application, or chosen by openbox, instead. | |||||
<y>200</y> | |||||
<monitor>1</monitor> | |||||
# specifies the monitor in a xinerama setup. | |||||
# 1 is the first head, or 'mouse' for wherever the mouse is | |||||
</position> | |||||
<size> | |||||
# the size to make the window. | |||||
<width>20</width> | |||||
# a number like 20, or 'default' to use the size given by the application. | |||||
# you can use fractions such as 1/2 or percentages such as 75% in which | |||||
# case the value is relative to the size of the monitor that the window | |||||
# appears on. | |||||
<height>30%</height> | |||||
</size> | |||||
<focus>yes</focus> | |||||
# if the window should try be given focus when it appears. if this is set | |||||
# to yes it doesn't guarantee the window will be given focus. some | |||||
# restrictions may apply, but Openbox will try to | |||||
<desktop>1</desktop> | |||||
# 1 is the first desktop, 'all' for all desktops | |||||
<layer>normal</layer> | |||||
# 'above', 'normal', or 'below' | |||||
<iconic>no</iconic> | |||||
# make the window iconified when it appears, or not | |||||
<skip_pager>no</skip_pager> | |||||
# asks to not be shown in pagers | |||||
<skip_taskbar>no</skip_taskbar> | |||||
# asks to not be shown in taskbars. window cycling actions will also | |||||
# skip past such windows | |||||
<fullscreen>yes</fullscreen> | |||||
# make the window in fullscreen mode when it appears | |||||
<maximized>true</maximized> | |||||
# 'Horizontal', 'Vertical' or boolean (yes/no) | |||||
</application> | |||||
# end of the example | |||||
--> | |||||
<application class="*"> | |||||
<decor>no</decor> | |||||
</application> | |||||
<application class="DROPDOWN_TERM"> | |||||
<decor>no</decor> | |||||
<shade>no</shade> | |||||
<position force="no"> | |||||
<x>center</x> | |||||
<y>200</y> | |||||
<monitor>1</monitor> | |||||
</position> | |||||
<size> | |||||
<width>50%</width> | |||||
<height>60%</height> | |||||
</size> | |||||
<focus>yes</focus> | |||||
<!-- # if the window should try be given focus when it appears. if this is set --> | |||||
<!-- # to yes it doesn't guarantee the window will be given focus. some --> | |||||
<!-- # restrictions may apply, but Openbox will try to --> | |||||
<desktop>1</desktop> | |||||
<layer>normal</layer> | |||||
<iconic>no</iconic> | |||||
<skip_pager>no</skip_pager> | |||||
<!-- # asks to not be shown in pagers --> | |||||
<skip_taskbar>no</skip_taskbar> | |||||
<!-- # asks to not be shown in taskbars. window cycling actions will also --> | |||||
<!-- # skip past such windows --> | |||||
<!-- <fullscreen>yes</fullscreen> --> | |||||
<!-- <maximized>true</maximized> --> | |||||
<!-- # 'Horizontal', 'Vertical' or boolean (yes/no) --> | |||||
</application> | |||||
</applications> | |||||
</openbox_config> |
@@ -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() |
@@ -0,0 +1,725 @@ | |||||
# =================================================================== | |||||
# This file contains the default startup commands for ranger. | |||||
# To change them, it is recommended to create either /etc/ranger/rc.conf | |||||
# (system-wide) or ~/.config/ranger/rc.conf (per user) 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 false | |||||
# 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 false | |||||
# 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. | |||||
# | |||||
# * terminology: | |||||
# Previews images in full color in the terminology terminal emulator. | |||||
# Supports a wide variety of formats, even vector graphics like svg. | |||||
# | |||||
# * 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. | |||||
# | |||||
# * kitty: | |||||
# Preview images in full color using kitty image protocol. | |||||
# Requires python PIL or pillow library. | |||||
# If ranger does not share the local filesystem with kitty | |||||
# the transfer method is changed to encode the whole image; | |||||
# while slower, this allows remote previews, | |||||
# for example during an ssh session. | |||||
# Tmux is unsupported. | |||||
set preview_images_method w3m | |||||
# Delay in seconds before displaying an image with the w3m method. | |||||
# Increase it in case of experiencing display corruption. | |||||
set w3m_delay 0.02 | |||||
# 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 | |||||
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic). | |||||
# Requires the python-bidi pip package | |||||
set bidi_support 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? (separators, outline, both, or none) | |||||
# Separators are vertical lines between columns. | |||||
# Outline draws a box around all the columns. | |||||
# Both combines the two. | |||||
set draw_borders none | |||||
# 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 the free disk space in the status bar? | |||||
set display_free_space_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 true | |||||
# 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 | |||||
# The key hint lists up to this size have their sublists expanded. | |||||
# Otherwise the submaps are replaced with "...". | |||||
set hint_collapse_threshold 10 | |||||
# 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. | |||||
# Possible values: false, absolute, relative. | |||||
set line_numbers false | |||||
# When line_numbers=relative show the absolute line number in the | |||||
# current line. | |||||
set relative_current_zero 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 | |||||
# This setting allows to freeze the list of files to save I/O bandwidth. It | |||||
# should be 'false' during start-up, but you can toggle it by pressing F. | |||||
set freeze_files false | |||||
# =================================================================== | |||||
# == Local Options | |||||
# =================================================================== | |||||
# You can set local options that only affect a single directory. | |||||
# Examples: | |||||
# setlocal path=~/downloads sort mtime | |||||
# =================================================================== | |||||
# == Command Aliases in the Console | |||||
# =================================================================== | |||||
alias e edit | |||||
alias q quit | |||||
alias q! quit! | |||||
alias qa quitall | |||||
alias qa! quitall! | |||||
alias qall quitall | |||||
alias qall! quitall! | |||||
alias setl setlocal | |||||
alias filter scout -prts | |||||
alias find scout -aets | |||||
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 | |||||
map <C-p> chain console; eval fm.ui.console.history_move(-1) | |||||
# 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 { traverse_backwards | |||||
map ) jump_non | |||||
map gh cd ~ | |||||
map ge cd /etc | |||||
map gu cd /usr | |||||
map gd cd /dev | |||||
map gl cd -r . | |||||
map gL cd -r %f | |||||
map go cd /opt | |||||
map gv cd /var | |||||
map gm cd /media | |||||
map gi eval fm.cd('/run/media/' + os.getenv('USER')) | |||||
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 | |||||
map y. yank name_without_extension | |||||
# 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 | |||||
map <a-r> tab_shift 1 | |||||
map <a-l> tab_shift -1 | |||||
# 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! | |||||
copymap <C-h> <backspace> | |||||
copymap <backspace> <backspace2> | |||||
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 | |||||
# Filter stack | |||||
map .n console filter_stack add name%space | |||||
map .m console filter_stack add mime%space | |||||
map .d filter_stack add type d | |||||
map .f filter_stack add type f | |||||
map .l filter_stack add type l | |||||
map .| filter_stack add or | |||||
map .& filter_stack add and | |||||
map .! filter_stack add not | |||||
map .r console filter_stack rotate | |||||
map .c filter_stack clear | |||||
map .* filter_stack decompose | |||||
map .p filter_stack pop | |||||
map .. filter_stack show | |||||
# 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-b> eval fm.ui.console.move_word(left=1) | |||||
cmap <a-f> eval fm.ui.console.move_word(right=1) | |||||
copycmap <a-b> <a-left> | |||||
copycmap <a-f> <a-right> | |||||
# 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 <ESC> <C-g> | |||||
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,256 @@ | |||||
# vim: ft=cfg | |||||
# | |||||
# 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 xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@" | |||||
!mime ^text, label pager, ext 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$ = make | |||||
#-------------------------------------------- | |||||
# Code | |||||
#------------------------------------------- | |||||
ext py = python3 -- "$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 -- "$@" | |||||
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 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 evince, X, flag f = evince -- "$@" | |||||
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, flag 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 djvu, has djview, X, flag f = djview -- "$@" | |||||
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, has pqiv, X, flag f = pqiv -- "$@" | |||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@" | |||||
mime ^image, has feh, X, flag f = feh -- "$@" | |||||
mime ^image, has mirage, X, flag f = mirage -- "$@" | |||||
mime ^image, has ristretto, X, flag f = ristretto "$@" | |||||
mime ^image, has eog, X, flag f = eog -- "$@" | |||||
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 gwenview, X, flag f = gwenview -- "$@" | |||||
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" | "$PAGER" | |||||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done | |||||
ext ace, has unace = unace l "$1" | "$PAGER" | |||||
ext ace, has unace = for file in "$@"; do unace e "$file"; done | |||||
ext rar, has unrar = unrar l "$1" | "$PAGER" | |||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done | |||||
#------------------------------------------- | |||||
# Flag t fallback terminals | |||||
#------------------------------------------- | |||||
# Rarely installed terminal emulators get higher priority; It is assumed that | |||||
# if you install a rare terminal emulator, you probably use it. | |||||
# gnome-terminal/konsole/xterm on the other hand are often installed as part of | |||||
# a desktop environment or as fallback terminal emulators. | |||||
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@" | |||||
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@" | |||||
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"' | |||||
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@" | |||||
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@" | |||||
mime ^ranger/x-terminal-emulator, has st = st -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@" | |||||
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@" | |||||
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@" | |||||
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@" | |||||
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@" | |||||
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@" | |||||
#------------------------------------------- | |||||
# 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,216 @@ | |||||
#!/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) | |||||
# Preview as text conversion | |||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w ${PV_WIDTH} && exit 5 | |||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w ${PV_WIDTH} && 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;; | |||||
# 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;; | |||||
# Preview archives using the first image inside. | |||||
# (Very useful for comic book collections for example.) | |||||
# application/zip|application/x-rar|application/x-7z-compressed|\ | |||||
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar) | |||||
# local fn=""; local fe="" | |||||
# local zip=""; local rar=""; local tar=""; local bsd="" | |||||
# case "${mimetype}" in | |||||
# application/zip) zip=1 ;; | |||||
# application/x-rar) rar=1 ;; | |||||
# application/x-7z-compressed) ;; | |||||
# *) tar=1 ;; | |||||
# esac | |||||
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \ | |||||
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \ | |||||
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \ | |||||
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return | |||||
# | |||||
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \ | |||||
# [ print(l, end='') for l in sys.stdin if \ | |||||
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\ | |||||
# sort -V | head -n 1) | |||||
# [ "$fn" = "" ] && return | |||||
# [ "$bsd" ] && fn=$(printf '%b' "$fn") | |||||
# | |||||
# [ "$tar" ] && tar --extract --to-stdout \ | |||||
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6 | |||||
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g') | |||||
# [ "$bsd" ] && bsdtar --extract --to-stdout \ | |||||
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6 | |||||
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}" | |||||
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \ | |||||
# "${IMAGE_CACHE_PATH}" && exit 6 | |||||
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \ | |||||
# "${IMAGE_CACHE_PATH}" && exit 6 | |||||
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}" | |||||
# ;; | |||||
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,9 @@ | |||||
# Force text files to have unix eols, so Windows/Cygwin does not break them | |||||
*.* eol=lf | |||||
# These files are unfortunately not recognized as text files so | |||||
# explicitly listing them here | |||||
tpm eol=lf | |||||
bin/* eol=lf | |||||
bindings/* eol=lf | |||||
tests/* eol=lf |
@@ -0,0 +1,4 @@ | |||||
**/.vagrant/ | |||||
run_tests | |||||
tests/run_tests_in_isolation | |||||
tests/helpers/helpers.sh |
@@ -0,0 +1,3 @@ | |||||
[submodule "lib/tmux-test"] | |||||
path = lib/tmux-test | |||||
url = https://github.com/tmux-plugins/tmux-test.git |
@@ -0,0 +1,19 @@ | |||||
# generic packages and tmux | |||||
before_install: | |||||
- sudo apt-get update | |||||
- sudo apt-get install -y git-core expect | |||||
- sudo apt-get install -y python-software-properties software-properties-common | |||||
- sudo apt-get install -y libevent-dev libncurses-dev | |||||
- git clone https://github.com/tmux/tmux.git | |||||
- cd tmux | |||||
- git checkout 2.0 | |||||
- sh autogen.sh | |||||
- ./configure && make && sudo make install | |||||
install: | |||||
- git fetch --unshallow --recurse-submodules || git fetch --recurse-submodules | |||||
# manual `git clone` required for testing `tmux-test` plugin itself | |||||
- git clone https://github.com/tmux-plugins/tmux-test lib/tmux-test; true | |||||
- lib/tmux-test/setup | |||||
script: ./tests/run_tests_in_isolation |
@@ -0,0 +1,83 @@ | |||||
# Changelog | |||||
### master | |||||
- upgrade to new version of `tmux-test` | |||||
- bug: when using `emacs` copy mode, Enter does not quit screen after tpm | |||||
installation/update. Fix by making `Escape` the key for emacs mode. | |||||
- add a doc with troubleshooting instructions | |||||
- add `.gitattributes` file that forces linefeed characters (classic `\n`) as | |||||
line endings - helps with misconfigured git on windows/cygwin | |||||
- readme update: announce Cygwin support | |||||
- un-deprecate old plugin definition syntax: `set -g @tpm_plugins` | |||||
### v3.0.0, 2015-08-03 | |||||
- refactor `shared_set_tpm_path_constant` function | |||||
- move all instructions to `docs/` dir | |||||
- add `bin/install_plugins` cli executable script | |||||
- improved test runner function | |||||
- switch to using [tmux-test](https://github.com/tmux-plugins/tmux-test) | |||||
framework | |||||
- add `bin/update_plugins` cli executable script | |||||
- refactor test `expect` scripts, make them simpler and ensure they properly | |||||
assert expectations | |||||
- refactor code that sets 'TMUX_PLUGIN_MANAGER_PATH' global env var | |||||
- stop using global variable for 'tpm path' | |||||
- support defining plugins via `set -g @plugin` in sourced files as well | |||||
### v2.0.0, 2015-07-07 | |||||
- enable overriding default key bindings | |||||
- start using `C-c` to clear screen | |||||
- add uninstall/clean procedure and keybinding (prefix+alt+u) (@chilicuil) | |||||
- add new `set @plugin 'repo'` plugin definition syntax (@chilicuil) | |||||
- revert back to using `-g` flag in new plugin definition syntax | |||||
- permit leading whitespace with new plugin definition syntax (thanks @chilicuil) | |||||
- make sure `TMUX_PLUGIN_MANAGER_PATH` always has trailng slash | |||||
- ensure old/deprecated plugin syntax `set -g @tpm_plugins` works alongside new | |||||
`set -g @plugin` syntax | |||||
### v1.2.2, 2015-02-08 | |||||
- set GIT_TERMINAL_PROMPT=0 when doing `git clone`, `pull` or `submodule update` | |||||
to ensure git does not prompt for username/password in any case | |||||
### v1.2.1, 2014-11-21 | |||||
- change the way plugin name is expanded. It now uses the http username | |||||
and password by default, like this: `https://git::@github.com/`. This prevents | |||||
username and password prompt (and subsequently tmux install hanging) with old | |||||
git versions. Fixes #7. | |||||
### v1.2.0, 2014-11-20 | |||||
- refactor tests so they can be used on travis | |||||
- add travis.yml, add travis badge to the readme | |||||
### v1.1.0, 2014-11-19 | |||||
- if the plugin is not downloaded do not source it | |||||
- remove `PLUGINS.md`, an obsolete list of plugins | |||||
- update readme with instructions about uninstalling plugins | |||||
- tilde char and `$HOME` in `TMUX_SHARED_MANAGER_PATH` couldn't be used because | |||||
they are just plain strings. Fixing the problem by manually expanding them. | |||||
- bugfix: fragile `*.tmux` file globbing (@majutsushi) | |||||
### v1.0.0, 2014-08-05 | |||||
- update readme because of github organization change to | |||||
[tmux-plugins](https://github.com/tmux-plugins) | |||||
- update tests to pass | |||||
- update README to suggest different first plugin | |||||
- update list of plugins in the README | |||||
- remove README 'about' section | |||||
- move key binding to the main file. Delete `key_binding.sh`. | |||||
- rename `display_message` -> `echo_message` | |||||
- installing plugins installs just new plugins. Already installed plugins aren't | |||||
updated. | |||||
- add 'update plugin' binding and functionality | |||||
- add test for updating a plugin | |||||
### v0.0.2, 2014-07-17 | |||||
- run all *.tmux plugin files as executables | |||||
- fix all redirects to /dev/null | |||||
- fix bug: TPM shared path is created before sync (cloning plugins from github | |||||
is done) | |||||
- add test suite running in Vagrant | |||||
- add Tmux version check. `TPM` won't run if Tmux version is less than 1.9. | |||||
### v0.0.1, 2014-05-21 | |||||
- get TPM up and running |
@@ -0,0 +1,2 @@ | |||||
Instructions moved to | |||||
[docs/how_to_create_plugin.md](docs/how_to_create_plugin.md). |
@@ -0,0 +1,20 @@ | |||||
MIT license | |||||
Copyright (C) 2014 Bruno Sutic | |||||
Permission is hereby granted, free of charge, to any person obtaining | |||||
a copy of this software and associated documentation files (the "Software"), | |||||
to deal in the Software without restriction, including without limitation | |||||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |||||
and/or sell copies of the Software, and to permit persons to whom the | |||||
Software is furnished to do so, subject to the following conditions: | |||||
The above copyright notice and this permission notice shall be included | |||||
in all copies or substantial portions of the Software. | |||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | |||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | |||||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
@@ -0,0 +1,113 @@ | |||||
# Tmux Plugin Manager | |||||
[![Build Status](https://travis-ci.org/tmux-plugins/tpm.svg?branch=master)](https://travis-ci.org/tmux-plugins/tpm) | |||||
Installs and loads `tmux` plugins. | |||||
Tested and working on Linux, OSX, and Cygwin. | |||||
### Installation | |||||
Requirements: `tmux` version 1.9 (or higher), `git`, `bash`. | |||||
Clone TPM: | |||||
```bash | |||||
$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |||||
``` | |||||
Put this at the bottom of `~/.tmux.conf` (`$XDG_CONFIG_HOME/tmux/tmux.conf` | |||||
works too): | |||||
```bash | |||||
# List of plugins | |||||
set -g @plugin 'tmux-plugins/tpm' | |||||
set -g @plugin 'tmux-plugins/tmux-sensible' | |||||
# Other examples: | |||||
# set -g @plugin 'github_username/plugin_name' | |||||
# set -g @plugin 'git@github.com/user/plugin' | |||||
# set -g @plugin 'git@bitbucket.com/user/plugin' | |||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |||||
run -b '~/.tmux/plugins/tpm/tpm' | |||||
``` | |||||
Reload TMUX environment so TPM is sourced: | |||||
```bash | |||||
# type this in terminal if tmux is already running | |||||
$ tmux source ~/.tmux.conf | |||||
``` | |||||
That's it! | |||||
### Installing plugins | |||||
1. Add new plugin to `~/.tmux.conf` with `set -g @plugin '...'` | |||||
2. Press `prefix` + <kbd>I</kbd> (capital i, as in **I**nstall) to fetch the plugin. | |||||
You're good to go! The plugin was cloned to `~/.tmux/plugins/` dir and sourced. | |||||
### Uninstalling plugins | |||||
1. Remove (or comment out) plugin from the list. | |||||
2. Press `prefix` + <kbd>alt</kbd> + <kbd>u</kbd> (lowercase u as in **u**ninstall) to remove the plugin. | |||||
All the plugins are installed to `~/.tmux/plugins/` so alternatively you can | |||||
find plugin directory there and remove it. | |||||
### Key bindings | |||||
`prefix` + <kbd>I</kbd> | |||||
- Installs new plugins from GitHub or any other git repository | |||||
- Refreshes TMUX environment | |||||
`prefix` + <kbd>U</kbd> | |||||
- updates plugin(s) | |||||
`prefix` + <kbd>alt</kbd> + <kbd>u</kbd> | |||||
- remove/uninstall plugins not on the plugin list | |||||
### More plugins | |||||
For more plugins, check [here](https://github.com/tmux-plugins). | |||||
### Docs | |||||
- [Help, tpm not working](docs/tpm_not_working.md) - problem solutions | |||||
More advanced features and instructions, regular users probably do not need | |||||
this: | |||||
- [How to create a plugin](docs/how_to_create_plugin.md). It's easy. | |||||
- [Managing plugins via the command line](docs/managing_plugins_via_cmd_line.md) | |||||
- [Changing plugins install dir](docs/changing_plugins_install_dir.md) | |||||
- [Automatic TPM installation on a new machine](docs/automatic_tpm_installation.md) | |||||
### Tests | |||||
Tests for this project run on [Travis CI](https://travis-ci.org/tmux-plugins/tpm). | |||||
When run locally, [vagrant](https://www.vagrantup.com/) is required. | |||||
Run tests with: | |||||
```bash | |||||
# within project directory | |||||
$ ./run_tests | |||||
``` | |||||
### Other goodies | |||||
- [tmux-copycat](https://github.com/tmux-plugins/tmux-copycat) - a plugin for | |||||
regex searches in tmux and fast match selection | |||||
- [tmux-yank](https://github.com/tmux-plugins/tmux-yank) - enables copying | |||||
highlighted text to system clipboard | |||||
- [tmux-open](https://github.com/tmux-plugins/tmux-open) - a plugin for quickly | |||||
opening highlighted file or a url | |||||
- [tmux-continuum](https://github.com/tmux-plugins/tmux-continuum) - automatic | |||||
restoring and continuous saving of tmux env | |||||
### License | |||||
[MIT](LICENSE.md) |
@@ -0,0 +1,14 @@ | |||||
#!/usr/bin/env bash | |||||
# Script intended for use via the command line. | |||||
# | |||||
# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system, | |||||
# but does not need to be started in order to run this script. | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
SCRIPTS_DIR="$CURRENT_DIR/../scripts" | |||||
main() { | |||||
"$SCRIPTS_DIR/clean_plugins.sh" # has correct exit code | |||||
} | |||||
main |
@@ -0,0 +1,14 @@ | |||||
#!/usr/bin/env bash | |||||
# Script intended for use via the command line. | |||||
# | |||||
# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system, | |||||
# but does not need to be started in order to run this script. | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
SCRIPTS_DIR="$CURRENT_DIR/../scripts" | |||||
main() { | |||||
"$SCRIPTS_DIR/install_plugins.sh" # has correct exit code | |||||
} | |||||
main |
@@ -0,0 +1,24 @@ | |||||
#!/usr/bin/env bash | |||||
# Script intended for use via the command line. | |||||
# | |||||
# `.tmux.conf` needs to be set for TPM. Tmux has to be installed on the system, | |||||
# but does not need to be started in order to run this script. | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
SCRIPTS_DIR="$CURRENT_DIR/../scripts" | |||||
PROGRAM_NAME="$0" | |||||
if [ $# -eq 0 ]; then | |||||
echo "usage:" | |||||
echo " $PROGRAM_NAME all update all plugins" | |||||
echo " $PROGRAM_NAME tmux-foo update plugin 'tmux-foo'" | |||||
echo " $PROGRAM_NAME tmux-bar tmux-baz update multiple plugins" | |||||
exit 1 | |||||
fi | |||||
main() { | |||||
"$SCRIPTS_DIR/update_plugin.sh" --shell-echo "$*" # has correct exit code | |||||
} | |||||
main "$*" | |||||
@@ -0,0 +1,19 @@ | |||||
#!/usr/bin/env bash | |||||
# Tmux key-binding script. | |||||
# Scripts intended to be used via the command line are in `bin/` directory. | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
SCRIPTS_DIR="$CURRENT_DIR/../scripts" | |||||
HELPERS_DIR="$SCRIPTS_DIR/helpers" | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
source "$HELPERS_DIR/tmux_utils.sh" | |||||
main() { | |||||
reload_tmux_environment | |||||
"$SCRIPTS_DIR/clean_plugins.sh" --tmux-echo >/dev/null 2>&1 | |||||
reload_tmux_environment | |||||
end_message | |||||
} | |||||
main |
@@ -0,0 +1,19 @@ | |||||
#!/usr/bin/env bash | |||||
# Tmux key-binding script. | |||||
# Scripts intended to be used via the command line are in `bin/` directory. | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
SCRIPTS_DIR="$CURRENT_DIR/../scripts" | |||||
HELPERS_DIR="$SCRIPTS_DIR/helpers" | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
source "$HELPERS_DIR/tmux_utils.sh" | |||||
main() { | |||||
reload_tmux_environment | |||||
"$SCRIPTS_DIR/install_plugins.sh" --tmux-echo >/dev/null 2>&1 | |||||
reload_tmux_environment | |||||
end_message | |||||
} | |||||
main |
@@ -0,0 +1,49 @@ | |||||
#!/usr/bin/env bash | |||||
# Tmux key-binding script. | |||||
# Scripts intended to be used via the command line are in `bin/` directory. | |||||
# This script: | |||||
# - shows a list of installed plugins | |||||
# - starts a prompt to enter the name of the plugin that will be updated | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
SCRIPTS_DIR="$CURRENT_DIR/../scripts" | |||||
HELPERS_DIR="$SCRIPTS_DIR/helpers" | |||||
source "$HELPERS_DIR/plugin_functions.sh" | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
source "$HELPERS_DIR/tmux_utils.sh" | |||||
display_plugin_update_list() { | |||||
local plugins="$(tpm_plugins_list_helper)" | |||||
tmux_echo "Installed plugins:" | |||||
tmux_echo "" | |||||
for plugin in $plugins; do | |||||
# displaying only installed plugins | |||||
if plugin_already_installed "$plugin"; then | |||||
local plugin_name="$(plugin_name_helper "$plugin")" | |||||
tmux_echo " $plugin_name" | |||||
fi | |||||
done | |||||
tmux_echo "" | |||||
tmux_echo "Type plugin name to update it." | |||||
tmux_echo "" | |||||
tmux_echo "- \"all\" - updates all plugins" | |||||
tmux_echo "- ENTER - cancels" | |||||
} | |||||
update_plugin_prompt() { | |||||
tmux command-prompt -p 'plugin update:' " \ | |||||
send-keys C-c; \ | |||||
run-shell '$SCRIPTS_DIR/update_plugin_prompt_handler.sh %1'" | |||||
} | |||||
main() { | |||||
reload_tmux_environment | |||||
display_plugin_update_list | |||||
update_plugin_prompt | |||||
} | |||||
main |
@@ -0,0 +1,12 @@ | |||||
# Automatic tpm installation | |||||
One of the first things we do on a new machine is cloning our dotfiles. Not everything comes with them though, so for example `tpm` most likely won't be installed. | |||||
If you want to install `tpm` and plugins automatically when tmux is started, put the following snippet in `.tmux.conf` before the final `run '~/.tmux/plugins/tpm/tpm'`: | |||||
``` | |||||
if "test ! -d ~/.tmux/plugins/tpm" \ | |||||
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" | |||||
``` | |||||
This useful tip was submitted by @acr4 and narfman0. |
@@ -0,0 +1,14 @@ | |||||
# Changing plugins install dir | |||||
By default, TPM installs plugins to `~/.tmux/plugins/`. | |||||
You can change the install path by putting this in `.tmux.conf`: | |||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '/some/other/path/' | |||||
Tmux plugin manager initialization in `.tmux.conf` should also be updated: | |||||
# initializes TMUX plugin manager in a new path | |||||
run /some/other/path/tpm/tpm | |||||
Please make sure that the `run` line is at the very bottom of `.tmux.conf`. |
@@ -0,0 +1,108 @@ | |||||
# How to create Tmux plugins | |||||
Creating a new plugin is easy. | |||||
For demonstration purposes we'll create a simple plugin that lists all | |||||
installed TPM plugins. Yes, a plugin that lists plugins :) We'll bind that to | |||||
`prefix + T`. | |||||
The source code for this example plugin can be found | |||||
[here](https://github.com/tmux-plugins/tmux-example-plugin). | |||||
### 1. create a new git project | |||||
TPM depends on git for downloading and updating plugins. | |||||
To create a new git project: | |||||
$ mkdir tmux_my_plugin | |||||
$ cd tmux_my_plugin | |||||
$ git init | |||||
### 2. create a `*.tmux` plugin run file | |||||
When it sources a plugin, TPM executes all `*.tmux` files in your plugins' | |||||
directory. That's how plugins are run. | |||||
Create a plugin run file in plugin directory: | |||||
$ touch my_plugin.tmux | |||||
$ chmod u+x my_plugin.tmux | |||||
You can have more than one `*.tmux` file, and all will get executed. However, usually | |||||
you'll need just one. | |||||
### 3. create a plugin key binding | |||||
We want the behavior of the plugin to trigger when a user hits `prefix + T`. | |||||
Key `T` is chosen because: | |||||
- it's "kind of" a mnemonic for `TPM` | |||||
- the key is not used by Tmux natively. Tmux man page, KEY BINDINGS section | |||||
contains a list of all the bindings Tmux uses. There's plenty of unused keys | |||||
and we don't want to override any of Tmux default key bindings. | |||||
Open the plugin run file in your favorite text editor: | |||||
$ vim my_plugin.tmux | |||||
# or | |||||
$ subl my_plugin.tmux | |||||
Put the following content in the file: | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
tmux bind-key T run-shell "$CURRENT_DIR/scripts/tmux_list_plugins.sh" | |||||
As you can see, plugin run file is a simple bash script that sets up the binding. | |||||
When pressed, `prefix + T` will execute another shell script: | |||||
`tmux_list_plugins.sh`. That script should be in `scripts/` directory - | |||||
relative to the plugin run file. | |||||
### 4. listing plugins | |||||
Now that we have the binding, let's create a script that's invoked with | |||||
`prefix + T`. | |||||
$ mkdir scripts | |||||
$ touch scripts/tmux_list_plugins.sh | |||||
$ chmod u+x scripts/tmux_list_plugins.sh | |||||
And here's the script content: | |||||
#!/usr/bin/env bash | |||||
# fetching the directory where plugins are installed | |||||
plugin_path="$(tmux show-env -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)" | |||||
# listing installed plugins | |||||
ls -1 "$plugin_path" | |||||
### 5. try it out | |||||
To see if this works, execute the plugin run file: | |||||
$ ./my_plugin.tmux | |||||
That should set up the key binding. Now hit `prefix + T` and see if it works. | |||||
### 6. publish the plugin | |||||
When everything is ready, push the plugin to an online git repository, | |||||
preferably Github. | |||||
Other users can install your plugin by just adding plugin git URL to the | |||||
`@plugin` list in their `.tmux.conf`. | |||||
If the plugin is on Github, your users will be able to use the shorthand of | |||||
`github_username/repository`. | |||||
### Conclusion | |||||
Hopefully, that was easy. As you can see, it's mostly shell scripting. | |||||
You can use other scripting languages (ruby, python etc) but plain old shell | |||||
is preferred because of portability. |
@@ -0,0 +1,36 @@ | |||||
# Managing plugins via the command line | |||||
Aside from tmux key bindings, TPM provides shell interface for managing plugins | |||||
via scripts located in [bin/](../bin/) directory. | |||||
Tmux does not need to be started in order to run scripts (but it's okay if it | |||||
is). If you [changed tpm install dir](../docs/changing_plugins_install_dir.md) | |||||
in `.tmux.conf` that should work fine too. | |||||
Prerequisites: | |||||
- tmux installed on the system (doh) | |||||
- `.tmux.conf` set up for TPM | |||||
### Installing plugins | |||||
As usual, plugins need to be specified in `.tmux.conf`. Run the following | |||||
command to install plugins: | |||||
~/.tmux/plugins/tpm/bin/install_plugins | |||||
### Updating plugins | |||||
To update all installed plugins: | |||||
~/.tmux/plugins/tpm/bin/update_plugins all | |||||
or update a single plugin: | |||||
~/.tmux/plugins/tpm/bin/update_plugins tmux-sensible | |||||
### Removing plugins | |||||
To remove plugins not on the plugin list: | |||||
~/.tmux/plugins/tpm/bin/clean_plugins |
@@ -0,0 +1,96 @@ | |||||
# Help, tpm not working! | |||||
Here's the list of issues users had with `tpm`: | |||||
<hr /> | |||||
> Nothing works. `tpm` key bindings `prefix + I`, `prefix + U` not even | |||||
defined. | |||||
Related [issue #22](https://github.com/tmux-plugins/tpm/issues/22) | |||||
- Do you have required `tmux` version to run `tpm`?<br/> | |||||
Check `tmux` version with `$ tmux -V` command and make sure it's higher or | |||||
equal to the required version for `tpm` as stated in the readme. | |||||
- ZSH tmux plugin might be causing issues.<br/> | |||||
If you have it installed, try disabling it and see if `tpm` works then. | |||||
<hr /> | |||||
> Help, I'm using custom config file with `tmux -f /path/to/my_tmux.conf` | |||||
to start Tmux and for some reason plugins aren't loaded!? | |||||
Related [issue #57](https://github.com/tmux-plugins/tpm/issues/57) | |||||
`tpm` has a known issue when using custom config file with `-f` option. | |||||
The solution is to use alternative plugin definition syntax. Here are the steps | |||||
to make it work: | |||||
1. remove all `set -g @plugin` lines from tmux config file | |||||
2. in the config file define the plugins in the following way: | |||||
# List of plugins | |||||
set -g @tpm_plugins ' \ | |||||
tmux-plugins/tpm \ | |||||
tmux-plugins/tmux-sensible \ | |||||
tmux-plugins/tmux-resurrect \ | |||||
' | |||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |||||
run '~/.tmux/plugins/tpm/tpm' | |||||
3. Reload TMUX environment so TPM is sourced: `$ tmux source /path/to/my_tmux.conf` | |||||
The plugins should now be working. | |||||
<hr /> | |||||
> Weird sequence of characters show up when installing or updating plugins | |||||
Related: [issue #25](https://github.com/tmux-plugins/tpm/issues/25) | |||||
- This could be caused by [tmuxline.vim](https://github.com/edkolev/tmuxline.vim) | |||||
plugin. Uninstall it and see if things work. | |||||
<hr /> | |||||
> "failed to connect to server" error when sourcing .tmux.conf | |||||
Related: [issue #48](https://github.com/tmux-plugins/tpm/issues/48) | |||||
- Make sure `tmux source ~/.tmux.conf` command is ran from inside `tmux`. | |||||
<hr /> | |||||
> tpm not working: '~/.tmux/plugins/tpm/tpm' returned 2 (Windows / Cygwin) | |||||
Related: [issue #81](https://github.com/tmux-plugins/tpm/issues/81) | |||||
This issue is most likely caused by Windows line endings. For example, if you | |||||
have git's `core.autocrlf` option set to `true`, git will automatically convert | |||||
all the files to Windows line endings which might cause a problem. | |||||
The solution is to convert all line ending to Unix newline characters. This | |||||
command handles that for all files under `.tmux/` dir (skips `.git` | |||||
subdirectories): | |||||
```bash | |||||
find ~/.tmux -type d -name '.git*' -prune -o -type f -print0 | xargs -0 dos2unix | |||||
``` | |||||
<hr /> | |||||
> '~/.tmux/plugins/tpm/tpm' returned 127 (on macOS, w/ tmux installed using brew) | |||||
Related: [issue #67](https://github.com/tmux-plugins/tpm/issues/67) | |||||
This problem is because tmux's `run-shell` command runs a shell which doesn't read from user configs, thus tmux installed in `/usr/local/bin` will not be found. | |||||
The solution is to insert the following line: | |||||
``` | |||||
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin" | |||||
``` | |||||
before any `run-shell`/`run` commands in `~/.tmux.conf`. |
@@ -0,0 +1,78 @@ | |||||
#!/usr/bin/env bash | |||||
VERSION="$1" | |||||
UNSUPPORTED_MSG="$2" | |||||
get_tmux_option() { | |||||
local option=$1 | |||||
local default_value=$2 | |||||
local option_value=$(tmux show-option -gqv "$option") | |||||
if [ -z "$option_value" ]; then | |||||
echo "$default_value" | |||||
else | |||||
echo "$option_value" | |||||
fi | |||||
} | |||||
# Ensures a message is displayed for 5 seconds in tmux prompt. | |||||
# Does not override the 'display-time' tmux option. | |||||
display_message() { | |||||
local message="$1" | |||||
# display_duration defaults to 5 seconds, if not passed as an argument | |||||
if [ "$#" -eq 2 ]; then | |||||
local display_duration="$2" | |||||
else | |||||
local display_duration="5000" | |||||
fi | |||||
# saves user-set 'display-time' option | |||||
local saved_display_time=$(get_tmux_option "display-time" "750") | |||||
# sets message display time to 5 seconds | |||||
tmux set-option -gq display-time "$display_duration" | |||||
# displays message | |||||
tmux display-message "$message" | |||||
# restores original 'display-time' value | |||||
tmux set-option -gq display-time "$saved_display_time" | |||||
} | |||||
# this is used to get "clean" integer version number. Examples: | |||||
# `tmux 1.9` => `19` | |||||
# `1.9a` => `19` | |||||
get_digits_from_string() { | |||||
local string="$1" | |||||
local only_digits="$(echo "$string" | tr -dC '[:digit:]')" | |||||
echo "$only_digits" | |||||
} | |||||
tmux_version_int() { | |||||
local tmux_version_string=$(tmux -V) | |||||
echo "$(get_digits_from_string "$tmux_version_string")" | |||||
} | |||||
unsupported_version_message() { | |||||
if [ -n "$UNSUPPORTED_MSG" ]; then | |||||
echo "$UNSUPPORTED_MSG" | |||||
else | |||||
echo "Error, Tmux version unsupported! Please install Tmux version $VERSION or greater!" | |||||
fi | |||||
} | |||||
exit_if_unsupported_version() { | |||||
local current_version="$1" | |||||
local supported_version="$2" | |||||
if [ "$current_version" -lt "$supported_version" ]; then | |||||
display_message "$(unsupported_version_message)" | |||||
exit 1 | |||||
fi | |||||
} | |||||
main() { | |||||
local supported_version_int="$(get_digits_from_string "$VERSION")" | |||||
local current_version_int="$(tmux_version_int)" | |||||
exit_if_unsupported_version "$current_version_int" "$supported_version_int" | |||||
} | |||||
main |
@@ -0,0 +1,41 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
HELPERS_DIR="$CURRENT_DIR/helpers" | |||||
source "$HELPERS_DIR/plugin_functions.sh" | |||||
source "$HELPERS_DIR/utility.sh" | |||||
if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
else # shell output functions | |||||
source "$HELPERS_DIR/shell_echo_functions.sh" | |||||
fi | |||||
clean_plugins() { | |||||
local plugins plugin plugin_directory | |||||
plugins="$(tpm_plugins_list_helper)" | |||||
for plugin_directory in "$(tpm_path)"/*; do | |||||
[ -d "${plugin_directory}" ] || continue | |||||
plugin="$(plugin_name_helper "${plugin_directory}")" | |||||
case "${plugins}" in | |||||
*"${plugin}"*) : ;; | |||||
*) | |||||
[ "${plugin}" = "tpm" ] && continue | |||||
echo_ok "Removing \"$plugin\"" | |||||
rm -rf "${plugin_directory}" >/dev/null 2>&1 | |||||
[ -d "${plugin_directory}" ] && | |||||
echo_err " \"$plugin\" clean fail" || | |||||
echo_ok " \"$plugin\" clean success" | |||||
;; | |||||
esac | |||||
done | |||||
} | |||||
main() { | |||||
ensure_tpm_path_exists | |||||
clean_plugins | |||||
exit_value_helper | |||||
} | |||||
main |
@@ -0,0 +1,104 @@ | |||||
# using @tpm_plugins is now deprecated in favor of using @plugin syntax | |||||
tpm_plugins_variable_name="@tpm_plugins" | |||||
# manually expanding tilde char or `$HOME` variable. | |||||
_manual_expansion() { | |||||
local path="$1" | |||||
local expanded_tilde="${path/#\~/$HOME}" | |||||
echo "${expanded_tilde/#\$HOME/$HOME}" | |||||
} | |||||
_tpm_path() { | |||||
local string_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)/" | |||||
_manual_expansion "$string_path" | |||||
} | |||||
_CACHED_TPM_PATH="$(_tpm_path)" | |||||
# Get the absolute path to the users configuration file of TMux. | |||||
# This includes a prioritized search on different locations. | |||||
# | |||||
_get_user_tmux_conf() { | |||||
# Define the different possible locations. | |||||
xdg_location="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf" | |||||
default_location="$HOME/.tmux.conf" | |||||
# Search for the correct configuration file by priority. | |||||
if [ -f "$xdg_location" ]; then | |||||
echo "$xdg_location" | |||||
else | |||||
echo "$default_location" | |||||
fi | |||||
} | |||||
_tmux_conf_contents() { | |||||
user_config=$(_get_user_tmux_conf) | |||||
cat /etc/tmux.conf "$user_config" 2>/dev/null | |||||
if [ "$1" == "full" ]; then # also output content from sourced files | |||||
local file | |||||
for file in $(_sourced_files); do | |||||
cat $(_manual_expansion "$file") 2>/dev/null | |||||
done | |||||
fi | |||||
} | |||||
# return files sourced from tmux config files | |||||
_sourced_files() { | |||||
_tmux_conf_contents | | |||||
awk '/^[ \t]*source(-file)? +/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $2 }' | |||||
} | |||||
# Want to be able to abort in certain cases | |||||
trap "exit 1" TERM | |||||
export TOP_PID=$$ | |||||
_fatal_error_abort() { | |||||
echo >&2 "Aborting." | |||||
kill -s TERM $TOP_PID | |||||
} | |||||
# PUBLIC FUNCTIONS BELOW | |||||
tpm_path() { | |||||
if [ "$_CACHED_TPM_PATH" == "/" ]; then | |||||
echo >&2 "FATAL: Tmux Plugin Manager not configured in tmux.conf" | |||||
_fatal_error_abort | |||||
fi | |||||
echo "$_CACHED_TPM_PATH" | |||||
} | |||||
tpm_plugins_list_helper() { | |||||
# lists plugins from @tpm_plugins option | |||||
echo "$(tmux start-server\; show-option -gqv "$tpm_plugins_variable_name")" | |||||
# read set -g @plugin "tmux-plugins/tmux-example-plugin" entries | |||||
_tmux_conf_contents "full" | | |||||
awk '/^[ \t]*set(-option)? +-g +@plugin/ { gsub(/'\''/,""); gsub(/'\"'/,""); print $4 }' | |||||
} | |||||
# Allowed plugin name formats: | |||||
# 1. "git://github.com/user/plugin_name.git" | |||||
# 2. "user/plugin_name" | |||||
plugin_name_helper() { | |||||
local plugin="$1" | |||||
# get only the part after the last slash, e.g. "plugin_name.git" | |||||
local plugin_basename="$(basename "$plugin")" | |||||
# remove ".git" extension (if it exists) to get only "plugin_name" | |||||
local plugin_name="${plugin_basename%.git}" | |||||
echo "$plugin_name" | |||||
} | |||||
plugin_path_helper() { | |||||
local plugin="$1" | |||||
local plugin_name="$(plugin_name_helper "$plugin")" | |||||
echo "$(tpm_path)${plugin_name}/" | |||||
} | |||||
plugin_already_installed() { | |||||
local plugin="$1" | |||||
local plugin_path="$(plugin_path_helper "$plugin")" | |||||
[ -d "$plugin_path" ] && | |||||
cd "$plugin_path" && | |||||
git remote >/dev/null 2>&1 | |||||
} |
@@ -0,0 +1,7 @@ | |||||
echo_ok() { | |||||
echo "$*" | |||||
} | |||||
echo_err() { | |||||
fail_helper "$*" | |||||
} |
@@ -0,0 +1,28 @@ | |||||
_has_emacs_mode_keys() { | |||||
$(tmux show -gw mode-keys | grep -q emacs) | |||||
} | |||||
tmux_echo() { | |||||
local message="$1" | |||||
tmux run-shell "echo '$message'" | |||||
} | |||||
echo_ok() { | |||||
tmux_echo "$*" | |||||
} | |||||
echo_err() { | |||||
tmux_echo "$*" | |||||
} | |||||
end_message() { | |||||
if _has_emacs_mode_keys; then | |||||
local continue_key="ESCAPE" | |||||
else | |||||
local continue_key="ENTER" | |||||
fi | |||||
tmux_echo "" | |||||
tmux_echo "TMUX environment reloaded." | |||||
tmux_echo "" | |||||
tmux_echo "Done, press $continue_key to continue." | |||||
} |
@@ -0,0 +1,3 @@ | |||||
reload_tmux_environment() { | |||||
tmux source-file ~/.tmux.conf >/dev/null 2>&1 | |||||
} |
@@ -0,0 +1,17 @@ | |||||
ensure_tpm_path_exists() { | |||||
mkdir -p "$(tpm_path)" | |||||
} | |||||
fail_helper() { | |||||
local message="$1" | |||||
echo "$message" >&2 | |||||
FAIL="true" | |||||
} | |||||
exit_value_helper() { | |||||
if [ "$FAIL" == "true" ]; then | |||||
exit 1 | |||||
else | |||||
exit 0 | |||||
fi | |||||
} |
@@ -0,0 +1,66 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
HELPERS_DIR="$CURRENT_DIR/helpers" | |||||
source "$HELPERS_DIR/plugin_functions.sh" | |||||
source "$HELPERS_DIR/utility.sh" | |||||
if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
else # shell output functions | |||||
source "$HELPERS_DIR/shell_echo_functions.sh" | |||||
fi | |||||
clone() { | |||||
local plugin="$1" | |||||
cd "$(tpm_path)" && | |||||
GIT_TERMINAL_PROMPT=0 git clone --recursive "$plugin" >/dev/null 2>&1 | |||||
} | |||||
# tries cloning: | |||||
# 1. plugin name directly - works if it's a valid git url | |||||
# 2. expands the plugin name to point to a github repo and tries cloning again | |||||
clone_plugin() { | |||||
local plugin="$1" | |||||
clone "$plugin" || | |||||
clone "https://git::@github.com/$plugin" | |||||
} | |||||
# clone plugin and produce output | |||||
install_plugin() { | |||||
local plugin="$1" | |||||
local plugin_name="$(plugin_name_helper "$plugin")" | |||||
if plugin_already_installed "$plugin"; then | |||||
echo_ok "Already installed \"$plugin_name\"" | |||||
else | |||||
echo_ok "Installing \"$plugin_name\"" | |||||
clone_plugin "$plugin" && | |||||
echo_ok " \"$plugin_name\" download success" || | |||||
echo_err " \"$plugin_name\" download fail" | |||||
fi | |||||
} | |||||
install_plugins() { | |||||
local plugins="$(tpm_plugins_list_helper)" | |||||
for plugin in $plugins; do | |||||
install_plugin "$plugin" | |||||
done | |||||
} | |||||
verify_tpm_path_permissions() { | |||||
local path="$(tpm_path)" | |||||
# check the write permission flag for all users to ensure | |||||
# that we have proper access | |||||
[ -w "$path" ] || | |||||
echo_err "$path is not writable!" | |||||
} | |||||
main() { | |||||
ensure_tpm_path_exists | |||||
verify_tpm_path_permissions | |||||
install_plugins | |||||
exit_value_helper | |||||
} | |||||
main |
@@ -0,0 +1,41 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
HELPERS_DIR="$CURRENT_DIR/helpers" | |||||
source "$HELPERS_DIR/plugin_functions.sh" | |||||
plugin_dir_exists() { | |||||
[ -d "$1" ] | |||||
} | |||||
# Runs all *.tmux files from the plugin directory. | |||||
# Files are ran as executables. | |||||
# No errors if the plugin dir does not exist. | |||||
silently_source_all_tmux_files() { | |||||
local plugin_path="$1" | |||||
local plugin_tmux_files="$plugin_path*.tmux" | |||||
if plugin_dir_exists "$plugin_path"; then | |||||
for tmux_file in $plugin_tmux_files; do | |||||
# if the glob didn't find any files this will be the | |||||
# unexpanded glob which obviously doesn't exist | |||||
[ -f "$tmux_file" ] || continue | |||||
# runs *.tmux file as an executable | |||||
$tmux_file >/dev/null 2>&1 | |||||
done | |||||
fi | |||||
} | |||||
source_plugins() { | |||||
local plugin plugin_path | |||||
local plugins="$(tpm_plugins_list_helper)" | |||||
for plugin in $plugins; do | |||||
plugin_path="$(plugin_path_helper "$plugin")" | |||||
silently_source_all_tmux_files "$plugin_path" | |||||
done | |||||
} | |||||
main() { | |||||
source_plugins | |||||
} | |||||
main |
@@ -0,0 +1,71 @@ | |||||
#!/usr/bin/env bash | |||||
# this script handles core logic of updating plugins | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
HELPERS_DIR="$CURRENT_DIR/helpers" | |||||
source "$HELPERS_DIR/plugin_functions.sh" | |||||
source "$HELPERS_DIR/utility.sh" | |||||
if [ "$1" == "--tmux-echo" ]; then # tmux-specific echo functions | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
else # shell output functions | |||||
source "$HELPERS_DIR/shell_echo_functions.sh" | |||||
fi | |||||
# from now on ignore first script argument | |||||
shift | |||||
pull_changes() { | |||||
local plugin="$1" | |||||
local plugin_path="$(plugin_path_helper "$plugin")" | |||||
cd "$plugin_path" && | |||||
GIT_TERMINAL_PROMPT=0 git pull && | |||||
GIT_TERMINAL_PROMPT=0 git submodule update --init --recursive | |||||
} | |||||
update() { | |||||
local plugin="$1" | |||||
$(pull_changes "$plugin" > /dev/null 2>&1) && | |||||
echo_ok " \"$plugin\" update success" || | |||||
echo_err " \"$plugin\" update fail" | |||||
} | |||||
update_all() { | |||||
echo_ok "Updating all plugins!" | |||||
echo_ok "" | |||||
local plugins="$(tpm_plugins_list_helper)" | |||||
for plugin in $plugins; do | |||||
local plugin_name="$(plugin_name_helper "$plugin")" | |||||
# updating only installed plugins | |||||
if plugin_already_installed "$plugin_name"; then | |||||
update "$plugin_name" & | |||||
fi | |||||
done | |||||
wait | |||||
} | |||||
update_plugins() { | |||||
local plugins="$*" | |||||
for plugin in $plugins; do | |||||
local plugin_name="$(plugin_name_helper "$plugin")" | |||||
if plugin_already_installed "$plugin_name"; then | |||||
update "$plugin_name" & | |||||
else | |||||
echo_err "$plugin_name not installed!" & | |||||
fi | |||||
done | |||||
wait | |||||
} | |||||
main() { | |||||
ensure_tpm_path_exists | |||||
if [ "$1" == "all" ]; then | |||||
update_all | |||||
else | |||||
update_plugins "$*" | |||||
fi | |||||
exit_value_helper | |||||
} | |||||
main "$*" |
@@ -0,0 +1,18 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
HELPERS_DIR="$CURRENT_DIR/helpers" | |||||
if [ $# -eq 0 ]; then | |||||
exit 0 | |||||
fi | |||||
source "$HELPERS_DIR/tmux_echo_functions.sh" | |||||
source "$HELPERS_DIR/tmux_utils.sh" | |||||
main() { | |||||
"$CURRENT_DIR/update_plugin.sh" --tmux-echo "$*" | |||||
reload_tmux_environment | |||||
end_message | |||||
} | |||||
main "$*" |
@@ -0,0 +1,13 @@ | |||||
install_key_option="@tpm-install" | |||||
default_install_key="I" | |||||
update_key_option="@tpm-update" | |||||
default_update_key="U" | |||||
clean_key_option="@tpm-clean" | |||||
default_clean_key="M-u" | |||||
SUPPORTED_TMUX_VERSION="1.9" | |||||
DEFAULT_TPM_ENV_VAR_NAME="TMUX_PLUGIN_MANAGER_PATH" | |||||
DEFAULT_TPM_PATH="$HOME/.tmux/plugins/" |
@@ -0,0 +1,36 @@ | |||||
#!/usr/bin/env expect | |||||
# disables script output | |||||
log_user 0 | |||||
spawn tmux | |||||
# Waiting for tmux to attach. If this is not done, next command, `send` will | |||||
# not work properly. | |||||
sleep 1 | |||||
# this is tmux prefix + I | |||||
send "I" | |||||
# cloning might take a while | |||||
set timeout 20 | |||||
expect_after { | |||||
timeout { exit 1 } | |||||
} | |||||
expect { | |||||
"Installing \"non-existing-plugin\"" | |||||
} | |||||
expect { | |||||
"\"non-existing-plugin\" download fail" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue" { | |||||
exit 0 | |||||
} | |||||
} | |||||
exit 1 |
@@ -0,0 +1,35 @@ | |||||
#!/usr/bin/env expect | |||||
# disables script output | |||||
log_user 0 | |||||
spawn tmux | |||||
# Waiting for tmux to attach. If this is not done, next command, `send` will | |||||
# not work properly. | |||||
sleep 1 | |||||
# this is tmux prefix + alt + u | |||||
send "u" | |||||
set timeout 5 | |||||
expect_after { | |||||
timeout { exit 1 } | |||||
} | |||||
expect { | |||||
"Removing \"tmux-example-plugin\"" | |||||
} | |||||
expect { | |||||
"\"tmux-example-plugin\" clean success" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue." { | |||||
exit 0 | |||||
} | |||||
} | |||||
exit 1 |
@@ -0,0 +1,44 @@ | |||||
#!/usr/bin/env expect | |||||
# disables script output | |||||
log_user 0 | |||||
spawn tmux | |||||
# Waiting for tmux to attach. If this is not done, next command, `send` will | |||||
# not work properly. | |||||
sleep 1 | |||||
# this is tmux prefix + I | |||||
send "I" | |||||
# cloning might take a while | |||||
set timeout 15 | |||||
expect_after { | |||||
timeout { exit 1 } | |||||
} | |||||
expect { | |||||
"Installing \"tmux-example-plugin\"" | |||||
} | |||||
expect { | |||||
"\"tmux-example-plugin\" download success" | |||||
} | |||||
expect { | |||||
"Installing \"tmux-copycat\"" | |||||
} | |||||
expect { | |||||
"\"tmux-copycat\" download success" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue." { | |||||
exit 0 | |||||
} | |||||
} | |||||
exit 1 |
@@ -0,0 +1,50 @@ | |||||
#!/usr/bin/env expect | |||||
# disables script output | |||||
log_user 0 | |||||
spawn tmux | |||||
# Waiting for tmux to attach. If this is not done, next command, `send` will | |||||
# not work properly. | |||||
sleep 1 | |||||
# this is tmux prefix + I | |||||
send "I" | |||||
# cloning might take a while | |||||
set timeout 15 | |||||
expect_after { | |||||
timeout { exit 1 } | |||||
} | |||||
expect { | |||||
"Installing \"tmux-example-plugin\"" | |||||
} | |||||
expect { | |||||
"\"tmux-example-plugin\" download success" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue" { | |||||
send " " | |||||
} | |||||
} | |||||
sleep 1 | |||||
# this is tmux prefix + I | |||||
send "I" | |||||
expect { | |||||
"Already installed \"tmux-example-plugin\"" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue" { | |||||
exit 0 | |||||
} | |||||
} | |||||
exit 1 |
@@ -0,0 +1,55 @@ | |||||
#!/usr/bin/env expect | |||||
# disables script output | |||||
log_user 0 | |||||
spawn tmux | |||||
# Waiting for tmux to attach. If this is not done, next command, `send` will | |||||
# not work properly. | |||||
sleep 1 | |||||
# this is tmux prefix + U | |||||
send "U" | |||||
set timeout 15 | |||||
expect_after { | |||||
timeout { exit 1 } | |||||
} | |||||
expect { | |||||
"Installed plugins" | |||||
} | |||||
expect { | |||||
"tmux-example-plugin" | |||||
} | |||||
expect { | |||||
"\"all\" - updates all plugins" | |||||
} | |||||
expect { | |||||
"ENTER - cancels" | |||||
} | |||||
# wait for tmux to display prompt before sending characters | |||||
sleep 1 | |||||
send "tmux-example-plugin\r" | |||||
expect { | |||||
"Updating \"tmux-example-plugin\"" | |||||
} | |||||
expect { | |||||
"\"tmux-example-plugin\" update success" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue." { | |||||
exit 0 | |||||
} | |||||
} | |||||
exit 1 |
@@ -0,0 +1,59 @@ | |||||
#!/usr/bin/env expect | |||||
# disables script output | |||||
log_user 0 | |||||
spawn tmux | |||||
# Waiting for tmux to attach. If this is not done, next command, `send` will | |||||
# not work properly. | |||||
sleep 1 | |||||
# this is tmux prefix + U | |||||
send "U" | |||||
set timeout 5 | |||||
expect_after { | |||||
timeout { exit 1 } | |||||
} | |||||
expect { | |||||
"Installed plugins" | |||||
} | |||||
expect { | |||||
"tmux-example-plugin" | |||||
} | |||||
expect { | |||||
"\"all\" - updates all plugins" | |||||
} | |||||
expect { | |||||
"ENTER - cancels" | |||||
} | |||||
# wait for tmux to display prompt before sending characters | |||||
sleep 1 | |||||
send "all\r" | |||||
expect { | |||||
"Updating all plugins!" | |||||
} | |||||
expect { | |||||
"Updating \"tmux-example-plugin\"" | |||||
} | |||||
expect { | |||||
"\"tmux-example-plugin\" update success" | |||||
} | |||||
expect { | |||||
"Done, press ENTER to continue." { | |||||
exit 0 | |||||
} | |||||
} | |||||
exit 1 |
@@ -0,0 +1,13 @@ | |||||
check_dir_exists_helper() { | |||||
[ -d "$1" ] | |||||
} | |||||
# runs the scripts and asserts it has the correct output and exit code | |||||
script_run_helper() { | |||||
local script="$1" | |||||
local expected_output="$2" | |||||
local expected_exit_code="${3:-0}" | |||||
$script 2>&1 | | |||||
grep "$expected_output" >/dev/null 2>&1 && # grep -q flag quits the script early | |||||
[ "${PIPESTATUS[0]}" -eq "$expected_exit_code" ] | |||||
} |
@@ -0,0 +1,67 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
TPM_DIR="$PWD" | |||||
PLUGINS_DIR="$HOME/.tmux/plugins" | |||||
source "$CURRENT_DIR/helpers/helpers.sh" | |||||
source "$CURRENT_DIR/helpers/tpm.sh" | |||||
manually_install_the_plugin() { | |||||
rm -rf "$PLUGINS_DIR" | |||||
mkdir -p "$PLUGINS_DIR" | |||||
cd "$PLUGINS_DIR" | |||||
git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin | |||||
} | |||||
# TMUX KEY-BINDING TESTS | |||||
test_plugin_uninstallation_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
manually_install_the_plugin | |||||
"$CURRENT_DIR/expect_successful_clean_plugins" || | |||||
fail_helper "[key-binding] clean fails" | |||||
teardown_helper | |||||
} | |||||
# SCRIPT TESTS | |||||
test_plugin_uninstallation_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
manually_install_the_plugin | |||||
script_run_helper "$TPM_DIR/bin/clean_plugins" '"tmux-example-plugin" clean success' || | |||||
fail_helper "[script] plugin cleaning fails" | |||||
teardown_helper | |||||
} | |||||
test_unsuccessful_plugin_uninstallation_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
manually_install_the_plugin | |||||
chmod 000 "$PLUGINS_DIR/tmux-example-plugin" # disable directory deletion | |||||
local expected_exit_code=1 | |||||
script_run_helper "$TPM_DIR/bin/clean_plugins" '"tmux-example-plugin" clean fail' "$expected_exit_code" || | |||||
fail_helper "[script] unsuccessful plugin cleaning doesn't fail" | |||||
chmod 755 "$PLUGINS_DIR/tmux-example-plugin" # enable directory deletion | |||||
teardown_helper | |||||
} | |||||
run_tests |
@@ -0,0 +1,284 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
PLUGINS_DIR="$HOME/.tmux/plugins" | |||||
TPM_DIR="$PWD" | |||||
CUSTOM_PLUGINS_DIR="$HOME/foo/plugins" | |||||
ADDITIONAL_CONFIG_FILE_1="$HOME/.tmux/additional_config_file_1" | |||||
ADDITIONAL_CONFIG_FILE_2="$HOME/.tmux/additional_config_file_2" | |||||
source "$CURRENT_DIR/helpers/helpers.sh" | |||||
source "$CURRENT_DIR/helpers/tpm.sh" | |||||
# TMUX KEY-BINDING TESTS | |||||
test_plugin_installation_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
"$CURRENT_DIR/expect_successful_plugin_download" || | |||||
fail_helper "[key-binding] plugin installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding] plugin download fails" | |||||
teardown_helper | |||||
} | |||||
test_plugin_installation_via_tmux_key_binding_set_option() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set-option -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
"$CURRENT_DIR/expect_successful_plugin_download" || | |||||
fail_helper "[key-binding][set-option] plugin installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding][set-option] plugin download fails" | |||||
teardown_helper | |||||
} | |||||
test_plugin_installation_custom_dir_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '$CUSTOM_PLUGINS_DIR' | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
"$CURRENT_DIR/expect_successful_plugin_download" || | |||||
fail_helper "[key-binding][custom dir] plugin installation fails" | |||||
check_dir_exists_helper "$CUSTOM_PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding][custom dir] plugin download fails" | |||||
teardown_helper | |||||
rm -rf "$CUSTOM_PLUGINS_DIR" | |||||
} | |||||
test_non_existing_plugin_installation_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/non-existing-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
"$CURRENT_DIR/expect_failed_plugin_download" || | |||||
fail_helper "[key-binding] non existing plugin installation doesn't fail" | |||||
teardown_helper | |||||
} | |||||
test_multiple_plugins_installation_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
\ \ set -g @plugin 'tmux-plugins/tmux-copycat' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
"$CURRENT_DIR/expect_successful_multiple_plugins_download" || | |||||
fail_helper "[key-binding] multiple plugins installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[key-binding] plugin download fails (tmux-copycat)" | |||||
teardown_helper | |||||
} | |||||
test_plugins_installation_from_sourced_file_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
source '$ADDITIONAL_CONFIG_FILE_1' | |||||
set -g @plugin 'tmux-plugins/tmux-example-plugin' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
mkdir ~/.tmux | |||||
echo "set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_1" | |||||
"$CURRENT_DIR/expect_successful_multiple_plugins_download" || | |||||
fail_helper "[key-binding][sourced file] plugins installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding][sourced file] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[key-binding][sourced file] plugin download fails (tmux-copycat)" | |||||
teardown_helper | |||||
} | |||||
test_plugins_installation_from_multiple_sourced_files_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
\ \ source '$ADDITIONAL_CONFIG_FILE_1' | |||||
source-file '$ADDITIONAL_CONFIG_FILE_2' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
mkdir ~/.tmux | |||||
echo "set -g @plugin 'tmux-plugins/tmux-example-plugin'" > "$ADDITIONAL_CONFIG_FILE_1" | |||||
echo " set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_2" | |||||
"$CURRENT_DIR/expect_successful_multiple_plugins_download" || | |||||
fail_helper "[key-binding][multiple sourced files] plugins installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding][multiple sourced files] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[key-binding][multiple sourced files] plugin download fails (tmux-copycat)" | |||||
teardown_helper | |||||
} | |||||
# SCRIPT TESTS | |||||
test_plugin_installation_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || | |||||
fail_helper "[script] plugin installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script] plugin download fails" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-example-plugin"' || | |||||
fail_helper "[script] plugin already installed message fail" | |||||
teardown_helper | |||||
} | |||||
test_plugin_installation_custom_dir_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '$CUSTOM_PLUGINS_DIR' | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || | |||||
fail_helper "[script][custom dir] plugin installation fails" | |||||
check_dir_exists_helper "$CUSTOM_PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script][custom dir] plugin download fails" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-example-plugin"' || | |||||
fail_helper "[script][custom dir] plugin already installed message fail" | |||||
teardown_helper | |||||
rm -rf "$CUSTOM_PLUGINS_DIR" | |||||
} | |||||
test_non_existing_plugin_installation_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/non-existing-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
local expected_exit_code=1 | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"non-existing-plugin" download fail' "$expected_exit_code" || | |||||
fail_helper "[script] non existing plugin installation doesn't fail" | |||||
teardown_helper | |||||
} | |||||
test_multiple_plugins_installation_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
\ \ set -g @plugin 'tmux-plugins/tmux-copycat' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || | |||||
fail_helper "[script] multiple plugins installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[script] plugin download fails (tmux-copycat)" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-copycat"' || | |||||
fail_helper "[script] multiple plugins already installed message fail" | |||||
teardown_helper | |||||
} | |||||
test_plugins_installation_from_sourced_file_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
source '$ADDITIONAL_CONFIG_FILE_1' | |||||
set -g @plugin 'tmux-plugins/tmux-example-plugin' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
mkdir ~/.tmux | |||||
echo "set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_1" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-copycat" download success' || | |||||
fail_helper "[script][sourced file] plugins installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script][sourced file] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[script][sourced file] plugin download fails (tmux-copycat)" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-copycat"' || | |||||
fail_helper "[script][sourced file] plugins already installed message fail" | |||||
teardown_helper | |||||
} | |||||
test_plugins_installation_from_multiple_sourced_files_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
\ \ source '$ADDITIONAL_CONFIG_FILE_1' | |||||
source-file '$ADDITIONAL_CONFIG_FILE_2' | |||||
set -g @plugin 'tmux-plugins/tmux-example-plugin' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
mkdir ~/.tmux | |||||
echo " set -g @plugin 'tmux-plugins/tmux-copycat'" > "$ADDITIONAL_CONFIG_FILE_1" | |||||
echo "set -g @plugin 'tmux-plugins/tmux-sensible'" > "$ADDITIONAL_CONFIG_FILE_2" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-sensible" download success' || | |||||
fail_helper "[script][multiple sourced files] plugins installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script][multiple sourced files] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[script][multiple sourced files] plugin download fails (tmux-copycat)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-sensible/" || | |||||
fail_helper "[script][multiple sourced files] plugin download fails (tmux-sensible)" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-sensible"' || | |||||
fail_helper "[script][multiple sourced files] plugins already installed message fail" | |||||
teardown_helper | |||||
} | |||||
run_tests |
@@ -0,0 +1,100 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
PLUGINS_DIR="$HOME/.tmux/plugins" | |||||
TPM_DIR="$PWD" | |||||
source "$CURRENT_DIR/helpers/helpers.sh" | |||||
source "$CURRENT_DIR/helpers/tpm.sh" | |||||
# TMUX KEY-BINDING TESTS | |||||
test_plugin_installation_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @tpm_plugins "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
# opens tmux and test it with `expect` | |||||
$CURRENT_DIR/expect_successful_plugin_download || | |||||
fail_helper "[key-binding] plugin installation fails" | |||||
# check plugin dir exists after download | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding] plugin download fails" | |||||
teardown_helper | |||||
} | |||||
test_legacy_and_new_syntax_for_plugin_installation_work_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @tpm_plugins " \ | |||||
tmux-plugins/tmux-example-plugin \ | |||||
" | |||||
set -g @plugin 'tmux-plugins/tmux-copycat' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
# opens tmux and test it with `expect` | |||||
"$CURRENT_DIR"/expect_successful_multiple_plugins_download || | |||||
fail_helper "[key-binding] multiple plugins installation fails" | |||||
# check plugin dir exists after download | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[key-binding] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[key-binding] plugin download fails (tmux-copycat)" | |||||
teardown_helper | |||||
} | |||||
# SCRIPT TESTS | |||||
test_plugin_installation_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @tpm_plugins "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || | |||||
fail_helper "[script] plugin installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script] plugin download fails" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-example-plugin"' || | |||||
fail_helper "[script] plugin already installed message fail" | |||||
teardown_helper | |||||
} | |||||
test_legacy_and_new_syntax_for_plugin_installation_work_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @tpm_plugins " \ | |||||
tmux-plugins/tmux-example-plugin \ | |||||
" | |||||
set -g @plugin 'tmux-plugins/tmux-copycat' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" '"tmux-example-plugin" download success' || | |||||
fail_helper "[script] multiple plugin installation fails" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-example-plugin/" || | |||||
fail_helper "[script] plugin download fails (tmux-example-plugin)" | |||||
check_dir_exists_helper "$PLUGINS_DIR/tmux-copycat/" || | |||||
fail_helper "[script] plugin download fails (tmux-copycat)" | |||||
script_run_helper "$TPM_DIR/bin/install_plugins" 'Already installed "tmux-copycat"' || | |||||
fail_helper "[script] multiple plugins already installed message fail" | |||||
teardown_helper | |||||
} | |||||
run_tests |
@@ -0,0 +1,78 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
TPM_DIR="$PWD" | |||||
PLUGINS_DIR="$HOME/.tmux/plugins" | |||||
CUSTOM_PLUGINS_DIR="$HOME/foo/plugins" | |||||
source "$CURRENT_DIR/helpers/helpers.sh" | |||||
source "$CURRENT_DIR/helpers/tpm.sh" | |||||
check_binding_defined() { | |||||
local binding="$1" | |||||
tmux list-keys | grep -q "$binding" | |||||
} | |||||
create_test_plugin_helper() { | |||||
local plugin_path="$PLUGINS_DIR/tmux_test_plugin/" | |||||
rm -rf "$plugin_path" | |||||
mkdir -p "$plugin_path" | |||||
while read line; do | |||||
echo "$line" >> "$plugin_path/test_plugin.tmux" | |||||
done | |||||
chmod +x "$plugin_path/test_plugin.tmux" | |||||
} | |||||
check_tpm_path() { | |||||
local correct_tpm_path="$1" | |||||
local tpm_path="$(tmux start-server\; show-environment -g TMUX_PLUGIN_MANAGER_PATH | cut -f2 -d=)" | |||||
[ "$correct_tpm_path" == "$tpm_path" ] | |||||
} | |||||
test_plugin_sourcing() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "doesnt_matter/tmux_test_plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
# manually creates a local tmux plugin | |||||
create_test_plugin_helper <<- HERE | |||||
tmux bind-key R run-shell foo_command | |||||
HERE | |||||
tmux new-session -d # tmux starts detached | |||||
check_binding_defined "R run-shell foo_command" || | |||||
fail_helper "Plugin sourcing fails" | |||||
teardown_helper | |||||
} | |||||
test_default_tpm_path() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
check_tpm_path "${PLUGINS_DIR}/" || | |||||
fail_helper "Default TPM path not correct" | |||||
teardown_helper | |||||
} | |||||
test_custom_tpm_path() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH '$CUSTOM_PLUGINS_DIR' | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
check_tpm_path "$CUSTOM_PLUGINS_DIR" || | |||||
fail_helper "Custom TPM path not correct" | |||||
teardown_helper | |||||
} | |||||
run_tests |
@@ -0,0 +1,60 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
TPM_DIR="$PWD" | |||||
PLUGINS_DIR="$HOME/.tmux/plugins" | |||||
source "$CURRENT_DIR/helpers/helpers.sh" | |||||
source "$CURRENT_DIR/helpers/tpm.sh" | |||||
manually_install_the_plugin() { | |||||
mkdir -p "$PLUGINS_DIR" | |||||
cd "$PLUGINS_DIR" | |||||
git clone --quiet https://github.com/tmux-plugins/tmux-example-plugin | |||||
} | |||||
# TMUX KEY-BINDING TESTS | |||||
test_plugin_update_via_tmux_key_binding() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
manually_install_the_plugin | |||||
"$CURRENT_DIR/expect_successful_update_of_all_plugins" || | |||||
fail_helper "[key-binding] 'update all plugins' fails" | |||||
"$CURRENT_DIR/expect_successful_update_of_a_single_plugin" || | |||||
fail_helper "[key-binding] 'update single plugin' fails" | |||||
teardown_helper | |||||
} | |||||
# SCRIPT TESTS | |||||
test_plugin_update_via_script() { | |||||
set_tmux_conf_helper <<- HERE | |||||
set -g mode-keys vi | |||||
set -g @plugin "tmux-plugins/tmux-example-plugin" | |||||
run-shell "$TPM_DIR/tpm" | |||||
HERE | |||||
manually_install_the_plugin | |||||
local expected_exit_code=1 | |||||
script_run_helper "$TPM_DIR/bin/update_plugins" 'usage' "$expected_exit_code" || | |||||
fail_helper "[script] running update plugins without args should fail" | |||||
script_run_helper "$TPM_DIR/bin/update_plugins tmux-example-plugin" '"tmux-example-plugin" update success' || | |||||
fail_helper "[script] plugin update fails" | |||||
script_run_helper "$TPM_DIR/bin/update_plugins all" '"tmux-example-plugin" update success' || | |||||
fail_helper "[script] update all plugins fails" | |||||
teardown_helper | |||||
} | |||||
run_tests |
@@ -0,0 +1,72 @@ | |||||
#!/usr/bin/env bash | |||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |||||
BINDINGS_DIR="$CURRENT_DIR/bindings" | |||||
SCRIPTS_DIR="$CURRENT_DIR/scripts" | |||||
source "$SCRIPTS_DIR/variables.sh" | |||||
get_tmux_option() { | |||||
local option="$1" | |||||
local default_value="$2" | |||||
local option_value="$(tmux show-option -gqv "$option")" | |||||
if [ -z "$option_value" ]; then | |||||
echo "$default_value" | |||||
else | |||||
echo "$option_value" | |||||
fi | |||||
} | |||||
tpm_path_set() { | |||||
tmux show-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" >/dev/null 2>&1 | |||||
} | |||||
set_default_tpm_path() { | |||||
tmux set-environment -g "$DEFAULT_TPM_ENV_VAR_NAME" "$DEFAULT_TPM_PATH" | |||||
} | |||||
# Ensures TMUX_PLUGIN_MANAGER_PATH global env variable is set. | |||||
# | |||||
# Put this in `.tmux.conf` to override the default: | |||||
# `set-environment -g TMUX_PLUGIN_MANAGER_PATH "/some/other/path/"` | |||||
set_tpm_path() { | |||||
if ! tpm_path_set; then | |||||
set_default_tpm_path | |||||
fi | |||||
} | |||||
# 1. Fetches plugin names from `@plugin` variables | |||||
# 2. Creates full plugin path | |||||
# 3. Sources all *.tmux files from each of the plugin directories | |||||
# - no errors raised if directory does not exist | |||||
# Files are sourced as tmux config files, not as shell scripts! | |||||
source_plugins() { | |||||
"$SCRIPTS_DIR/source_plugins.sh" >/dev/null 2>&1 | |||||
} | |||||
# prefix + I - downloads TPM plugins and reloads TMUX environment | |||||
# prefix + U - updates a plugin (or all of them) and reloads TMUX environment | |||||
# prefix + alt + u - remove unused TPM plugins and reloads TMUX environment | |||||
set_tpm_key_bindings() { | |||||
local install_key="$(get_tmux_option "$install_key_option" "$default_install_key")" | |||||
tmux bind-key "$install_key" run-shell "$BINDINGS_DIR/install_plugins" | |||||
local update_key="$(get_tmux_option "$update_key_option" "$default_update_key")" | |||||
tmux bind-key "$update_key" run-shell "$BINDINGS_DIR/update_plugins" | |||||
local clean_key="$(get_tmux_option "$clean_key_option" "$default_clean_key")" | |||||
tmux bind-key "$clean_key" run-shell "$BINDINGS_DIR/clean_plugins" | |||||
} | |||||
supported_tmux_version_ok() { | |||||
"$SCRIPTS_DIR/check_tmux_version.sh" "$SUPPORTED_TMUX_VERSION" | |||||
} | |||||
main() { | |||||
if supported_tmux_version_ok; then | |||||
set_tpm_path | |||||
set_tpm_key_bindings | |||||
source_plugins | |||||
fi | |||||
} | |||||
main |
@@ -0,0 +1,76 @@ | |||||
bind r source-file ~/.config/tmux/tmux.conf | |||||
set-option -g prefix ` | |||||
set-option -g mode-keys vi | |||||
bind-key ` send-prefix | |||||
bind v split-window -h | |||||
bind h split-window -v | |||||
bind -n M-h select-pane -L | |||||
bind -n M-l select-pane -R | |||||
bind -n M-k select-pane -U | |||||
bind -n M-j select-pane -D | |||||
bind -n M-o next-window | |||||
bind -n M-i previous-window | |||||
bind -n M-] swap-window -t +1 | |||||
bind -n M-[ swap-window -t -1 | |||||
set -g mouse on | |||||
set -g mouse on | |||||
set -g mouse on | |||||
set -g default-terminal "tmux-256color" | |||||
bind-key -T copy-mode-vi v send-keys -X begin-selection | |||||
bind-key -T copy-mode-vi y send-keys -X copy-selection | |||||
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |||||
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | |||||
unbind '"' | |||||
unbind % | |||||
unbind C-b | |||||
unbind p | |||||
unbind n | |||||
###################### | |||||
### DESIGN CHANGES ### | |||||
###################### | |||||
# {{{ | |||||
# loud or quiet? | |||||
set -g visual-activity off | |||||
set -g visual-bell off | |||||
set -g visual-silence off | |||||
setw -g monitor-activity off | |||||
set -g bell-action none | |||||
# modes | |||||
setw -g clock-mode-colour colour5 | |||||
setw -g mode-style 'fg=colour1 bg=colour18 bold' | |||||
# panes | |||||
set -g pane-border-style 'fg=colour19 bg=colour0' | |||||
set -g pane-active-border-style 'bg=colour0 fg=colour9' | |||||
# statusbar | |||||
set -g status-position bottom | |||||
set -g status-justify left | |||||
set -g status-style 'bg=colour18 fg=colour137 dim' | |||||
set -g status-left '' | |||||
set -g status-right '#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' | |||||
set -g status-right-length 50 | |||||
set -g status-left-length 20 | |||||
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold' | |||||
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' | |||||
setw -g window-status-style 'fg=colour9 bg=colour18' | |||||
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | |||||
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' | |||||
# messages | |||||
set -g message-style 'fg=colour232 bg=colour16 bold' | |||||
# }}} | |||||
#Plugins | |||||
set -g @plugin 'tmux-plugins/tpm' | |||||
set -g @plugin 'mattdavis90/base16-tmux' | |||||
set -g @colors-base16 'ocean' | |||||
#Final | |||||
run -b '~/.config/tmux/plugins/tpm/tpm' |
@@ -0,0 +1,892 @@ | |||||
!-------- Xterm Terminal Settings {{{ | |||||
!------------------------------------------------------ | |||||
! https://wiki.archlinux.org/index.php/Xterm | |||||
! https://lukas.zapletalovi.com/2013/07/hidden-gems-of-xterm.html | |||||
! http://www.futurile.net/2016/06/14/xterm-setup-and-truetype-font-configuration/ | |||||
! http://www.futurile.net/2016/06/15/xterm-256color-themes-molokai-terminal-theme/ | |||||
! Allow xterm to report the TERM variable correctly. | |||||
! Do not set the TERM variable from your ~/.bashrc or ~/.bash_profile or similar file. | |||||
! The terminal itself should report the correct TERM to the system so that the proper terminfo file will be used. | |||||
! Two usable terminfo names are xterm and xterm-256color | |||||
XTerm.termName: xterm-256color | |||||
! Fonts ==================================================== | |||||
! set font and fontsize | |||||
XTerm*faceName: Cousine NF | |||||
XTerm*faceSize: 10 | |||||
! VT Font Menu: Unreadable | |||||
xterm*faceSize1: 6 | |||||
! VT font menu: Tiny | |||||
xterm*faceSize2: 8 | |||||
! VT font menu: Medium | |||||
xterm*faceSize3: 10 | |||||
! VT font menu: Large | |||||
xterm*faceSize4: 15 | |||||
! VT font menu: Huge | |||||
xterm*faceSize5: 25 | |||||
! Ensure that your locale is set up for UTF-8. If you do not use UTF-8, you may need to force xterm to more strictly follow your locale by setting | |||||
XTerm.vt100.locale: true | |||||
! Cursor ==================================================== | |||||
! pointer and cursor (blinking and color) | |||||
XTerm*pointerColor: white | |||||
XTerm*pointerColorBackground: black | |||||
XTerm*cursorColor: white | |||||
XTerm*cursorBlink: true | |||||
!! Selecting Text ======================================================== | |||||
! Only select text | |||||
XTerm*highlightSelection: true | |||||
! Remove trailing spaces | |||||
XTerm*trimSelection: true | |||||
!! Scrolling ======================================================== | |||||
! Use: Shift-Pageup / Shift-Pagedown to scroll or mousewheel | |||||
! Lines of output that you can scroll back over | |||||
XTerm*saveLines: 16384 | |||||
! Turn the scrollbar on, and put it on the right | |||||
! XTerm.vt100.scrollBar: true | |||||
! XTerm.vt100.scrollbar.width: 8 | |||||
! xterm*scrollBar: true | |||||
! xterm*rightScrollBar: true | |||||
! Do not scroll when there is new input e.g. tail -f /var/syslog | |||||
XTerm*scrollTtyOutput: false | |||||
!! Keybinding ======================================================== | |||||
! http://blog.rot13.org/2010/03/change-font-size-in-xterm-using-keyboard.html | |||||
! - change fontsize on the fly (ctrl+plus = increase ; ctrl+minus = decrease, ctrl+0 = default) | |||||
! - copy/paste hotkey (ctrl+shift+c = copy ; ctrl+shift+v = paste) | |||||
! - open url (clickable links) | |||||
! 1) double click to highlight the full url | |||||
! 2) Shift + click it to open it | |||||
XTerm.vt100.translations: #override \n\ | |||||
Ctrl <Key> minus: smaller-vt-font() \n\ | |||||
Ctrl <Key> plus: larger-vt-font() \n\ | |||||
Ctrl <Key> 0: set-vt-font(d) \n\ | |||||
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\ | |||||
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\ | |||||
Shift <Btn1Up>: exec-formatted("xdg-open '%t'", PRIMARY) \n\ | |||||
<Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0) \n\ | |||||
<Btn2Up>: insert-selection(PRIMARY) | |||||
! enable copy/paste hotkey to work (shift+insert = paste ; mouse highlight = copy) | |||||
XTerm*selectToClipboard: true | |||||
! disable fullscreen hotkey alt+enter (hotkey conflicts with weechat, midnight commander ...etc) | |||||
XTerm*fullscreen: never | |||||
! enable alt key to work | |||||
XTerm*metaSendsEscape: true | |||||
! Fix the backspace key (for Emacs) | |||||
XTerm.vt100.backarrowKey: false | |||||
XTerm.ttyModes: erase ^? | |||||
! double-click to select whole URLs :D | |||||
! https://scarygliders.net/2011/12/01/customize-xterm-the-original-and-best-terminal/ | |||||
XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48 | |||||
! Tips: Left and right selection (text selection using left button for beginning and right button for end) | |||||
! Tips: Triple Click ( 1 click = nothing, 2 click = select word, 3 click = select line ) | |||||
! | |||||
! XTerm*on3Clicks: regex [[:alpha:]]+://([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+ | |||||
XTerm*on3Clicks: regex ([[:alpha:]]+://)?([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+ | |||||
! <BtnUp>:select-end(SELECT, CUT_BUFFER0) \n\ | |||||
! Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \n\ | |||||
! <Btn4Down>:scroll-back(5,line,m) \n\ | |||||
! Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \n\ | |||||
! <Btn5Down>:scroll-forw(5,line,m) \n\ | |||||
! Ctrl <Key>M: maximize() \n\ | |||||
! Ctrl <Key>R: restore() \n\ | |||||
! Shift <KeyPress> Prior:scroll-back(1,halfpage) \n\ | |||||
! Shift <KeyPress> Next:scroll-forw(1,halfpage) \n\ | |||||
! Shift <KeyPress> Select:select-cursor-start() \ | |||||
! select-cursor-end(SELECT, CUT_BUFFER0) \n\ | |||||
! Shift <KeyPress> Insert:insert-selection(SELECT, CUT_BUFFER0) \n\ | |||||
! Alt <Key>Return:fullscreen() \n\ | |||||
! <KeyRelease> Scroll_Lock:scroll-lock() \n\ | |||||
! Shift~Ctrl <KeyPress> KP_Add:larger-vt-font() \n\ | |||||
! Shift Ctrl <KeyPress> KP_Add:smaller-vt-font() \n\ | |||||
! Shift <KeyPress> KP_Subtract:smaller-vt-font() \n\ | |||||
! ~Meta <KeyPress>:insert-seven-bit() \n\ | |||||
! Meta <KeyPress>:insert-eight-bit() \n\ | |||||
! !Ctrl <Btn1Down>:popup-menu(mainMenu) \n\ | |||||
! ~Meta <Btn1Down>:select-start() \n\ | |||||
! ~Meta <Btn1Motion>:select-extend() \n\ | |||||
! !Ctrl <Btn2Down>:popup-menu(vtMenu) \n\ | |||||
! ~Ctrl ~Meta <Btn2Down>:ignore() \n\ | |||||
! Meta <Btn2Down>:clear-saved-lines() \n\ | |||||
! ~Ctrl ~Meta <Btn2Up>:insert-selection(SELECT, CUT_BUFFER0) \n\ | |||||
! !Ctrl <Btn3Down>:popup-menu(fontMenu) \n\ | |||||
! ~Ctrl ~Meta <Btn3Down>:start-extend() \n\ | |||||
! ~Meta <Btn3Motion>:select-extend() \n\ | |||||
! Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \n\ | |||||
! <Btn4Down>:scroll-back(5,line,m) \n\ | |||||
! Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \n\ | |||||
! <BtnUp>:select-end(SELECT, CUT_BUFFER0) \n\ | |||||
! <BtnDown>:ignore() | |||||
! http://forums.fedoraforum.org/showpost.php?p=1538211&postcount=3 | |||||
! https://stackoverflow.com/a/29551654 | |||||
! XTerm*title: xterm | |||||
! XTerm*background: #011622 | |||||
! XTerm*foreground: WhiteSmoke | |||||
! XTerm*pointerColor: white | |||||
! XTerm*pointerColorBackground: #011622 | |||||
! XTerm*cursorColor: #EBD27D | |||||
! XTerm*internalBorder: 3 | |||||
! XTerm*loginShell: true | |||||
! XTerm*scrollBar: false | |||||
! XTerm*scrollKey: true | |||||
! XTerm*saveLines: 1250 | |||||
! XTerm*multiClickTime: 250 | |||||
! XTerm*Geometry: 140x50+110+60 | |||||
! XTerm*renderFont: true | |||||
! set fontsize | |||||
! xterm*font: *-fixed-*-*-*-24-* | |||||
! set font | |||||
! xterm*faceName: Monospace | |||||
! }}} | |||||
!#################### | |||||
!###### Themes ###### | |||||
!#################### | |||||
! http://web.archive.org/web/20090130061234/http://phraktured.net/terminal-colors/ | |||||
!-------- Theme: Solarized {{{ | |||||
! !------------------------------------------------------ | |||||
! | |||||
! !!Source http://github.com/altercation/solarized | |||||
! | |||||
! *background: #002b36 | |||||
! *foreground: #657b83 | |||||
! !!*fading: 40 | |||||
! *fadeColor: #002b36 | |||||
! *cursorColor: #93a1a1 | |||||
! *pointerColorBackground: #586e75 | |||||
! *pointerColorForeground: #93a1a1 | |||||
! | |||||
! !! black dark/light | |||||
! *color0: #073642 | |||||
! *color8: #002b36 | |||||
! | |||||
! !! red dark/light | |||||
! *color1: #dc322f | |||||
! *color9: #cb4b16 | |||||
! | |||||
! !! green dark/light | |||||
! *color2: #859900 | |||||
! *color10: #586e75 | |||||
! | |||||
! !! yellow dark/light | |||||
! *color3: #b58900 | |||||
! *color11: #657b83 | |||||
! | |||||
! !! blue dark/light | |||||
! *color4: #268bd2 | |||||
! *color12: #839496 | |||||
! | |||||
! !! magenta dark/light | |||||
! *color5: #d33682 | |||||
! *color13: #6c71c4 | |||||
! | |||||
! !! cyan dark/light | |||||
! *color6: #2aa198 | |||||
! *color14: #93a1a1 | |||||
! | |||||
! !! white dark/light | |||||
! *color7: #eee8d5 | |||||
! *color15: #fdf6e3 | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Rezza {{{ | |||||
! !------------------------------------------------------ | |||||
! !!colors ripped from rezza: http://metawire.org/~rezza/index.php | |||||
! *foreground: rgb:dd/dd/dd | |||||
! *background: rgb:22/22/22 | |||||
! !black | |||||
! *color0: rgb:19/19/19 | |||||
! *color8: rgb:25/25/25 | |||||
! !red | |||||
! *color1: rgb:80/32/32 | |||||
! *color9: rgb:98/2b/2b | |||||
! !green | |||||
! *color2: rgb:5b/76/2f | |||||
! *color10: rgb:89/b8/3f | |||||
! !brown/yellow | |||||
! *color3: rgb:aa/99/43 | |||||
! *color11: rgb:ef/ef/60 | |||||
! !blue | |||||
! *color4: rgb:32/4c/80 | |||||
! *color12: rgb:2b/4f/98 | |||||
! !magenta | |||||
! *color5: rgb:70/6c/9a | |||||
! *color13: rgb:82/6a/b1 | |||||
! !cyan | |||||
! *color6: rgb:92/b1/9e | |||||
! *color14: rgb:a1/cd/cd | |||||
! !white | |||||
! *color7: rgb:ff/ff/ff | |||||
! *color15: rgb:dd/dd/dd | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: One {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme One | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:a8/a8/a8 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:a8/00/00 | |||||
! *color2: rgb:00/a8/00 | |||||
! *color3: rgb:a8/54/00 | |||||
! *color4: rgb:00/00/a8 | |||||
! *color5: rgb:a8/00/a8 | |||||
! *color6: rgb:00/a8/a8 | |||||
! *color7: rgb:a8/a8/a8 | |||||
! *color8: rgb:54/50/54 | |||||
! *color9: rgb:f8/54/50 | |||||
! *color10: rgb:50/fc/50 | |||||
! *color11: rgb:f8/fc/50 | |||||
! *color12: rgb:50/54/f8 | |||||
! *color13: rgb:f8/54/f8 | |||||
! *color14: rgb:50/fc/f8 | |||||
! *color15: rgb:f8/fc/f8 | |||||
! ! }}} | |||||
! !-------- Theme: Two {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Two | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:7f/7f/7f | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:9e/18/28 | |||||
! *color2: rgb:ae/ce/92 | |||||
! *color3: rgb:96/8a/38 | |||||
! *color4: rgb:41/41/71 | |||||
! *color5: rgb:96/3c/59 | |||||
! *color6: rgb:41/81/79 | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:cf/61/71 | |||||
! *color10: rgb:c5/f7/79 | |||||
! *color11: rgb:ff/f7/96 | |||||
! *color12: rgb:41/86/be | |||||
! *color13: rgb:cf/9e/be | |||||
! *color14: rgb:71/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! ! | |||||
! ! | |||||
! ! }}} | |||||
! !-------- Theme: Three {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Three | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:cf/cf/cf | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:e0/10/10 | |||||
! *color2: rgb:20/ad/20 | |||||
! *color3: rgb:d4/c2/4f | |||||
! *color4: rgb:23/1b/b8 | |||||
! *color5: rgb:9c/38/85 | |||||
! *color6: rgb:1d/bd/b8 | |||||
! *color7: rgb:fe/fe/fe | |||||
! *color8: rgb:6a/6a/6a | |||||
! *color9: rgb:e8/3a/3d | |||||
! *color10: rgb:35/e9/56 | |||||
! *color11: rgb:ff/ff/2f | |||||
! *color12: rgb:3a/53/f0 | |||||
! *color13: rgb:e6/28/ba | |||||
! *color14: rgb:1c/f5/f5 | |||||
! *color15: rgb:ff/ff/ff | |||||
! ! }}} | |||||
! !-------- Theme: Four {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Four | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:ff/ff/ff | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:d3/62/65 | |||||
! *color2: rgb:ae/ce/91 | |||||
! *color3: rgb:e7/e1/8c | |||||
! *color4: rgb:7a/7a/b0 | |||||
! *color5: rgb:96/3c/59 | |||||
! *color6: rgb:41/81/79 | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:ef/81/71 | |||||
! *color10: rgb:e5/f7/79 | |||||
! *color11: rgb:ff/f7/96 | |||||
! *color12: rgb:41/86/be | |||||
! *color13: rgb:ef/9e/be | |||||
! *color14: rgb:71/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Five {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Five | |||||
! *background: rgb:ad/aa/ad | |||||
! *foreground: rgb:00/00/00 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:64/0f/19 | |||||
! *color2: rgb:63/79/6b | |||||
! *color3: rgb:ad/71/42 | |||||
! *color4: rgb:4f/4f/89 | |||||
! *color5: rgb:b2/5c/7c | |||||
! *color6: rgb:52/75/6b | |||||
! *color7: rgb:ad/aa/ad | |||||
! *color8: rgb:52/55/52 | |||||
! *color9: rgb:a5/61/63 | |||||
! *color10: rgb:ce/c2/63 | |||||
! *color11: rgb:73/ae/70 | |||||
! *color12: rgb:36/70/9f | |||||
! *color13: rgb:aa/82/9c | |||||
! *color14: rgb:51/89/89 | |||||
! *color15: rgb:ff/ff/ef | |||||
! ! }}} | |||||
! !-------- Theme: Six {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Six | |||||
! *background: rgb:be/be/be | |||||
! *foreground: rgb:21/21/21 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:bf/72/76 | |||||
! *color2: rgb:86/af/80 | |||||
! *color3: rgb:96/8a/38 | |||||
! *color4: rgb:36/73/b5 | |||||
! *color5: rgb:9a/70/b2 | |||||
! *color6: rgb:7a/be/cc | |||||
! *color7: rgb:db/db/db | |||||
! *color8: rgb:66/92/af | |||||
! *color9: rgb:e5/50/5f | |||||
! *color10: rgb:87/bc/87 | |||||
! *color11: rgb:e0/d9/5c | |||||
! *color12: rgb:1b/85/d6 | |||||
! *color13: rgb:ad/73/ba | |||||
! *color14: rgb:33/8e/aa | |||||
! *color15: rgb:f4/f4/f4 | |||||
! ! }}} | |||||
! !-------- Theme: Seven {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Seven | |||||
! *background: rgb:67/67/67 | |||||
! *foreground: rgb:ff/ff/ff | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:bf/46/46 | |||||
! *color2: rgb:67/b2/5f | |||||
! *color3: rgb:cf/c4/4e | |||||
! *color4: rgb:51/60/83 | |||||
! *color5: rgb:ca/6e/ff | |||||
! *color6: rgb:92/b2/f8 | |||||
! *color7: rgb:d5/d5/d5 | |||||
! *color8: rgb:00/00/00 | |||||
! *color9: rgb:f4/8a/8a | |||||
! *color10: rgb:a5/d7/9f | |||||
! *color11: rgb:e1/da/84 | |||||
! *color12: rgb:a2/bb/ff | |||||
! *color13: rgb:e2/b0/ff | |||||
! *color14: rgb:ba/cd/f8 | |||||
! *color15: rgb:d5/d5/d5 | |||||
! ! }}} | |||||
! !-------- Theme: Eight {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Eight | |||||
! *background: rgb:10/10/10 | |||||
! *foreground: rgb:d3/d3/d3 | |||||
! *color0: rgb:10/10/10 | |||||
! *color1: rgb:cd/5c/5c | |||||
! *color2: rgb:2e/8b/57 | |||||
! *color3: rgb:f0/e6/8c | |||||
! *color4: rgb:b0/c4/de | |||||
! *color5: rgb:ba/55/d3 | |||||
! *color6: rgb:46/82/b4 | |||||
! *color7: rgb:d3/d3/d3 | |||||
! *color8: rgb:4d/4d/4d | |||||
! *color9: rgb:ff/6a/6a | |||||
! *color10: rgb:8f/bc/8f | |||||
! *color11: rgb:ff/fa/cd | |||||
! *color12: rgb:1e/90/ff | |||||
! *color13: rgb:db/70/93 | |||||
! *color14: rgb:5f/9e/a0 | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Nine {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Nine | |||||
! *background: rgb:1a/1a/1a | |||||
! *foreground: rgb:d6/d6/d6 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:9e/18/28 | |||||
! *color2: rgb:00/88/00 | |||||
! *color3: rgb:96/8a/38 | |||||
! *color4: rgb:41/41/71 | |||||
! *color5: rgb:96/3c/59 | |||||
! *color6: rgb:41/81/79 | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:cf/61/71 | |||||
! *color10 rgb:7c/bc/8c | |||||
! *color11 rgb:ff/f7/96 | |||||
! *color12 rgb:41/86/be | |||||
! *color13 rgb:cf/9e/be | |||||
! *color14 rgb:71/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Ten {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Ten | |||||
! *background: rgb:1a/1a/1a | |||||
! *foreground: rgb:d6/d6/d6 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:98/56/5e | |||||
! *color2: rgb:66/82/5d | |||||
! *color3: rgb:96/91/76 | |||||
! *color4: rgb:4d/65/85 | |||||
! *color5: rgb:96/73/95 | |||||
! *color6: rgb:5f/7f/7b | |||||
! *color7: rgb:b3/b3/b3 | |||||
! *color8: rgb:73/73/73 | |||||
! *color9: rgb:cf/a3/a9 | |||||
! *color10: rgb:ca/f7/bb | |||||
! *color11: rgb:ff/f8/bc | |||||
! *color12: rgb:83/a3/be | |||||
! *color13: rgb:bb/a9/cf | |||||
! *color14: rgb:96/cc/cc | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Eleven {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Eleven | |||||
! *background: rgb:33/33/33 | |||||
! *foreground: rgb:ff/ff/ff | |||||
! *color0: rgb:33/33/33 | |||||
! *color8: rgb:33/33/33 | |||||
! *color1: rgb:ff/a0/a0 | |||||
! *color9: rgb:ff/a0/a0 | |||||
! *color2: rgb:98/fb/98 | |||||
! *color10: rgb:9a/cd/32 | |||||
! *color3: rgb:f0/e6/8c | |||||
! *color11: rgb:f0/e6/8c | |||||
! *color4: rgb:87/ce/eb | |||||
! *color12: rgb:87/ce/eb | |||||
! *color5: rgb:ff/a0/a0 | |||||
! *color13: rgb:ff/a0/a0 | |||||
! *color6: rgb:87/ce/eb | |||||
! *color14: rgb:87/ce/eb | |||||
! *color7: rgb:ff/ff/ff | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twelve {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Twelve | |||||
! *foreground: rgb:ff/ff/ff | |||||
! *background: rgb:00/00/00 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:bf/72/76 | |||||
! *color2: rgb:86/af/80 | |||||
! *color3: rgb:96/8a/38 | |||||
! *color4: rgb:36/73/b5 | |||||
! *color5: rgb:9a/70/b2 | |||||
! *color6: rgb:7a/be/cc | |||||
! *color7: rgb:db/db/db | |||||
! *color8: rgb:66/92/af | |||||
! *color9: rgb:e5/50/5f | |||||
! *color10: rgb:87/bc/87 | |||||
! *color11: rgb:e0/d9/5c | |||||
! *color12: rgb:1b/85/d6 | |||||
! *color13: rgb:ad/73/ba | |||||
! *color14: rgb:33/8e/aa | |||||
! *color15: rgb:f4/f4/f4 | |||||
! | |||||
! | |||||
! ! }}} | |||||
!-------- Theme: Thirteen {{{ | |||||
!------------------------------------------------------ | |||||
!Theme Thirteen | |||||
*background: rgb:00/00/00 | |||||
*foreground: rgb:aa/aa/aa | |||||
*color0: rgb:00/00/00 | |||||
*color1: rgb:9e/18/28 | |||||
*color2: rgb:ae/ce/92 | |||||
*color3: rgb:96/8a/38 | |||||
*color4: rgb:41/41/71 | |||||
*color5: rgb:96/3c/59 | |||||
*color6: rgb:7f/9f/7f | |||||
*color7: rgb:be/be/be | |||||
*color8: rgb:66/66/66 | |||||
*color9: rgb:cf/61/71 | |||||
*color10: rgb:af/c5/af | |||||
*color11: rgb:f0/df/af | |||||
*color12: rgb:8e/9f/bc | |||||
*color13: rgb:dc/a3/a3 | |||||
*color14: rgb:95/c1/c5 | |||||
*color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! }}} | |||||
! !-------- Theme: Fourteen {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Fourteen | |||||
! *background: rgb:95/95/95 | |||||
! *foreground: rgb:00/00/00 | |||||
! *color0: rgb:7f/7f/7f | |||||
! *color1: rgb:cd/00/00 | |||||
! *color2: rgb:00/8b/00 | |||||
! *color3: rgb:ee/ee/00 | |||||
! *color4: rgb:00/00/cd | |||||
! *color5: rgb:cd/00/cd | |||||
! *color6: rgb:00/ee/ee | |||||
! *color7: rgb:fa/eb/d7 | |||||
! *color8: rgb:e5/e5/e5 | |||||
! *color9: rgb:80/00/00 | |||||
! *color10: rgb:00/50/20 | |||||
! *color11: rgb:99/55/00 | |||||
! *color12: rgb:00/40/80 | |||||
! *color13: rgb:44/33/00 | |||||
! *color14: rgb:30/60/80 | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Fifteen {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Fifteen | |||||
! *background: rgb:1d/2b/3a | |||||
! *foreground: rgb:be/be/be | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:d3/62/65 | |||||
! *color2: rgb:ae/ce/91 | |||||
! *color3: rgb:e7/e1/8c | |||||
! *color4: rgb:7a/7a/b0 | |||||
! *color5: rgb:96/3c/59 | |||||
! *color6: rgb:41/81/79 | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:ef/81/71 | |||||
! *color10: rgb:e5/f7/79 | |||||
! *color11: rgb:ff/f7/99 | |||||
! *color12: rgb:41/86/be | |||||
! *color13: rgb:ef/9e/be | |||||
! *color14: rgb:71/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Sixteen {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Sixteen | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:be/be/be | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:9e/18/28 | |||||
! *color2: rgb:ae/ce/92 | |||||
! *color3: rgb:96/8a/38 | |||||
! *color4: rgb:41/41/71 | |||||
! *color5: rgb:96/3c/59 | |||||
! *color6: rgb:41/81/79 | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:cf/61/71 | |||||
! *color10: rgb:c5/f7/79 | |||||
! *color11: rgb:ff/f7/96 | |||||
! *color12: rgb:41/86/be | |||||
! *color13: rgb:cf/9e/be | |||||
! *color14: rgb:71/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Seventeen {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Seventeen | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:e5/e5/e5 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:ff/00/00 | |||||
! *color2: rgb:00/ff/00 | |||||
! *color3: rgb:ff/ff/00 | |||||
! *color4: rgb:00/00/ff | |||||
! *color5: rgb:ff/00/ff | |||||
! *color6: rgb:00/ff/ff | |||||
! *color7: rgb:ff/ff/ff | |||||
! *color8: rgb:ff/d3/9b | |||||
! *color9: rgb:ff/82/47 | |||||
! *color10: rgb:ff/82/ab | |||||
! *color11: rgb:87/ce/fa | |||||
! *color12: rgb:ff/ff/ff | |||||
! *color13: rgb:ff/ff/ff | |||||
! *color14: rgb:ff/ff/ff | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Eighteen {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Eighteen | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:9e/18/28 | |||||
! *color2: rgb:5c/b2/47 | |||||
! *color3: rgb:96/8a/38 | |||||
! *color4: rgb:41/61/a0 | |||||
! *color5: rgb:9b/76/8e | |||||
! *color6: rgb:41/91/89 | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:cf/61/71 | |||||
! *color10: rgb:c5/f7/79 | |||||
! *color11: rgb:ff/f7/96 | |||||
! *color12: rgb:41/86/be | |||||
! *color13: rgb:cf/9e/be | |||||
! *color14: rgb:71/be/be | |||||
! *color15: rgb:dd/dd/dd | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Nineteen {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Nineteen | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:b0/70/50 | |||||
! *color2: rgb:12/91/4e | |||||
! *color3: rgb:a0/a0/70 | |||||
! *color4: rgb:3e/45/81 | |||||
! *color5: rgb:a0/70/a0 | |||||
! *color6: rgb:70/a0/a0 | |||||
! *color7: rgb:a0/a0/a0 | |||||
! *color8: rgb:60/60/60 | |||||
! *color9: rgb:b0/70/50 | |||||
! *color10: rgb:12/91/4e | |||||
! *color11: rgb:c0/c0/90 | |||||
! *color12: rgb:3e/45/81 | |||||
! *color13: rgb:c0/90/c0 | |||||
! *color14: rgb:90/c0/c0 | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twenty {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Twenty | |||||
! *foreground: rgb:aa/aa/aa | |||||
! *background: rgb:00/00/00 | |||||
! *color0: rgb:30/34/30 | |||||
! *color1: rgb:bf/79/79 | |||||
! *color2: rgb:97/b2/6b | |||||
! *color3: rgb:cd/cd/c1 | |||||
! *color4: rgb:86/a2/be | |||||
! *color5: rgb:d9/b7/98 | |||||
! *color6: rgb:a1/b5/cd | |||||
! *color7: rgb:ff/ff/ff | |||||
! *color8: rgb:cd/b5/cd | |||||
! *color9: rgb:f4/a4/5f | |||||
! *color10: rgb:c5/f7/79 | |||||
! *color11: rgb:ff/ff/ef | |||||
! *color12: rgb:98/af/d9 | |||||
! *color13: rgb:d7/d9/98 | |||||
! *color14: rgb:a1/b5/cd | |||||
! *color15: rgb:de/de/de | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twenty-One {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Twenty-One | |||||
! *background: rgb:1a/1a/1a | |||||
! *foreground: rgb:aa/aa/aa | |||||
! *color0: rgb:00/00/00 | |||||
! *color8: rgb:66/66/66 | |||||
! *color1: rgb:9e/18/28 | |||||
! *color9: rgb:bc/57/66 | |||||
! *color2: rgb:00/88/00 | |||||
! *color10: rgb:61/a1/71 | |||||
! *color3: rgb:d2/bb/4b | |||||
! *color11: rgb:e7/db/52 | |||||
! *color4: rgb:41/41/71 | |||||
! *color12: rgb:50/85/af | |||||
! *color5: rgb:96/3c/59 | |||||
! *color13: rgb:a9/7a/99 | |||||
! *color6: rgb:41/81/79 | |||||
! *color14: rgb:6b/a4/a4 | |||||
! *color7: rgb:be/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twenty-Two {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Twenty-Two | |||||
! *background: rgb:00/00/00 | |||||
! *foreground: rgb:be/be/be | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:d3/62/65 | |||||
! *color2: rgb:ae/ce/91 | |||||
! *color3: rgb:e7/e1/8c | |||||
! *color4: rgb:7a/7a/b0 | |||||
! *color5: rgb:96/3c/59 | |||||
! *color6: rgb:7f/9f/7f | |||||
! *color7: rgb:be/be/be | |||||
! *color8: rgb:66/66/66 | |||||
! *color9: rgb:ef/81/71 | |||||
! *color10: rgb:e5/f7/79 | |||||
! *color11: rgb:f0/df/af | |||||
! *color12: rgb:8e/9f/bc | |||||
! *color13: rgb:ef/9e/be | |||||
! *color14: rgb:71/be/be | |||||
! *color15: rgb:ff/ff/ff | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twenty-Three {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Twenty-Three | |||||
! *background: rgb:0e/0e/0e | |||||
! *foreground: rgb:4a/d5/e1 | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:dc/74/d1 | |||||
! *color2: rgb:0e/b8/c7 | |||||
! *color3: rgb:df/e3/7e | |||||
! !*color4: ??? | |||||
! *color5: rgb:9e/88/f0 | |||||
! *color6: rgb:73/f7/ff | |||||
! *color7: rgb:e1/dd/dd | |||||
! *color8: rgb:8b/8f/93 | |||||
! *color9: rgb:dc/74/d1 | |||||
! *color10: rgb:0e/b8/c7 | |||||
! *color11: rgb:df/e3/7e | |||||
! *color13: rgb:9e/88/f0 | |||||
! *color14: rgb:73/f7/ff | |||||
! *color15: rgb:e1/dd/dd | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twenty-Four {{{ | |||||
! !------------------------------------------------------ | |||||
! !Theme Twenty-Four | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:cd/5c/5c | |||||
! *color2: rgb:8e/ae/71 | |||||
! *color3: rgb:d2/b4/8c | |||||
! *color4: rgb:5f/7b/8a | |||||
! *color5: rgb:cd/cd/b4 | |||||
! *color6: rgb:68/68/68 | |||||
! *color7: rgb:ff/ff/ff | |||||
! *color8: rgb:00/00/00 | |||||
! *color9: rgb:ee/63/63 | |||||
! *color10: rgb:95/c7/49 | |||||
! *color11: rgb:cd/cd/c1 | |||||
! *color12: rgb:6b/7b/8a | |||||
! *color13: rgb:cd/cd/b4 | |||||
! *color14: rgb:77/87/98 | |||||
! *color15: rgb:ca/ca/ca | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Twenty-Five {{{ | |||||
! !------------------------------------------------------ | |||||
! ! Theme Twenty-Five | |||||
! *color0: rgb:00/00/00 | |||||
! *color1: rgb:80/00/00 | |||||
! *color2: rgb:00/80/00 | |||||
! *color3: rgb:d0/d0/90 | |||||
! *color4: rgb:00/00/80 | |||||
! *color5: rgb:80/00/80 | |||||
! *color6: rgb:a6/ca/f0 | |||||
! *color7: rgb:d0/d0/d0 | |||||
! *color8: rgb:b0/b0/b0 | |||||
! *color9: rgb:f0/80/60 | |||||
! *color10: rgb:60/f0/80 | |||||
! *color11: rgb:e0/c0/60 | |||||
! *color12: rgb:80/c0/e0 | |||||
! *color13: rgb:f0/c0/f0 | |||||
! *color14: rgb:c0/d8/f8 | |||||
! *color15: rgb:e0/e0/e0 | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Tango {{{ | |||||
! !------------------------------------------------------ | |||||
! !tango color scheme | |||||
! ! source: https://github.com/lenage/dotfiles/blob/master/.Xresources | |||||
! xterm*color0: #1e1e1e | |||||
! xterm*color1: #cc0000 | |||||
! xterm*color2: #4e9a06 | |||||
! xterm*color3: #c4a000 | |||||
! xterm*color4: #3465a4 | |||||
! xterm*color5: #75507b | |||||
! xterm*color6: #0b939b | |||||
! xterm*color7: #d3d7cf | |||||
! xterm*color8: #555753 | |||||
! xterm*color9: #ef2929 | |||||
! xterm*color10: #8ae234 | |||||
! xterm*color11: #fce94f | |||||
! xterm*color12: #729fcf | |||||
! xterm*color13: #ad7fa8 | |||||
! xterm*color14: #00f5e9 | |||||
! xterm*color15: #eeeeec | |||||
! | |||||
! | |||||
! ! }}} | |||||
! !-------- Theme: Snazzy Color {{{ | |||||
! !------------------------------------------------------ | |||||
! ! https://github.com/olstenlarck/urxvt-xterm-snazzy/blob/7c34009a19ade65271e26ef065c678b0fa2abd0d/.Xdefaults | |||||
! | |||||
! *background: #282a36 | |||||
! *foreground: #eff0eb | |||||
! | |||||
! ! original #86a2b0 | |||||
! *colorUL: #eff0eb | |||||
! *underlineColor: #eff0eb | |||||
! | |||||
! ! black | |||||
! *color0 : #2E3436 | |||||
! *color8 : #686868 | |||||
! | |||||
! ! red | |||||
! *color1 : #ff5c57 | |||||
! *color9 : #ff5c57 | |||||
! | |||||
! ! green | |||||
! *color2 : #5af78e | |||||
! *color10 : #5af78e | |||||
! | |||||
! ! yellow | |||||
! *color3 : #f3f99d | |||||
! *color11 : #f3f99d | |||||
! | |||||
! ! blue | |||||
! *color4 : #57c7ff | |||||
! *color12 : #57c7ff | |||||
! | |||||
! ! magenta | |||||
! *color5 : #ff6ac1 | |||||
! *color13 : #ff6ac1 | |||||
! | |||||
! ! cyan | |||||
! *color6 : #9aedfe | |||||
! *color14 : #9aedfe | |||||
! | |||||
! ! white | |||||
! *color7 : #f1f1f0 | |||||
! *color15 : #eff0eb | |||||
! | |||||
! | |||||
! ! }}} |