This commit is contained in:
Pavel Korytov 2020-07-16 18:49:21 +03:00
parent 281373a5f2
commit f8e1ccfd17
111 changed files with 5451 additions and 29 deletions

8
.gitmodules vendored
View file

@ -1,12 +1,12 @@
[submodule "vifm-colors"]
path = vifm/colors
path = config/vifm/colors
url = https://github.com/vifm/vifm-colors.git
[submodule "vifm/colors"]
path = vifm/colors
path = config/vifm/colors
url = https://github.com/vifm/vifm-colors.git
[submodule "vifm/vifm_devicons"]
path = vifm/vifm_devicons
path = config/vifm/vifm_devicons
url = https://github.com/ryanoasis/vim-devicons.git
[submodule "qutebrowser/dracula"]
path = qutebrowser/dracula
path = config/qutebrowser/dracula
url = https://github.com/dracula/qutebrowser-dracula-theme.git

View file

@ -1 +0,0 @@
sleep 10 && /home/pavel/Programs/activitywatch/aw-qt

View file

@ -1,3 +0,0 @@
#!/bin/bash
terminator -e "source /home/pavel/anaconda3/bin/activate ermaket && nvim ${1}"

2
bin/activity_watch Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
/home/pavel/Programs/activitywatch/aw-qt

90
bin/i3blocks/bandwidth Executable file
View file

@ -0,0 +1,90 @@
#!/bin/bash
# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>
# Copyright (C) 2014 kaueraal
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Use the provided interface, otherwise the device used for the default route.
if [[ -n $BLOCK_INSTANCE ]]; then
INTERFACE=$BLOCK_INSTANCE
else
INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')
fi
# Issue #36 compliant.
if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ]
then
echo "$INTERFACE down"
echo "$INTERFACE down"
echo "#FF0000"
exit 0
fi
# path to store the old results in
path="/dev/shm/$(basename $0)-${INTERFACE}"
# grabbing data for each adapter.
read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes"
read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes"
# get time
time=$(date +%s)
# write current data if file does not exist. Do not exit, this will cause
# problems if this file is sourced instead of executed as another process.
if ! [[ -f "${path}" ]]; then
echo "${time} ${rx} ${tx}" > "${path}"
chmod 0666 "${path}"
fi
# read previous state and update data storage
read old < "${path}"
echo "${time} ${rx} ${tx}" > "${path}"
# parse old data and calc time passed
old=(${old//;/ })
time_diff=$(( $time - ${old[0]} ))
# sanity check: has a positive amount of time passed
[[ "${time_diff}" -gt 0 ]] || exit
# calc bytes transferred, and their rate in byte/s
rx_diff=$(( $rx - ${old[1]} ))
tx_diff=$(( $tx - ${old[2]} ))
rx_rate=$(( $rx_diff / $time_diff ))
tx_rate=$(( $tx_diff / $time_diff ))
# shift by 10 bytes to get KiB/s. If the value is larger than
# 1024^2 = 1048576, then display MiB/s instead
# incoming
echo -n "IN "
rx_kib=$(( $rx_rate >> 10 ))
if [[ "$rx_rate" -gt 1048576 ]]; then
printf '%sM' "`echo "scale=1; $rx_kib / 1024" | bc`"
else
echo -n "${rx_kib}K"
fi
echo -n " "
# outgoing
echo -n "OUT "
tx_kib=$(( $tx_rate >> 10 ))
if [[ "$tx_rate" -gt 1048576 ]]; then
printf '%sM' "`echo "scale=1; $tx_kib / 1024" | bc`"
else
echo -n "${tx_kib}K"
fi

104
bin/i3blocks/bandwidth3 Executable file
View file

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

74
bin/i3blocks/battery Executable file
View file

@ -0,0 +1,74 @@
#!/usr/bin/perl
#
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
#
# Licensed under the terms of the GNU GPL v3, or any later version.
#
# This script is meant to use with i3blocks. It parses the output of the "acpi"
# command (often provided by a package of the same name) to read the status of
# the battery, and eventually its remaining time (to full charge or discharge).
#
# The color will gradually change for a percentage below 85%, and the urgency
# (exit code 33) is set if there is less that 5% remaining.
use strict;
use warnings;
use utf8;
my $acpi;
my $status;
my $percent;
my $full_text;
my $short_text;
my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
# read the first line of the "acpi" command output
open (ACPI, "acpi -b | grep 'Battery $bat_number' |") or die;
$acpi = <ACPI>;
close(ACPI);
# fail on unexpected output
if ($acpi !~ /: (\w+), (\d+)%/) {
die "$acpi\n";
}
$status = $1;
$percent = $2;
$full_text = "$percent%";
if ($status eq 'Discharging') {
$full_text .= ' DIS';
} elsif ($status eq 'Charging') {
$full_text .= ' CHR';
}
$short_text = $full_text;
if ($acpi =~ /(\d\d:\d\d):/) {
$full_text .= " ($1)";
}
# print text
print "$full_text\n";
print "$short_text\n";
# consider color and urgent flag only on discharge
if ($status eq 'Discharging') {
if ($percent < 20) {
print "#FF0000\n";
} elsif ($percent < 40) {
print "#FFAE00\n";
} elsif ($percent < 60) {
print "#FFF600\n";
} elsif ($percent < 85) {
print "#A8FF00\n";
}
if ($percent < 5) {
exit(33);
}
}
exit(0);

55
bin/i3blocks/cpu_usage Executable file
View file

@ -0,0 +1,55 @@
#!/usr/bin/perl
#
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
#
# Licensed under the terms of the GNU GPL v3, or any later version.
use strict;
use warnings;
use utf8;
use Getopt::Long;
# default values
my $t_warn = 50;
my $t_crit = 80;
my $cpu_usage = -1;
sub help {
print "Usage: cpu_usage [-w <warning>] [-c <critical>]\n";
print "-w <percent>: warning threshold to become yellow\n";
print "-c <percent>: critical threshold to become red\n";
exit 0;
}
GetOptions("help|h" => \&help,
"w=i" => \$t_warn,
"c=i" => \$t_crit);
# Get CPU usage
$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
open (MPSTAT, 'mpstat 1 1 |') or die;
while (<MPSTAT>) {
if (/^Average.*\s+(\d+\.\d+)/) {
$cpu_usage = 100 - $1; # 100% - %idle
last;
}
}
close(MPSTAT);
$cpu_usage eq -1 and die 'Can\'t find CPU information';
# Print short_text, full_text
printf "%.2f%%\n", $cpu_usage;
printf "%.2f%%\n", $cpu_usage;
# Print color, if needed
if ($cpu_usage >= $t_crit) {
print "#FF0000\n";
exit 33;
} elsif ($cpu_usage >= $t_warn) {
print "#FFFC00\n";
}
exit 0;

41
bin/i3blocks/disk Executable file
View file

@ -0,0 +1,41 @@
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
DIR="${BLOCK_INSTANCE:-$HOME}"
ALERT_LOW="${1:-10}" # color will turn red under this value (default: 10%)
df -h -P -l "$DIR" | awk -v alert_low=$ALERT_LOW '
/\/.*/ {
# full text
print $4
# short text
print $4
use=$5
# no need to continue parsing
exit 0
}
END {
gsub(/%$/,"",use)
if (100 - use < alert_low) {
# color
print "#FF0000"
}
}
'

61
bin/i3blocks/iface Executable file
View file

@ -0,0 +1,61 @@
#!/bin/bash
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------
# Use the provided interface, otherwise the device used for the default route.
if [[ -n $BLOCK_INSTANCE ]]; then
IF=$BLOCK_INSTANCE
else
IF=$(ip route | awk '/^default/ { print $5 ; exit }')
fi
#------------------------------------------------------------------------
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
# connection (think desktop), the corresponding block should not be displayed.
[[ ! -d /sys/class/net/${IF} ]] && exit
#------------------------------------------------------------------------
if [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
echo down # full text
echo down # short text
echo \#FF0000 # color
exit
fi
case $1 in
-4)
AF=inet ;;
-6)
AF=inet6 ;;
*)
AF=inet6? ;;
esac
# if no interface is found, use the first device with a global scope
IPADDR=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$1 and exit")
case $BLOCK_BUTTON in
3) echo -n "$IPADDR" | xclip -q -se c ;;
esac
#------------------------------------------------------------------------
echo "$IPADDR" # full text
echo "$IPADDR" # short text

70
bin/i3blocks/keyindicator Executable file
View file

@ -0,0 +1,70 @@
#!/usr/bin/perl
#
# Copyright 2014 Marcelo Cerri <mhcerri at gmail dot com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use utf8;
use Getopt::Long;
use File::Basename;
# Default values
my $indicator = $ENV{BLOCK_INSTANCE} || "CAPS";
my $color_on = "#00FF00";
my $color_off = "#222222";
sub help {
my $program = basename($0);
printf "Usage: %s [-c <color on>] [-C <color off>]\n", $program;
printf " -c <color on>: hex color to use when indicator is on\n";
printf " -C <color off>: hex color to use when indicator is off\n";
printf "\n";
printf "Note: environment variable \$BLOCK_INSTANCE should be one of:\n";
printf " CAPS, NUM (default is CAPS).\n";
exit 0;
}
Getopt::Long::config qw(no_ignore_case);
GetOptions("help|h" => \&help,
"c=s" => \$color_on,
"C=s" => \$color_off) or exit 1;
# Key mapping
my %indicators = (
CAPS => 0x00000001,
NUM => 0x00000002,
);
# Retrieve key flags
my $mask = 0;
open(XSET, "xset -q |") or die;
while (<XSET>) {
if (/LED mask:\s*([0-9]+)/) {
$mask = $1;
last;
}
}
close(XSET);
# Output
printf "%s\n", $indicator;
printf "%s\n", $indicator;
if (($indicators{$indicator} || 0) & $mask) {
printf "%s\n", $color_on;
} else {
printf "%s\n", $color_off;
}
exit 0

34
bin/i3blocks/load_average Executable file
View file

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

76
bin/i3blocks/mediaplayer Executable file
View file

@ -0,0 +1,76 @@
#!/usr/bin/perl
# Copyright (C) 2014 Tony Crisci <tony@dubstepdish.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Requires playerctl binary to be in your path (except cmus)
# See: https://github.com/acrisci/playerctl
# Set instance=NAME in the i3blocks configuration to specify a music player
# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your
# DBus session).
use Env qw(BLOCK_INSTANCE);
my @metadata = ();
my $player_arg = "";
if ($BLOCK_INSTANCE) {
$player_arg = "--player='$BLOCK_INSTANCE'";
}
if ($ENV{'BLOCK_BUTTON'} == 1) {
system("playerctl $player_arg previous");
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
system("playerctl $player_arg play-pause");
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
system("playerctl $player_arg next");
}
if ($player_arg eq '' or $player_arg =~ /cmus$/) {
# try cmus first
my @cmus = split /^/, qx(cmus-remote -Q);
if ($? == 0) {
foreach my $line (@cmus) {
my @data = split /\s/, $line;
if (shift @data eq 'tag') {
my $key = shift @data;
my $value = join ' ', @data;
@metadata[0] = $value if $key eq 'artist';
@metadata[1] = $value if $key eq 'title';
}
}
if (@metadata) {
# metadata found so we are done
print(join ' - ', @metadata);
exit 0;
}
}
# if cmus was given, we are done
exit 0 unless $player_arg eq '';
}
my $artist = qx(playerctl $player_arg metadata artist);
# exit status will be nonzero when playerctl cannot find your player
exit(0) if $?;
push(@metadata, $artist) if $artist;
my $title = qx(playerctl $player_arg metadata title);
exit(0) if $?;
push(@metadata, $title) if $title;
print(join(" - ", @metadata)) if @metadata;

49
bin/i3blocks/memory Executable file
View file

@ -0,0 +1,49 @@
#!/bin/sh
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
TYPE="${BLOCK_INSTANCE:-mem}"
awk -v type=$TYPE '
/^MemTotal:/ {
mem_total=$2
}
/^MemFree:/ {
mem_free=$2
}
/^Buffers:/ {
mem_free+=$2
}
/^Cached:/ {
mem_free+=$2
}
/^SwapTotal:/ {
swap_total=$2
}
/^SwapFree:/ {
swap_free=$2
}
END {
# full text
if (type == "swap")
printf("%.1fG\n", (swap_total-swap_free)/1024/1024)
else
printf("%.1fG\n", mem_free/1024/1024)
# TODO: short text
# TODO: color (if less than X%)
}
' /proc/meminfo

149
bin/i3blocks/openvpn Executable file
View file

@ -0,0 +1,149 @@
#!/usr/bin/perl
# Made by Pierre Mavro/Deimosfr <deimos@deimos.fr>
# Licensed under the terms of the GNU GPL v3, or any later version.
# Version: 0.2
# Usage:
# 1. The configuration name of OpenVPN should be familiar for you (home,work...)
# 2. The device name in your configuration file should be fully named (tun0,tap1...not only tun or tap)
# 3. When you launch one or multiple OpenVPN connexion, be sure the PID file is written in the correct folder (ex: --writepid /run/openvpn/home.pid)
use strict;
use warnings;
use utf8;
use Getopt::Long;
my $openvpn_enabled='/dev/shm/openvpn_i3blocks_enabled';
my $openvpn_disabled='/dev/shm/openvpn_i3blocks_disabled';
# Print output
sub print_output {
my $ref_pid_files = shift;
my @pid_files = @$ref_pid_files;
my $change=0;
# Total pid files
my $total_pid = @pid_files;
if ($total_pid == 0) {
print "VPN: down\n"x2;
# Delete OpenVPN i3blocks temp files
if (-f $openvpn_enabled) {
unlink $openvpn_enabled or die "Can't delete $openvpn_enabled\n";
# Colorize if VPN has just went down
print '#FF0000\n';
}
unless (-f $openvpn_disabled) {
open(my $shm, '>', $openvpn_disabled) or die "Can't write $openvpn_disabled\n";
}
exit(0);
}
# Check if interface device is present
my $vpn_found=0;
my $pid;
my $cmd_line;
my @config_name;
my @config_path;
my $interface;
my $current_config_path;
my $current_config_name;
foreach (@pid_files) {
# Get current PID
$pid=0;
open(PID, '<', $_);
while(<PID>) {
chomp $_;
$pid = $_;
}
close(PID);
# Check if PID has been found
if ($pid ==0) {
print "Can't get PID $_: $!\n";
}
# Check if PID is still alive
$cmd_line='/proc/'.$pid.'/cmdline';
if (-f $cmd_line) {
# Get config name
open(CMD_LINE, '<', $cmd_line);
while(<CMD_LINE>) {
chomp $_;
if ($_ =~ /--config\s*(.*\.conf)/) {
# Get interface from config file
$current_config_path = $1;
# Remove unwanted escape chars
$current_config_path =~ s/\x{00}//g;
$interface = 'null';
# Get configuration name
if ($current_config_path =~ /(\w+).conf/) {
$current_config_name=$1;
} else {
$current_config_name='unknow';
}
# Get OpenVPN interface device name
open(CONFIG, '<', $current_config_path) or die "Can't read config file '$current_config_path': $!\n";
while(<CONFIG>) {
chomp $_;
if ($_ =~ /dev\s+(\w+)/) {
$interface=$1;
last;
}
}
close(CONFIG);
# check if interface exist
unless ($interface eq 'null') {
if (-d "/sys/class/net/$interface") {
push @config_name, $current_config_name;
$vpn_found=1;
# Write enabled file
unless (-f $openvpn_enabled) {
open(my $shm, '>', $openvpn_enabled) or die "Can't write $openvpn_enabled\n";
$change=1;
}
}
}
}
}
close(CMD_LINE);
}
}
# Check if PID found
my $names;
my $short_status;
if ($vpn_found == 1) {
$names = join('/', @config_name);
$short_status='up';
} else {
$short_status='down';
$names = $short_status;
}
print "VPN: $names\n";
print "VPN: $short_status\n";
# Print color if there were changes
print "#00FF00\n" if ($change == 1);
exit(0);
}
sub check_opts {
# Vars
my @pid_file=glob '/run/openvpn/*.pid';
# Set options
GetOptions( "help|h" => \&help,
"p=s" => \@pid_file);
print_output(\@pid_file);
}
sub help {
print "Usage: openvpn [-d pid folder files]\n";
print "-d : pid folder files (default /run/openvpn/*.pid)\n";
print "Note: devices in configuration file should be named with their number (ex: tun0, tap1)\n";
exit(1);
}
&check_opts;

69
bin/i3blocks/temperature Executable file
View file

@ -0,0 +1,69 @@
#!/usr/bin/perl
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
use utf8;
use Getopt::Long;
binmode(STDOUT, ":utf8");
# default values
my $t_warn = 70;
my $t_crit = 90;
my $chip = "";
my $temperature = -9999;
sub help {
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
print "-w <percent>: warning threshold to become yellow\n";
print "-c <percent>: critical threshold to become red\n";
print "--chip <chip>: sensor chip\n";
exit 0;
}
GetOptions("help|h" => \&help,
"w=i" => \$t_warn,
"c=i" => \$t_crit,
"chip=s" => \$chip);
# Get chip temperature
open (SENSORS, "sensors -u $chip |") or die;
while (<SENSORS>) {
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
$temperature = $1;
last;
}
}
close(SENSORS);
$temperature eq -9999 and die 'Cannot find temperature';
# Print short_text, full_text
print "$temperature°C\n" x2;
# Print color, if needed
if ($temperature >= $t_crit) {
print "#FF0000\n";
exit 33;
} elsif ($temperature >= $t_warn) {
print "#FFFC00\n";
}
exit 0;

70
bin/i3blocks/volume Executable file
View file

@ -0,0 +1,70 @@
#!/bin/bash
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------
# The second parameter overrides the mixer selection
# For PulseAudio users, use "pulse"
# For Jack/Jack2 users, use "jackplug"
# For ALSA users, you may use "default" for your primary card
# or you may use hw:# where # is the number of the card desired
MIXER="default"
[ -n "$(lsmod | grep pulse)" ] && MIXER="pulse"
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
MIXER="${2:-$MIXER}"
# The instance option sets the control to report and configure
# This defaults to the first control of your selected mixer
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
sed -n "s/Simple mixer control '\([A-Za-z ]*\)',0/\1/p" |
head -n1
)}"
# The first parameter sets the step to change the volume by (and units to display)
# This may be in in % or dB (eg. 5% or 3dB)
STEP="${1:-5%}"
#------------------------------------------------------------------------
capability() { # Return "Capture" if the device is a capture device
amixer -D $MIXER get $SCONTROL |
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
}
volume() {
amixer -D $MIXER get $SCONTROL $(capability)
}
format() {
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
# If dB was selected, print that instead
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
perl_filter+='"; exit}'
perl -ne "$perl_filter"
}
#------------------------------------------------------------------------
case $BLOCK_BUTTON in
3) amixer -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
4) amixer -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
5) amixer -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
esac
volume | format

46
bin/i3blocks/wifi Executable file
View file

@ -0,0 +1,46 @@
#!/bin/bash
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
#------------------------------------------------------------------------
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
# connection (think desktop), the corresponding block should not be displayed.
[[ ! -d /sys/class/net/${INTERFACE}/wireless ]] ||
[[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit
#------------------------------------------------------------------------
QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70)}')
#------------------------------------------------------------------------
echo "$QUALITY%"
# echo $QUALITY% # short text
# color
if [[ $QUALITY -ge 80 ]]; then
echo "#00FF00"
elif [[ $QUALITY -lt 80 ]]; then
echo "#FFF600"
elif [[ $QUALITY -lt 60 ]]; then
echo "#FFAE00"
elif [[ $QUALITY -lt 40 ]]; then
echo "#FF0000"
fi

3
bin/scripts/set_layout Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
setxkbmap -layout us,ru
setxkbmap -model pc105 -option 'grp:win_space_toggle' -option 'grp:alt_shift_toggle'

32
config/fonts/local.conf Normal file
View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans Mono</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>Ubuntu</string>
</edit>
</match>
<!--alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono Book</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Ubuntu Regular</family>
</prefer>
</alias-->
</fontconfig>

2
config/qutebrowser/dracula/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/bookmarks/
quickmarks

View file

@ -0,0 +1,31 @@
### [qutebrowser](https://www.qutebrowser.org/)
#### Install using Git
If you are a git user, you can install the theme and keep up to date by cloning the repo:
$ git clone https://github.com/dracula/qutebrowser-dracula-theme.git dracula
#### Install manually
Download using the [GitHub .zip download](https://github.com/dracula/qutebrowser.git) option and unzip.
#### Activating theme
- Find your *[qutebrowser configuration directory](https://www.qutebrowser.org/doc/help/configuring.html#configpy)* (see e.g. `:version` in qutebrowser). This folder should be located at the "config" location listed on qute://version, which is typically ~/.config/qutebrowser/ on Linux, ~/.qutebrowser/ on macOS, and %APPDATA%/qutebrowser/config/ on Windows.
- Move the repository folder to `dracula` inside the configuration directory.
- In your [qutebrowser config.py file](https://www.qutebrowser.org/doc/help/configuring.html#configpy), include the following:
```python
import dracula.draw
# Load existing settings made via :set
config.load_autoconfig()
dracula.draw.blood(c, {
'spacing': {
'vertical': 6,
'horizontal': 8
}
})
```

View file

@ -0,0 +1,291 @@
def blood(c, options = {}):
palette = {
'background': '#282a36',
'background-alt': '#282a36',
'background-attention': '#181920',
'border': '#282a36',
'current-line': '#44475a',
'selection': '#44475a',
'foreground': '#f8f8f2',
'foreground-alt': '#e0e0e0',
'foreground-attention': '#ffffff',
'comment': '#6272a4',
'cyan': '#8be9fd',
'green': '#50fa7b',
'orange': '#ffb86c',
'pink': '#ff79c6',
'purple': '#bd93f9',
'red': '#ff5555',
'yellow': '#f1fa8c'
}
spacing = options.get('spacing', {
'vertical': 5,
'horizontal': 5
})
padding = options.get('padding', {
'top': spacing['vertical'],
'right': spacing['horizontal'],
'bottom': spacing['vertical'],
'left': spacing['horizontal']
})
## Background color of the completion widget category headers.
c.colors.completion.category.bg = palette['background']
## Bottom border color of the completion widget category headers.
c.colors.completion.category.border.bottom = palette['border']
## Top border color of the completion widget category headers.
c.colors.completion.category.border.top = palette['border']
## Foreground color of completion widget category headers.
c.colors.completion.category.fg = palette['foreground']
## Background color of the completion widget for even rows.
c.colors.completion.even.bg = palette['background']
## Background color of the completion widget for odd rows.
c.colors.completion.odd.bg = palette['background-alt']
## Text color of the completion widget.
c.colors.completion.fg = palette['foreground']
## Background color of the selected completion item.
c.colors.completion.item.selected.bg = palette['selection']
## Bottom border color of the selected completion item.
c.colors.completion.item.selected.border.bottom = palette['selection']
## Top border color of the completion widget category headers.
c.colors.completion.item.selected.border.top = palette['selection']
## Foreground color of the selected completion item.
c.colors.completion.item.selected.fg = palette['foreground']
## Foreground color of the matched text in the completion.
c.colors.completion.match.fg = palette['orange']
## Color of the scrollbar in completion view
c.colors.completion.scrollbar.bg = palette['background']
## Color of the scrollbar handle in completion view.
c.colors.completion.scrollbar.fg = palette['foreground']
## Background color for the download bar.
c.colors.downloads.bar.bg = palette['background']
## Background color for downloads with errors.
c.colors.downloads.error.bg = palette['background']
## Foreground color for downloads with errors.
c.colors.downloads.error.fg = palette['red']
## Color gradient stop for download backgrounds.
c.colors.downloads.stop.bg = palette['background']
## Color gradient interpolation system for download backgrounds.
## Type: ColorSystem
## Valid values:
## - rgb: Interpolate in the RGB color system.
## - hsv: Interpolate in the HSV color system.
## - hsl: Interpolate in the HSL color system.
## - none: Don't show a gradient.
c.colors.downloads.system.bg = 'none'
## Background color for hints. Note that you can use a `rgba(...)` value
## for transparency.
c.colors.hints.bg = palette['background']
## Font color for hints.
c.colors.hints.fg = palette['purple']
## Hints
c.hints.border = '1px solid ' + palette['background-alt']
## Font color for the matched part of hints.
c.colors.hints.match.fg = palette['foreground-alt']
## Background color of the keyhint widget.
c.colors.keyhint.bg = palette['background']
## Text color for the keyhint widget.
c.colors.keyhint.fg = palette['purple']
## Highlight color for keys to complete the current keychain.
c.colors.keyhint.suffix.fg = palette['selection']
## Background color of an error message.
c.colors.messages.error.bg = palette['background']
## Border color of an error message.
c.colors.messages.error.border = palette['background-alt']
## Foreground color of an error message.
c.colors.messages.error.fg = palette['red']
## Background color of an info message.
c.colors.messages.info.bg = palette['background']
## Border color of an info message.
c.colors.messages.info.border = palette['background-alt']
## Foreground color an info message.
c.colors.messages.info.fg = palette['comment']
## Background color of a warning message.
c.colors.messages.warning.bg = palette['background']
## Border color of a warning message.
c.colors.messages.warning.border = palette['background-alt']
## Foreground color a warning message.
c.colors.messages.warning.fg = palette['red']
## Background color for prompts.
c.colors.prompts.bg = palette['background']
# ## Border used around UI elements in prompts.
c.colors.prompts.border = '1px solid ' + palette['background-alt']
## Foreground color for prompts.
c.colors.prompts.fg = palette['cyan']
## Background color for the selected item in filename prompts.
c.colors.prompts.selected.bg = palette['selection']
## Background color of the statusbar in caret mode.
c.colors.statusbar.caret.bg = palette['background']
## Foreground color of the statusbar in caret mode.
c.colors.statusbar.caret.fg = palette['orange']
## Background color of the statusbar in caret mode with a selection.
c.colors.statusbar.caret.selection.bg = palette['background']
## Foreground color of the statusbar in caret mode with a selection.
c.colors.statusbar.caret.selection.fg = palette['orange']
## Background color of the statusbar in command mode.
c.colors.statusbar.command.bg = palette['background']
## Foreground color of the statusbar in command mode.
c.colors.statusbar.command.fg = palette['pink']
## Background color of the statusbar in private browsing + command mode.
c.colors.statusbar.command.private.bg = palette['background']
## Foreground color of the statusbar in private browsing + command mode.
c.colors.statusbar.command.private.fg = palette['foreground-alt']
## Background color of the statusbar in insert mode.
c.colors.statusbar.insert.bg = palette['background-attention']
## Foreground color of the statusbar in insert mode.
c.colors.statusbar.insert.fg = palette['foreground-attention']
## Background color of the statusbar.
c.colors.statusbar.normal.bg = palette['background']
## Foreground color of the statusbar.
c.colors.statusbar.normal.fg = palette['foreground']
## Background color of the statusbar in passthrough mode.
c.colors.statusbar.passthrough.bg = palette['background']
## Foreground color of the statusbar in passthrough mode.
c.colors.statusbar.passthrough.fg = palette['orange']
## Background color of the statusbar in private browsing mode.
c.colors.statusbar.private.bg = palette['background-alt']
## Foreground color of the statusbar in private browsing mode.
c.colors.statusbar.private.fg = palette['foreground-alt']
## Background color of the progress bar.
c.colors.statusbar.progress.bg = palette['background']
## Foreground color of the URL in the statusbar on error.
c.colors.statusbar.url.error.fg = palette['red']
## Default foreground color of the URL in the statusbar.
c.colors.statusbar.url.fg = palette['foreground']
## Foreground color of the URL in the statusbar for hovered links.
c.colors.statusbar.url.hover.fg = palette['cyan']
## Foreground color of the URL in the statusbar on successful load
c.colors.statusbar.url.success.http.fg = palette['green']
## Foreground color of the URL in the statusbar on successful load
c.colors.statusbar.url.success.https.fg = palette['green']
## Foreground color of the URL in the statusbar when there's a warning.
c.colors.statusbar.url.warn.fg = palette['yellow']
## Status bar padding
c.statusbar.padding = padding
## Background color of the tab bar.
## Type: QtColor
c.colors.tabs.bar.bg = palette['selection']
## Background color of unselected even tabs.
## Type: QtColor
c.colors.tabs.even.bg = palette['selection']
## Foreground color of unselected even tabs.
## Type: QtColor
c.colors.tabs.even.fg = palette['foreground']
## Color for the tab indicator on errors.
## Type: QtColor
c.colors.tabs.indicator.error = palette['red']
## Color gradient start for the tab indicator.
## Type: QtColor
c.colors.tabs.indicator.start = palette['orange']
## Color gradient end for the tab indicator.
## Type: QtColor
c.colors.tabs.indicator.stop = palette['green']
## Color gradient interpolation system for the tab indicator.
## Type: ColorSystem
## Valid values:
## - rgb: Interpolate in the RGB color system.
## - hsv: Interpolate in the HSV color system.
## - hsl: Interpolate in the HSL color system.
## - none: Don't show a gradient.
c.colors.tabs.indicator.system = 'none'
## Background color of unselected odd tabs.
## Type: QtColor
c.colors.tabs.odd.bg = palette['selection']
## Foreground color of unselected odd tabs.
## Type: QtColor
c.colors.tabs.odd.fg = palette['foreground']
# ## Background color of selected even tabs.
# ## Type: QtColor
c.colors.tabs.selected.even.bg = palette['background']
# ## Foreground color of selected even tabs.
# ## Type: QtColor
c.colors.tabs.selected.even.fg = palette['foreground']
# ## Background color of selected odd tabs.
# ## Type: QtColor
c.colors.tabs.selected.odd.bg = palette['background']
# ## Foreground color of selected odd tabs.
# ## Type: QtColor
c.colors.tabs.selected.odd.fg = palette['foreground']
## Tab padding
c.tabs.padding = padding
c.tabs.indicator.width = 1
c.tabs.favicons.scale = 1

View file

@ -0,0 +1,21 @@
# Dracula for [qutebrowser](https://www.qutebrowser.org/)
> A dark theme for [qutebrowser](https://www.qutebrowser.org/).
![Screenshot](./screenshot.png)
## Install
All instructions can be found at [draculatheme.com/qutebrowser](https://draculatheme.com/qutebrowser).
## Team
This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/qutebrowser/graphs/contributors).
[![Evan Nagle](https://avatars2.githubusercontent.com/u/556537?s=88&v=4&s=70)](https://github.com/evannagle) |
--- |
[Evan Nagle](https://github.com/evannagle) |
## License
[MIT License](./LICENSE)

Binary file not shown.

After

Width:  |  Height:  |  Size: 605 KiB

View file

339
config/vifm/colors/COPYING Normal file
View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View file

@ -0,0 +1,28 @@
0.9 to current
Add new color scheme: gruvbox (Thanks laur89)
Add new color scheme: iceberg (Thanks puven12)
Add new color scheme: dracula (Thanks EgZvor)
Add new color scheme: molokai (Thanks mimadrid)
Add missing `:highlight clear` to:
* lucius
* reicheltd-light
Update near-default scheme:
* Add CmpMismatch (since vifm v0.9).
* Add one more document type: mobi.
* Support change of terminal background.
0.8.2 to 0.9
Add new color scheme: lucius (Thanks francogonzaga)
Add new color scheme: SemiDarkDesert (Thanks clausED)
Add new color scheme: near-default (Thanks xaizek)
Clean up info in README
0.8 to 0.8.2
Add GPL-2 license file
Add new color scheme: ph (Thanks pihao)
Add new color scheme: reicheltd-light (Thanks reicheltd)
Add new color scheme: snowwhite (Thanks durcheinandr)
Add new color scheme: semidarkdesert (Thanks clausED)
Add new color scheme: near-default

View file

@ -0,0 +1,65 @@
" You can edit this file by hand.
" The " character at the beginning of a line comments out the line.
" Blank lines are ignored.
" The Default color scheme is used for any directory that does not have
" a specified scheme and for parts of user interface like menus. A
" color scheme set for a base directory will also
" be used for the sub directories.
" The standard ncurses colors are:
" Default = -1 = None, can be used for transparency or default color
" Black = 0
" Red = 1
" Green = 2
" Yellow = 3
" Blue = 4
" Magenta = 5
" Cyan = 6
" White = 7
" Light versions of colors are also available (set bold attribute):
" LightBlack
" LightRed
" LightGreen
" LightYellow
" LightBlue
" LightMagenta
" LightCyan
" LightWhite
" Available attributes (some of them can be combined):
" bold
" underline
" reverse or inverse
" standout
" none
" Vifm supports 256 colors you can use color numbers 0-255
" (requires properly set up terminal: set your TERM environment variable
" (directly or using resources) to some color terminal name (e.g.
" xterm-256color) from /usr/lib/terminfo/; you can check current number
" of colors in your terminal with tput colors command)
" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color
highlight clear
highlight Win cterm=none ctermfg=white ctermbg=black
highlight Directory cterm=bold ctermfg=cyan ctermbg=default
highlight Link cterm=bold ctermfg=yellow ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
highlight Device cterm=bold ctermfg=red ctermbg=default
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
highlight Executable cterm=bold ctermfg=green ctermbg=default
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=default ctermbg=blue
highlight TopLine cterm=none ctermfg=black ctermbg=white
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default
highlight StatusLine cterm=bold ctermfg=black ctermbg=white
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Border cterm=none ctermfg=black ctermbg=white
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white

View file

@ -0,0 +1,59 @@
# vifm-colors
Various colorschemes for [vifm](https://vifm.info/):
- astrell (by astrell)
- darkdesert (by langner)
- Default
- desert
- dracula (by EgZvor)
- g80
- gruvbox (by laur89)
- iceberg (by puven12)
- lucius (by francogonzaga)
- matrix
- mc-like (by Petteri Knihti)
- molokai (by Miguel Madrid Mencía)
- near-default
- ph (by pihao)
- reicheltd-light (by reicheltd)
- semidarkdesert (by clausED)
- snowwhite (by durcheinandr)
- solarized-dark
- zenburn
- zenburn_1 (by frgm)
The solarized-dark theme is based on [istib](https://github.com/istib)'s [version](https://github.com/istib/dotfiles/blob/master/vifm/vifm-colors).
## Installation
### Distribution
Some distributions offer a package for vifm color schemes. In this case you can install them easily using your package manager.
#### openSUSE
```
zypper in vifm-colors
```
### Manual
If you would like to have just one theme you could download it via wget, for example:
`wget -P ~/.vifm/colors https://raw.githubusercontent.com/vifm/vifm-colors/master/solarized-dark.vifm`
If you prefer to download all themes you could set it up with git, and stay up to date.
`rm -rf ~/.config/vifm/colors`
`git clone https://github.com/vifm/vifm-colors ~/.config/vifm/colors`
To check for updates just type `git pull` in `~/.config/vifm/colors`.
*Note:* replace `~/.config/vifm` with `~/.vifm` in commands above if you store your configuration there.
## Preview
A preview of all color themes contained in this repository are available at [the official vifm site](https://vifm.info/colorschemes.shtml).
## Set a theme
Load with `:colorscheme theme-name` in vifm, or write `colorscheme theme-name` in vifm's configuration file `~/.config/vifm/vifmrc`.
If you have any color themes that are not in this repo, feel free to fork, add it and send a pull request!

View file

@ -0,0 +1,33 @@
" by astrell
" with builtin regular/root user differentiation
highlight clear
highlight Border cterm=none ctermfg=black ctermbg=131
highlight TopLine cterm=none ctermfg=black ctermbg=white
highlight TopLineSel cterm=bold ctermfg=default ctermbg=default
highlight StatusLine cterm=none ctermfg=black ctermbg=white
highlight WildMenu cterm=none ctermfg=default ctermbg=153
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=default
highlight Win cterm=none ctermfg=0 ctermbg=224
highlight Directory cterm=bold ctermfg=17 ctermbg=default
highlight Link cterm=none ctermfg=94 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=160 ctermbg=default
highlight Socket cterm=bold ctermfg=91 ctermbg=default
highlight Device cterm=bold ctermfg=52 ctermbg=default
highlight Fifo cterm=bold ctermfg=105 ctermbg=default
highlight Executable cterm=bold ctermfg=23 ctermbg=default
highlight Selected cterm=bold ctermfg=default ctermbg=182
highlight CurrLine cterm=bold ctermfg=238 ctermbg=153
highlight OtherLine cterm=default ctermfg=default ctermbg=default
" overwrite some colors for root user
if $USER == 'root'
highlight Win cterm=none ctermfg=0 ctermbg=182
highlight Selected cterm=bold ctermfg=default ctermbg=217
endif

View file

@ -0,0 +1 @@
To port themes from vim to vifm [this](http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim) is helpful to look up colors.

View file

@ -0,0 +1,24 @@
" Dark Desert
" by Karol M. Langner
" based on Desert by Michael jubalh Vetter
" https://github.com/vifm/vifm-colors
highlight clear
highlight Win cterm=none ctermfg=220 ctermbg=233
highlight Directory cterm=bold ctermfg=77 ctermbg=default
highlight Link cterm=bold ctermfg=239 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=24 ctermbg=default
highlight Device cterm=bold ctermfg=31 ctermbg=default
highlight Fifo cterm=bold ctermfg=31 ctermbg=default
highlight Executable cterm=bold ctermfg=green ctermbg=default
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=131 ctermbg=228
highlight TopLine cterm=none ctermfg=124 ctermbg=235
highlight TopLineSel cterm=bold ctermfg=124 ctermbg=235
highlight StatusLine cterm=bold ctermfg=124 ctermbg=235
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=217 ctermbg=black
highlight ErrorMsg cterm=none ctermfg=7 ctermbg=1
highlight Border cterm=none ctermfg=black ctermbg=235

View file

@ -0,0 +1,23 @@
" Desert
" by Michael jubalh Vetter
" https://github.com/jubalh/vifm-colors
highlight clear
highlight Win cterm=none ctermfg=220 ctermbg=237
highlight Directory cterm=bold ctermfg=77 ctermbg=default
highlight Link cterm=bold ctermfg=239 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=24 ctermbg=default
highlight Device cterm=bold ctermfg=31 ctermbg=default
highlight Fifo cterm=bold ctermfg=31 ctermbg=default
highlight Executable cterm=bold ctermfg=green ctermbg=default
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=131 ctermbg=228
highlight TopLine cterm=none ctermfg=black ctermbg=white
highlight TopLineSel cterm=bold ctermfg=red ctermbg=default
highlight StatusLine cterm=bold ctermfg=red ctermbg=white
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=217 ctermbg=black
highlight ErrorMsg cterm=none ctermfg=7 ctermbg=1
highlight Border cterm=none ctermfg=black ctermbg=white

View file

@ -0,0 +1,45 @@
" VIFM COLORS
" dracula
" based on: https://github.com/istib/dotfiles/blob/master/vifm/vifm-colors
" Default = -1 = None, can be used for transparency or default color
" Black = 0
" Red = 1
" Green = 2
" Yellow = 3
" Blue = 4
" Magenta = 5
" Cyan = 6
" White = 7
" STYLES
" bold
" underline
" reverse or inverse
" standout
" none
highlight clear
highlight Win cterm=none ctermfg=default ctermbg=none
highlight TopLine cterm=none ctermfg=blue ctermbg=none
highlight TopLineSel cterm=none ctermfg=magenta ctermbg=none
highlight StatusLine cterm=none ctermfg=blue ctermbg=none
highlight Border cterm=none ctermfg=blue ctermbg=none
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=236 ctermbg=blue
highlight WildMenu cterm=none,reverse ctermfg=blue ctermbg=236
highlight CmdLine cterm=none ctermfg=255 ctermbg=236
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Directory cterm=none ctermfg=blue ctermbg=default
highlight Link cterm=none ctermfg=cyan ctermbg=default
highlight BrokenLink cterm=none ctermfg=red ctermbg=default
highlight Socket cterm=none ctermfg=magenta ctermbg=black
highlight Device cterm=none ctermfg=red ctermbg=default
highlight Fifo cterm=none ctermfg=yellow ctermbg=black
highlight Executable cterm=none ctermfg=green ctermbg=default

View file

@ -0,0 +1,28 @@
" G80
" Reset all styles first
highlight clear
highlight Border cterm=none ctermfg=237 ctermbg=237
highlight TopLine cterm=none ctermfg=188 ctermbg=237
highlight TopLineSel cterm=underline ctermfg=188 ctermbg=237
highlight Win cterm=none ctermfg=188 ctermbg=237
highlight Directory cterm=none ctermfg=188 ctermbg=237
highlight CurrLine cterm=none ctermfg=188 ctermbg=236
highlight OtherLine cterm=none ctermfg=247 ctermbg=237
highlight Selected cterm=none ctermfg=188 ctermbg=238
highlight JobLine cterm=bold ctermfg=188 ctermbg=238
highlight StatusLine cterm=none ctermfg=188 ctermbg=235
highlight WildMenu cterm=none ctermfg=188 ctermbg=238
highlight CmdLine cterm=none ctermfg=188 ctermbg=237
highlight ErrorMsg cterm=none ctermfg=188 ctermbg=237
highlight Executable cterm=none ctermfg=188 ctermbg=237
highlight Link cterm=none ctermfg=188 ctermbg=237
highlight BrokenLink cterm=none ctermfg=188 ctermbg=237
highlight Device cterm=none ctermfg=188 ctermbg=237
highlight Fifo cterm=none ctermfg=188 ctermbg=237
highlight Socket cterm=none ctermfg=188 ctermbg=237

View file

@ -0,0 +1,30 @@
" gruvbox color scheme approximation for vifm
" Reset all styles first
highlight clear
highlight Border cterm=none ctermfg=235 ctermbg=default
highlight TopLine cterm=none ctermfg=214 ctermbg=235
highlight TopLineSel cterm=bold ctermfg=214 ctermbg=237
highlight Win cterm=none ctermfg=223 ctermbg=default
"highlight OtherWin cterm=none ctermfg=223 ctermbg=236
highlight Directory cterm=bold ctermfg=109 ctermbg=default
highlight CurrLine cterm=bold,inverse ctermfg=default ctermbg=default
highlight OtherLine cterm=bold ctermfg=default ctermbg=235
highlight Selected cterm=none ctermfg=223 ctermbg=237
highlight JobLine cterm=bold ctermfg=116 ctermbg=238
highlight StatusLine cterm=bold ctermfg=144 ctermbg=236
highlight ErrorMsg cterm=bold ctermfg=167 ctermbg=default
highlight WildMenu cterm=bold ctermfg=235 ctermbg=144
highlight CmdLine cterm=none ctermfg=223 ctermbg=default
highlight Executable cterm=bold ctermfg=142 ctermbg=default
highlight Link cterm=none ctermfg=132 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=167 ctermbg=default
highlight Device cterm=none,standout ctermfg=214 ctermbg=default
highlight Fifo cterm=none ctermfg=172 ctermbg=default
highlight Socket cterm=bold ctermfg=223 ctermbg=default

View file

@ -0,0 +1,29 @@
" iceberg
" by puven12
"
" This colorscheme is based on iceberg colorscheme for vim
" by cocopon
highlight clear
highlight Win cterm=none ctermfg=255 ctermbg=234
highlight Directory cterm=bold ctermfg=109 ctermbg=default
highlight Link cterm=bold ctermfg=216 ctermbg=234
highlight BrokenLink cterm=bold ctermfg=red ctermbg=239
highlight Socket cterm=bold ctermfg=green ctermbg=default
highlight Device cterm=bold ctermfg=red ctermbg=default
highlight Fifo cterm=bold ctermfg=150 ctermbg=default
highlight Executable cterm=none ctermfg=150 ctermbg=default
highlight Selected cterm=none ctermfg=255 ctermbg=236
highlight CurrLine cterm=reverse
highlight TopLine cterm=none ctermfg=255 ctermbg=234
highlight TopLineSel cterm=bold ctermfg=110 ctermbg=default
highlight StatusLine cterm=none ctermfg=240 ctermbg=235
highlight WildMenu cterm=underline,reverse ctermfg=255 ctermbg=black
highlight CmdLine cterm=none ctermfg=255 ctermbg=234
highlight ErrorMsg cterm=none ctermfg=203 ctermbg=234
highlight Border cterm=none ctermfg=black ctermbg=234
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=255
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default
highlight CmpMismatch cterm=bold ctermfg=255 ctermbg=red
highlight AuxWin cterm=bold,underline,reverse,standout ctermfg=default ctermbg=default

View file

@ -0,0 +1,25 @@
" lucius
" by francogonzaga
"
" https://gist.github.com/francogonzaga/5509523
"
" This color scheme is loosely based on the lucius color scheme for vim
highlight clear
highlight Win cterm=none ctermfg=250 ctermbg=236
highlight Directory cterm=bold ctermfg=4 ctermbg=236
highlight Link cterm=bold ctermfg=yellow ctermbg=236
highlight BrokenLink cterm=bold ctermfg=red ctermbg=none
highlight Socket cterm=bold ctermfg=magenta ctermbg=black
highlight Device cterm=bold ctermfg=red ctermbg=black
highlight Fifo cterm=bold ctermfg=cyan ctermbg=none
highlight Executable cterm=bold ctermfg=112 ctermbg=236
highlight Selected cterm=none ctermfg=236 ctermbg=208
highlight CurrLine cterm=bold ctermfg=251 ctermbg=240
highlight TopLine cterm=none ctermfg=black ctermbg=240
highlight TopLineSel cterm=none ctermfg=250 ctermbg=12
highlight StatusLine cterm=bold ctermfg=255 ctermbg=12
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=white ctermbg=240
highlight ErrorMsg cterm=none ctermfg=250 ctermbg=124
highlight Border cterm=none ctermfg=236 ctermbg=236

View file

@ -0,0 +1,27 @@
" Matrix
" by Michael jubalh Vetter
" https://github.com/jubalh/vifm-colors
highlight clear
highlight Win cterm=none ctermfg=green ctermbg=black
highlight TopLine cterm=none ctermfg=green ctermbg=none
highlight TopLineSel cterm=none ctermfg=green ctermbg=none
highlight StatusLine cterm=none ctermfg=green ctermbg=none
highlight Border cterm=none ctermfg=green ctermbg=none
highlight Selected cterm=bold ctermfg=red ctermbg=default
highlight CurrLine cterm=bold ctermfg=black ctermbg=green
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Directory cterm=none ctermfg=blue ctermbg=default
highlight Link cterm=none ctermfg=yellow ctermbg=default
highlight BrokenLink cterm=none ctermfg=red ctermbg=default
highlight Socket cterm=none ctermfg=yellow ctermbg=default
highlight Device cterm=none ctermfg=yellow ctermbg=default
highlight Fifo cterm=none ctermfg=yellow ctermbg=default
highlight Executable cterm=none ctermfg=green ctermbg=default

View file

@ -0,0 +1,26 @@
" mimicking midnight commander
" by Petteri Knihti
highlight clear
highlight Win cterm=none ctermfg=white ctermbg=blue
highlight CurrLine cterm=none ctermfg=black ctermbg=cyan
highlight Selected cterm=bold ctermfg=yellow ctermbg=default
highlight TopLine cterm=none ctermfg=black ctermbg=cyan
highlight TopLineSel cterm=bold ctermfg=yellow ctermbg=cyan
highlight StatusLine cterm=none ctermfg=black ctermbg=cyan
highlight Border cterm=none ctermfg=none ctermbg=blue
highlight WildMenu cterm=reverse ctermfg=black ctermbg=white
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Directory cterm=bold ctermfg=cyan ctermbg=default
highlight Link cterm=bold ctermfg=yellow ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
highlight Device cterm=bold ctermfg=red ctermbg=default
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
highlight Executable cterm=bold ctermfg=green ctermbg=default

View file

@ -0,0 +1,31 @@
" Molokai
" by Miguel Madrid Mencia
" https://github.com/vifm/vifm-colors
highlight clear
highlight Border cterm=none ctermfg=black ctermbg=232
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight CurrLine cterm=bold ctermfg=default ctermbg=208
highlight Device cterm=bold ctermfg=red ctermbg=default
highlight Directory cterm=bold ctermfg=12 ctermbg=default
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Executable cterm=bold ctermfg=green ctermbg=default
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
highlight Link cterm=bold ctermfg=green ctermbg=default
highlight OtherLine cterm=bold ctermfg=default ctermbg=130
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
highlight StatusLine cterm=none ctermfg=white ctermbg=233
highlight SuggestBox cterm=none ctermfg=white ctermbg=black
highlight TopLine cterm=none ctermfg=15 ctermbg=233
highlight TopLineSel cterm=none ctermfg=148 ctermbg=default
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight Win cterm=none ctermfg=white ctermbg=black
if $USER == 'root'
highlight Border cterm=none ctermfg=default ctermbg=red
highlight StatusLine cterm=none ctermfg=white ctermbg=red
highlight TopLine cterm=none ctermfg=default ctermbg=red
endif

View file

@ -0,0 +1,89 @@
" vim: filetype=vifm :
" xterm color customization:
"
" ! regular (not bold) red
" XTerm*color1: #ff3030
" ! regular (not bold) green
" XTerm*color2: #70dd70
" ! regular (not bold) yellow
" XTerm*color3: #f0f000
" ! regular (not bold) blue
" XTerm*color4: #6060dd
" ! bold red
" XTerm*color9: #ff8080
" ! bold green
" XTerm*color10: #20dd20
" ! bold yellow
" XTerm*color11: #e0e000
" ! bold blue
" XTerm*color12: #a8a8ff
highlight clear
highlight Win cterm=none ctermfg=white ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
highlight Device cterm=bold,reverse ctermfg=red ctermbg=default
highlight Fifo cterm=bold,reverse ctermfg=cyan ctermbg=default
highlight CurrLine cterm=reverse,bold ctermfg=default ctermbg=default
highlight TopLine cterm=none ctermfg=black ctermbg=white
highlight TopLineSel cterm=underline ctermfg=black ctermbg=default
highlight StatusLine cterm=none ctermfg=black ctermbg=white
highlight WildMenu cterm=underline,bold,reverse ctermfg=yellow ctermbg=black
highlight CmdLine cterm=bold ctermfg=white ctermbg=default
highlight ErrorMsg cterm=bold ctermfg=white ctermbg=red
highlight Border cterm=none ctermfg=white ctermbg=default
highlight OtherLine cterm=reverse ctermfg=234 ctermbg=white
highlight SuggestBox cterm=bold,reverse ctermfg=cyan ctermbg=default
" no 256-color palette on Windows
if $OS == 'Windows_NT'
highlight Directory cterm=bold ctermfg=cyan ctermbg=default
highlight Link cterm=bold ctermfg=yellow ctermbg=default
highlight Executable cterm=bold ctermfg=green ctermbg=default
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red
finish
endif
highlight Directory cterm=bold ctermfg=123 ctermbg=default
highlight Link cterm=bold ctermfg=229 ctermbg=default
highlight Executable cterm=bold ctermfg=119 ctermbg=default
highlight Selected cterm=bold ctermfg=213 ctermbg=default
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=88
" software documentation
highlight {COPYRIGHT,COPYING*,BUGS,ChangeLog*,FAQ,INSTALL*,LICEN[CS]E,NEWS,
\README*,AUTHORS,TODO,THANKS}
\ cterm=none ctermfg=187 ctermbg=default
" build system files
highlight {Makefile,Makefile.am,Makefile.in,Makefile.win,*.mak,*.mk,
\CMakeLists.txt}
\ cterm=none ctermfg=121 ctermbg=default
" archives
highlight {*.7z,*.ace,*.arj,*.bz2,*.cpio,*.deb,*.dz,*.gz,*.jar,*.lzh,*.lzma,
\*.rar,*.rpm,*.rz,*.tar,*.taz,*.tb2,*.tbz,*.tbz2,*.tgz,*.tlz,*.trz,
\*.txz,*.tz,*.tz2,*.xz,*.z,*.zip,*.zoo}
\ cterm=none ctermfg=215 ctermbg=default
" documents
highlight {*.djvu,*.htm,*.html,*.shtml,*.css,*.markdown,*.md,*[^0-9].[1-9],
\*.mkd,*.org,*.pandoc,*.pdc,*.pdf,*.epub,*.fb2,*.tex,*.txt,*.xhtml,
\*.xml,*.pptx,*.ppt,*.doc,*.docx,*.xls,*.xls[mx],*.mobi}
\ cterm=none ctermfg=217 ctermbg=default
" media
highlight {*.aac,*.anx,*.asf,*.au,*.avi,*.ts,*.axa,*.axv,*.divx,*.flac,*.m2a,
\*.m2v,*.m4a,*.m4p,*.m4v,*.mid,*.midi,*.mka,*.mkv,*.mov,*.mp3,*.mp4,
\*.flv,*.mp4v,*.mpc,*.mpeg,*.mpg,*.nuv,*.oga,*.ogg,*.ogv,*.ogx,*.pbm,
\*.pgm,*.qt,*.ra,*.ram,*.rm,*.spx,*.vob,*.wav,*.wma,*.wmv,*.xvid,
\*.ac3}
\ cterm=none ctermfg=49 ctermbg=default
" images
highlight {*.bmp,*.gif,*.jpeg,*.jpg,*.ico,*.png,*.ppm,*.svg,*.svgz,*.tga,*.tif,
\*.tiff,*.xbm,*.xcf,*.xpm,*.xspf,*.xwd}
\ cterm=none ctermfg=117 ctermbg=default
" executables
highlight {*.sh,*.bash,*.bat,*.btm,*.cmd,*.com,*.dll,*.exe,*.run,*.msu,*.msi}
\ cterm=none ctermfg=77 ctermbg=default
" source code
highlight {*.patch,*.diff,*.py,*.[ch]pp,*.mk,*.c,*.h,*.[ch]pp,*.cc,*.hs,*.php}
\ cterm=none ctermfg=193 ctermbg=default

View file

@ -0,0 +1,27 @@
" ph
highlight clear
highlight Win cterm=none ctermfg=248 ctermbg=234
highlight Directory cterm=bold ctermfg=033 ctermbg=234
highlight Link cterm=bold ctermfg=yellow ctermbg=234
highlight BrokenLink cterm=reverse ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=125 ctermbg=default
highlight Device cterm=bold ctermfg=red ctermbg=default
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
highlight Executable cterm=bold ctermfg=166 ctermbg=default
highlight Selected cterm=bold ctermfg=255 ctermbg=237
highlight CurrLine cterm=bold ctermfg=default ctermbg=237
highlight TopLine cterm=bold ctermfg=black ctermbg=235
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default
highlight StatusLine cterm=bold ctermfg=black ctermbg=235
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Border cterm=none ctermfg=black ctermbg=234
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default
if $USER == 'root'
highlight Border ctermbg=red
endif

View file

@ -0,0 +1,28 @@
" vim: filetype=vifm :
" Author: Daniel R. (a.k.a. reicheltd)
highlight clear
highlight Win cterm=none ctermfg=236 ctermbg=255
highlight Directory cterm=bold ctermfg=21 ctermbg=255
highlight Link cterm=bold ctermfg=39 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
highlight Device cterm=bold ctermfg=blue ctermbg=default
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
highlight Executable cterm=bold ctermfg=red ctermbg=default
highlight Selected cterm=bold ctermfg=200 ctermbg=default
highlight CurrLine cterm=bold ctermfg=255 ctermbg=27
highlight TopLine cterm=none ctermfg=236 ctermbg=255
highlight TopLineSel cterm=bold ctermfg=236 ctermbg=255
highlight StatusLine cterm=bold ctermfg=236 ctermbg=255
highlight WildMenu cterm=underline,reverse ctermfg=236 ctermbg=255
highlight CmdLine cterm=none ctermfg=236 ctermbg=255
highlight ErrorMsg cterm=none ctermfg=red ctermbg=236
highlight Border cterm=none ctermfg=236 ctermbg=255

View file

@ -0,0 +1,23 @@
" SemiDarkDesert
" by Claus E. Durst, based on 'Desert' by Michael jubalh Vetter
" https://github.com/clausED/vifm-colors
highlight clear
highlight Win cterm=none ctermfg=220 ctermbg=233
highlight Directory cterm=bold ctermfg=77 ctermbg=default
highlight Link cterm=bold ctermfg=239 ctermbg=default
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=24 ctermbg=default
highlight Device cterm=bold ctermfg=31 ctermbg=default
highlight Fifo cterm=bold ctermfg=31 ctermbg=default
highlight Executable cterm=bold ctermfg=green ctermbg=default
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=131 ctermbg=228
highlight TopLine cterm=none ctermfg=black ctermbg=248
highlight TopLineSel cterm=bold ctermfg=red ctermbg=default
highlight StatusLine cterm=bold ctermfg=red ctermbg=248
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=217 ctermbg=black
highlight ErrorMsg cterm=none ctermfg=7 ctermbg=1
highlight Border cterm=none ctermfg=black ctermbg=240

View file

@ -0,0 +1,31 @@
" snowwhite
" Author: Jochen Schweizer
" https://github.com/durcheinandr/vifm-colors
highlight clear
highlight SuggestBox cterm=none ctermfg=16 ctermbg=231
highlight Win cterm=none ctermfg=16 ctermbg=231
highlight Directory cterm=bold ctermfg=16 ctermbg=231
highlight Link cterm=none ctermfg=16 ctermbg=231
highlight BrokenLink cterm=bold ctermfg=196 ctermbg=231
highlight Socket cterm=none ctermfg=16 ctermbg=231
highlight Device cterm=none ctermfg=16 ctermbg=231
highlight Fifo cterm=none ctermfg=16 ctermbg=231
highlight Executable cterm=none ctermfg=16 ctermbg=231
highlight Selected cterm=none ctermfg=208 ctermbg=231
highlight CurrLine cterm=none ctermfg=231 ctermbg=208
highlight TopLine cterm=none ctermfg=16 ctermbg=255
highlight TopLineSel cterm=none ctermfg=231 ctermbg=16
highlight StatusLine cterm=bold ctermfg=16 ctermbg=255
highlight WildMenu cterm=underline,reverse ctermfg=16 ctermbg=231
highlight CmdLine cterm=none ctermfg=16 ctermbg=231
highlight ErrorMsg cterm=bold ctermfg=196 ctermbg=231
highlight Border cterm=none ctermfg=16 ctermbg=255

View file

@ -0,0 +1,45 @@
" VIFM COLORS
" solarized dark
" based on: https://github.com/istib/dotfiles/blob/master/vifm/vifm-colors
" Default = -1 = None, can be used for transparency or default color
" Black = 0
" Red = 1
" Green = 2
" Yellow = 3
" Blue = 4
" Magenta = 5
" Cyan = 6
" White = 7
" STYLES
" bold
" underline
" reverse or inverse
" standout
" none
highlight clear
highlight Win cterm=none ctermfg=default ctermbg=none
highlight TopLine cterm=none ctermfg=blue ctermbg=none
highlight TopLineSel cterm=none ctermfg=blue ctermbg=none
highlight StatusLine cterm=none ctermfg=blue ctermbg=none
highlight Border cterm=none ctermfg=blue ctermbg=none
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
highlight CurrLine cterm=bold ctermfg=default ctermbg=blue
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Directory cterm=none ctermfg=cyan ctermbg=default
highlight Link cterm=none ctermfg=yellow ctermbg=default
highlight BrokenLink cterm=none ctermfg=red ctermbg=default
highlight Socket cterm=none ctermfg=magenta ctermbg=default
highlight Device cterm=none ctermfg=red ctermbg=default
highlight Fifo cterm=none ctermfg=cyan ctermbg=default
highlight Executable cterm=none ctermfg=green ctermbg=default

View file

@ -0,0 +1,22 @@
highlight clear
highlight Win cterm=none ctermfg=245 ctermbg=234
highlight Directory cterm=bold ctermfg=166 ctermbg=234
highlight Link cterm=bold ctermfg=yellow ctermbg=234
highlight BrokenLink cterm=reverse ctermfg=red ctermbg=default
highlight Socket cterm=bold ctermfg=125 ctermbg=default
highlight Device cterm=bold ctermfg=red ctermbg=default
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
highlight Executable cterm=bold ctermfg=0x2aa198 ctermbg=default
highlight Selected cterm=bold ctermfg=125 ctermbg=235
highlight CurrLine cterm=bold ctermfg=245 ctermbg=235
highlight TopLine cterm=none ctermfg=black ctermbg=white
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default
highlight StatusLine cterm=bold ctermfg=black ctermbg=white
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
highlight CmdLine cterm=none ctermfg=white ctermbg=black
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
highlight Border cterm=none ctermfg=black ctermbg=white

View file

@ -0,0 +1,29 @@
" zenburn like color scheme for vifm
" http://kippura.org/zenburnpage/
" Reset all styles first
highlight clear
highlight Border cterm=none ctermfg=235 ctermbg=237
highlight TopLine cterm=none ctermfg=108 ctermbg=235
highlight TopLineSel cterm=bold ctermfg=186 ctermbg=235
highlight Win cterm=none ctermfg=188 ctermbg=237
highlight Directory cterm=none ctermfg=108 ctermbg=237
highlight CurrLine cterm=none ctermfg=223 ctermbg=235
highlight OtherLine cterm=none ctermfg=247 ctermbg=237
highlight Selected cterm=none ctermfg=116 ctermbg=238
highlight JobLine cterm=bold ctermfg=116 ctermbg=238
highlight StatusLine cterm=bold ctermfg=144 ctermbg=236
highlight ErrorMsg cterm=bold ctermfg=115 ctermbg=237
highlight WildMenu cterm=bold ctermfg=235 ctermbg=144
highlight CmdLine cterm=none ctermfg=188 ctermbg=237
highlight Executable cterm=none ctermfg=172 ctermbg=237
highlight Link cterm=none ctermfg=142 ctermbg=237
highlight BrokenLink cterm=none ctermfg=174 ctermbg=237
highlight Device cterm=none ctermfg=228 ctermbg=237
highlight Fifo cterm=none ctermfg=109 ctermbg=237
highlight Socket cterm=none ctermfg=110 ctermbg=237

View file

@ -0,0 +1,28 @@
#### Requirements
If you are **not** sure whether or not what you are reporting is actually an issue **or** you have a general question please message in the [Gitter Chat Room](https://gitter.im/ryanoasis/vim-devicons)
These items you must provide answers to. Make sure to add **all the information needed to understand the bug** so that someone can help. If the info is missing we'll add the 'Needs more information' label and _may_ choose to close the issue until there is enough information.
Please acknowledge that you understand by marking off the following list items below with an 'x'
_--- ✂ snip ✂ --- Delete this line and all of the ^above^ after reading and before submitting your issue please --- ✂ snip ✂ ---_
#### Required Info
- [ ] I have searched the [issues](https://github.com/ryanoasis/vim-devicons/issues) for my issue and found nothing related and/or helpful
- [ ] I have read or at least glanced at the [FAQ](https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting)
- [ ] I have read or at least glanced at the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki)
- [ ] `VimDevIcons` is the last loaded vim plugin?
- [ ] What **version** of vim are you using?
- hint: `vim --version`
- [ ] What **version** of vim-devicons are you using?
- hint: `:echo webdevicons#version()`
- [ ] Are you using vim from the terminal or a GUI vim?
- [ ] Are you using Mac, Linux or Windows?
#### Optional Info
- [ ] Provide **screenshots** where appropriate

View file

@ -0,0 +1,15 @@
#### Requirements (please check off with 'x')
- [ ] I have read the [Contributing Guidelines](https://github.com/ryanoasis/vim-devicons/blob/master/contributing.md)
- [ ] I have read or at least glanced at the [FAQ](https://github.com/ryanoasis/vim-devicons#faq--troubleshooting)
- [ ] I have read or at least glanced at the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki)
#### What does this Pull Request (PR) do?
#### How should this be manually tested?
#### Any background context you can provide?
#### What are the relevant tickets (if any)?
#### Screenshots (if appropriate or helpful)

2
config/vifm/vifm_devicons/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
doc/tags
__pycache__/

View file

@ -0,0 +1,8 @@
language: python
python: "3.8"
install:
- pip install vim-vint
script:
- vint --verbose --stat $(find . -type f -name '*.vim')

View file

@ -0,0 +1,249 @@
CHANGELOG
================================================================================
This project is using [Semantic Versioning 2.0.0](http://semver.org/)
- v0.11.0
- Added Docker filetypes support (PR #228) (@IngoHeimbach)
- Added Swift filetypes support (PR #252) (@motform)
- Added Elixir filetypes support (PR #244) (@akoutmos)
- Added configuration for 'prePadding' (fixes #231)
- Added support for `vue` filetype extensions out-of-the-box (fixes #235)
- Added configuration for 'DevIconsArtifactFix' (#225)
- Added leftrelease override to work on single mouse click (PR #246) (@Matrix86)
- Added Travis CI with vim linting (PR #236) (@kutsan)
- Fixed Vim-Startify no longer working "out of the box" (#233)
- Fixed Denite information being discarded (fixes #216) (PR #229 @carlitux)
- Fixed inconsistent spacing between folder and file glyphs (fixes #213)
- Updated variable declarations and refactored into set function (PR #237) (@kutsan)
- Updated plugin initialization functions to autoload on demand (PR #238) (@kutsan)
- Updated documentation and refactored massively to Wiki (PR #232) (@kutsan)
- Updated `vim` glyph to better glyph (fixes #234)
- Updated Readme screenshots and badges
- v0.10.0
- Added support for symlink directories (PR #221) (@mhartington)
- Added missing Denite config in readme (PR #217, fixes #205) (@mohamadLy)
- Fixed NERDTree folder open bug with cascade setting (fixes #194)
- Fixed potential issue with Vim-Airline (PR #219) (@chrisbra)
- Fixed readme.md (removed duplicate section) (PR #222) (@thehappydinoa)
- Updated Vim-Airline Repo link in readme (PR #220) (@chrisbra)
- v0.9.3
- Added `tsx` filetype (PR #210) (@dustinblackman)
- Updated links of [deprecated kien/ctrlp](https://github.com/kien/ctrlp.vim) to [active ctrlp fork](https://github.com/ctrlpvim/ctrlp.vim) (PR #211) (@haxorjim)
- Updated MacOS and Windows `guifont` examples with alternate format (fixes #208)
- v0.9.2
- Added `yaml` filetype (PR #207) (@jpoppe)
- Added mention of `vim-workspace` as an integrated plugin (PR #206) (@bagrat)
- Fixed NERDTree keymap `U` open folder icon bug (fixes #189)
- v0.9.1
- Added `sass` filetype (PR #202) (@toastal)
- Fixed NERDTree open/close folder icon bugs (fixes #194)
- Fixed airline conflict with file enconding `skip_expected_string` feature (fixes #203)
- Fixed possible glyph artifacts on open/close folder glyphs
- v0.9.0
- Added support for [Denite](https://github.com/Shougo/denite.nvim) (PR #191) (@0phoff)
- Added symbol for byte order marker (BOM) (utf-8) (PR #199) (@Snaptags)
- Added support for `.zshrc`, `.vimrc`, `pp` (Puppet classes extensions), and `Vagrantfile` filetypes (enhancement #200) (@kiyanwang)
- Added support for `h`, `hpp`, `hxx` (C/C++ header filetype extensions) (enhancement #190)
- Added support for `bash`, `zsh`, `ksh`, `csh`, `awk`, `ps1` (script extensions) (enhancement #196)
- Added support for `rmd` (R Markdown) (partially fixes #195)
- Fixes opened folders titles padding/spacing offset (fixes #197)
- v0.8.6
- Added support for vimfiler explorer mode (fixes #171)
- Added `doc/tags` to `.gitignore` (PR #182) (@doronbehar)
- Added warning to readme pertaining to old versions of NERDTree and CtrlP (PR #177, fixes #174) (@Melon-Bread)
- Fixes CtrlP buffer names (PR #185) (@HerringtonDarkholme)
- Fixes character encoding issue in vim doc (PR #178) (@mhartington)
- Fixes extraneous space after glyph in airline (PR #184) (@tbodt)
- Fixes errors when NERDTree not present (PR #187) (@blueyed)
- Updated Contributor Covenant to `v1.4`
- Updated API examples
- v0.8.5
- Fixed errors in neovim (E670) (PR #163, fixes #162) (@mhartington)
- Fixed issue of updating NERDTree window via `CursorHoldUpdate` (PR #166) (@svanharmelen)
- Fixes updating of special buffer when selected
- Fixes potential issues CtrlP opening in wrong buffer when NERDTree is opened
- Fixed issue with CtrlP `:CtrlPMRU` always defaulting to current buffer (fixes #88)
- Also adds glyphs to other CtrlP modes besides MRU as a side effect
- Fixed documentation discrepency on pluging load order (PR #169) (@F1LT3R)
- Fixed documentation related to CtrlP MRU mode (PR #170, fixes #168) (@F1LT3R)
- v0.8.4
- Fixed always warning about deprecated CtrlP version (fixes #137)
- Fixed missing configuration info about pattern based symbols (fixes #152)
- Fixed `WebDevIconsGetFileTypeSymbol` method iterator missing `break` (PR #156) (@blueyed)
- Fixed a typo in the readme (PR #159) (@SSARCandy)
- Added reference to [tiagofumo/vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight) in readme (PR #161) (@tiagofumo)
- However, the [FAQ](https://github.com/ryanoasis/vim-devicons/wiki/FAQ) has been moved to the [Wiki](https://github.com/ryanoasis/vim-devicons/wiki) in this release
- v0.8.3
- Fixed NERDTree not displaying glyph (icon) for newly created files (fixes #153)
- Also adds info to readme about `updatetime`
- Fixed resourcing `vimrc` not maintaining current NERDTree state (fixes #154)
- Adds new public methods `webdevicons#hardRefresh()` and `webdevicons#softRefresh()`
- Makes public method `webdevicons#refresh()` do a 'soft' refresh
- Fixed various source formatting and implemented most of vim lint ([vint](https://github.com/Kuniwak/vint)) recommendations
- Added public methods available to readme
- v0.8.2
- Updated `jsx` filetype (using React glyph) (enhancement PR #148) (@alpertuna)
- Added issue and pull request templates
- v0.8.1
- Fixed Unite display issues (absolute paths and/or duplicate paths) (fixes #140)
- Fixed custom CtrlP open function causing 'E16' (fixes #115)
- Fixed typo in readme for setting default folder glyph (PR #143)
- Added documentation for highlighting icon/glyphs only (not just entire lines) in NERDTree (fixes #142)
- v0.8.0
- Added support for more [unite](https://github.com/Shougo/unite.vim) actions: `file_rec/async`, `file_rec/neovim`, `file_rec/neovim2`, `file_rec/git` (enhancement PR #132, fixes #131) (@mhartington)
- Improved Darwin detection by using a lighter method/logic (#135) (@delphinus35)
- Fixes `NERDTree-C` (fix PR #139) (@endenwer)
- Fixes error using open/close symbols for folder (fixes #130)
- v0.7.1
- Misc readme updates
- Fixed performance issues and odd graphical artifacts in v0.7.0 (fixes #127)
- Improved installation instructions and re-organized some items to [Nerd Fonts repo](https://github.com/ryanoasis/nerd-fonts) (PR #129, fixes #125, #128) (@her)
- v0.7.0
- Deprecated support for [kien/ctrlp](https://github.com/kien/ctrlp.vim) and only support [active ctrlp fork](https://github.com/ctrlpvim/ctrlp.vim) going forward (fixes #117)
- Added information to readme about [vim-startify](https://github.com/mhinz/vim-startify) support (enhancement #94)
- Added information to readme with possible fix to 'Dots after icons' (fixes #110) (@KabbAmine)
- Added support for 'cljc' (Clojure) filetypes (fix PR #120) (@spacepluk)
- Fixed certain folders in NERDTree showing file glyphs (based on pattern matching) (fixes #112)
- Fixed OS icon being display with as Linux Tux on Mac (fixes #118,fix PR #121) (@trodrigu)
- Fixed deprecated Linux font path in readme (fix PR #123) (@jrobeson)
- v0.6.1
- Fixed likely breaking bug: undefined variable g:DevIconsEnableFoldersOpenClose (fixes #109)
- Fixed up the changelog details
- v0.6.0
- Added support for [Powerline](https://github.com/powerline/powerline) (enhancement PR #74) (@delphinus35)
- Added support for 'ts' (TypeScript) filetypes (enhancement #79)
- Added support for 'jl' (Julia) filetypes
- Added support for 'bat' (batch) filetypes
- Added support for 'ejs' (Embedded JavaScript Templates) filetypes (enhancement #105) (@lerrua)
- Added support for 'react.jsx' filetype
- Added support for 'procfile' filetype
- Changed default 'go' filetype glyph to a better one
- Added open & close folder glyphs (icons) (enhancement #104)
- Fixed new files not having icons until refreshing NERDTree (fixes #33)
- Solution very similar to [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin)
- v0.5.4
- Misc readme updates
- Add support for ocaml 'ml', 'mli' filetypes (enhancement PR #99) (@CharlieMartell)
- Add support for 'sql' and 'dump' filetypes (enhancement PR #100) (@lerrua)
- Add support for 'ico' filetypes (enhancement PR #101) (@lerrua)
- Add support for 'markdown' filetypes (enhancement PR #102) (@lerrua)
- Improved install fonts instructions on Mac (enhancement PR #103) (@lerrua)
- v0.5.3
- Add 'slim' filetype support (same icon as 'html') (enhancement PR #98) (@lerrua)
- Add 'fish' filetype support (same icon as 'sh') (enhancement #93) (@michaelmrose)
- Updated old link references (enhancement PR #87) (@lerrua)
- Improved default Ruby icon (uses 'glyph set 2') (enhancement PR #97) (@lerrua)
- Prevent destorying user's conceal settings (Use setlocal) (enhancement PR #96) (@shawncplus)
- Fixes filenames of buffers getting lost in unite filter (fixes #86) (@ahrse)
- Various readme updates and fixes
- v0.5.2
- Various readme updates and fixes
- Various file clean-up (.gitignore removed)
- Fixed link to install fonts (PR #83 fixes #81) (@theRemix)
- Fixed glyph used for Go (PR #82) (@hoop33)
- Added Code of Conduct
- v0.5.1
- Fixed [CtrlP](https://github.com/ctrlpvim/ctrlp.vim) integration bugs (truncating 6 characters is unreliable) and only add glyphs for MRU File Mode (Fixes #80)
- Readme updates and improvements
- v0.5.0
- Readme updates (removed polls sections, v0.5.0 specific changes)
- Misc code formatting fixes (tabs to spaces, modeline additions, reorganization)
- Update API: make WebDevIconsGetFileFormatSymbol return only fenc (fixes #73)
- Added Perl support (enhancement #60)
- Added support for some (mostly frontend) frameworks (enhancement #61)
- Added basic support for vim-flagship (enhancement #70)
- Added support for Unite and Vimfiler (enhancement #54)
- Added support for CtrlP (enhancement #56)
- Rebranding part 1: title and image (vim-devicons) (enhancement #76)
- v0.4.4
- Lots of readme updates and tweaks
- Changelog semver details
- Spelling / confusing grammar corrections (PR #68) (@adelarsq)
- Fixed default folder/directory glyph (PR Fixes #72) (@cj)
- Mac OS X screenshot (Fixes #32) (@RageZBla)
- Fixed misalignment when used with [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) (Fixes #71)
- Fixed re-sourcing bug (Fixes #71)
- Fixed directory node user settings being overwritten (Fixes #59)
- Fixed minor screenshot issues and clean-up
- v0.4.3
- Prevent error 'Unknown function' when opening Vim without airline plugin (Fixes #67)
- Temporary fix for gvim glyph artifact issues (particuarly NERDTree) (Fixes #58)
- Support file format symbols (glyphs) in vim-airline (Enhancement #66)
- Add vimrc setup example to readme (Documentation #65)
- Fixes Conceal highlighting issues (Fixes #53, #52)
- Make sure plugin plays nice with [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) (Enhancement #62)
- general readme updates and improvements
- changelog format fixes
- v0.4.2
- Updated vim doc with latest readme updates (html2vimdoc)
- Fixes #7 update readme for font and vim setup on osx and win platforms
- Fixes #49 with a FAQ update
- Fixes #41 No such event: nerdtree syntax match (@nbicalcarata)
- Removed test files from the repo and added folders to git-ignore
- Warn about loading vim-webdevicons before nerdtree plugin
- fix lazy NERDTree (@blueyed)
- Improve conceiling with NERDTree (@blueyed)
- add instructions to readme for vim setup on os x (@alfredbez)
- v0.4.1
- Fixes #39 - updated screenshots (particularly nerdtree)
- Fixes #37 - g:webdevicons_conceal_nerdtree_brackets applying global config
- Add instructions to readme for adding icon to lightline (@hoop33)
- Updated vim doc with latest readme updates (sync'd with html2vimdoc)
- Added TL;DR section to readme
- Add a note to readme to load NERDTree before vim-webdevicons (@hoop33)
- Fix: Automatically turning off NERDTree support (@hoop33)
- general readme updates
- v0.4.0
- #27 Remove [ ] wrapping icons
- #26 Add detection and warning on unsupported (old) NERDTree versions
- updated readme with more links and new details on new features and conifgs
- #30 Improve vim standard plugin conventions and tips
- #30 work on sections and standard plugin conventions part 1
- #30 clean-up of unused (for now) autoload file
- #28 setting global options broken part 1
- #29 Add vimdoc, more updates
- autogenerating vimdoc using html2vimdoc
- readme updates
- v0.3.4
- Adds basic support for directory/folder glyphs - fixes #22
- optimize icon lookup - WebDevIconsGetFileTypeSymbol: use if/else (@blueyed)
- Do not clobber the default or customized airline formatter (@blueyed)
- fixed a bug related to the latest airline updates (Ali Aliev)
- various readme updates
- more sample usage images
- v0.3.3
- Load the plugin once only (@blueyed)
- Add font installation instructions, fixes #5 (@wikimatze)
- added plugin install instructions
- slight readme re-ordering
- moved contributing section near bottom
- added additional screenshots
- added more thanks to those whose some more of the glyphs came from
- v0.3.2
- moved screenshots into the wiki (wiki.vim-webdevicons) to reduce unnecessary project size of cloning repo
- v0.3.1
- readme updates (with references to new font-patcher repo)
- readme updates screenshots reference wiki
- v0.3.0
- moved font-patcher and patched fonts into a separate repo (nerd-filetype-glyphs-fonts-patcher)
- adds twigg file type support for #10 (@wikimatze)
- adds cpp file type support
- updated utf8 test file with glyphs
- readme fixes (@wikimatze, @blueyed)
- readme updates
- v0.2.1
- readme updates
- v0.2.0
- Script for patching any font: Initial cleaned up work for issue (feature enhancement) for #1
- added python font patcher and readme updates
- v0.1.4
- readme updates
- v0.1.3
- fixes #3 make matches case insensitive (ignore case)
- v0.1.2
- fixes lookup for exact file notes (@johngeorgewright)
- v0.1.1
- updated readme substantially
- v0.1.0
- release

View file

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team on
[VimDevIcons Gitter Chat](https://gitter.im/ryanoasis/vim-devicons)
or contacting [@ryanoasis](https://github.com/ryanoasis). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View file

@ -0,0 +1,22 @@
# Contributing Guide
## How to contribute
Work In Progress, for now the minimum:
* Fork the project and submit a Pull Request (PR)
* Explain what the PR fixes or improves
* Screenshots for bonus points
* Use sensible commit messages
* If your PR fixes a separate issue number, include it in the commit message
## Things to keep in mind
* Smaller PRs are likely to be merged more quickly than bigger changes
* If it is a useful PR it **will** get merged in eventually
* [E.g. see how many have already been merged vs. still open](https://github.com/ryanoasis/vim-devicons/pulls)
* This project is using [Semantic Versioning 2.0.0](http://semver.org/)
* I try to group fixes into milestones/versions
* If your bug or PR is *not* trivial it will likely end up in the next **MINOR** version
* If your bug or PR *is* trivial *or* critical it will likely end up in the next **PATCH** version
* Most of the time PRs and fixes are *not* merged directly into `master` without being present on a new versioned branch
* Sometimes for small items I will make exceptions to get the fix or readme change on master sooner but even after there will *always* be a versioned branch to keep track of each release

View file

@ -0,0 +1,68 @@
### API
```vim
" returns the font character that represents the icon
" parameters: a:1 (filename), a:2 (isDirectory)
" both parameters optional
" by default without parameters uses buffer name
WebDevIconsGetFileTypeSymbol(...)
" returns the font character that represents
" the file format as an icon (windows, linux, mac)
WebDevIconsGetFileFormatSymbol()
```
#### Public Methods
```vim
" Returns the current version of the plugin
webdevicons#version()
```
```vim
" Calls webdevicons#softRefresh()
" basically a backwards compatibility convenience
webdevicons#refresh()
```
```vim
" Does a 'hard' refresh of NERDTree
" resets vim-devicons syntax and closes and reopens NERDTree
webdevicons#hardRefresh()
```
```vim
" Does a 'soft' refresh of NERDTree
" resets vim-devicons syntax and toggles NERDTree to the same state
webdevicons#softRefresh()
```
#### API Examples
##### Status line
> Custom vim status line (not relying on vim-airline or lightline):
```vim
set statusline=%f\ %{WebDevIconsGetFileTypeSymbol()}\ %h%w%m%r\ %=%(%l,%c%V\ %Y\ %=\ %P%)
```
##### Simple function call
```vim
echo WebDevIconsGetFileFormatSymbol()
```
#### Integration with other plugins
##### vim-startify
```vim
let entry_format = "' ['. index .']'. repeat(' ', (3 - strlen(index)))"
if exists('*WebDevIconsGetFileTypeSymbol') " support for vim-devicons
let entry_format .= ". WebDevIconsGetFileTypeSymbol(entry_path) .' '. entry_path"
else
let entry_format .= '. entry_path'
endif
```

View file

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014 Ryan L McIntyre
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.

View file

@ -0,0 +1,107 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicons/screenshots/v0.10.x/branding-logo-3.svg?sanitize=true" alt="VimDevIcons - Add Icons to Your Plugins">
</h1>
<div align="center">
![version](https://img.shields.io/github/release/ryanoasis/vim-devicons.svg?style=for-the-badge)
![chat on gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=for-the-badge)
![code of conduct](https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=for-the-badge)
![prs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACWFBMVEXXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWkrXWko2FeWCAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAI28AACNvATX8B%2FsAAAAHdElNRQfhBQMBMCLAfV85AAAAi0lEQVQ4y2NgIBYszkPmJc5ORZE9DgEJqNxmmPS%2B43AA4h5B5TIwbD5%2BHFnoKCoXYSBMBIW7CF0eAxChoPM4ARXHB4GCZEIKKA8H%2FCoWE1LAwIBfBVp6wQA1DPhVzMJMcyggCVuqxGI%2FLhWY6Z6QPKoK7HmHkDwDwxYC8gwMdSDprXiz6PHjpQxUBgCLDfI7GXNh5gAAAABJRU5ErkJggg%3D%3D)
![travis-ci status](https://img.shields.io/travis/ryanoasis/vim-devicons?style=for-the-badge&logo=appveyor=travis)
</div>
> Supports plugins such as [NERDTree](https://github.com/preservim/nerdtree), [vim-airline](https://github.com/vim-airline/vim-airline), [CtrlP](https://github.com/ctrlpvim/ctrlp.vim), [powerline](https://github.com/powerline/powerline), [denite](https://github.com/Shougo/denite.nvim), [unite](https://github.com/Shougo/unite.vim), [lightline.vim](https://github.com/itchyny/lightline.vim), [vim-startify](https://github.com/mhinz/vim-startify), [vimfiler](https://github.com/Shougo/vimfiler.vim), [vim-buffet](https://github.com/bagrat/vim-buffet) and [flagship](https://github.com/tpope/vim-flagship).
<h3 align="center">
<img src="https://github.com/ryanoasis/vim-devicons/wiki/screenshots/v0.10.x/overall-screenshot.png" alt="vim-devicons overall screenshot" />
</h3>
> See [Screenshots](https://github.com/ryanoasis/vim-devicons/wiki/screenshots) for more.
Features
--------
- Adds filetype glyphs (icons) to various vim plugins.
- Customizable and extendable glyphs settings.
- Supports a wide range of file type extensions.
- Supports popular full filenames, like `.gitignore`, `node_modules`, `.vimrc`, and many more.
- Supports byte order marker (BOM).
- Works with patched fonts, especially [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts).
> See [Detailed Features](https://github.com/ryanoasis/vim-devicons/wiki/Detailed-Features) for more.
> See [Configuration](https://github.com/ryanoasis/vim-devicons/wiki/Extra-Configuration) for a list of configuration and customization options.
Installation
------------
1. Install a [Nerd Font compatible font](https://github.com/ryanoasis/nerd-fonts#font-installation) or [patch your own](https://github.com/ryanoasis/nerd-fonts#font-patcher). Then set your terminal font (or `guifont` if you are using GUI version of Vim).
1. Install the Vim plugin with your favorite plugin manager, e.g. [vim-plug](https://github.com/junegunn/vim-plug):
```vim
Plug 'ryanoasis/vim-devicons'
```
> Always load the vim-devicons as the very last one.
1. Configure Vim
```vim
set encoding=UTF-8
```
> No need to set explicitly under Neovim: always uses UTF-8 as the default encoding.
> See [Installation](https://github.com/ryanoasis/vim-devicons/wiki/Installation) for detailed setup instructions
Use `:help devicons` for further configuration.
Developers
----------
See [DEVELOPER](DEVELOPER.md) for how to use the API.
Troubleshooting
---------------
See [FAQ](https://github.com/ryanoasis/vim-devicons/wiki/FAQ-&-Troubleshooting).
Contributing
------------
### [Code of Conduct](CODE_OF_CONDUCT.md)
This project has adopted a Code of Conduct that we expect project participants to adhere to. Check out [code of conduct](CODE_OF_CONDUCT.md) for further details.
### [Contributing Guide](CONTRIBUTING.md)
Read our [contributing](CONTRIBUTING.md) guide to learn about how to send pull requests, creating issues properly.
### Promotion
You can help us by simply giving a star or voting on vim.org. It will ensure continued development going forward.
- Star this repository [on GitHub](https://github.com/ryanoasis/vim-devicons).
- Vote for it [on vim.org](http://www.vim.org/scripts/script.php?script_id=5114).
Acknowledgments
---------------
Thanks goes to these people for inspiration and helping with sending PRs.
- [vim-airline](https://github.com/vim-airline/vim-airline)
- [nerdtree](https://github.com/preservim/nerdtree)
- [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) by [@Xuyuanp](https://github.com/Xuyuanp)
- [seti-ui](https://atom.io/themes/seti-ui) by [@jesseweed](https://github.com/jesseweed)
- [devicons](http://vorillaz.github.io/devicons) by [@vorillaz](https://github.com/vorillaz)
- [development.svg.icons](https://github.com/benatespina/development.svg.icons) by [@benatespina](https://github.com/benatespina)
- [Learn Vimscript the Hard Way](http://learnvimscriptthehardway.stevelosh.com/) book by [Steve Losh](http://stevelosh.com/)
- All [contributors](https://github.com/ryanoasis/vim-devicons/graphs/contributors)
License
-------
[MIT](LICENSE)

View file

@ -0,0 +1,14 @@
" Version: 0.11.0
" Webpage: https://github.com/ryanoasis/vim-devicons
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
" License: see LICENSE
function! airline#extensions#tabline#formatters#webdevicons#format(bufnr, buffers) abort
" Call original formatter.
let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers)
return originalFormatter . g:WebDevIconsTabAirLineBeforeGlyphPadding .
\ WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . g:WebDevIconsTabAirLineAfterGlyphPadding
endfunction
" modeline syntax:
" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,30 @@
" Initialize for up to date ctrlp fork: ctrlpvim/ctrlp.vim
" Support for kien/ctrlp.vim deprecated since v0.7.0
" @TODO implementation for CtrlP buffer and find file mode
function! devicons#plugins#ctrlp#init() abort
let l:ctrlp_warning_message = 'vim-devicons: https://github.com/kien/ctrlp.vim is deprecated since v0.7.0, please use https://github.com/ctrlpvim/ctrlp.vim'
let l:ctrlp_warned_file = webdevicons#pluginHome() . '/status_warned_ctrlp'
if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp
let l:forkedCtrlp = exists('g:ctrlp_mruf_map_string')
if l:forkedCtrlp
if !exists('g:ctrlp_formatline_func')
" logic for ctrlpvim/ctrlp.vim:
let g:ctrlp_formatline_func = 's:formatline(s:curtype() == "buf" ? v:val : WebDevIconsGetFileTypeSymbol(v:val) . " " . v:val) '
endif
elseif empty(glob(l:ctrlp_warned_file))
" logic for kien/ctrlp.vim:
echohl WarningMsg |
\ echomsg l:ctrlp_warning_message
" only warn first time, do not warn again:
try
execute writefile(['File automatically generated after warning about CtrlP once', l:ctrlp_warning_message], l:ctrlp_warned_file)
catch
endtry
endif
endif
endfunction
" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,10 @@
function! devicons#plugins#denite#init() abort
let s:denite_ver = (exists('*denite#get_status_mode') ? 2 : 3)
if s:denite_ver == 3
call denite#custom#source('file,file/rec,file_mru,file/old,buffer,directory/rec,directory_mru', 'converters', ['devicons_denite_converter'])
else
call denite#custom#source('file,file_rec,file_mru,file_old,buffer,directory_rec,directory_mru', 'converters', ['devicons_denite_converter'])
endif
endfunction
" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,15 @@
function! devicons#plugins#flagship#init() abort
if g:webdevicons_enable_flagship_statusline
augroup webdevicons_flagship_filetype
autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileTypeSymbol')
augroup END
endif
if g:webdevicons_enable_flagship_statusline_fileformat_symbols
augroup webdevicons_flagship_filesymbol
autocmd User Flags call Hoist('buffer', 'WebDevIconsGetFileFormatSymbol')
augroup END
endif
endfunction
" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,6 @@
function! devicons#plugins#startify#init() abort
exec ":function! StartifyEntryFormat() abort \n return 'WebDevIconsGetFileTypeSymbol(absolute_path) .\" \". entry_path' \n endfunction"
endfunction
" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,37 @@
function! devicons#plugins#unite#init() abort
let s:filters = {
\ 'name': 'devicons_unite_converter'
\ }
function! s:filters.filter(candidates, context) abort
for candidate in a:candidates
if has_key(candidate, 'action__buffer_nr')
let bufname = bufname(candidate.action__buffer_nr)
let filename = fnamemodify(bufname, ':p:t')
let path = fnamemodify(bufname, ':p:h')
elseif has_key(candidate, 'word') && has_key(candidate, 'action__path')
let path = candidate.action__path
let filename = candidate.word
endif
let icon = WebDevIconsGetFileTypeSymbol(filename, isdirectory(filename))
" prevent filenames of buffers getting 'lost'
if filename != path
let path = printf('%s', filename)
endif
" Customize output format.
let candidate.abbr = printf('%s %s', icon, path)
endfor
return a:candidates
endfunction
call unite#define_filter(s:filters)
unlet s:filters
call unite#custom#source('file,file_rec,buffer,file_rec/async,file_rec/neovim,file_rec/neovim2,file_rec/git', 'converters', 'devicons_unite_converter')
endfunction
" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,8 @@
function! devicons#plugins#vimfiler#init() abort
call vimfiler#custom#profile('default', 'context', {
\ 'columns': 'devicons:size:time',
\ 'explorer_columns': 'devicons'
\ })
endfunction
" vim: tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,80 @@
"=============================================================================
" FILE: devicons.vim
" Version: 0.11.0
" Webpage: https://github.com/ryanoasis/vim-devicons
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
" License: MIT license {{{
" 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.
" }}}
"=============================================================================
let s:save_cpo = &cpo
set cpo&vim
function! vimfiler#columns#devicons#define() abort
return s:column
endfunction
let s:column = {
\ 'name' : 'devicons',
\ 'description' : 'get devicon glyph',
\ 'syntax' : 'vimfilerColumn__devicons',
\ }
function! s:column.length(files, context) abort
return 3
endfunction
function! s:column.define_syntax(context) abort "{{{
syntax match vimfilerColumn__TypeText '\[T\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeImage '\[I\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeArchive '\[A\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeExecute '\[X\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeMultimedia '\[M\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeDirectory '\[do\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeSystem '\[S\]'
\ contained containedin=vimfilerColumn__Type
syntax match vimfilerColumn__TypeLink '\[L\]'
\ contained containedin=vimfilerColumn__Type
highlight def link vimfilerColumn__TypeText Constant
highlight def link vimfilerColumn__TypeImage Type
highlight def link vimfilerColumn__TypeArchive Special
highlight def link vimfilerColumn__TypeExecute Statement
highlight def link vimfilerColumn__TypeMultimedia Identifier
highlight def link vimfilerColumn__TypeDirectory Preproc
highlight def link vimfilerColumn__TypeSystem Comment
highlight def link vimfilerColumn__TypeLink Comment
endfunction"}}}
function! s:column.get(file, context) abort
return WebDevIconsGetFileTypeSymbol(strpart(a:file.action__path, strridx(a:file.action__path, '/')), a:file.vimfiler__is_directory)
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: foldmethod=marker

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,389 @@
" Version: 0.11.0
" Webpage: https://github.com/ryanoasis/vim-devicons
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
" License: see LICENSE
" @todo fix duplicate global variable initialize here:
if !exists('g:webdevicons_enable')
let g:webdevicons_enable = 1
endif
if !exists('g:webdevicons_enable_nerdtree')
let g:webdevicons_enable_nerdtree = 1
endif
if !exists('g:DevIconsEnableFoldersOpenClose')
let g:DevIconsEnableFoldersOpenClose = 0
endif
if !exists('g:DevIconsEnableFolderPatternMatching')
let g:DevIconsEnableFolderPatternMatching = 1
endif
if !exists('g:DevIconsEnableFolderExtensionPatternMatching')
let g:DevIconsEnableFolderExtensionPatternMatching = 0
endif
" end @todo duplicate global variables
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
" actual font patcher)
if !exists('g:webdevicons_gui_glyph_fix')
if has('gui_running')
let g:webdevicons_gui_glyph_fix = 1
else
let g:webdevicons_gui_glyph_fix = 0
endif
endif
if !exists('g:DevIconsEnableNERDTreeRedraw')
if has('gui_running')
let g:DevIconsEnableNERDTreeRedraw = 1
else
let g:DevIconsEnableNERDTreeRedraw = 0
endif
endif
if g:webdevicons_enable_nerdtree == 1
if !exists('g:loaded_nerd_tree')
echohl WarningMsg |
\ echomsg 'vim-webdevicons requires NERDTree to be loaded before vim-webdevicons.'
endif
if exists('g:loaded_nerd_tree') && g:loaded_nerd_tree == 1 && !exists('g:NERDTreePathNotifier')
let g:webdevicons_enable_nerdtree = 0
echohl WarningMsg |
\ echomsg 'vim-webdevicons requires a newer version of NERDTree to show glyphs in NERDTree - consider updating NERDTree.'
endif
" @todo I don't even want this to execute UNLESS the user has the
" 'nerdtree-git-plugin' INSTALLED (not LOADED)
" As it currently functions this warning will display even if the user does
" not have nerdtree-git-plugin not just if it isn't loaded yet
" (not what we want)
"if !exists('g:loaded_nerdtree_git_status')
" echohl WarningMsg |
" \ echomsg 'vim-webdevicons works better when 'nerdtree-git-plugin' is loaded before vim-webdevicons (small refresh issues otherwise).'
"endif
endif
if !exists('g:webdevicons_enable_airline_tabline')
let g:webdevicons_enable_airline_tabline = 1
endif
if !exists('g:webdevicons_enable_airline_statusline')
let g:webdevicons_enable_airline_statusline = 1
endif
function! s:SetupListeners()
call g:NERDTreePathNotifier.AddListener('init', 'NERDTreeWebDevIconsRefreshListener')
call g:NERDTreePathNotifier.AddListener('refresh', 'NERDTreeWebDevIconsRefreshListener')
call g:NERDTreePathNotifier.AddListener('refreshFlags', 'NERDTreeWebDevIconsRefreshListener')
endfunction
" util like helpers
" scope: local
function! s:Refresh()
call b:NERDTree.root.refreshFlags()
call NERDTreeRender()
endfunction
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
" actual font patcher)
" NERDTree-C
" scope: global
function! WebDevIconsNERDTreeChangeRootHandler(node)
call b:NERDTree.changeRoot(a:node)
call NERDTreeRender()
call a:node.putCursorHere(0, 0)
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endfunction
" NERDTree-u
" scope: global
function! WebDevIconsNERDTreeUpDirCurrentRootClosedHandler()
call nerdtree#ui_glue#upDir(0)
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endfunction
function! WebDevIconsNERDTreeDirUpdateFlags(node, glyph)
let path = a:node.path
let isOpen = a:node.isOpen
let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding
let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding
let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0)
let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1)
let collapsesToSameLine = (exists('g:NERDTreeCascadeSingleChildDir') == 1)
let dirHasOnlyOneChildDir = 0
if collapsesToSameLine
" need to call to determin children:
call a:node._initChildren(1)
let dirHasOnlyOneChildDir = (a:node.getChildCount() ==# 1 && a:node.children[0].path.isDirectory)
endif
" properly set collapsed/combined directory display to opened glyph
if collapsesToSameLine && dirHasOnlyOneChildDir
call WebDevIconsNERDTreeDirOpen(a:node.children[0])
endif
" align vertically at the same level: non git-flag nodes with git-flag nodes
if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin
let prePadding .= ' '
endif
let flag = prePadding . a:glyph . postPadding
call a:node.path.flagSet.clearFlags('webdevicons')
if flag !=? ''
call a:node.path.flagSet.addFlag('webdevicons', flag)
"echom "added flag of " . flag
call a:node.path.refreshFlags(b:NERDTree)
"echom "flagset is now " . string(a:node.path.flagSet)
endif
endfunction
function! WebDevIconsNERDTreeDirClose(node)
let a:node.path.isOpen = 0
let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph)
endfunction
function! WebDevIconsNERDTreeDirOpen(node)
let a:node.path.isOpen = 1
let glyph = g:DevIconsDefaultFolderOpenSymbol
call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph)
endfunction
function! WebDevIconsNERDTreeDirOpenRecursively(node)
call WebDevIconsNERDTreeDirOpen(a:node)
for i in a:node.children
if i.path.isDirectory ==# 1
call WebDevIconsNERDTreeDirOpenRecursively(i)
endif
endfor
endfunction
function! WebDevIconsNERDTreeDirCloseRecursively(node)
call WebDevIconsNERDTreeDirClose(a:node)
for i in a:node.children
if i.path.isDirectory ==# 1
call WebDevIconsNERDTreeDirCloseRecursively(i)
endif
endfor
endfunction
function! WebDevIconsNERDTreeDirCloseChildren(node)
for i in a:node.children
if i.path.isDirectory ==# 1
call WebDevIconsNERDTreeDirClose(i)
endif
endfor
endfunction
" NERDTreeMapActivateNode and <2-LeftMouse>
" handle the user activating a tree node
" scope: global
function! WebDevIconsNERDTreeMapActivateNode(node)
let isOpen = a:node.isOpen
if isOpen
let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
else
let glyph = g:DevIconsDefaultFolderOpenSymbol
endif
let a:node.path.isOpen = !isOpen
call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph)
" continue with normal activate logic
call a:node.activate()
" glyph change possible artifact clean-up
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endfunction
" NERDTreeMapActivateNodeSingleMode
" handle the user activating a tree node if NERDTreeMouseMode is setted to 3
" scope: global
function! WebDevIconsNERDTreeMapActivateNodeSingleMode(node)
if g:NERDTreeMouseMode == 3
let isOpen = a:node.isOpen
if isOpen
let glyph = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
else
let glyph = g:DevIconsDefaultFolderOpenSymbol
endif
let a:node.path.isOpen = !isOpen
call WebDevIconsNERDTreeDirUpdateFlags(a:node, glyph)
" continue with normal activate logic
call a:node.activate()
" glyph change possible artifact clean-up
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endif
endfunction
function! WebDevIconsNERDTreeMapOpenRecursively(node)
" normal original logic:
call nerdtree#echo('Recursively opening node. Please wait...')
call a:node.openRecursively()
call WebDevIconsNERDTreeDirOpenRecursively(a:node)
" continue with normal original logic:
call b:NERDTree.render()
" glyph change possible artifact clean-up
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
call nerdtree#echo('Recursively opening node. Please wait... DONE')
endfunction
function! WebDevIconsNERDTreeMapCloseChildren(node)
" close children but not current node:
call WebDevIconsNERDTreeDirCloseChildren(a:node)
" continue with normal original logic:
call a:node.closeChildren()
call b:NERDTree.render()
call a:node.putCursorHere(0, 0)
" glyph change possible artifact clean-up
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endfunction
function! WebDevIconsNERDTreeMapCloseDir(node)
" continue with normal original logic:
let parent = a:node.parent
while g:NERDTreeCascadeOpenSingleChildDir && !parent.isRoot()
let childNodes = parent.getVisibleChildren()
if len(childNodes) == 1 && childNodes[0].path.isDirectory
let parent = parent.parent
else
break
endif
endwhile
if parent ==# {} || parent.isRoot()
call nerdtree#echo('cannot close tree root')
else
call parent.close()
" update the glyph
call WebDevIconsNERDTreeDirClose(parent)
call b:NERDTree.render()
call parent.putCursorHere(0, 0)
" glyph change possible artifact clean-up
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endif
endfunction
function! WebDevIconsNERDTreeMapUpdirKeepOpen()
call WebDevIconsNERDTreeDirOpen(b:NERDTree.root)
" continue with normal logic:
call nerdtree#ui_glue#upDir(1)
call s:Refresh()
" glyph change possible artifact clean-up
if g:DevIconsEnableNERDTreeRedraw ==# 1
redraw!
endif
endfunction
if g:webdevicons_enable == 1 && g:webdevicons_enable_nerdtree == 1
call s:SetupListeners()
if g:DevIconsEnableFoldersOpenClose
" These overrides are needed because we cannot
" simply use AddListener for reliably updating
" the folder open/close glyphs because the event
" path has no access to the 'isOpen' property
" some of these are a little more brittle/fragile
" than others
" TODO FIXME better way to reliably update
" open/close glyphs in NERDTreeWebDevIconsRefreshListener
" NERDTreeMapActivateNode
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapActivateNode,
\ 'callback': 'WebDevIconsNERDTreeMapActivateNode',
\ 'override': 1,
\ 'scope': 'DirNode' })
" NERDTreeMapCustomOpen
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapCustomOpen,
\ 'callback': 'WebDevIconsNERDTreeMapActivateNode',
\ 'override': 1,
\ 'scope': 'DirNode' })
" NERDTreeMapOpenRecursively
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapOpenRecursively,
\ 'callback': 'WebDevIconsNERDTreeMapOpenRecursively',
\ 'override': 1,
\ 'scope': 'DirNode' })
" NERDTreeMapCloseChildren
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapCloseChildren,
\ 'callback': 'WebDevIconsNERDTreeMapCloseChildren',
\ 'override': 1,
\ 'scope': 'DirNode' })
" NERDTreeMapCloseChildren
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapCloseDir,
\ 'callback': 'WebDevIconsNERDTreeMapCloseDir',
\ 'override': 1,
\ 'scope': 'Node' })
" <2-LeftMouse>
call NERDTreeAddKeyMap({
\ 'key': '<2-LeftMouse>',
\ 'callback': 'WebDevIconsNERDTreeMapActivateNode',
\ 'override': 1,
\ 'scope': 'DirNode' })
" <LeftRelease>
call NERDTreeAddKeyMap({
\ 'key': '<LeftRelease>',
\ 'callback': 'WebDevIconsNERDTreeMapActivateNodeSingleMode',
\ 'override': 1,
\ 'scope': 'DirNode' })
" NERDTreeMapUpdirKeepOpen
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapUpdirKeepOpen,
\ 'callback': 'WebDevIconsNERDTreeMapUpdirKeepOpen',
\ 'override': 1,
\ 'scope': 'all' })
endif
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
" actual font patcher)
if g:webdevicons_gui_glyph_fix ==# 1
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapChangeRoot,
\ 'callback': 'WebDevIconsNERDTreeChangeRootHandler',
\ 'override': 1,
\ 'quickhelpText': "change tree root to the\n\" selected dir\n\" plus devicons redraw\n\" hack fix",
\ 'scope': 'Node' })
call NERDTreeAddKeyMap({
\ 'key': g:NERDTreeMapUpdir,
\ 'callback': 'WebDevIconsNERDTreeUpDirCurrentRootClosedHandler',
\ 'override': 1,
\ 'quickhelpText': "move tree root up a dir\n\" plus devicons redraw\n\" hack fix",
\ 'scope': 'all' })
endif
endif
" modeline syntax:
" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,648 @@
" Version: 0.11.0
" Webpage: https://github.com/ryanoasis/vim-devicons
" Maintainer: Ryan McIntyre <ryanoasis@gmail.com>
" License: see LICENSE
let s:version = '0.11.0'
let s:plugin_home = expand('<sfile>:p:h:h')
" set scriptencoding after 'encoding' and when using multibyte chars
scriptencoding utf-8
" standard fix/safety: line continuation (avoiding side effects) {{{1
"========================================================================
let s:save_cpo = &cpo
set cpo&vim
" standard loading / not loading {{{1
"========================================================================
if exists('g:loaded_webdevicons')
finish
endif
let g:loaded_webdevicons = 1
" config enable / disable settings {{{1
"========================================================================
""
" Set the variable to the default value, only if variable is not defined.
"
" @param {string} var Variable name with its scope.
" @param {*} default Default value for variable.
""
function! s:set(var, default) abort
if !exists(a:var)
if type(a:default)
execute 'let' a:var '=' string(a:default)
else
execute 'let' a:var '=' a:default
endif
endif
endfunction
call s:set('g:webdevicons_enable', 1)
call s:set('g:webdevicons_enable_nerdtree', 1)
call s:set('g:webdevicons_enable_unite ', 1)
call s:set('g:webdevicons_enable_denite', 1)
call s:set('g:webdevicons_enable_vimfiler', 1)
call s:set('g:webdevicons_enable_ctrlp', 1)
call s:set('g:webdevicons_enable_airline_tabline', 1)
call s:set('g:webdevicons_enable_airline_statusline', 1)
call s:set('g:webdevicons_enable_airline_statusline_fileformat_symbols', 1)
call s:set('g:webdevicons_enable_flagship_statusline', 1)
call s:set('g:webdevicons_enable_flagship_statusline_fileformat_symbols', 1)
call s:set('g:webdevicons_enable_startify', 1)
call s:set('g:webdevicons_conceal_nerdtree_brackets', 1)
call s:set('g:DevIconsAppendArtifactFix', has('gui_running') ? 1 : 0)
call s:set('g:DevIconsArtifactFixChar', ' ')
" config options {{{1
"========================================================================
call s:set('g:WebDevIconsUnicodeDecorateFileNodes', 1)
call s:set('g:WebDevIconsUnicodeDecorateFolderNodes', 1)
call s:set('g:DevIconsEnableFoldersOpenClose', 0)
call s:set('g:DevIconsEnableFolderPatternMatching', 1)
call s:set('g:DevIconsEnableFolderExtensionPatternMatching', 0)
call s:set('g:WebDevIconsUnicodeDecorateFolderNodesExactMatches', 1)
call s:set('g:WebDevIconsUnicodeGlyphDoubleWidth', 1)
call s:set('g:WebDevIconsNerdTreeBeforeGlyphPadding', ' ')
call s:set('g:WebDevIconsNerdTreeAfterGlyphPadding', ' ')
call s:set('g:WebDevIconsNerdTreeGitPluginForceVAlign', 1)
call s:set('g:NERDTreeUpdateOnCursorHold', 1)
call s:set('g:WebDevIconsTabAirLineBeforeGlyphPadding', ' ')
call s:set('g:WebDevIconsTabAirLineAfterGlyphPadding', '')
" config defaults {{{1
"========================================================================
call s:set('g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol', '')
call s:set('g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol', '')
call s:set('g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol', g:DevIconsEnableFoldersOpenClose ? '' : '')
call s:set('g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol', '')
call s:set('g:DevIconsDefaultFolderOpenSymbol', '')
" functions {{{1
"========================================================================
" local functions {{{2
"========================================================================
" scope: local
function s:isDarwin()
if exists('s:is_darwin')
return s:is_darwin
endif
if exists('g:WebDevIconsOS')
let s:is_darwin = g:WebDevIconsOS ==? 'Darwin'
return s:is_darwin
endif
if has('macunix')
let s:is_darwin = 1
return s:is_darwin
endif
if ! has('unix')
let s:is_darwin = 0
return s:is_darwin
endif
if system('uname -s') ==# "Darwin\n"
let s:is_darwin = 1
else
let s:is_darwin = 0
endif
return s:is_darwin
endfunction
" scope: local
function! s:strip(input)
return substitute(a:input, '^\s*\(.\{-}\)\s*$', '\1', '')
endfunction
" scope: local
function! s:setDictionaries()
let s:file_node_extensions = {
\ 'styl' : '',
\ 'sass' : '',
\ 'scss' : '',
\ 'htm' : '',
\ 'html' : '',
\ 'slim' : '',
\ 'ejs' : '',
\ 'css' : '',
\ 'less' : '',
\ 'md' : '',
\ 'mdx' : '',
\ 'markdown' : '',
\ 'rmd' : '',
\ 'json' : '',
\ 'js' : '',
\ 'mjs' : '',
\ 'jsx' : '',
\ 'rb' : '',
\ 'php' : '',
\ 'py' : '',
\ 'pyc' : '',
\ 'pyo' : '',
\ 'pyd' : '',
\ 'coffee' : '',
\ 'mustache' : '',
\ 'hbs' : '',
\ 'conf' : '',
\ 'ini' : '',
\ 'yml' : '',
\ 'yaml' : '',
\ 'toml' : '',
\ 'bat' : '',
\ 'jpg' : '',
\ 'jpeg' : '',
\ 'bmp' : '',
\ 'png' : '',
\ 'gif' : '',
\ 'ico' : '',
\ 'twig' : '',
\ 'cpp' : '',
\ 'c++' : '',
\ 'cxx' : '',
\ 'cc' : '',
\ 'cp' : '',
\ 'c' : '',
\ 'cs' : '',
\ 'h' : '',
\ 'hh' : '',
\ 'hpp' : '',
\ 'hxx' : '',
\ 'hs' : '',
\ 'lhs' : '',
\ 'lua' : '',
\ 'java' : '',
\ 'sh' : '',
\ 'fish' : '',
\ 'bash' : '',
\ 'zsh' : '',
\ 'ksh' : '',
\ 'csh' : '',
\ 'awk' : '',
\ 'ps1' : '',
\ 'ml' : 'λ',
\ 'mli' : 'λ',
\ 'diff' : '',
\ 'db' : '',
\ 'sql' : '',
\ 'dump' : '',
\ 'clj' : '',
\ 'cljc' : '',
\ 'cljs' : '',
\ 'edn' : '',
\ 'scala' : '',
\ 'go' : '',
\ 'dart' : '',
\ 'xul' : '',
\ 'sln' : '',
\ 'suo' : '',
\ 'pl' : '',
\ 'pm' : '',
\ 't' : '',
\ 'rss' : '',
\ 'f#' : '',
\ 'fsscript' : '',
\ 'fsx' : '',
\ 'fs' : '',
\ 'fsi' : '',
\ 'rs' : '',
\ 'rlib' : '',
\ 'd' : '',
\ 'erl' : '',
\ 'hrl' : '',
\ 'ex' : '',
\ 'exs' : '',
\ 'eex' : '',
\ 'leex' : '',
\ 'vim' : '',
\ 'ai' : '',
\ 'psd' : '',
\ 'psb' : '',
\ 'ts' : '',
\ 'tsx' : '',
\ 'jl' : '',
\ 'pp' : '',
\ 'vue' : '﵂',
\ 'elm' : '',
\ 'swift' : '',
\ 'xcplayground' : ''
\}
let s:file_node_exact_matches = {
\ 'exact-match-case-sensitive-1.txt' : '1',
\ 'exact-match-case-sensitive-2' : '2',
\ 'gruntfile.coffee' : '',
\ 'gruntfile.js' : '',
\ 'gruntfile.ls' : '',
\ 'gulpfile.coffee' : '',
\ 'gulpfile.js' : '',
\ 'gulpfile.ls' : '',
\ 'mix.lock' : '',
\ 'dropbox' : '',
\ '.ds_store' : '',
\ '.gitconfig' : '',
\ '.gitignore' : '',
\ '.gitlab-ci.yml' : '',
\ '.bashrc' : '',
\ '.zshrc' : '',
\ '.vimrc' : '',
\ '.gvimrc' : '',
\ '_vimrc' : '',
\ '_gvimrc' : '',
\ '.bashprofile' : '',
\ 'favicon.ico' : '',
\ 'license' : '',
\ 'node_modules' : '',
\ 'react.jsx' : '',
\ 'procfile' : '',
\ 'dockerfile' : '',
\ 'docker-compose.yml' : '',
\}
let s:file_node_pattern_matches = {
\ '.*jquery.*\.js$' : '',
\ '.*angular.*\.js$' : '',
\ '.*backbone.*\.js$' : '',
\ '.*require.*\.js$' : '',
\ '.*materialize.*\.js$' : '',
\ '.*materialize.*\.css$' : '',
\ '.*mootools.*\.js$' : '',
\ '.*vimrc.*' : '',
\ 'Vagrantfile$' : ''
\}
if !exists('g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols')
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {}
endif
if !exists('g:WebDevIconsUnicodeDecorateFileNodesExactSymbols')
" do not remove: exact-match-case-sensitive-*
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols = {}
endif
if !exists('g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols')
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols = {}
endif
" iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously)
for [key, val] in items(s:file_node_extensions)
if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, key)
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[key] = val
endif
endfor
" iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously)
for [key, val] in items(s:file_node_exact_matches)
if !has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, key)
let g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[key] = val
endif
endfor
" iterate to fix allow user overriding of specific individual keys in vimrc (only gvimrc was working previously)
for [key, val] in items(s:file_node_pattern_matches)
if !has_key(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols, key)
let g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols[key] = val
endif
endfor
endfunction
" scope: local
function! s:setSyntax()
if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1
augroup webdevicons_conceal_nerdtree_brackets
au!
autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\]" contained conceal containedin=ALL
autocmd FileType nerdtree syntax match hideBracketsInNerdTree "\[" contained conceal containedin=ALL
autocmd FileType nerdtree setlocal conceallevel=3
autocmd FileType nerdtree setlocal concealcursor=nvic
augroup END
endif
endfunction
" scope: local
" stole solution/idea from nerdtree-git-plugin :)
function! s:setCursorHold()
if g:webdevicons_enable_nerdtree
augroup webdevicons_cursor_hold
autocmd CursorHold * silent! call s:CursorHoldUpdate()
augroup END
endif
endfunction
" scope: local
" stole solution/idea from nerdtree-git-plugin :)
function! s:CursorHoldUpdate()
if g:NERDTreeUpdateOnCursorHold != 1
return
endif
if !exists('g:NERDTree') || !g:NERDTree.IsOpen()
return
endif
" Do not update when a special buffer is selected
if !empty(&l:buftype)
return
endif
" winnr need to make focus go to opened file
" CursorToTreeWin needed to avoid error on opening file
let l:winnr = winnr()
let l:altwinnr = winnr('#')
call g:NERDTree.CursorToTreeWin()
call b:NERDTree.root.refreshFlags()
call NERDTreeRender()
exec l:altwinnr . 'wincmd w'
exec l:winnr . 'wincmd w'
endfunction
" scope: local
function! s:hardRefreshNerdTree()
if g:webdevicons_enable_nerdtree == 1 && g:webdevicons_conceal_nerdtree_brackets == 1 && g:NERDTree.IsOpen()
NERDTreeClose
NERDTree
endif
endfunction
" scope: local
function! s:softRefreshNerdTree()
if g:webdevicons_enable_nerdtree == 1 && g:NERDTree.IsOpen()
NERDTreeToggle
NERDTreeToggle
endif
endfunction
" local initialization {{{2
"========================================================================
" scope: local
function! s:initialize()
call s:setDictionaries()
call s:setSyntax()
call s:setCursorHold()
if exists('g:loaded_flagship') | call devicons#plugins#flagship#init() | endif
if exists('g:loaded_unite') && g:webdevicons_enable_unite | call devicons#plugins#unite#init() | endif
if exists('g:loaded_denite') && g:webdevicons_enable_denite | call devicons#plugins#denite#init() | endif
if exists('g:loaded_vimfiler') && g:webdevicons_enable_vimfiler | call devicons#plugins#vimfiler#init() | endif
if exists('g:loaded_ctrlp') && g:webdevicons_enable_ctrlp | call devicons#plugins#ctrlp#init() | endif
if exists('g:loaded_startify') && g:webdevicons_enable_startify | call devicons#plugins#startify#init() | endif
endfunction
" public functions {{{2
"========================================================================
" scope: public
function! webdevicons#version()
return s:version
endfunction
" scope: public
function! webdevicons#pluginHome()
return s:plugin_home
endfunction
" scope: public
" allow the first version of refresh to now call softRefresh
function! webdevicons#refresh()
call webdevicons#softRefresh()
endfunction
" scope: public
function! webdevicons#hardRefresh()
call s:setSyntax()
call s:hardRefreshNerdTree()
endfunction
" scope: public
function! webdevicons#softRefresh()
call s:setSyntax()
call s:softRefreshNerdTree()
endfunction
" a:1 (bufferName), a:2 (isDirectory)
" scope: public
function! WebDevIconsGetFileTypeSymbol(...)
if a:0 == 0
let fileNodeExtension = expand('%:e')
let fileNode = expand('%:t')
let isDirectory = 0
else
let fileNodeExtension = fnamemodify(a:1, ':e')
let fileNode = fnamemodify(a:1, ':t')
if a:0 > 1
let isDirectory = a:2
else
let isDirectory = 0
endif
endif
if isDirectory == 0 || g:DevIconsEnableFolderPatternMatching
let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
let fileNodeExtension = tolower(fileNodeExtension)
let fileNode = tolower(fileNode)
for [pattern, glyph] in items(g:WebDevIconsUnicodeDecorateFileNodesPatternSymbols)
if match(fileNode, pattern) != -1
let symbol = glyph
break
endif
endfor
if symbol == g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode)
let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode]
elseif ((isDirectory == 1 && g:DevIconsEnableFolderExtensionPatternMatching) || isDirectory == 0) && has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension)
let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension]
elseif isDirectory == 1
let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
endif
endif
else
let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
endif
let artifactFix = s:DevIconsGetArtifactFix()
return symbol . artifactFix
endfunction
" scope: local
" Temporary (hopefully) fix for glyph issues in gvim (proper fix is with the
" actual font patcher)
function! s:DevIconsGetArtifactFix()
if g:DevIconsAppendArtifactFix == 1
let artifactFix = g:DevIconsArtifactFixChar
else
let artifactFix = ''
endif
return artifactFix
endfunction
" scope: public
function! WebDevIconsGetFileFormatSymbol(...)
let fileformat = ''
let bomb = ''
if (&bomb && g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol !=? '')
let bomb = g:WebDevIconsUnicodeByteOrderMarkerDefaultSymbol . ' '
endif
if &fileformat ==? 'dos'
let fileformat = ''
elseif &fileformat ==? 'unix'
if s:isDarwin()
let fileformat = ''
else
let fileformat = ''
endif
elseif &fileformat ==? 'mac'
let fileformat = ''
endif
let artifactFix = s:DevIconsGetArtifactFix()
return bomb . fileformat . artifactFix
endfunction
" for airline plugin {{{3
"========================================================================
" scope: public
function! AirlineWebDevIcons(...)
let w:airline_section_x = get(w:, 'airline_section_x',
\ get(g:, 'airline_section_x', ''))
let w:airline_section_x .= ' %{WebDevIconsGetFileTypeSymbol()} '
let hasFileFormatEncodingPart = airline#parts#ffenc() !=? ''
if g:webdevicons_enable_airline_statusline_fileformat_symbols && hasFileFormatEncodingPart
let w:airline_section_y = ' %{&fenc . " " . WebDevIconsGetFileFormatSymbol()} '
endif
endfunction
if g:webdevicons_enable == 1 && exists('g:loaded_airline') && g:loaded_airline == 1 && g:webdevicons_enable_airline_statusline
call airline#add_statusline_func('AirlineWebDevIcons')
endif
if g:webdevicons_enable == 1 && g:webdevicons_enable_airline_tabline
" Store original formatter.
if exists('g:airline#extensions#tabline#formatter')
let g:_webdevicons_airline_orig_formatter = g:airline#extensions#tabline#formatter
else
let g:_webdevicons_airline_orig_formatter = 'default'
endif
let g:airline#extensions#tabline#formatter = 'webdevicons'
endif
" for nerdtree plugin {{{3
"========================================================================
" scope: public
function! NERDTreeWebDevIconsRefreshListener(event)
let path = a:event.subject
let postPadding = g:WebDevIconsNerdTreeAfterGlyphPadding
let prePadding = g:WebDevIconsNerdTreeBeforeGlyphPadding
let hasGitFlags = (len(path.flagSet._flagsForScope('git')) > 0)
let hasGitNerdTreePlugin = (exists('g:loaded_nerdtree_git_status') == 1)
let artifactFix = s:DevIconsGetArtifactFix()
" align vertically at the same level: non git-flag nodes with git-flag nodes
if g:WebDevIconsNerdTreeGitPluginForceVAlign && !hasGitFlags && hasGitNerdTreePlugin
let prePadding .= ' '
endif
if !path.isDirectory
" Hey we got a regular file, lets get it's proper icon
let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str()) . postPadding
elseif path.isDirectory && g:WebDevIconsUnicodeDecorateFolderNodes == 1
" Ok we got a directory, some more tests and checks
let directoryOpened = 0
if g:DevIconsEnableFoldersOpenClose && len(path.flagSet._flagsForScope('webdevicons')) > 0
" did the user set different icons for open and close?
" isOpen is not available on the path listener directly
" but we added one via overriding particular keymappings for NERDTree
if has_key(path, 'isOpen') && path.isOpen == 1
let directoryOpened = 1
endif
endif
if g:WebDevIconsUnicodeDecorateFolderNodesExactMatches == 1
" Did the user enable exact matching of folder type/names
" think node_modules
if g:DevIconsEnableFoldersOpenClose && directoryOpened
" the folder is open
let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding
else
" the folder is not open
if path.isSymLink
" We have a symlink
let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding
else
" We have a regular folder
let flag = prePadding . WebDevIconsGetFileTypeSymbol(path.str(), path.isDirectory) . postPadding
endif
endif
else
" the user did not enable exact matching
if g:DevIconsEnableFoldersOpenClose && directoryOpened
" the folder is open
let flag = prePadding . g:DevIconsDefaultFolderOpenSymbol . artifactFix . postPadding
else
" the folder is not open
if path.isSymLink
" We have a symlink
let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesSymlinkSymbol . artifactFix . postPadding
else
" We have a regular folder
let flag = prePadding . g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol . artifactFix . postPadding
endif
endif
endif
else
let flag = prePadding . ' ' . artifactFix . postPadding
endif
call path.flagSet.clearFlags('webdevicons')
if flag !=? ''
call path.flagSet.addFlag('webdevicons', flag)
endif
endfunction
" call setup after processing all the functions (to avoid errors) {{{1
"========================================================================
" had some issues with VimEnter, for now using:
call s:initialize()
" standard fix/safety: line continuation (avoiding side effects) {{{1
"========================================================================
let &cpo = s:save_cpo
unlet s:save_cpo
" modeline syntax:
" vim: fdm=marker tabstop=2 softtabstop=2 shiftwidth=2 expandtab:

View file

@ -0,0 +1,2 @@
import pkg_resources
pkg_resources.declare_namespace(__name__)

Some files were not shown because too many files have changed in this diff Show more