The NIX update

This commit is contained in:
2024-10-09 16:55:47 +01:00
parent da1ac8eb6f
commit aace32af13
341 changed files with 1136 additions and 44347 deletions

View File

@@ -1,44 +1,25 @@
# Trude's Dotfiles
![banner](images/banner-debian.png)
<p align="center">
<img width="150" height="150" src="images/logo-circle.png">
<img width="150" height="150" src="images/nix-snowflake-colours.svg">
</p>
Welcome to Trude's dotfiles. Here you will find my personal configurations, tools and scripts.
Some of these only apply to the `trude` user, and assume the repository is always placed at `$HOME/dotfiles`. I highly recommend anyone interested to fork the repository and modify the configurations to your liking.
This repo can be used as a base for your own dotfiles.
Looking for my **sway** dotfiles? [Click Here](https://github.com/TrudeEH/dotfiles/tree/arch-sway)
I highly recommend anyone interested to fork the repository and modify the configurations to your liking.
This repository can be used as a base for your own dotfiles.
## Structure
- `install.sh` Install the dotfiles and set up a new Debian machine with popular applications and tools.
- `scripts/` Scripts directory. You may find some useful snippets here. These are never used as dependencies.
- `dotfiles/.local/bin` Dmenu scripts and scripts used by other programs.
- `install.sh`
- `scripts/` Scripts directory. You may find some useful snippets here.
- `nix/` Nix configurations for Linux and macOS.
- `nix-shells/` Nix shells for development environments and temporary programs.
## Getting Started
1. Fork the repository to be able to customize it and make it your own.
1. Install `git` and `curl`.
2. Run the install script:
2. Run the install script by executing the code below in your terminal.
```sh
git clone <your repository>
cd dotfiles
./install.sh
sh <(curl -L https://raw.githubusercontent.com/TrudeEH/dotfiles/refs/heads/main/install.sh)
```
3. Make it your own! Tweak the install script, change some settings and add in your own.
## Screenshots
### Installer
![screenshot 1](images/dialog.png)
### Desktop
![screenshot 1](images/sc1.png)
![screenshot 2](images/sc2.png)
## Tested on
- ChromeOS Crostini (Debian 12 Container)
- Debian 12
- Linux Mint 21.3
- Ubuntu 24.04
## Gruvbox theme
![theme](images/gruvbox.png)

View File

@@ -1,5 +0,0 @@
# Change Xorg display scaling if needed.
# Xft.dpi: 192 # 200% Scale
# Xft.dpi: 160 # 166% Scale
# Xft.dpi: 96 # Default

View File

@@ -1,119 +0,0 @@
export EDITOR="nvim"
export PS1="\n[\[\e[37m\]\u\[\e[0m\]@\[\e[37;2m\]\h\[\e[0m\]] \[\e[1m\]\w \[\e[0;2m\]J:\[\e[0m\]\j\n\$ "
update() {
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
sudo apt autoclean
}
extract() {
if [ -f $1 ]; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
pushall() {
if [[ -z "$1" ]]; then
echo "Usage: pushall \"commit message\""
else
git pull
git diff
read -p "Press ENTER to continue..."
git add -A
git commit -m "$@"
git push
fi
}
hex2color() {
hex=${1#"#"}
r=$(printf '0x%0.2s' "$hex")
g=$(printf '0x%0.2s' ${hex#??})
b=$(printf '0x%0.2s' ${hex#????})
printf '%03d' "$(((r < 75 ? 0 : (r - 35) / 40) * 6 * 6 + (\
g < 75 ? 0 : (g - 35) / 40) * 6 + (\
b < 75 ? 0 : (b - 35) / 40) + 16))"
}
color2hex() {
dec=$(($1 % 256)) ### input must be a number in range 0-255.
if [ "$dec" -lt "16" ]; then
bas=$((dec % 16))
mul=128
[ "$bas" -eq "7" ] && mul=192
[ "$bas" -eq "8" ] && bas=7
[ "$bas" -gt "8" ] && mul=255
a="$(((bas & 1) * mul))"
b="$((((bas & 2) >> 1) * mul))"
c="$((((bas & 4) >> 2) * mul))"
printf 'dec= %3s basic= #%02x%02x%02x\n' "$dec" "$a" "$b" "$c"
elif [ "$dec" -gt 15 ] && [ "$dec" -lt 232 ]; then
b=$(((dec - 16) % 6))
b=$((b == 0 ? 0 : b * 40 + 55))
g=$(((dec - 16) / 6 % 6))
g=$((g == 0 ? 0 : g * 40 + 55))
r=$(((dec - 16) / 36))
r=$((r == 0 ? 0 : r * 40 + 55))
printf 'dec= %3s color= #%02x%02x%02x\n' "$dec" "$r" "$g" "$b"
else
gray=$(((dec - 232) * 10 + 8))
printf 'dec= %3s gray= #%02x%02x%02x\n' "$dec" "$gray" "$gray" "$gray"
fi
}
# Commands that should be applied only for interactive shells.
[[ $- == *i* ]] || return
HISTFILESIZE=100000
HISTSIZE=10000
shopt -s histappend
shopt -s checkwinsize
shopt -s extglob
shopt -s globstar
shopt -s checkjobs
alias l='ls -alh'
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias ll='ls -lhi'
alias ta='tmux attach'
alias t='tmux'
alias v='nvim'
alias cpp='rsync -ah --progress'
alias code='code --enable-features=UseOzonePlatform --ozone-platform=wayland'
set completion-ignore-case On
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] &&
. /usr/share/bash-completion/bash_completion
export OFLAGS="--ozone-platform-hint=auto"
export PATH=$PATH:/home/trude/.local/bin
if [[ -z $TMUX ]]; then
tmux attach
if [[ $? == 1 ]]; then
tmux new -s main
fi
fi

View File

@@ -1,436 +0,0 @@
# See dunst(5) for all configuration options
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
### Geometry ###
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 400
# The maximum height of a single notification, excluding the frame.
height = 400
# Position the notification in the top right corner
origin = top-center
# Offset from the origin
offset = 10x10
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 4
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 10
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
# Show how many messages are currently hidden (because of
# notification_limit).
indicate_hidden = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 15
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 1
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 10
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#ebdbb2"
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
idle_threshold = 120
### Text ###
font = JetBrains Mono Nerd Font 10
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "%s %p\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = center
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Align icons left/right/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 0
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 64
# Paths to default icons.
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = dmenu -p dunst:
# Browser for opening urls in context menu.
browser = firefox -new-tab
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# applications (default: overlay)
# layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#282828"
foreground = "#ebdbb2"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#new_icon = /path/to/icon
[urgency_normal]
background = "#282828"
foreground = "#ebdbb2"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#new_icon = /path/to/icon
[urgency_critical]
background = "#282828"
foreground = "#ebdbb2"
frame_color = "#fb4934"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#new_icon = /path/to/icon
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

View File

@@ -1,10 +0,0 @@
[user]
email = "ehtrude@gmail.com"
name = "TrudeEH"
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential

View File

@@ -1,61 +0,0 @@
backend = "glx"
glx-no-stencil = true
glx-copy-from-front = false
# Opacity
active-opacity = 1
inactive-opacity = 1
frame-opacity = 1
#inactive-opacity-override = false;
#blur-background = false;
#blur-background-exclude = [
# "window_type = 'dock'
#]
#blur-method = "dual_kawase";
#blur-strength = 8;
# Fading
fading = false
#fade-delta = 2;
#no-fading-openclose = false;
#fade-exclude = [ ];
# Other
#mark-wmwin-focused = true;
#mark-ovredir-focused = true;
#detect-rounded-corners = true;
#detect-clien-opacity = true;
vsync = true
dbe = false
#unredir-if-possible = false;
#focus-exclude = [ ];
#detect-transient = true;
#detect-client-leader = true;
# Window type settings
#wintypes:
#{
# dock = {
# shadow = false;
# };
#};
# Window transparency
opacity-rule = [
#"90:class_g = 'st'",
]
shadow = false
#shadow-radius = 12;
#shadow-offset-x = -5;
#shadow-offset-y = -5;
#shadow-opacity = 0.5;
#shadow-green = 1.0;
#shadow-exclude = [ ];
#corner-radius = 0;
xrender-sync-fence = true

View File

@@ -1,88 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$CURRENT_DIR/scripts/helpers.sh"
cpu_interpolation=(
"\#{cpu_percentage}"
"\#{cpu_icon}"
"\#{cpu_bg_color}"
"\#{cpu_fg_color}"
"\#{gpu_percentage}"
"\#{gpu_icon}"
"\#{gpu_bg_color}"
"\#{gpu_fg_color}"
"\#{ram_percentage}"
"\#{ram_icon}"
"\#{ram_bg_color}"
"\#{ram_fg_color}"
"\#{gram_percentage}"
"\#{gram_icon}"
"\#{gram_bg_color}"
"\#{gram_fg_color}"
"\#{cpu_temp}"
"\#{cpu_temp_icon}"
"\#{cpu_temp_bg_color}"
"\#{cpu_temp_fg_color}"
"\#{gpu_temp}"
"\#{gpu_temp_icon}"
"\#{gpu_temp_bg_color}"
"\#{gpu_temp_fg_color}"
)
cpu_commands=(
"#($CURRENT_DIR/scripts/cpu_percentage.sh)"
"#($CURRENT_DIR/scripts/cpu_icon.sh)"
"#($CURRENT_DIR/scripts/cpu_bg_color.sh)"
"#($CURRENT_DIR/scripts/cpu_fg_color.sh)"
"#($CURRENT_DIR/scripts/gpu_percentage.sh)"
"#($CURRENT_DIR/scripts/gpu_icon.sh)"
"#($CURRENT_DIR/scripts/gpu_bg_color.sh)"
"#($CURRENT_DIR/scripts/gpu_fg_color.sh)"
"#($CURRENT_DIR/scripts/ram_percentage.sh)"
"#($CURRENT_DIR/scripts/ram_icon.sh)"
"#($CURRENT_DIR/scripts/ram_bg_color.sh)"
"#($CURRENT_DIR/scripts/ram_fg_color.sh)"
"#($CURRENT_DIR/scripts/gram_percentage.sh)"
"#($CURRENT_DIR/scripts/gram_icon.sh)"
"#($CURRENT_DIR/scripts/gram_bg_color.sh)"
"#($CURRENT_DIR/scripts/gram_fg_color.sh)"
"#($CURRENT_DIR/scripts/cpu_temp.sh)"
"#($CURRENT_DIR/scripts/cpu_temp_icon.sh)"
"#($CURRENT_DIR/scripts/cpu_temp_bg_color.sh)"
"#($CURRENT_DIR/scripts/cpu_temp_fg_color.sh)"
"#($CURRENT_DIR/scripts/gpu_temp.sh)"
"#($CURRENT_DIR/scripts/gpu_temp_icon.sh)"
"#($CURRENT_DIR/scripts/gpu_temp_bg_color.sh)"
"#($CURRENT_DIR/scripts/gpu_temp_fg_color.sh)"
)
set_tmux_option() {
local option=$1
local value=$2
tmux set-option -gq "$option" "$value"
}
do_interpolation() {
local all_interpolated="$1"
for ((i = 0; i < ${#cpu_commands[@]}; i++)); do
all_interpolated=${all_interpolated//${cpu_interpolation[$i]}/${cpu_commands[$i]}}
done
echo "$all_interpolated"
}
update_tmux_option() {
local option
local option_value
local new_option_value
option=$1
option_value=$(get_tmux_option "$option")
new_option_value=$(do_interpolation "$option_value")
set_tmux_option "$option" "$new_option_value"
}
main() {
update_tmux_option "status-right"
update_tmux_option "status-left"
}
main

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
cpu_low_bg_color=""
cpu_medium_bg_color=""
cpu_high_bg_color=""
cpu_low_default_bg_color="#[bg=green]"
cpu_medium_default_bg_color="#[bg=yellow]"
cpu_high_default_bg_color="#[bg=red]"
get_bg_color_settings() {
cpu_low_bg_color=$(get_tmux_option "@cpu_low_bg_color" "$cpu_low_default_bg_color")
cpu_medium_bg_color=$(get_tmux_option "@cpu_medium_bg_color" "$cpu_medium_default_bg_color")
cpu_high_bg_color=$(get_tmux_option "@cpu_high_bg_color" "$cpu_high_default_bg_color")
}
print_bg_color() {
local cpu_percentage
local load_status
cpu_percentage=$("$CURRENT_DIR"/cpu_percentage.sh | sed -e 's/%//')
load_status=$(load_status "$cpu_percentage" "cpu")
if [ "$load_status" == "low" ]; then
echo "$cpu_low_bg_color"
elif [ "$load_status" == "medium" ]; then
echo "$cpu_medium_bg_color"
elif [ "$load_status" == "high" ]; then
echo "$cpu_high_bg_color"
fi
}
main() {
get_bg_color_settings
print_bg_color
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
cpu_low_fg_color=""
cpu_medium_fg_color=""
cpu_high_fg_color=""
cpu_low_default_fg_color="#[fg=green]"
cpu_medium_default_fg_color="#[fg=yellow]"
cpu_high_default_fg_color="#[fg=red]"
get_fg_color_settings() {
cpu_low_fg_color=$(get_tmux_option "@cpu_low_fg_color" "$cpu_low_default_fg_color")
cpu_medium_fg_color=$(get_tmux_option "@cpu_medium_fg_color" "$cpu_medium_default_fg_color")
cpu_high_fg_color=$(get_tmux_option "@cpu_high_fg_color" "$cpu_high_default_fg_color")
}
print_fg_color() {
local cpu_percentage
local load_status
cpu_percentage=$("$CURRENT_DIR"/cpu_percentage.sh | sed -e 's/%//')
load_status=$(load_status "$cpu_percentage" "cpu")
if [ "$load_status" == "low" ]; then
echo "$cpu_low_fg_color"
elif [ "$load_status" == "medium" ]; then
echo "$cpu_medium_fg_color"
elif [ "$load_status" == "high" ]; then
echo "$cpu_high_fg_color"
fi
}
main() {
get_fg_color_settings
print_fg_color
}
main "$@"

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
# script global variables
cpu_low_icon=""
cpu_medium_icon=""
cpu_high_icon=""
cpu_low_default_icon="="
cpu_medium_default_icon="≡"
cpu_high_default_icon="≣"
# icons are set as script global variables
get_icon_settings() {
cpu_low_icon=$(get_tmux_option "@cpu_low_icon" "$cpu_low_default_icon")
cpu_medium_icon=$(get_tmux_option "@cpu_medium_icon" "$cpu_medium_default_icon")
cpu_high_icon=$(get_tmux_option "@cpu_high_icon" "$cpu_high_default_icon")
}
print_icon() {
local cpu_percentage
local load_status
cpu_percentage=$("$CURRENT_DIR"/cpu_percentage.sh | sed -e 's/%//')
load_status=$(load_status "$cpu_percentage" "cpu")
if [ "$load_status" == "low" ]; then
echo "$cpu_low_icon"
elif [ "$load_status" == "medium" ]; then
echo "$cpu_medium_icon"
elif [ "$load_status" == "high" ]; then
echo "$cpu_high_icon"
fi
}
main() {
get_icon_settings
print_icon "$1"
}
main "$@"

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
cpu_percentage_format="%3.1f%%"
print_cpu_percentage() {
cpu_percentage_format=$(get_tmux_option "@cpu_percentage_format" "$cpu_percentage_format")
if command_exists "iostat"; then
if is_linux_iostat; then
cached_eval iostat -c 1 2 | sed '/^\s*$/d' | tail -n 1 | awk -v format="$cpu_percentage_format" '{usage=100-$NF} END {printf(format, usage)}' | sed 's/,/./'
elif is_osx; then
cached_eval iostat -c 2 disk0 | sed '/^\s*$/d' | tail -n 1 | awk -v format="$cpu_percentage_format" '{usage=100-$6} END {printf(format, usage)}' | sed 's/,/./'
elif is_freebsd || is_openbsd; then
cached_eval iostat -c 2 | sed '/^\s*$/d' | tail -n 1 | awk -v format="$cpu_percentage_format" '{usage=100-$NF} END {printf(format, usage)}' | sed 's/,/./'
else
echo "Unknown iostat version please create an issue"
fi
elif command_exists "sar"; then
cached_eval sar -u 1 1 | sed '/^\s*$/d' | tail -n 1 | awk -v format="$cpu_percentage_format" '{usage=100-$NF} END {printf(format, usage)}' | sed 's/,/./'
else
if is_cygwin; then
usage="$(cached_eval WMIC cpu get LoadPercentage | grep -Eo '^[0-9]+')"
# shellcheck disable=SC2059
printf "$cpu_percentage_format" "$usage"
else
load=$(cached_eval ps -aux | awk '{print $3}' | tail -n+2 | awk '{s+=$1} END {print s}')
cpus=$(cpus_number)
echo "$load $cpus" | awk -v format="$cpu_percentage_format" '{printf format, $1/$2}'
fi
fi
}
main() {
print_cpu_percentage
}
main

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
cpu_temp_format="%2.0f"
cpu_temp_unit="C"
print_cpu_temp() {
cpu_temp_format=$(get_tmux_option "@cpu_temp_format" "$cpu_temp_format")
cpu_temp_unit=$(get_tmux_option "@cpu_temp_unit" "$cpu_temp_unit")
if command_exists "sensors"; then
local val
if [[ "$cpu_temp_unit" == F ]]; then
val="$(sensors -f)"
else
val="$(sensors)"
fi
echo "$val" | sed -e 's/^Tccd/Core /' | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}'
fi
}
main() {
print_cpu_temp
}
main

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
cpu_temp_low_bg_color=""
cpu_temp_medium_bg_color=""
cpu_temp_high_bg_color=""
cpu_temp_low_default_bg_color="#[bg=green]"
cpu_temp_medium_default_bg_color="#[bg=yellow]"
cpu_temp_high_default_bg_color="#[bg=red]"
get_bg_color_settings() {
cpu_temp_low_bg_color=$(get_tmux_option "@cpu_temp_low_bg_color" "$cpu_temp_low_default_bg_color")
cpu_temp_medium_bg_color=$(get_tmux_option "@cpu_temp_medium_bg_color" "$cpu_temp_medium_default_bg_color")
cpu_temp_high_bg_color=$(get_tmux_option "@cpu_temp_high_bg_color" "$cpu_temp_high_default_bg_color")
}
print_bg_color() {
local cpu_temp
local cpu_temp_status
cpu_temp=$("$CURRENT_DIR"/cpu_temp.sh | sed -e 's/[^0-9.]//')
cpu_temp_status=$(temp_status "$cpu_temp")
if [ "$cpu_temp_status" == "low" ]; then
echo "$cpu_temp_low_bg_color"
elif [ "$cpu_temp_status" == "medium" ]; then
echo "$cpu_temp_medium_bg_color"
elif [ "$cpu_temp_status" == "high" ]; then
echo "$cpu_temp_high_bg_color"
fi
}
main() {
get_bg_color_settings
print_bg_color
}
main

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
cpu_temp_low_fg_color=""
cpu_temp_medium_fg_color=""
cpu_temp_high_fg_color=""
cpu_temp_low_default_fg_color="#[fg=green]"
cpu_temp_medium_default_fg_color="#[fg=yellow]"
cpu_temp_high_default_fg_color="#[fg=red]"
get_fg_color_settings() {
cpu_temp_low_fg_color=$(get_tmux_option "@cpu_temp_low_fg_color" "$cpu_temp_low_default_fg_color")
cpu_temp_medium_fg_color=$(get_tmux_option "@cpu_temp_medium_fg_color" "$cpu_temp_medium_default_fg_color")
cpu_temp_high_fg_color=$(get_tmux_option "@cpu_temp_high_fg_color" "$cpu_temp_high_default_fg_color")
}
print_fg_color() {
local cpu_temp
local cpu_temp_status
cpu_temp=$("$CURRENT_DIR"/cpu_temp.sh | sed -e 's/[^0-9.]//')
cpu_temp_status=$(temp_status "$cpu_temp")
if [ "$cpu_temp_status" == "low" ]; then
echo "$cpu_temp_low_fg_color"
elif [ "$cpu_temp_status" == "medium" ]; then
echo "$cpu_temp_medium_fg_color"
elif [ "$cpu_temp_status" == "high" ]; then
echo "$cpu_temp_high_fg_color"
fi
}
main() {
get_fg_color_settings
print_fg_color
}
main

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
# script global variables
cpu_temp_low_icon=""
cpu_temp_medium_icon=""
cpu_temp_high_icon=""
cpu_temp_low_default_icon="="
cpu_temp_medium_default_icon="≡"
cpu_temp_high_default_icon="≣"
# icons are set as script global variables
get_icon_settings() {
cpu_temp_low_icon=$(get_tmux_option "@cpu_temp_low_icon" "$cpu_temp_low_default_icon")
cpu_temp_medium_icon=$(get_tmux_option "@cpu_temp_medium_icon" "$cpu_temp_medium_default_icon")
cpu_temp_high_icon=$(get_tmux_option "@cpu_temp_high_icon" "$cpu_temp_high_default_icon")
}
print_icon() {
local cpu_temp
local cpu_temp_status
cpu_temp=$("$CURRENT_DIR"/cpu_temp.sh | sed -e 's/[^0-9.]//')
cpu_temp_status=$(temp_status "$cpu_temp")
if [ "$cpu_temp_status" == "low" ]; then
echo "$cpu_temp_low_icon"
elif [ "$cpu_temp_status" == "medium" ]; then
echo "$cpu_temp_medium_icon"
elif [ "$cpu_temp_status" == "high" ]; then
echo "$cpu_temp_high_icon"
fi
}
main() {
get_icon_settings
print_icon "$1"
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gpu_low_bg_color=""
gpu_medium_bg_color=""
gpu_high_bg_color=""
gpu_low_default_bg_color="#[bg=green]"
gpu_medium_default_bg_color="#[bg=yellow]"
gpu_high_default_bg_color="#[bg=red]"
get_bg_color_settings() {
gpu_low_bg_color=$(get_tmux_option "@gpu_low_bg_color" "$gpu_low_default_bg_color")
gpu_medium_bg_color=$(get_tmux_option "@gpu_medium_bg_color" "$gpu_medium_default_bg_color")
gpu_high_bg_color=$(get_tmux_option "@gpu_high_bg_color" "$gpu_high_default_bg_color")
}
print_bg_color() {
local gpu_percentage
local gpu_load_status
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
if [ "$gpu_load_status" == "low" ]; then
echo "$gpu_low_bg_color"
elif [ "$gpu_load_status" == "medium" ]; then
echo "$gpu_medium_bg_color"
elif [ "$gpu_load_status" == "high" ]; then
echo "$gpu_high_bg_color"
fi
}
main() {
get_bg_color_settings
print_bg_color
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gpu_low_fg_color=""
gpu_medium_fg_color=""
gpu_high_fg_color=""
gpu_low_default_fg_color="#[fg=green]"
gpu_medium_default_fg_color="#[fg=yellow]"
gpu_high_default_fg_color="#[fg=red]"
get_fg_color_settings() {
gpu_low_fg_color=$(get_tmux_option "@gpu_low_fg_color" "$gpu_low_default_fg_color")
gpu_medium_fg_color=$(get_tmux_option "@gpu_medium_fg_color" "$gpu_medium_default_fg_color")
gpu_high_fg_color=$(get_tmux_option "@gpu_high_fg_color" "$gpu_high_default_fg_color")
}
print_fg_color() {
local gpu_percentage
local gpu_load_status
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
if [ "$gpu_load_status" == "low" ]; then
echo "$gpu_low_fg_color"
elif [ "$gpu_load_status" == "medium" ]; then
echo "$gpu_medium_fg_color"
elif [ "$gpu_load_status" == "high" ]; then
echo "$gpu_high_fg_color"
fi
}
main() {
get_fg_color_settings
print_fg_color
}
main "$@"

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
# script global variables
gpu_low_icon=""
gpu_medium_icon=""
gpu_high_icon=""
gpu_low_default_icon="="
gpu_medium_default_icon="≡"
gpu_high_default_icon="≣"
# icons are set as script global variables
get_icon_settings() {
gpu_low_icon=$(get_tmux_option "@gpu_low_icon" "$gpu_low_default_icon")
gpu_medium_icon=$(get_tmux_option "@gpu_medium_icon" "$gpu_medium_default_icon")
gpu_high_icon=$(get_tmux_option "@gpu_high_icon" "$gpu_high_default_icon")
}
print_icon() {
local gpu_percentage
local gpu_load_status
gpu_percentage=$("$CURRENT_DIR"/gpu_percentage.sh | sed -e 's/%//')
gpu_load_status=$(load_status "$gpu_percentage" "gpu")
if [ "$gpu_load_status" == "low" ]; then
echo "$gpu_low_icon"
elif [ "$gpu_load_status" == "medium" ]; then
echo "$gpu_medium_icon"
elif [ "$gpu_load_status" == "high" ]; then
echo "$gpu_high_icon"
fi
}
main() {
get_icon_settings
print_icon "$1"
}
main "$@"

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gpu_percentage_format="%3.1f%%"
print_gpu_percentage() {
gpu_percentage_format=$(get_tmux_option "@gpu_percentage_format" "$gpu_percentage_format")
if command_exists "nvidia-smi"; then
loads=$(cached_eval nvidia-smi)
elif command_exists "cuda-smi"; then
loads=$(cached_eval cuda-smi)
else
echo "No GPU"
return
fi
echo "$loads" | sed -nr 's/.*\s([0-9]+)%.*/\1/p' | awk -v format="$gpu_percentage_format" '{sum+=$1; n+=1} END {printf format, sum/n}'
}
main() {
print_gpu_percentage
}
main

View File

@@ -1,34 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gpu_temp_format="%2.0f"
gpu_temp_unit="C"
print_gpu_temp() {
gpu_temp_format=$(get_tmux_option "@gpu_temp_format" "$gpu_temp_format")
gpu_temp_unit=$(get_tmux_option "@gpu_temp_unit" "$gpu_temp_unit")
if command_exists "nvidia-smi"; then
loads=$(cached_eval nvidia-smi)
elif command_exists "cuda-smi"; then
loads=$(cached_eval cuda-smi)
else
echo "No GPU"
return
fi
tempC=$(echo "$loads" | sed -nr 's/.*\s([0-9]+)C.*/\1/p' | awk '{sum+=$1; n+=1} END {printf "%5.3f", sum/n}')
if [ "$gpu_temp_unit" == "C" ]; then
echo "$tempC" | awk -v format="${gpu_temp_format}C" '{sum+=$1} END {printf format, sum}'
else
echo "$tempC" | awk -v format="${gpu_temp_format}F" '{sum+=$1} END {printf format, sum*9/5+32}'
fi
}
main() {
print_gpu_temp
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gpu_temp_low_bg_color=""
gpu_temp_medium_bg_color=""
gpu_temp_high_bg_color=""
gpu_temp_low_default_bg_color="#[bg=green]"
gpu_temp_medium_default_bg_color="#[bg=yellow]"
gpu_temp_high_default_bg_color="#[bg=red]"
get_bg_color_settings() {
gpu_temp_low_bg_color=$(get_tmux_option "@gpu_temp_low_bg_color" "$gpu_temp_low_default_bg_color")
gpu_temp_medium_bg_color=$(get_tmux_option "@gpu_temp_medium_bg_color" "$gpu_temp_medium_default_bg_color")
gpu_temp_high_bg_color=$(get_tmux_option "@gpu_temp_high_bg_color" "$gpu_temp_high_default_bg_color")
}
print_bg_color() {
local gpu_temp
local gpu_temp_status
gpu_temp=$("$CURRENT_DIR"/gpu_temp.sh | sed -e 's/[^0-9.]//')
gpu_temp_status=$(temp_status "$gpu_temp")
if [ "$gpu_temp_status" == "low" ]; then
echo "$gpu_temp_low_bg_color"
elif [ "$gpu_temp_status" == "medium" ]; then
echo "$gpu_temp_medium_bg_color"
elif [ "$gpu_temp_status" == "high" ]; then
echo "$gpu_temp_high_bg_color"
fi
}
main() {
get_bg_color_settings
print_bg_color
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gpu_temp_low_fg_color=""
gpu_temp_medium_fg_color=""
gpu_temp_high_fg_color=""
gpu_temp_low_default_fg_color="#[fg=green]"
gpu_temp_medium_default_fg_color="#[fg=yellow]"
gpu_temp_high_default_fg_color="#[fg=red]"
get_fg_color_settings() {
gpu_temp_low_fg_color=$(get_tmux_option "@gpu_temp_low_fg_color" "$gpu_temp_low_default_fg_color")
gpu_temp_medium_fg_color=$(get_tmux_option "@gpu_temp_medium_fg_color" "$gpu_temp_medium_default_fg_color")
gpu_temp_high_fg_color=$(get_tmux_option "@gpu_temp_high_fg_color" "$gpu_temp_high_default_fg_color")
}
print_fg_color() {
local gpu_temp
local gpu_temp_status
gpu_temp=$("$CURRENT_DIR"/gpu_temp.sh | sed -e 's/[^0-9.]//')
gpu_temp_status=$(temp_status "$gpu_temp")
if [ "$gpu_temp_status" == "low" ]; then
echo "$gpu_temp_low_fg_color"
elif [ "$gpu_temp_status" == "medium" ]; then
echo "$gpu_temp_medium_fg_color"
elif [ "$gpu_temp_status" == "high" ]; then
echo "$gpu_temp_high_fg_color"
fi
}
main() {
get_fg_color_settings
print_fg_color
}
main "$@"

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
# script global variables
gpu_temp_low_icon=""
gpu_temp_medium_icon=""
gpu_temp_high_icon=""
gpu_temp_low_default_icon="="
gpu_temp_medium_default_icon="≡"
gpu_temp_high_default_icon="≣"
# icons are set as script global variables
get_icon_settings() {
gpu_temp_low_icon=$(get_tmux_option "@gpu_temp_low_icon" "$gpu_temp_low_default_icon")
gpu_temp_medium_icon=$(get_tmux_option "@gpu_temp_medium_icon" "$gpu_temp_medium_default_icon")
gpu_temp_high_icon=$(get_tmux_option "@gpu_temp_high_icon" "$gpu_temp_high_default_icon")
}
print_icon() {
local gpu_temp
local gpu_temp_status
gpu_temp=$("$CURRENT_DIR"/gpu_temp.sh | sed -e 's/[^0-9.]//')
gpu_temp_status=$(temp_status "$gpu_temp")
if [ "$gpu_temp_status" == "low" ]; then
echo "$gpu_temp_low_icon"
elif [ "$gpu_temp_status" == "medium" ]; then
echo "$gpu_temp_medium_icon"
elif [ "$gpu_temp_status" == "high" ]; then
echo "$gpu_temp_high_icon"
fi
}
main() {
get_icon_settings
print_icon "$1"
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gram_low_bg_color=""
gram_medium_bg_color=""
gram_high_bg_color=""
gram_low_default_bg_color="#[bg=green]"
gram_medium_default_bg_color="#[bg=yellow]"
gram_high_default_bg_color="#[bg=red]"
get_bg_color_settings() {
gram_low_bg_color=$(get_tmux_option "@gram_low_bg_color" "$gram_low_default_bg_color")
gram_medium_bg_color=$(get_tmux_option "@gram_medium_bg_color" "$gram_medium_default_bg_color")
gram_high_bg_color=$(get_tmux_option "@gram_high_bg_color" "$gram_high_default_bg_color")
}
print_bg_color() {
local gram_percentage
local gram_load_status
gram_percentage=$("$CURRENT_DIR"/gram_percentage.sh | sed -e 's/%//')
gram_load_status=$(load_status "$gram_percentage" "gram")
if [ "$gram_load_status" == "low" ]; then
echo "$gram_low_bg_color"
elif [ "$gram_load_status" == "medium" ]; then
echo "$gram_medium_bg_color"
elif [ "$gram_load_status" == "high" ]; then
echo "$gram_high_bg_color"
fi
}
main() {
get_bg_color_settings
print_bg_color
}
main "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gram_low_fg_color=""
gram_medium_fg_color=""
gram_high_fg_color=""
gram_low_default_fg_color="#[fg=green]"
gram_medium_default_fg_color="#[fg=yellow]"
gram_high_default_fg_color="#[fg=red]"
get_fg_color_settings() {
gram_low_fg_color=$(get_tmux_option "@gram_low_fg_color" "$gram_low_default_fg_color")
gram_medium_fg_color=$(get_tmux_option "@gram_medium_fg_color" "$gram_medium_default_fg_color")
gram_high_fg_color=$(get_tmux_option "@gram_high_fg_color" "$gram_high_default_fg_color")
}
print_fg_color() {
local gram_percentage
local gram_load_status
gram_percentage=$("$CURRENT_DIR"/gram_percentage.sh | sed -e 's/%//')
gram_load_status=$(load_status "$gram_percentage" "gram")
if [ "$gram_load_status" == "low" ]; then
echo "$gram_low_fg_color"
elif [ "$gram_load_status" == "medium" ]; then
echo "$gram_medium_fg_color"
elif [ "$gram_load_status" == "high" ]; then
echo "$gram_high_fg_color"
fi
}
main() {
get_fg_color_settings
print_fg_color
}
main "$@"

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
# script global variables
gram_low_icon=""
gram_medium_icon=""
gram_high_icon=""
gram_low_default_icon="="
gram_medium_default_icon="≡"
gram_high_default_icon="≣"
# icons are set as script global variables
get_icon_settings() {
gram_low_icon=$(get_tmux_option "@gram_low_icon" "$gram_low_default_icon")
gram_medium_icon=$(get_tmux_option "@gram_medium_icon" "$gram_medium_default_icon")
gram_high_icon=$(get_tmux_option "@gram_high_icon" "$gram_high_default_icon")
}
print_icon() {
local gram_percentage
local gram_load_status
gram_percentage=$("$CURRENT_DIR"/gram_percentage.sh | sed -e 's/%//')
gram_load_status=$(load_status "$gram_percentage" "gram")
if [ "$gram_load_status" == "low" ]; then
echo "$gram_low_icon"
elif [ "$gram_load_status" == "medium" ]; then
echo "$gram_medium_icon"
elif [ "$gram_load_status" == "high" ]; then
echo "$gram_high_icon"
fi
}
main() {
get_icon_settings
print_icon "$1"
}
main "$@"

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
gram_percentage_format="%3.1f%%"
print_gram_percentage() {
gram_percentage_format=$(get_tmux_option "@gram_percentage_format" "$gram_percentage_format")
if command_exists "nvidia-smi"; then
loads=$(cached_eval nvidia-smi | sed -nr 's/.*\s([0-9]+)MiB\s*\/\s*([0-9]+)MiB.*/\1 \2/p')
elif command_exists "cuda-smi"; then
loads=$(cached_eval cuda-smi | sed -nr 's/.*\s([0-9.]+) of ([0-9.]+) MB.*/\1 \2/p' | awk '{print $2-$1" "$2}')
else
echo "No GPU"
return
fi
echo "$loads" | awk -v format="$gram_percentage_format" '{used+=$1; tot+=$2} END {printf format, 100*used/tot}'
}
main() {
print_gram_percentage
}
main "$@"

View File

@@ -1,152 +0,0 @@
#!/usr/bin/env bash
export LANG=C
export LC_ALL=C
get_tmux_option() {
local option
local default_value
local option_value
option="$1"
default_value="$2"
option_value="$(tmux show-option -qv "$option")"
if [ -z "$option_value" ]; then
option_value="$(tmux show-option -gqv "$option")"
fi
if [ -z "$option_value" ]; then
echo "$default_value"
else
echo "$option_value"
fi
}
is_osx() {
[ "$(uname)" == "Darwin" ]
}
is_freebsd() {
[ "$(uname)" == "FreeBSD" ]
}
is_openbsd() {
[ "$(uname)" == "OpenBSD" ]
}
is_linux() {
[ "$(uname)" == "Linux" ]
}
is_cygwin() {
command -v WMIC &>/dev/null
}
is_linux_iostat() {
# Bug in early versions of linux iostat -V return error code
iostat -c &>/dev/null
}
# is second float bigger or equal?
fcomp() {
awk -v n1="$1" -v n2="$2" 'BEGIN {if (n1<=n2) exit 0; exit 1}'
}
load_status() {
local percentage=$1
local prefix=$2
medium_thresh=$(get_tmux_option "@${prefix}_medium_thresh" "30")
high_thresh=$(get_tmux_option "@${prefix}_high_thresh" "80")
if fcomp "$high_thresh" "$percentage"; then
echo "high"
elif fcomp "$medium_thresh" "$percentage" && fcomp "$percentage" "$high_thresh"; then
echo "medium"
else
echo "low"
fi
}
temp_status() {
local temp
temp=$1
cpu_temp_medium_thresh=$(get_tmux_option "@cpu_temp_medium_thresh" "80")
cpu_temp_high_thresh=$(get_tmux_option "@cpu_temp_high_thresh" "90")
if fcomp "$cpu_temp_high_thresh" "$temp"; then
echo "high"
elif fcomp "$cpu_temp_medium_thresh" "$temp" && fcomp "$temp" "$cpu_temp_high_thresh"; then
echo "medium"
else
echo "low"
fi
}
cpus_number() {
if is_linux; then
if command_exists "nproc"; then
nproc
else
echo "$(($(sed -n 's/^processor.*:\s*\([0-9]\+\)/\1/p' /proc/cpuinfo | tail -n 1) + 1))"
fi
else
sysctl -n hw.ncpu
fi
}
command_exists() {
local command
command="$1"
command -v "$command" &>/dev/null
}
get_tmp_dir() {
local tmpdir
tmpdir="${TMPDIR:-${TMP:-${TEMP:-/tmp}}}"
[ -d "$tmpdir" ] || local tmpdir=~/tmp
echo "$tmpdir/tmux-$EUID-cpu"
}
get_time() {
date +%s.%N
}
get_cache_val() {
local key
local timeout
local cache
key="$1"
# seconds after which cache is invalidated
timeout="${2:-2}"
cache="$(get_tmp_dir)/$key"
if [ -f "$cache" ]; then
awk -v cache="$(head -n1 "$cache")" -v timeout="$timeout" -v now="$(get_time)" \
'BEGIN {if (now - timeout < cache) exit 0; exit 1}' &&
tail -n+2 "$cache"
fi
}
put_cache_val() {
local key
local val
local tmpdir
key="$1"
val="${*:2}"
tmpdir="$(get_tmp_dir)"
[ ! -d "$tmpdir" ] && mkdir -p "$tmpdir" && chmod 0700 "$tmpdir"
(
get_time
echo -n "$val"
) >"$tmpdir/$key"
echo -n "$val"
}
cached_eval() {
local command
local key
local val
command="$1"
key="$(basename "$command")"
val="$(get_cache_val "$key")"
if [ -z "$val" ]; then
put_cache_val "$key" "$($command "${@:2}")"
else
echo -n "$val"
fi
}

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
ram_low_bg_color=""
ram_medium_bg_color=""
ram_high_bg_color=""
ram_low_default_bg_color="#[bg=green]"
ram_medium_default_bg_color="#[bg=yellow]"
ram_high_default_bg_color="#[bg=red]"
get_bg_color_settings() {
ram_low_bg_color=$(get_tmux_option "@ram_low_bg_color" "$ram_low_default_bg_color")
ram_medium_bg_color=$(get_tmux_option "@ram_medium_bg_color" "$ram_medium_default_bg_color")
ram_high_bg_color=$(get_tmux_option "@ram_high_bg_color" "$ram_high_default_bg_color")
}
print_bg_color() {
local ram_percentage
local ram_load_status
ram_percentage=$("$CURRENT_DIR"/ram_percentage.sh | sed -e 's/%//')
ram_load_status=$(load_status "$ram_percentage" "ram")
if [ "$ram_load_status" == "low" ]; then
echo "$ram_low_bg_color"
elif [ "$ram_load_status" == "medium" ]; then
echo "$ram_medium_bg_color"
elif [ "$ram_load_status" == "high" ]; then
echo "$ram_high_bg_color"
fi
}
main() {
get_bg_color_settings
print_bg_color
}
main

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
ram_low_fg_color=""
ram_medium_fg_color=""
ram_high_fg_color=""
ram_low_default_fg_color="#[fg=green]"
ram_medium_default_fg_color="#[fg=yellow]"
ram_high_default_fg_color="#[fg=red]"
get_fg_color_settings() {
ram_low_fg_color=$(get_tmux_option "@ram_low_fg_color" "$ram_low_default_fg_color")
ram_medium_fg_color=$(get_tmux_option "@ram_medium_fg_color" "$ram_medium_default_fg_color")
ram_high_fg_color=$(get_tmux_option "@ram_high_fg_color" "$ram_high_default_fg_color")
}
print_fg_color() {
local ram_percentage
local ram_load_status
ram_percentage=$("$CURRENT_DIR"/ram_percentage.sh | sed -e 's/%//')
ram_load_status=$(load_status "$ram_percentage" "ram")
if [ "$ram_load_status" == "low" ]; then
echo "$ram_low_fg_color"
elif [ "$ram_load_status" == "medium" ]; then
echo "$ram_medium_fg_color"
elif [ "$ram_load_status" == "high" ]; then
echo "$ram_high_fg_color"
fi
}
main() {
get_fg_color_settings
print_fg_color
}
main

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
# script global variables
ram_low_icon=""
ram_medium_icon=""
ram_high_icon=""
ram_low_default_icon="="
ram_medium_default_icon="≡"
ram_high_default_icon="≣"
# icons are set as script global variables
get_icon_settings() {
ram_low_icon=$(get_tmux_option "@ram_low_icon" "$ram_low_default_icon")
ram_medium_icon=$(get_tmux_option "@ram_medium_icon" "$ram_medium_default_icon")
ram_high_icon=$(get_tmux_option "@ram_high_icon" "$ram_high_default_icon")
}
print_icon() {
local ram_percentage
local ram_load_status
ram_percentage=$("$CURRENT_DIR"/ram_percentage.sh | sed -e 's/%//')
ram_load_status=$(load_status "$ram_percentage" "ram")
if [ "$ram_load_status" == "low" ]; then
echo "$ram_low_icon"
elif [ "$ram_load_status" == "medium" ]; then
echo "$ram_medium_icon"
elif [ "$ram_load_status" == "high" ]; then
echo "$ram_high_icon"
fi
}
main() {
get_icon_settings
print_icon "$1"
}
main "$@"

View File

@@ -1,52 +0,0 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/helpers.sh
source "$CURRENT_DIR/helpers.sh"
ram_percentage_format="%3.1f%%"
sum_macos_vm_stats() {
grep -Eo '[0-9]+' |
awk '{ a += $1 * 4096 } END { print a }'
}
print_ram_percentage() {
ram_percentage_format=$(get_tmux_option "@ram_percentage_format" "$ram_percentage_format")
if command_exists "free"; then
cached_eval free | awk -v format="$ram_percentage_format" '$1 ~ /Mem/ {printf(format, 100*$3/$2)}'
elif command_exists "vm_stat"; then
# page size of 4096 bytes
stats="$(cached_eval vm_stat)"
used_and_cached=$(
echo "$stats" |
grep -E "(Pages active|Pages inactive|Pages speculative|Pages wired down|Pages occupied by compressor)" |
sum_macos_vm_stats
)
cached=$(
echo "$stats" |
grep -E "(Pages purgeable|File-backed pages)" |
sum_macos_vm_stats
)
free=$(
echo "$stats" |
grep -E "(Pages free)" |
sum_macos_vm_stats
)
used=$((used_and_cached - cached))
total=$((used_and_cached + free))
echo "$used $total" | awk -v format="$ram_percentage_format" '{printf(format, 100*$1/$2)}'
fi
}
main() {
print_ram_percentage
}
main

View File

@@ -1,74 +0,0 @@
# easy reload config
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded."
# set window split
bind-key v split-window -h -c "#{pane_current_path}"
bind-key b split-window -v -c "#{pane_current_path}"
# Leader Key (using C-s instead of the default C-b)
set -g prefix C-s
bind-key C-s last-window
# Start index at 1
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Allows for faster key repetition
set -s escape-time 50
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
# client connected to *that window*. Much more reasonable.
setw -g aggressive-resize on
# hjkl pane traversal
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
# auto window rename
set-window-option -g automatic-rename
# Vi copypaste mode
set-window-option -g mode-keys vi
bind g copy-mode
bind -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
bind P paste-buffer
# Mouse support
set -g mouse on
# VIM Options
set-option -g focus-events on
# Truecolor support
set -g default-terminal "$TERM"
set -ag terminal-overrides ",$TERM:Tc"
# Remove confirm prompt when closing pane
bind-key x kill-pane
# Styling
set-option -g status-position top
set -g mode-style "fg=black,bg=orange"
set-option -g pane-border-style fg=colour236
set-option -g pane-active-border-style fg=orange
set-window-option -g window-status-current-style fg=orange,bg=default,bright
set-window-option -g window-status-style fg=colour244,bg=default
set-window-option -g clock-mode-colour orange
set-option -g status-style "bg=default,fg=white"
set-option -g status-left ""
set-option -g status-right '[Session: #S] [CPU: #{cpu_fg_color}#{cpu_percentage}#[default]] [RAM: #{ram_fg_color}#{ram_percentage}#[default]] %d#[dim]/#[default]%m#[dim]/#[default]%Y %I:%M#[dim]%P#[default]'
set -g status-interval 1
set -g status-right-length 60
# Load TMUX Plugins
set -g @cpu_high_fg_color "#[fg=#FF0000]"
set -g @ram_high_fg_color "#[fg=#FF0000]"
run-shell '~/.config/tmux/plugins/tmux-cpu/cpu.tmux'

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +0,0 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Retro groove color scheme for Airline
" Author: morhetz <morhetz@gmail.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 12 Aug 2017
" -----------------------------------------------------------------------------
let g:airline#themes#gruvbox#palette = {}
function! airline#themes#gruvbox#refresh()
let M0 = airline#themes#get_highlight('Identifier')
let accents_group = airline#themes#get_highlight('Special')
let modified_group = [M0[0], '', M0[2], '', '']
let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg'])
let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg'])
let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['Pmenu', 'bg'])
let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg'])
let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group }
let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group
let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group
let g:airline#themes#gruvbox#palette.normal.airline_error = error_group
let g:airline#themes#gruvbox#palette.normal_modified.airline_error = error_group
let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg'])
let s:I2 = s:N2
let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['Pmenu', 'bg'])
let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified
let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
let g:airline#themes#gruvbox#palette.insert.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
let g:airline#themes#gruvbox#palette.insert_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg'])
let s:R2 = s:I2
let s:R3 = s:I3
let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified
let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
let g:airline#themes#gruvbox#palette.replace.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
let g:airline#themes#gruvbox#palette.replace_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
let s:V2 = s:N2
let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg'])
let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] }
let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
let g:airline#themes#gruvbox#palette.visual.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
let g:airline#themes#gruvbox#palette.visual_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg'])
let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group }
let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group }
let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg'])
let g:airline#themes#gruvbox#palette.tabline = {
\ 'airline_tab': s:N2,
\ 'airline_tabsel': s:N1,
\ 'airline_tabtype': s:V1,
\ 'airline_tabfill': s:TF,
\ 'airline_tabhid': s:IA,
\ 'airline_tabmod': s:I1
\ }
endfunction
call airline#themes#gruvbox#refresh()
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:

View File

@@ -1,41 +0,0 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Retro groove color scheme for Vim
" Author: morhetz <morhetz@gmail.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 09 Apr 2014
" -----------------------------------------------------------------------------
function! gruvbox#invert_signs_toggle()
if g:gruvbox_invert_signs == 0
let g:gruvbox_invert_signs=1
else
let g:gruvbox_invert_signs=0
endif
colorscheme gruvbox
endfunction
" Search Highlighting {{{
function! gruvbox#hls_show()
set hlsearch
call GruvboxHlsShowCursor()
endfunction
function! gruvbox#hls_hide()
set nohlsearch
call GruvboxHlsHideCursor()
endfunction
function! gruvbox#hls_toggle()
if &hlsearch
call gruvbox#hls_hide()
else
call gruvbox#hls_show()
endif
endfunction
" }}}
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:

View File

@@ -1,57 +0,0 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim)
" Author: gmoe <me@griffinmoe.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 20 Sep 2017
" -----------------------------------------------------------------------------
function! s:getGruvColor(group)
let guiColor = synIDattr(hlID(a:group), "fg", "gui")
let termColor = synIDattr(hlID(a:group), "fg", "cterm")
return [ guiColor, termColor ]
endfunction
if exists('g:lightline')
let s:bg0 = s:getGruvColor('GruvboxBg0')
let s:bg1 = s:getGruvColor('GruvboxBg1')
let s:bg2 = s:getGruvColor('GruvboxBg2')
let s:bg4 = s:getGruvColor('GruvboxBg4')
let s:fg1 = s:getGruvColor('GruvboxFg1')
let s:fg4 = s:getGruvColor('GruvboxFg4')
let s:yellow = s:getGruvColor('GruvboxYellow')
let s:blue = s:getGruvColor('GruvboxBlue')
let s:aqua = s:getGruvColor('GruvboxAqua')
let s:orange = s:getGruvColor('GruvboxOrange')
let s:green = s:getGruvColor('GruvboxGreen')
let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}}
let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg4, s:bg2 ] ]
let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ]
let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ]
let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ]
let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ]
let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ]
let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg1, s:bg2 ] ]
let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ]
let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ]
let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg1, s:bg2 ] ]
let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg1, s:bg2 ] ]
let s:p.terminal.middle = [ [ s:fg4, s:bg2 ] ]
let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg1, s:bg2 ] ]
let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ]
let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ]
let s:p.visual.left = [ [ s:bg0, s:orange, 'bold' ], [ s:bg0, s:bg4 ] ]
let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ]
let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ]
let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ]
let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ]
let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ]
let s:p.tabline.right = [ [ s:bg0, s:orange ] ]
let s:p.normal.error = [ [ s:bg0, s:orange ] ]
let s:p.normal.warning = [ [ s:bg2, s:yellow ] ]
let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p)
endif

View File

@@ -1,118 +0,0 @@
#!/bin/sh
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
printf "\033Ptmux;\033\033]4;236;rgb:32/30/2f\007\033\\"
printf "\033Ptmux;\033\033]4;234;rgb:1d/20/21\007\033\\"
printf "\033Ptmux;\033\033]4;235;rgb:28/28/28\007\033\\"
printf "\033Ptmux;\033\033]4;237;rgb:3c/38/36\007\033\\"
printf "\033Ptmux;\033\033]4;239;rgb:50/49/45\007\033\\"
printf "\033Ptmux;\033\033]4;241;rgb:66/5c/54\007\033\\"
printf "\033Ptmux;\033\033]4;243;rgb:7c/6f/64\007\033\\"
printf "\033Ptmux;\033\033]4;244;rgb:92/83/74\007\033\\"
printf "\033Ptmux;\033\033]4;245;rgb:92/83/74\007\033\\"
printf "\033Ptmux;\033\033]4;228;rgb:f2/e5/bc\007\033\\"
printf "\033Ptmux;\033\033]4;230;rgb:f9/f5/d7\007\033\\"
printf "\033Ptmux;\033\033]4;229;rgb:fb/f1/c7\007\033\\"
printf "\033Ptmux;\033\033]4;223;rgb:eb/db/b2\007\033\\"
printf "\033Ptmux;\033\033]4;250;rgb:d5/c4/a1\007\033\\"
printf "\033Ptmux;\033\033]4;248;rgb:bd/ae/93\007\033\\"
printf "\033Ptmux;\033\033]4;246;rgb:a8/99/84\007\033\\"
printf "\033Ptmux;\033\033]4;167;rgb:fb/49/34\007\033\\"
printf "\033Ptmux;\033\033]4;142;rgb:b8/bb/26\007\033\\"
printf "\033Ptmux;\033\033]4;214;rgb:fa/bd/2f\007\033\\"
printf "\033Ptmux;\033\033]4;109;rgb:83/a5/98\007\033\\"
printf "\033Ptmux;\033\033]4;175;rgb:d3/86/9b\007\033\\"
printf "\033Ptmux;\033\033]4;108;rgb:8e/c0/7c\007\033\\"
printf "\033Ptmux;\033\033]4;208;rgb:fe/80/19\007\033\\"
printf "\033Ptmux;\033\033]4;88;rgb:9d/00/06\007\033\\"
printf "\033Ptmux;\033\033]4;100;rgb:79/74/0e\007\033\\"
printf "\033Ptmux;\033\033]4;136;rgb:b5/76/14\007\033\\"
printf "\033Ptmux;\033\033]4;24;rgb:07/66/78\007\033\\"
printf "\033Ptmux;\033\033]4;96;rgb:8f/3f/71\007\033\\"
printf "\033Ptmux;\033\033]4;66;rgb:42/7b/58\007\033\\"
printf "\033Ptmux;\033\033]4;130;rgb:af/3a/03\007\033\\"
else
printf "\033P\033]4;236;rgb:32/30/2f\007\033\\"
printf "\033P\033]4;234;rgb:1d/20/21\007\033\\"
printf "\033P\033]4;235;rgb:28/28/28\007\033\\"
printf "\033P\033]4;237;rgb:3c/38/36\007\033\\"
printf "\033P\033]4;239;rgb:50/49/45\007\033\\"
printf "\033P\033]4;241;rgb:66/5c/54\007\033\\"
printf "\033P\033]4;243;rgb:7c/6f/64\007\033\\"
printf "\033P\033]4;244;rgb:92/83/74\007\033\\"
printf "\033P\033]4;245;rgb:92/83/74\007\033\\"
printf "\033P\033]4;228;rgb:f2/e5/bc\007\033\\"
printf "\033P\033]4;230;rgb:f9/f5/d7\007\033\\"
printf "\033P\033]4;229;rgb:fb/f1/c7\007\033\\"
printf "\033P\033]4;223;rgb:eb/db/b2\007\033\\"
printf "\033P\033]4;250;rgb:d5/c4/a1\007\033\\"
printf "\033P\033]4;248;rgb:bd/ae/93\007\033\\"
printf "\033P\033]4;246;rgb:a8/99/84\007\033\\"
printf "\033P\033]4;167;rgb:fb/49/34\007\033\\"
printf "\033P\033]4;142;rgb:b8/bb/26\007\033\\"
printf "\033P\033]4;214;rgb:fa/bd/2f\007\033\\"
printf "\033P\033]4;109;rgb:83/a5/98\007\033\\"
printf "\033P\033]4;175;rgb:d3/86/9b\007\033\\"
printf "\033P\033]4;108;rgb:8e/c0/7c\007\033\\"
printf "\033P\033]4;208;rgb:fe/80/19\007\033\\"
printf "\033P\033]4;88;rgb:9d/00/06\007\033\\"
printf "\033P\033]4;100;rgb:79/74/0e\007\033\\"
printf "\033P\033]4;136;rgb:b5/76/14\007\033\\"
printf "\033P\033]4;24;rgb:07/66/78\007\033\\"
printf "\033P\033]4;96;rgb:8f/3f/71\007\033\\"
printf "\033P\033]4;66;rgb:42/7b/58\007\033\\"
printf "\033P\033]4;130;rgb:af/3a/03\007\033\\"
fi
elif [ "$TERM" != "linux" ] && [ "$TERM" != "vt100" ] && [ "$TERM" != "vt220" ]; then
printf "\033]4;236;rgb:32/30/2f\033\\"
printf "\033]4;234;rgb:1d/20/21\033\\"
printf "\033]4;235;rgb:28/28/28\033\\"
printf "\033]4;237;rgb:3c/38/36\033\\"
printf "\033]4;239;rgb:50/49/45\033\\"
printf "\033]4;241;rgb:66/5c/54\033\\"
printf "\033]4;243;rgb:7c/6f/64\033\\"
printf "\033]4;244;rgb:92/83/74\033\\"
printf "\033]4;245;rgb:92/83/74\033\\"
printf "\033]4;228;rgb:f2/e5/bc\033\\"
printf "\033]4;230;rgb:f9/f5/d7\033\\"
printf "\033]4;229;rgb:fb/f1/c7\033\\"
printf "\033]4;223;rgb:eb/db/b2\033\\"
printf "\033]4;250;rgb:d5/c4/a1\033\\"
printf "\033]4;248;rgb:bd/ae/93\033\\"
printf "\033]4;246;rgb:a8/99/84\033\\"
printf "\033]4;167;rgb:fb/49/34\033\\"
printf "\033]4;142;rgb:b8/bb/26\033\\"
printf "\033]4;214;rgb:fa/bd/2f\033\\"
printf "\033]4;109;rgb:83/a5/98\033\\"
printf "\033]4;175;rgb:d3/86/9b\033\\"
printf "\033]4;108;rgb:8e/c0/7c\033\\"
printf "\033]4;208;rgb:fe/80/19\033\\"
printf "\033]4;88;rgb:9d/00/06\033\\"
printf "\033]4;100;rgb:79/74/0e\033\\"
printf "\033]4;136;rgb:b5/76/14\033\\"
printf "\033]4;24;rgb:07/66/78\033\\"
printf "\033]4;96;rgb:8f/3f/71\033\\"
printf "\033]4;66;rgb:42/7b/58\033\\"
printf "\033]4;130;rgb:af/3a/03\033\\"
fi

View File

@@ -1,116 +0,0 @@
#!/bin/sh
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
printf "\033Ptmux;\033\033]4;236;rgb:26/24/23\007\033\\"
printf "\033Ptmux;\033\033]4;234;rgb:16/18/19\007\033\\"
printf "\033Ptmux;\033\033]4;235;rgb:1e/1e/1e\007\033\\"
printf "\033Ptmux;\033\033]4;237;rgb:2e/2a/29\007\033\\"
printf "\033Ptmux;\033\033]4;239;rgb:3f/39/35\007\033\\"
printf "\033Ptmux;\033\033]4;241;rgb:53/4a/42\007\033\\"
printf "\033Ptmux;\033\033]4;243;rgb:68/5c/51\007\033\\"
printf "\033Ptmux;\033\033]4;244;rgb:7f/70/61\007\033\\"
printf "\033Ptmux;\033\033]4;245;rgb:7f/70/61\007\033\\"
printf "\033Ptmux;\033\033]4;228;rgb:ef/df/ae\007\033\\"
printf "\033Ptmux;\033\033]4;230;rgb:f8/f4/cd\007\033\\"
printf "\033Ptmux;\033\033]4;229;rgb:fa/ee/bb\007\033\\"
printf "\033Ptmux;\033\033]4;223;rgb:e6/d4/a3\007\033\\"
printf "\033Ptmux;\033\033]4;250;rgb:cb/b8/90\007\033\\"
printf "\033Ptmux;\033\033]4;248;rgb:af/9f/81\007\033\\"
printf "\033Ptmux;\033\033]4;246;rgb:97/87/71\007\033\\"
printf "\033Ptmux;\033\033]4;167;rgb:f7/30/28\007\033\\"
printf "\033Ptmux;\033\033]4;142;rgb:aa/b0/1e\007\033\\"
printf "\033Ptmux;\033\033]4;214;rgb:f7/b1/25\007\033\\"
printf "\033Ptmux;\033\033]4;109;rgb:71/95/86\007\033\\"
printf "\033Ptmux;\033\033]4;175;rgb:c7/70/89\007\033\\"
printf "\033Ptmux;\033\033]4;108;rgb:7d/b6/69\007\033\\"
printf "\033Ptmux;\033\033]4;208;rgb:fb/6a/16\007\033\\"
printf "\033Ptmux;\033\033]4;88;rgb:89/00/09\007\033\\"
printf "\033Ptmux;\033\033]4;100;rgb:66/62/0d\007\033\\"
printf "\033Ptmux;\033\033]4;136;rgb:a5/63/11\007\033\\"
printf "\033Ptmux;\033\033]4;24;rgb:0e/53/65\007\033\\"
printf "\033Ptmux;\033\033]4;96;rgb:7b/2b/5e\007\033\\"
printf "\033Ptmux;\033\033]4;66;rgb:35/6a/46\007\033\\"
printf "\033Ptmux;\033\033]4;130;rgb:9d/28/07\007\033\\"
else
printf "\033P\033]4;236;rgb:26/24/23\007\033\\"
printf "\033P\033]4;234;rgb:16/18/19\007\033\\"
printf "\033P\033]4;235;rgb:1e/1e/1e\007\033\\"
printf "\033P\033]4;237;rgb:2e/2a/29\007\033\\"
printf "\033P\033]4;239;rgb:3f/39/35\007\033\\"
printf "\033P\033]4;241;rgb:53/4a/42\007\033\\"
printf "\033P\033]4;243;rgb:68/5c/51\007\033\\"
printf "\033P\033]4;244;rgb:7f/70/61\007\033\\"
printf "\033P\033]4;245;rgb:7f/70/61\007\033\\"
printf "\033P\033]4;228;rgb:ef/df/ae\007\033\\"
printf "\033P\033]4;230;rgb:f8/f4/cd\007\033\\"
printf "\033P\033]4;229;rgb:fa/ee/bb\007\033\\"
printf "\033P\033]4;223;rgb:e6/d4/a3\007\033\\"
printf "\033P\033]4;250;rgb:cb/b8/90\007\033\\"
printf "\033P\033]4;248;rgb:af/9f/81\007\033\\"
printf "\033P\033]4;246;rgb:97/87/71\007\033\\"
printf "\033P\033]4;167;rgb:f7/30/28\007\033\\"
printf "\033P\033]4;142;rgb:aa/b0/1e\007\033\\"
printf "\033P\033]4;214;rgb:f7/b1/25\007\033\\"
printf "\033P\033]4;109;rgb:71/95/86\007\033\\"
printf "\033P\033]4;175;rgb:c7/70/89\007\033\\"
printf "\033P\033]4;108;rgb:7d/b6/69\007\033\\"
printf "\033P\033]4;208;rgb:fb/6a/16\007\033\\"
printf "\033P\033]4;88;rgb:89/00/09\007\033\\"
printf "\033P\033]4;100;rgb:66/62/0d\007\033\\"
printf "\033P\033]4;136;rgb:a5/63/11\007\033\\"
printf "\033P\033]4;24;rgb:0e/53/65\007\033\\"
printf "\033P\033]4;96;rgb:7b/2b/5e\007\033\\"
printf "\033P\033]4;66;rgb:35/6a/46\007\033\\"
printf "\033P\033]4;130;rgb:9d/28/07\007\033\\"
fi
else
printf "\033]4;236;rgb:26/24/23\033\\"
printf "\033]4;234;rgb:16/18/19\033\\"
printf "\033]4;235;rgb:1e/1e/1e\033\\"
printf "\033]4;237;rgb:2e/2a/29\033\\"
printf "\033]4;239;rgb:3f/39/35\033\\"
printf "\033]4;241;rgb:53/4a/42\033\\"
printf "\033]4;243;rgb:68/5c/51\033\\"
printf "\033]4;244;rgb:7f/70/61\033\\"
printf "\033]4;245;rgb:7f/70/61\033\\"
printf "\033]4;228;rgb:ef/df/ae\033\\"
printf "\033]4;230;rgb:f8/f4/cd\033\\"
printf "\033]4;229;rgb:fa/ee/bb\033\\"
printf "\033]4;223;rgb:e6/d4/a3\033\\"
printf "\033]4;250;rgb:cb/b8/90\033\\"
printf "\033]4;248;rgb:af/9f/81\033\\"
printf "\033]4;246;rgb:97/87/71\033\\"
printf "\033]4;167;rgb:f7/30/28\033\\"
printf "\033]4;142;rgb:aa/b0/1e\033\\"
printf "\033]4;214;rgb:f7/b1/25\033\\"
printf "\033]4;109;rgb:71/95/86\033\\"
printf "\033]4;175;rgb:c7/70/89\033\\"
printf "\033]4;108;rgb:7d/b6/69\033\\"
printf "\033]4;208;rgb:fb/6a/16\033\\"
printf "\033]4;88;rgb:89/00/09\033\\"
printf "\033]4;100;rgb:66/62/0d\033\\"
printf "\033]4;136;rgb:a5/63/11\033\\"
printf "\033]4;24;rgb:0e/53/65\033\\"
printf "\033]4;96;rgb:7b/2b/5e\033\\"
printf "\033]4;66;rgb:35/6a/46\033\\"
printf "\033]4;130;rgb:9d/28/07\033\\"
fi

View File

@@ -1,120 +0,0 @@
" Vim Code Dark (airline theme)
" https://github.com/tomasiser/vim-code-dark
scriptencoding utf-8
let g:airline#themes#codedark#palette = {}
" Terminal colors (base16):
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "00"
let s:cterm02 = "08"
let s:cterm04 = "07"
let s:cterm06 = "07"
let s:cterm09 = "06"
let s:cterm0F = "03"
endif
if &t_Co >= 256
let g:codedark_term256=1
elseif !exists("g:codedark_term256")
let g:codedark_term256=0
endif
let s:cdFront = {'gui': '#FFFFFF', 'cterm': (g:codedark_term256 ? '231' : s:cterm07)}
let s:cdFrontGray = {'gui': '#D4D4D4', 'cterm': (g:codedark_term256 ? '188' : s:cterm05)}
let s:cdBack = {'gui': '#1E1E1E', 'cterm': (g:codedark_term256 ? '234' : s:cterm00)}
let s:cdSelection = {'gui': '#264F78', 'cterm': (g:codedark_term256 ? '24' : s:cterm01)}
let s:cdBlue = {'gui': '#0A7ACA', 'cterm': (g:codedark_term256 ? '32' : s:cterm0D)}
let s:cdLightBlue = {'gui': '#5CB6F8', 'cterm': (g:codedark_term256 ? '75' : s:cterm0C)}
let s:cdYellow = {'gui': '#FFAF00', 'cterm': (g:codedark_term256 ? '214' : s:cterm0A)}
let s:cdRed = {'gui': '#F44747', 'cterm': (g:codedark_term256 ? '203' : s:cterm08)}
let s:cdDarkDarkDark = {'gui': '#262626', 'cterm': (g:codedark_term256 ? '235' : s:cterm01)}
let s:cdDarkDark = {'gui': '#303030', 'cterm': (g:codedark_term256 ? '236' : s:cterm02)}
let s:cdDark = {'gui': '#3C3C3C', 'cterm': (g:codedark_term256 ? '237' : s:cterm03)}
let s:Warning = [ s:cdRed.gui, s:cdDarkDark.gui, s:cdRed.cterm, s:cdDarkDark.cterm, 'none']
" Normal:
let s:N1 = [ s:cdFront.gui, s:cdBlue.gui, s:cdFront.cterm, s:cdBlue.cterm, 'none' ]
let s:N2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:N3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:NM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#codedark#palette.normal_modified = { 'airline_c': s:NM }
let g:airline#themes#codedark#palette.normal.airline_warning = s:Warning
let g:airline#themes#codedark#palette.normal_modified.airline_warning = s:Warning
" Insert:
let s:I1 = [ s:cdBack.gui, s:cdYellow.gui, s:cdBack.cterm, s:cdYellow.cterm, 'none' ]
let s:I2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:I3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:IM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#codedark#palette.insert_modified = { 'airline_c': s:IM }
let g:airline#themes#codedark#palette.insert.airline_warning = s:Warning
let g:airline#themes#codedark#palette.insert_modified.airline_warning = s:Warning
" Replace:
let s:R1 = [ s:cdBack.gui, s:cdYellow.gui, s:cdBack.cterm, s:cdYellow.cterm, 'none' ]
let s:R2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:R3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:RM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#codedark#palette.replace_modified = { 'airline_c': s:RM }
let g:airline#themes#codedark#palette.replace.airline_warning = s:Warning
let g:airline#themes#codedark#palette.replace_modified.airline_warning = s:Warning
" Visual:
let s:V1 = [ s:cdLightBlue.gui, s:cdDark.gui, s:cdLightBlue.cterm, s:cdDark.cterm, 'none' ]
let s:V2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:V3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:VM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#codedark#palette.visual_modified = { 'airline_c': s:VM }
let g:airline#themes#codedark#palette.visual.airline_warning = s:Warning
let g:airline#themes#codedark#palette.visual_modified.airline_warning = s:Warning
" Inactive:
let s:IA1 = [ s:cdFrontGray.gui, s:cdDark.gui, s:cdFrontGray.cterm, s:cdDark.cterm, 'none' ]
let s:IA2 = [ s:cdFrontGray.gui, s:cdDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDark.cterm, 'none' ]
let s:IA3 = [ s:cdFrontGray.gui, s:cdDarkDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:IAM = [ s:cdFrontGray.gui, s:cdDarkDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let g:airline#themes#codedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
let g:airline#themes#codedark#palette.inactive_modified = { 'airline_c': s:IAM }
" Red accent for readonly:
let g:airline#themes#codedark#palette.accents = {
\ 'red': [ s:cdRed.gui, '', s:cdRed.cterm, '' ]
\ }

View File

@@ -1,40 +0,0 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/codedark.vim
" Author: artanikin
" License: MIT License
" Last Change: 2019/12/05 12:26:00
" =============================================================================
let s:term_red = 204
let s:term_green = 114
let s:term_yellow = 180
let s:term_blue = 39
let s:term_purple = 170
let s:term_white = 145
let s:term_black = 235
let s:term_grey = 236
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ '#262626', '#608B4E', s:term_black, s:term_green, 'bold' ], [ '#608B4E', '#262626', s:term_green, s:term_black ] ]
let s:p.normal.right = [ [ '#262626', '#608B4E', s:term_black, s:term_green ], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ], [ '#608B4E', '#262626', s:term_green, s:term_black ] ]
let s:p.inactive.right = [ [ '#262626', '#569CD6', s:term_black, s:term_blue], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ] ]
let s:p.inactive.left = s:p.inactive.right[1:]
" her
let s:p.insert.left = [ [ '#262626', '#569CD6', s:term_black, s:term_blue, 'bold' ], [ '#569CD6', '#262626', s:term_blue, s:term_black ] ]
let s:p.insert.right = [ [ '#262626', '#569CD6', s:term_black, s:term_blue ], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ], [ '#569CD6', '#262626', s:term_blue, s:term_black ] ]
let s:p.replace.left = [ [ '#262626', '#D16969', s:term_black, s:term_red, 'bold' ], [ '#D16969', '#262626', s:term_red, s:term_black ] ]
let s:p.replace.right = [ [ '#262626', '#D16969', s:term_black, s:term_red, 'bold' ], s:p.normal.right[1], [ '#D16969', '#262626', s:term_red, s:term_black ] ]
let s:p.visual.left = [ [ '#262626', '#C586C0', s:term_black, s:term_purple, 'bold' ], [ '#C586C0', '#262626', s:term_purple, s:term_black ] ]
let s:p.visual.right = [ [ '#262626', '#C586C0', s:term_black, s:term_purple, 'bold' ], s:p.normal.right[1], [ '#C586C0', '#262626', s:term_purple, s:term_black ] ]
let s:p.normal.middle = [ [ '#D4D4D4', '#262626', s:term_white, s:term_black ] ]
let s:p.insert.middle = s:p.normal.middle
let s:p.replace.middle = s:p.normal.middle
let s:p.tabline.left = [ s:p.normal.left[1] ]
let s:p.tabline.tabsel = [ s:p.normal.left[0] ]
let s:p.tabline.middle = s:p.normal.middle
let s:p.tabline.right = [ s:p.normal.left[1] ]
let s:p.normal.error = [ [ '#262626', '#D16969', s:term_black, s:term_red ] ]
let s:p.normal.warning = [ [ '#262626', '#D7BA7D', s:term_black, s:term_yellow ] ]
let g:lightline#colorscheme#codedark#palette = lightline#colorscheme#fill(s:p)

View File

@@ -1,18 +0,0 @@
scheme: "codedark"
author: "Tomas Iser (https://github.com/tomasiser)"
base00: "1E1E1E"
base01: "262626"
base02: "303030"
base03: "3C3C3C"
base04: "808080"
base05: "D4D4D4"
base06: "E9E9E9"
base07: "FFFFFF"
base08: "D16969"
base09: "B5CEA8"
base0A: "D7BA7D"
base0B: "608B4E"
base0C: "9CDCFE"
base0D: "569CD6"
base0E: "C586C0"
base0F: "CE9178"

View File

@@ -1,72 +0,0 @@
Windows Registry Editor Version 5.00
; Base16 codedark
; schema by Tomas Iser (https://github.com/tomasiser)
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\codedark]
; Default Foreground
"Colour0"="212,212,212"
; Default Bold Foreground -- equals to non-bold
"Colour1"="212,212,212"
; Default Background
"Colour2"="30,30,30"
; Default Bold Background -- equals to non-bold
"Colour3"="30,30,30"
; Cursor Text -- equals to default background
"Colour4"="30,30,30"
; Cursor Colour -- equals to default foreground
"Colour5"="212,212,212"
; ANSI Black
"Colour6"="30,30,30"
; ANSI Black Bold
"Colour7"="60,60,60"
; ANSI Red
"Colour8"="209,105,105"
; ANSI Red Bold
"Colour9"="181,206,168"
; ANSI Green
"Colour10"="96,139,78"
; ANSI Green Bold
"Colour11"="38,38,38"
; ANSI Yellow
"Colour12"="215,186,125"
; ANSI Yellow Bold
"Colour13"="48,48,48"
; ANSI Blue
"Colour14"="86,156,214"
; ANSI Blue Bold
"Colour15"="128,128,128"
; ANSI Magenta
"Colour16"="197,134,192"
; ANSI Magenta Bold
"Colour17"="233,233,233"
; ANSI Cyan
"Colour18"="156,220,254"
; ANSI Cyan Bold
"Colour19"="206,145,120"
; ANSI White
"Colour20"="212,212,212"
; ANSI White Bold
"Colour21"="255,255,255"

View File

@@ -1,123 +0,0 @@
#!/bin/sh
# base16-shell (https://github.com/chriskempson/base16-shell)
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
# codedark scheme by Tomas Iser (https://github.com/tomasiser)
# This script doesn't support linux console (use 'vconsole' template instead)
if [ "${TERM%%-*}" = 'linux' ]; then
return 2>/dev/null || exit 0
fi
color00="1E/1E/1E" # Base 00 - Black
color01="D1/69/69" # Base 08 - Red
color02="60/8B/4E" # Base 0B - Green
color03="D7/BA/7D" # Base 0A - Yellow
color04="56/9C/D6" # Base 0D - Blue
color05="C5/86/C0" # Base 0E - Magenta
color06="9C/DC/FE" # Base 0C - Cyan
color07="D4/D4/D4" # Base 05 - White
color08="3C/3C/3C" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="FF/FF/FF" # Base 07 - Bright White
color16="B5/CE/A8" # Base 09
color17="CE/91/78" # Base 0F
color18="26/26/26" # Base 01
color19="30/30/30" # Base 02
color20="80/80/80" # Base 04
color21="E9/E9/E9" # Base 06
color_foreground="D4/D4/D4" # Base 05
color_background="1E/1E/1E" # Base 00
color_cursor="D4/D4/D4" # Base 05
if [ -n "$TMUX" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template='\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\'
printf_template_var='\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\'
printf_template_custom='\033Ptmux;\033\033]%s%s\033\033\\\033\\'
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template='\033P\033]4;%d;rgb:%s\033\\'
printf_template_var='\033P\033]%d;rgb:%s\033\\'
printf_template_custom='\033P\033]%s%s\033\\'
else
printf_template='\033]4;%d;rgb:%s\033\\'
printf_template_var='\033]%d;rgb:%s\033\\'
printf_template_custom='\033]%s%s\033\\'
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg D4D4D4 # forground
printf $printf_template_custom Ph 1E1E1E # background
printf $printf_template_custom Pi D4D4D4 # bold color
printf $printf_template_custom Pj 303030 # selection color
printf $printf_template_custom Pk D4D4D4 # selected text color
printf $printf_template_custom Pl D4D4D4 # cursor
printf $printf_template_custom Pm 1E1E1E # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor

View File

@@ -1,656 +0,0 @@
" Vim Code Dark (color scheme)
" https://github.com/tomasiser/vim-code-dark
scriptencoding utf-8
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name="codedark"
" Highlighting function (inspiration from https://github.com/chriskempson/base16-vim)
if &t_Co >= 256
let g:codedark_term256=1
elseif !exists("g:codedark_term256")
let g:codedark_term256=0
endif
fun! <sid>hi(group, fg, bg, attr, sp)
if !empty(a:fg)
exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . (g:codedark_term256 ? a:fg.cterm256 : a:fg.cterm)
endif
if !empty(a:bg)
exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . (g:codedark_term256 ? a:bg.cterm256 : a:bg.cterm)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if !empty(a:sp)
exec "hi " . a:group . " guisp=" . a:sp.gui
endif
endfun
" Choose old or new name for Treesitter groups depending on Neovim version
fun! <sid>hiTS(g_new, g_old, fg, bg, attr, sp)
call <sid>hi(has("nvim-0.8.0") ? a:g_new : a:g_old, a:fg, a:bg, a:attr, a:sp)
endfun
fun! <sid>hiTSlink(g_new, g_old, link)
exec "hi! link " . (has("nvim-0.8.0") ? a:g_new : a:g_old) . " " . a:link
endfun
" ------------------
" Color definitions:
" ------------------
" Terminal colors (base16):
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "00"
let s:cterm02 = "08"
let s:cterm04 = "07"
let s:cterm06 = "07"
let s:cterm09 = "06"
let s:cterm0F = "03"
endif
" General appearance colors:
" (some of them may be unused)
" Transparent background
if !exists("g:codedark_transparent")
let g:codedark_transparent=0
endif
if !exists("g:codedark_modern")
let g:codedark_modern=0
endif
let s:cdNone = {'gui': 'NONE', 'cterm': 'NONE', 'cterm256': 'NONE'}
let s:cdFront = {'gui': '#D4D4D4', 'cterm': s:cterm05, 'cterm256': '188'}
let s:cdBack = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'}
if g:codedark_modern | let s:cdBack = {'gui': '#1f1f1f', 'cterm': 'NONE', 'cterm256': '234'} | endif
if g:codedark_transparent | let s:cdBack = {'gui': 'NONE', 'cterm': 'NONE', 'cterm256': 'NONE'} | endif
let s:cdTabCurrent = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'}
if g:codedark_modern | let s:cdTabCurrent = {'gui': '#1f1f1f', 'cterm': s:cterm00, 'cterm256': '234'} | endif
let s:cdTabOther = {'gui': '#2D2D2D', 'cterm': s:cterm01, 'cterm256': '236'}
if g:codedark_modern | let s:cdTabOther = {'gui': '#181818', 'cterm': s:cterm01, 'cterm256': '236'} | endif
let s:cdTabOutside = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'}
if g:codedark_modern | let s:cdTabOutside = {'gui': '#181818', 'cterm': s:cterm01, 'cterm256': '236'} | endif
let s:cdLeftDark = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'}
let s:cdLeftMid = {'gui': '#373737', 'cterm': s:cterm03, 'cterm256': '237'}
if g:codedark_modern | let s:cdLeftMid = {'gui': '#181818', 'cterm': 'NONE', 'cterm256': '237'} | endif
let s:cdLeftLight = {'gui': '#3F3F46', 'cterm': s:cterm03, 'cterm256': '238'}
let s:cdPopupFront = {'gui': '#BBBBBB', 'cterm': s:cterm06, 'cterm256': '250'}
let s:cdPopupBack = {'gui': '#2D2D30', 'cterm': s:cterm01, 'cterm256': '236'}
let s:cdPopupHighlightBlue = {'gui': '#073655', 'cterm': s:cterm0D, 'cterm256': '24'}
let s:cdPopupHighlightGray = {'gui': '#3D3D40', 'cterm': s:cterm03, 'cterm256': '237'}
let s:cdSplitLight = {'gui': '#898989', 'cterm': s:cterm04, 'cterm256': '245'}
let s:cdSplitDark = {'gui': '#444444', 'cterm': s:cterm03, 'cterm256': '238'}
let s:cdSplitThumb = {'gui': '#424242', 'cterm': s:cterm04, 'cterm256': '238'}
let s:cdCursorDarkDark = {'gui': '#222222', 'cterm': s:cterm01, 'cterm256': '235'}
let s:cdCursorDark = {'gui': '#51504F', 'cterm': s:cterm03, 'cterm256': '239'}
let s:cdCursorLight = {'gui': '#AEAFAD', 'cterm': s:cterm04, 'cterm256': '145'}
let s:cdSelection = {'gui': '#264F78', 'cterm': s:cterm03, 'cterm256': '24'}
let s:cdLineNumber = {'gui': '#5A5A5A', 'cterm': s:cterm04, 'cterm256': '240'}
let s:cdDiffRedDark = {'gui': '#4B1818', 'cterm': s:cterm08, 'cterm256': '52'}
if g:codedark_modern | let s:cdDiffRedDark = {'gui': '#da3633', 'cterm': 'NONE', 'cterm256': '52'} | endif
let s:cdDiffRedLight = {'gui': '#6F1313', 'cterm': s:cterm08, 'cterm256': '52'}
let s:cdDiffRedLightLight = {'gui': '#FB0101', 'cterm': s:cterm08, 'cterm256': '09'}
let s:cdDiffGreenDark = {'gui': '#373D29', 'cterm': s:cterm0B, 'cterm256': '237'}
if g:codedark_modern | let s:cdDiffGreenDark = {'gui': '#238636', 'cterm': 'NONE', 'cterm256': '237'} | endif
let s:cdDiffGreenLight = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'}
let s:cdDiffBlueLight = {'gui': '#87d7ff', 'cterm': s:cterm0C, 'cterm256': '117'}
let s:cdDiffBlue = {'gui': '#005f87', 'cterm': s:cterm0D, 'cterm256': '24'}
let s:cdSearchCurrent = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'}
if g:codedark_modern | let s:cdSearchCurrent = {'gui': '#9e6a03', 'cterm': s:cterm09, 'cterm256': '58'} | endif
let s:cdSearch = {'gui': '#773800', 'cterm': s:cterm03, 'cterm256': '94'}
" Syntax colors:
if !exists("g:codedark_conservative")
let g:codedark_conservative=0
endif
" Italicized comments
if !exists("g:codedark_italics")
let g:codedark_italics=0
endif
let s:cdGray = {'gui': '#808080', 'cterm': s:cterm04, 'cterm256': '08'}
let s:cdViolet = {'gui': '#646695', 'cterm': s:cterm04, 'cterm256': '60'}
let s:cdBlue = {'gui': '#569CD6', 'cterm': s:cterm0D, 'cterm256': '75'}
let s:cdDarkBlue = {'gui': '#223E55', 'cterm': s:cterm0D, 'cterm256': '73'}
let s:cdLightBlue = {'gui': '#9CDCFE', 'cterm': s:cterm0C, 'cterm256': '117'}
if g:codedark_conservative | let s:cdLightBlue = s:cdFront | endif
let s:cdGreen = {'gui': '#6A9955', 'cterm': s:cterm0B, 'cterm256': '65'}
let s:cdBlueGreen = {'gui': '#4EC9B0', 'cterm': s:cterm0F, 'cterm256': '43'}
let s:cdLightGreen = {'gui': '#B5CEA8', 'cterm': s:cterm09, 'cterm256': '151'}
let s:cdRed = {'gui': '#F44747', 'cterm': s:cterm08, 'cterm256': '203'}
if g:codedark_modern | let s:cdRed = {'gui': '#f85149', 'cterm': s:cterm08, 'cterm256': '203'} | endif
let s:cdOrange = {'gui': '#CE9178', 'cterm': s:cterm0F, 'cterm256': '173'}
let s:cdLightRed = {'gui': '#D16969', 'cterm': s:cterm08, 'cterm256': '167'}
if g:codedark_conservative | let s:cdLightRed = s:cdOrange | endif
let s:cdYellowOrange = {'gui': '#D7BA7D', 'cterm': s:cterm0A, 'cterm256': '179'}
let s:cdYellow = {'gui': '#DCDCAA', 'cterm': s:cterm0A, 'cterm256': '187'}
if g:codedark_conservative | let s:cdYellow = s:cdFront | endif
let s:cdPink = {'gui': '#C586C0', 'cterm': s:cterm0E, 'cterm256': '176'}
if g:codedark_conservative | let s:cdPink = s:cdBlue | endif
let s:cdSilver = {'gui': '#C0C0C0', 'cterm': s:cterm05, 'cterm256': '7'}
" UI (built-in)
" <sid>hi(GROUP, FOREGROUND, BACKGROUND, ATTRIBUTE, SPECIAL)
call <sid>hi('Normal', s:cdFront, s:cdBack, 'none', {})
call <sid>hi('ColorColumn', {}, s:cdCursorDarkDark, 'none', {})
call <sid>hi('Cursor', s:cdCursorDark, s:cdCursorLight, 'none', {})
call <sid>hi('CursorLine', {}, s:cdCursorDarkDark, 'none', {})
hi! link CursorColumn CursorLine
call <sid>hi('Directory', s:cdBlue, s:cdNone, 'none', {})
call <sid>hi('DiffAdd', s:cdFront, s:cdDiffGreenLight, 'none', {})
call <sid>hi('DiffChange', s:cdFront, s:cdDiffBlue, 'none', {})
call <sid>hi('DiffDelete', s:cdFront, s:cdDiffRedLight, 'none', {})
call <sid>hi('DiffText', s:cdBack, s:cdDiffBlueLight, 'none', {})
call <sid>hi('EndOfBuffer', s:cdLineNumber, s:cdBack, 'none', {})
call <sid>hi('ErrorMsg', s:cdRed, s:cdBack, 'none', {})
call <sid>hi('VertSplit', s:cdSplitDark, s:cdBack, 'none', {})
call <sid>hi('Folded', s:cdLeftLight, s:cdLeftDark, 'underline', {})
call <sid>hi('FoldColumn', s:cdLineNumber, s:cdBack, 'none', {})
call <sid>hi('SignColumn', {}, s:cdBack, 'none', {})
call <sid>hi('IncSearch', s:cdNone, s:cdSearchCurrent, 'none', {})
call <sid>hi('LineNr', s:cdLineNumber, s:cdBack, 'none', {})
call <sid>hi('CursorLineNr', s:cdPopupFront, s:cdBack, 'none', {})
call <sid>hi('MatchParen', s:cdNone, s:cdCursorDark, 'none', {})
call <sid>hi('ModeMsg', s:cdFront, s:cdLeftDark, 'none', {})
hi! link MoreMsg ModeMsg
call <sid>hi('NonText', s:cdLineNumber, s:cdNone, 'none', {})
call <sid>hi('Pmenu', s:cdPopupFront, s:cdPopupBack, 'none', {})
call <sid>hi('PmenuSel', s:cdPopupFront, s:cdPopupHighlightBlue, 'none', {})
call <sid>hi('PmenuSbar', {}, s:cdPopupHighlightGray, 'none', {})
call <sid>hi('PmenuThumb', {}, s:cdPopupFront, 'none', {})
call <sid>hi('Question', s:cdBlue, s:cdBack, 'none', {})
call <sid>hi('Search', s:cdNone, s:cdSearch, 'none', {})
call <sid>hi('SpecialKey', s:cdLineNumber, s:cdNone, 'none', {})
call <sid>hi('StatusLine', s:cdFront, s:cdLeftMid, 'none', {})
call <sid>hi('StatusLineNC', s:cdFront, s:cdLeftDark, 'none', {})
call <sid>hi('TabLine', s:cdFront, s:cdTabOther, 'none', {})
call <sid>hi('TabLineFill', s:cdFront, s:cdTabOutside, 'none', {})
call <sid>hi('TabLineSel', s:cdFront, s:cdTabCurrent, 'none', {})
call <sid>hi('Title', s:cdNone, s:cdNone, 'bold', {})
call <sid>hi('Visual', s:cdNone, s:cdSelection, 'none', {})
hi! link VisualNOS Visual
call <sid>hi('WarningMsg', s:cdOrange, s:cdBack, 'none', {})
call <sid>hi('WildMenu', s:cdNone, s:cdSelection, 'none', {})
call <sid>hi('netrwMarkFile', s:cdFront, s:cdSelection, 'none', {})
" Legacy groups for official git.vim and diff.vim syntax
hi! link diffAdded DiffAdd
hi! link diffChanged DiffChange
hi! link diffRemoved DiffDelete
if g:codedark_italics | call <sid>hi('Comment', s:cdGreen, {}, 'italic', {}) | else | call <sid>hi('Comment', s:cdGreen, {}, 'none', {}) | endif
" SYNTAX HIGHLIGHT (built-in)
call <sid>hi('Constant', s:cdBlue, {}, 'none', {})
call <sid>hi('String', s:cdOrange, {}, 'none', {})
call <sid>hi('Character', s:cdOrange, {}, 'none', {})
call <sid>hi('Number', s:cdLightGreen, {}, 'none', {})
call <sid>hi('Boolean', s:cdBlue, {}, 'none', {})
hi! link Float Number
call <sid>hi('Identifier', s:cdLightBlue, {}, 'none', {})
call <sid>hi('Function', s:cdYellow, {}, 'none', {})
call <sid>hi('Statement', s:cdPink, {}, 'none', {})
call <sid>hi('Conditional', s:cdPink, {}, 'none', {})
call <sid>hi('Repeat', s:cdPink, {}, 'none', {})
call <sid>hi('Label', s:cdPink, {}, 'none', {})
call <sid>hi('Operator', s:cdFront, {}, 'none', {})
call <sid>hi('Keyword', s:cdPink, {}, 'none', {})
call <sid>hi('Exception', s:cdPink, {}, 'none', {})
call <sid>hi('PreProc', s:cdPink, {}, 'none', {})
call <sid>hi('Include', s:cdPink, {}, 'none', {})
call <sid>hi('Define', s:cdPink, {}, 'none', {})
call <sid>hi('Macro', s:cdPink, {}, 'none', {})
call <sid>hi('PreCondit', s:cdPink, {}, 'none', {})
call <sid>hi('Type', s:cdBlue, {}, 'none', {})
call <sid>hi('StorageClass', s:cdBlue, {}, 'none', {})
call <sid>hi('Structure', s:cdBlue, {}, 'none', {})
call <sid>hi('Typedef', s:cdBlue, {}, 'none', {})
call <sid>hi('Special', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('SpecialChar', s:cdFront, {}, 'none', {})
call <sid>hi('Tag', s:cdFront, {}, 'none', {})
call <sid>hi('Delimiter', s:cdFront, {}, 'none', {})
if g:codedark_italics | call <sid>hi('SpecialComment', s:cdGreen, {}, 'italic', {}) | else | call <sid>hi('SpecialComment', s:cdGreen, {}, 'none', {}) | endif
call <sid>hi('Debug', s:cdFront, {}, 'none', {})
call <sid>hi('Underlined', s:cdNone, {}, 'underline', {})
call <sid>hi("Conceal", s:cdFront, s:cdBack, 'none', {})
call <sid>hi('Ignore', s:cdBack, {}, 'none', {})
call <sid>hi('Error', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('Todo', s:cdNone, s:cdLeftMid, 'none', {})
call <sid>hi('SpellBad', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('SpellCap', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('SpellRare', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('SpellLocal', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
" NEOVIM
" Make neovim specific groups load only on Neovim
if has("nvim")
" nvim-treesitter/nvim-treesitter (github)
call <sid>hiTSlink('@error', 'TSError', 'ErrorMsg')
call <sid>hiTSlink('@punctuation.delimiter', 'TSPunctDelimiter', 'Delimiter')
call <sid>hiTSlink('@punctuation.bracket', 'TSPunctBracket', 'Delimiter')
call <sid>hiTSlink('@punctuation.special', 'TSPunctSpecial', 'Delimiter')
" Constant
call <sid>hiTS('@constant', 'TSConstant', s:cdYellow, {}, 'none', {})
call <sid>hiTSlink('@constant.builtin', 'TSConstBuiltin', 'Constant')
call <sid>hiTS('@constant.macro', 'TSConstMacro', s:cdBlueGreen, {}, 'none', {})
call <sid>hiTSlink('@string', 'TSString', 'String')
call <sid>hiTSlink('@string.regex', 'TSStringRegex', 'String')
call <sid>hiTS('@string.escape', 'TSStringEscape', s:cdYellowOrange, {}, 'none', {})
call <sid>hiTSlink('@character', 'TSCharacter', 'Character')
call <sid>hiTSlink('@number', 'TSNumber', 'Number')
call <sid>hiTS('@boolean', 'TSBoolean', s:cdBlue, {}, 'none', {})
call <sid>hiTSlink('@float', 'TSFloat', 'Float')
call <sid>hiTS('@annotation', 'TSAnnotation', s:cdYellow, {}, 'none', {})
call <sid>hiTS('@attribute', 'TSAttribute', s:cdBlueGreen, {}, 'none', {})
call <sid>hiTS('@namespace', 'TSNamespace', s:cdBlueGreen, {}, 'none', {})
" Functions
call <sid>hiTSlink('@function.builtin', 'TSFuncBuiltin', 'Function')
call <sid>hiTSlink('@function', 'TSFunction','Function')
call <sid>hiTSlink('@function.macro', 'TSFuncMacro','Function')
call <sid>hiTS('@parameter', 'TSParameter', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@parameter.reference', 'TSParameterReference', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@method', 'TSMethod', s:cdYellow, {}, 'none', {})
call <sid>hiTS('@field', 'TSField', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@property', 'TSProperty', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@constructor', 'TSConstructor', s:cdBlueGreen, {}, 'none', {})
" Keywords
call <sid>hiTSlink('@conditional', 'TSConditional', 'Conditional')
call <sid>hiTSlink('@repeat', 'TSRepeat', 'Repeat')
call <sid>hiTS('@label', 'TSLabel', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@keyword', 'TSKeyword', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@keyword.function', 'TSKeywordFunction', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@keyword.operator', 'TSKeywordOperator', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@operator', 'TSOperator', s:cdFront, {}, 'none', {})
call <sid>hiTS('@exception', 'TSException', s:cdPink, {}, 'none', {})
call <sid>hiTS('@type', 'TSType', s:cdBlueGreen, {}, 'none', {})
call <sid>hiTSlink('@type.builtin', 'TSTypeBuiltin', 'Type')
call <sid>hi('TSStructure', s:cdLightBlue, {}, 'none', {})
call <sid>hiTSlink('@include', 'TSInclude', 'Include')
" Variable
call <sid>hiTS('@variable', 'TSVariable', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@variable.builtin', 'TSVariableBuiltin', s:cdLightBlue, {}, 'none', {})
" Text
call <sid>hiTS('@text', 'TSText', s:cdFront, s:cdNone, 'bold', {})
call <sid>hiTS('@text.strong', 'TSStrong', s:cdFront, s:cdNone, 'bold', {})
call <sid>hiTS('@text.emphasis', 'TSEmphasis', s:cdYellowOrange, s:cdNone, 'italic', {})
call <sid>hiTSlink('@text.underline', 'TSUnderline', 'Underlined')
call <sid>hiTS('@text.title', 'TSTitle', s:cdBlue, {}, 'bold', {})
call <sid>hiTS('@text.literal', 'TSLiteral', s:cdOrange, {}, 'none', {})
call <sid>hiTS('@text.uri', 'TSURI', s:cdOrange, {}, 'none', {})
" Tags
call <sid>hiTS('@tag', 'TSTag', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@tag.delimiter', 'TSTagDelimiter', s:cdGray, {}, 'none', {})
" hrsh7th/nvim-cmp (github)
call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'none', {})
call <sid>hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {})
hi! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch
call <sid>hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {})
call <sid>hi('CmpItemKindInterface', s:cdLightBlue, {}, 'none', {})
call <sid>hi('CmpItemKindText', s:cdLightBlue, {}, 'none', {})
call <sid>hi('CmpItemKindFunction', s:cdPink, {}, 'none', {})
call <sid>hi('CmpItemKindMethod ', s:cdPink, {}, 'none', {})
call <sid>hi('CmpItemKindKeyword', s:cdFront, {}, 'none', {})
call <sid>hi('CmpItemKindProperty', s:cdFront, {}, 'none', {})
call <sid>hi('CmpItemKindUnit', s:cdFront, {}, 'none', {})
endif
" MARKDOWN (built-in)
call <sid>hi('markdownH1', s:cdBlue, {}, 'bold', {})
hi! link markdownH2 markdownH1
hi! link markdownH3 markdownH1
hi! link markdownH4 markdownH1
hi! link markdownH5 markdownH1
hi! link markdownH6 markdownH1
call <sid>hi('markdownHeadingDelimiter', s:cdBlue, {}, 'none', {})
call <sid>hi('markdownBold', s:cdBlue, {}, 'bold', {})
call <sid>hi('markdownRule', s:cdBlue, {}, 'bold', {})
call <sid>hi('markdownCode', s:cdOrange, {}, 'none', {})
hi! link markdownCodeDelimiter markdownCode
call <sid>hi('markdownFootnote', s:cdOrange, {}, 'none', {})
hi! link markdownFootnoteDefinition markdownFootnote
call <sid>hi('markdownUrl', s:cdLightBlue, {}, 'underline', {})
call <sid>hi('markdownLinkText', s:cdOrange, {}, 'none', {})
call <sid>hi('markdownEscape', s:cdYellowOrange, {}, 'none', {})
" ASCIIDOC (built-in)
call <sid>hi("asciidocAttributeEntry", s:cdYellowOrange, {}, 'none', {})
call <sid>hi("asciidocAttributeList", s:cdPink, {}, 'none', {})
call <sid>hi("asciidocAttributeRef", s:cdYellowOrange, {}, 'none', {})
call <sid>hi("asciidocHLabel", s:cdBlue, {}, 'bold', {})
call <sid>hi("asciidocListingBlock", s:cdOrange, {}, 'none', {})
call <sid>hi("asciidocMacroAttributes", s:cdYellowOrange, {}, 'none', {})
call <sid>hi("asciidocOneLineTitle", s:cdBlue, {}, 'bold', {})
call <sid>hi("asciidocPassthroughBlock", s:cdBlue, {}, 'none', {})
call <sid>hi("asciidocQuotedMonospaced", s:cdOrange, {}, 'none', {})
call <sid>hi("asciidocTriplePlusPassthrough", s:cdYellow, {}, 'none', {})
call <sid>hi("asciidocMacro", s:cdPink, {}, 'none', {})
call <sid>hi("asciidocAdmonition", s:cdOrange, {}, 'none', {})
call <sid>hi("asciidocQuotedEmphasized", s:cdBlue, {}, 'italic', {})
call <sid>hi("asciidocQuotedEmphasized2", s:cdBlue, {}, 'italic', {})
call <sid>hi("asciidocQuotedEmphasizedItalic", s:cdBlue, {}, 'italic', {})
hi! link asciidocBackslash Keyword
hi! link asciidocQuotedBold markdownBold
hi! link asciidocQuotedMonospaced2 asciidocQuotedMonospaced
hi! link asciidocQuotedUnconstrainedBold asciidocQuotedBold
hi! link asciidocQuotedUnconstrainedEmphasized asciidocQuotedEmphasized
hi! link asciidocURL markdownUrl
" JSON (built-in)
call <sid>hi('jsonKeyword', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsonEscape', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('jsonNull', s:cdBlue, {}, 'none', {})
call <sid>hi('jsonBoolean', s:cdBlue, {}, 'none', {})
" HTML (built-in)
call <sid>hi('htmlTag', s:cdGray, {}, 'none', {})
call <sid>hi('htmlEndTag', s:cdGray, {}, 'none', {})
call <sid>hi('htmlTagName', s:cdBlue, {}, 'none', {})
hi! link htmlSpecialTagName htmlTagName
call <sid>hi('htmlArg', s:cdLightBlue, {}, 'none', {})
" PHP (built-in)
call <sid>hi('phpClass', s:cdBlueGreen, {}, 'none', {})
hi! link phpUseClass phpClass
hi! link phpStaticClasses phpClass
call <sid>hi('phpMethod', s:cdYellow, {}, 'none', {})
call <sid>hi('phpFunction', s:cdYellow, {}, 'none', {})
call <sid>hi('phpInclude', s:cdBlue, {}, 'none', {})
call <sid>hi('phpRegion', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('phpMethodsVar', s:cdLightBlue, {}, 'none', {})
" CSS (built-in)
call <sid>hi('cssBraces', s:cdFront, {}, 'none', {})
call <sid>hi('cssInclude', s:cdPink, {}, 'none', {})
call <sid>hi('cssTagName', s:cdBlue, {}, 'none', {})
call <sid>hi('cssClassName', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssPseudoClass', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssPseudoClassId', s:cdOrange, {}, 'none', {})
call <sid>hi('cssPseudoClassLang', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssIdentifier', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssDefinition', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssAttr', s:cdOrange, {}, 'none', {})
call <sid>hi('cssAttrRegion', s:cdOrange, {}, 'none', {})
call <sid>hi('cssColor', s:cdOrange, {}, 'none', {})
call <sid>hi('cssFunction', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssFunctionName', s:cdYellow, {}, 'none', {})
call <sid>hi('cssVendor', s:cdOrange, {}, 'none', {})
call <sid>hi('cssValueNumber', s:cdOrange, {}, 'none', {})
call <sid>hi('cssValueLength', s:cdLightGreen, {}, 'none', {})
call <sid>hi('cssUnitDecorators', s:cdLightGreen, {}, 'none', {})
call <sid>hi('cssStyle', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssImportant', s:cdBlue, {}, 'none', {})
call <sid>hi('cssSelectorOp', s:cdFront, {}, 'none', {})
call <sid>hi('cssKeyFrameProp2', s:cdLightGreen, {}, 'none', {})
" JavaScript:
call <sid>hi('jsVariableDef', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsFuncArgs', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsFuncBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsRegexpString', s:cdLightRed, {}, 'none', {})
call <sid>hi('jsThis', s:cdBlue, {}, 'none', {})
call <sid>hi('jsOperatorKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('jsDestructuringBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsObjectKey', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsGlobalObjects', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('jsModuleKeyword', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsClassDefinition', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('jsClassKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('jsExtendsKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('jsExportDefault', s:cdPink, {}, 'none', {})
call <sid>hi('jsFuncCall', s:cdYellow, {}, 'none', {})
call <sid>hi('jsObjectValue', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsParen', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsObjectProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsIfElseBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsParenIfElse', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsSpreadOperator', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsSpreadExpression', s:cdLightBlue, {}, 'none', {})
" Vue:
call <sid>hi('VueComponentName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('VueValue', s:cdLightBlue, {}, 'none', {})
call <sid>hi('VueBrace', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('VueExpression', s:cdYellow, {}, 'none', {})
call <sid>hi('VueTag', s:cdLightBlue, {}, 'none', {})
call <sid>hi('VueKey', s:cdPink, {}, 'none', {})
" Typescript:
call <sid>hi('typescriptLabel', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTry', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptExceptions', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptBraces', s:cdFront, {}, 'none', {})
call <sid>hi('typescriptEndColons', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptParens', s:cdFront, {}, 'none', {})
call <sid>hi('typescriptDocTags', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptDocComment', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptLogicSymbols', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptImport', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptBOM', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptVariableDeclaration', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptVariable', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptExport', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptAliasDeclaration', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptAliasKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptClassName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptAccessibilityModifier', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptOperator', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptArrowFunc', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptMethodAccessor', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptMember', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptTypeReference', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptDefault', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTemplateSB', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('typescriptArrowFuncArg', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptParamImpl', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptFuncComma', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptCastKeyword', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptCall', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptCase', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptReserved', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptDefault', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptDecorator', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptPredefinedType', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptClassHeritage', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptClassExtends', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptClassKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptDOMDocProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTemplateSubstitution', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptClassBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptFuncCallArg', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptIndexExpr', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptConditionalParen', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptArray', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptES6SetProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptObjectLiteral', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTypeParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptEnumKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptEnum', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptLoopParen', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptParenExp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptModule', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptAmbientDeclaration', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptModule', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptFuncTypeArrow', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptInterfaceHeritage', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptInterfaceName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptInterfaceKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptInterfaceExtends', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptGlobal', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptAsyncFuncKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptFuncKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptGlobalMethod', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptPromiseMethod', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptIdentifierName', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptCacheMethod', s:cdYellow, {}, 'none', {})
" XML:
call <sid>hi('xmlTag', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('xmlTagName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('xmlEndTag', s:cdBlueGreen, {}, 'none', {})
" Ruby:
call <sid>hi('rubyClassNameTag', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('rubyClassName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('rubyModuleName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('rubyConstant', s:cdBlueGreen, {}, 'none', {})
" Golang:
call <sid>hi('goPackage', s:cdBlue, {}, 'none', {})
call <sid>hi('goImport', s:cdBlue, {}, 'none', {})
call <sid>hi('goVar', s:cdBlue, {}, 'none', {})
call <sid>hi('goConst', s:cdBlue, {}, 'none', {})
call <sid>hi('goStatement', s:cdPink, {}, 'none', {})
call <sid>hi('goType', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goSignedInts', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goUnsignedInts', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goFloats', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goComplexes', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goBuiltins', s:cdYellow, {}, 'none', {})
call <sid>hi('goBoolean', s:cdBlue, {}, 'none', {})
call <sid>hi('goPredefinedIdentifiers', s:cdBlue, {}, 'none', {})
call <sid>hi('goTodo', s:cdGreen, {}, 'none', {})
call <sid>hi('goDeclaration', s:cdBlue, {}, 'none', {})
call <sid>hi('goDeclType', s:cdBlue, {}, 'none', {})
call <sid>hi('goTypeDecl', s:cdBlue, {}, 'none', {})
call <sid>hi('goTypeName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goVarAssign', s:cdLightBlue, {}, 'none', {})
call <sid>hi('goVarDefs', s:cdLightBlue, {}, 'none', {})
call <sid>hi('goReceiver', s:cdFront, {}, 'none', {})
call <sid>hi('goReceiverType', s:cdFront, {}, 'none', {})
call <sid>hi('goFunctionCall', s:cdYellow, {}, 'none', {})
call <sid>hi('goMethodCall', s:cdYellow, {}, 'none', {})
call <sid>hi('goSingleDecl', s:cdLightBlue, {}, 'none', {})
" Python:
call <sid>hi('pythonStatement', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonOperator', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonException', s:cdPink, {}, 'none', {})
call <sid>hi('pythonExClass', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('pythonBuiltinObj', s:cdLightBlue, {}, 'none', {})
call <sid>hi('pythonBuiltinType', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('pythonBoolean', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonNone', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonTodo', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonClassVar', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonClassDef', s:cdBlueGreen, {}, 'none', {})
" TeX:
call <sid>hi('texStatement', s:cdBlue, {}, 'none', {})
call <sid>hi('texBeginEnd', s:cdYellow, {}, 'none', {})
call <sid>hi('texBeginEndName', s:cdLightBlue, {}, 'none', {})
call <sid>hi('texOption', s:cdLightBlue, {}, 'none', {})
call <sid>hi('texBeginEndModifier', s:cdLightBlue, {}, 'none', {})
call <sid>hi('texDocType', s:cdPink, {}, 'none', {})
call <sid>hi('texDocTypeArgs', s:cdLightBlue, {}, 'none', {})
" GIT (built-in)
call <sid>hi('gitcommitHeader', s:cdGray, {}, 'none', {})
call <sid>hi('gitcommitOnBranch', s:cdGray, {}, 'none', {})
call <sid>hi('gitcommitBranch', s:cdPink, {}, 'none', {})
call <sid>hi('gitcommitComment', s:cdGray, {}, 'none', {})
call <sid>hi('gitcommitSelectedType', s:cdGreen, {}, 'none', {})
hi! link gitcommitSelectedFile gitcommitSelectedType
call <sid>hi('gitcommitDiscardedType', s:cdRed, {}, 'none', {})
hi! link gitcommitDiscardedFile gitcommitDiscardedType
hi! link gitcommitOverflow gitcommitDiscardedType
call <sid>hi('gitcommitSummary', s:cdPink, {}, 'none', {})
call <sid>hi('gitcommitBlank', s:cdPink, {}, 'none', {})
" Lua:
call <sid>hi('luaFuncCall', s:cdYellow, {}, 'none', {})
call <sid>hi('luaFuncArgName', s:cdLightBlue, {}, 'none', {})
call <sid>hi('luaFuncKeyword', s:cdPink, {}, 'none', {})
call <sid>hi('luaLocal', s:cdPink, {}, 'none', {})
call <sid>hi('luaBuiltIn', s:cdBlue, {}, 'none', {})
" SH:
call <sid>hi('shDeref', s:cdLightBlue, {}, 'none', {})
call <sid>hi('shVariable', s:cdLightBlue, {}, 'none', {})
" SQL:
call <sid>hi('sqlKeyword', s:cdPink, {}, 'none', {})
call <sid>hi('sqlFunction', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('sqlOperator', s:cdPink, {}, 'none', {})
" YAML:
call <sid>hi('yamlKey', s:cdBlue, {}, 'none', {})
call <sid>hi('yamlConstant', s:cdBlue, {}, 'none', {})
" C++:
call <sid>hi('CTagsClass', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsStructure', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsNamespace', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsGlobalVariable', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsDefinedName ', s:cdBlue, {}, 'none', {})
highlight def link CTagsFunction Function
highlight def link CTagsMember Identifier
" C++ color_coded
call <sid>hi('StructDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('UnionDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('ClassDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypeRef', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypedefDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypeAliasDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('EnumDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TemplateTypeParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypeAliasTemplateDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('ClassTemplate', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('ClassTemplatePartialSpecialization', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('FunctionTemplate', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TemplateRef', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TemplateTemplateParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('UsingDeclaration', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('MemberRef', s:cdLightBlue, {}, 'italic', {})
call <sid>hi('MemberRefExpr', s:cdYellow, {}, 'italic', {})
call <sid>hi('Namespace', s:cdSilver, {}, 'none', {})
call <sid>hi('NamespaceRef', s:cdSilver, {}, 'none', {})
call <sid>hi('NamespaceAlias', s:cdSilver, {}, 'none', {})
" C++ lsp-cxx-highlight
call <sid>hi('LspCxxHlSymClass', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymStruct', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymEnum', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymTypeAlias', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymTypeParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymConcept', s:cdBlueGreen, {}, 'italic', {})
call <sid>hi('LspCxxHlSymNamespace', s:cdSilver, {}, 'none', {})
" Coc Explorer:
call <sid>hi('CocHighlightText', {}, s:cdSelection, 'none', {})
call <sid>hi('CocExplorerIndentLine', s:cdCursorDark, {}, 'none', {})

View File

@@ -1,390 +0,0 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=500
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread
au FocusGained,BufEnter * silent! checktime
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = " "
" Fast saving
nmap <leader>w :w!<cr>
" :W sudo saves the file
" (useful for handling the permission-denied error)
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
" Use system clipboard
set clipboard+=unnamedplus
" Center the screen when in insert mode
autocmd InsertEnter * norm zz
set number relativenumber
set cursorline
set cursorcolumn
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the cursor - when moving vertically using j/k
set so=7
" Avoid garbled characters in Chinese language windows OS
let $LANG='en'
set langmenu=en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" Turn on the Wild menu
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
set wildignore+=.git\*,.hg\*,.svn\*
else
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif
" Always show current position
set ruler
" Height of the command bar
set cmdheight=1
" A buffer becomes hidden when it is abandoned
set hid
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" Properly disable sound on errors on MacVim
if has("gui_macvim")
autocmd GUIEnter * set vb t_vb=
endif
" Add a bit extra margin to the left
set foldcolumn=1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable
" Set regular expression engine automatically
set regexpengine=0
" Enable 256 colors palette in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
try
colorscheme gruvbox
catch
endtry
set background=dark
" Set background to transparent
hi Normal guibg=NONE ctermbg=NONE
" Set extra options when running in GUI mode
if has("gui_running")
set guioptions-=T
set guioptions-=e
set t_Co=256
set guitablabel=%M\ %t
endif
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git etc. anyway...
set nobackup
set nowb
set noswapfile
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 2 spaces
set shiftwidth=2
set tabstop=2
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" Visual mode pressing * or # searches for the current selection
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
map <space> /
map <C-space> ?
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cr>gT
" Close all the buffers
map <leader>ba :bufdo bd<cr>
map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>
" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext<cr>
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <C-r>=escape(expand("%:p:h"), " ")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>
" Specify the behavior when switching between buffers
try
set switchbuf=useopen,usetab,newtab
set stal=2
catch
endtry
" Return to last edit position when opening files (You want this!)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2
" Format the status line
function! GitBranch()
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
endfunction
function! StatuslineGit()
let l:branchname = GitBranch()
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
endfunction
" StatusLine is currently broken. Using the vim default.
" set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ Cursor:\ %l/%c\ \ \ Lines:\ %L%=%{StatuslineGit()}
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Editing mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remap VIM 0 to first non-blank character
map 0 ^
" Move a line of text using ALT+[jk] or Command+[jk] on mac
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
if has("mac") || has("macunix")
nmap <D-j> <M-j>
nmap <D-k> <M-k>
vmap <D-j> <M-j>
vmap <D-k> <M-k>
endif
" Delete trailing white space on save, useful for some filetypes ;)
fun! CleanExtraSpaces()
let save_cursor = getpos(".")
let old_query = getreg('/')
silent! %s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfun
if has("autocmd")
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee :call CleanExtraSpaces()
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>
" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" Quickly open a buffer for scribble
map <leader>q :e ~/buffer<cr>
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
endif
return ''
endfunction
" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum)
buffer #
else
bnext
endif
if bufnr("%") == l:currentBufNum
new
endif
if buflisted(l:currentBufNum)
execute("bdelete! ".l:currentBufNum)
endif
endfunction
function! CmdLine(str)
call feedkeys(":" . a:str)
endfunction
function! VisualSelection(direction, extra_filter) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", "\\/.*'$^~[]")
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'gv'
call CmdLine("Ack '" . l:pattern . "' " )
elseif a:direction == 'replace'
call CmdLine("%s" . '/'. l:pattern . '/')
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
set nocompatible
" VIM-PLUG PLUGINS
call plug#begin()
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" - Vim (Windows): '~/vimfiles/plugged'
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
Plug 'vimwiki/vimwiki'
call plug#end()

View File

@@ -1,147 +0,0 @@
#
# Run-time configuration file for dialog
#
# Automatically generated by "dialog --create-rc <file>"
#
#
# Types of values:
#
# Number - <number>
# String - "string"
# Boolean - <ON|OFF>
# Attribute - (foreground,background,highlight?,underline?,reverse?)
# Set aspect-ration.
aspect = 0
# Set separator (for multiple widgets output).
separate_widget = ""
# Set tab-length (for textbox tab-conversion).
tab_len = 0
# Make tab-traversal for checklist, etc., include the list.
visit_items = OFF
# Show scrollbar in dialog boxes?
# use_scrollbar = OFF
# Shadow dialog boxes? This also turns on color.
use_shadow = ON
# Turn color support ON or OFF
use_colors = ON
# Screen color
screen_color = (WHITE,BLACK,OFF)
# Shadow color
shadow_color = (BLACK,BLACK,ON)
# Dialog box color
dialog_color = (BLACK,WHITE,OFF)
# Dialog box title color
title_color = (BLACK,WHITE,OFF)
# Dialog box border color
border_color = (WHITE,WHITE,ON)
# Active button color
button_active_color = (WHITE,BLACK,ON)
# Inactive button color
button_inactive_color = dialog_color
# Active button key color
button_key_active_color = button_active_color
# Inactive button key color
button_key_inactive_color = (BLACK,WHITE,OFF)
# Active button label color
button_label_active_color = (WHITE,BLACK,ON)
# Inactive button label color
button_label_inactive_color = (BLACK,WHITE,ON)
# Input box color
inputbox_color = dialog_color
# Input box border color
inputbox_border_color = dialog_color
# Search box color
searchbox_color = dialog_color
# Search box title color
searchbox_title_color = title_color
# Search box border color
searchbox_border_color = border_color
# File position indicator color
position_indicator_color = title_color
# Menu box color
menubox_color = dialog_color
# Menu box border color
menubox_border_color = border_color
# Item color
item_color = dialog_color
# Selected item color
item_selected_color = button_active_color
# Tag color
tag_color = title_color
# Selected tag color
tag_selected_color = button_label_active_color
# Tag key color
tag_key_color = button_key_inactive_color
# Selected tag key color
tag_key_selected_color = (WHITE,BLACK,ON)
# Check box color
check_color = dialog_color
# Selected check box color
check_selected_color = button_active_color
# Up arrow color
uarrow_color = (GREEN,WHITE,ON)
# Down arrow color
darrow_color = uarrow_color
# Item help-text color
itemhelp_color = screen_color
# Active form text color
form_active_text_color = button_active_color
# Form text color
form_text_color = (WHITE,BLACK,ON)
# Readonly form item color
form_item_readonly_color = (BLACK,WHITE,ON)
# Dialog box gauge color
gauge_color = title_color
# Dialog box border2 color
border2_color = dialog_color
# Input box border2 color
inputbox_border2_color = dialog_color
# Search box border2 color
searchbox_border2_color = dialog_color
# Menu box border2 color
menubox_border2_color = dialog_color

View File

@@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Homepage</title>
</head>
<body>
<div class="clock" id="clock">
<span id="clock-text"></span>
</div>
<div class="date" id="date">
<span id="date-text"></span>
</div>
<script src="script.js"></script>
</body>
</html>

View File

@@ -1,51 +0,0 @@
// Load the config.json file (using JavaScript vanilla)
let clock_text = document.getElementById("clock-text");
let date_text = document.getElementById("date-text");
displayTime();
setInterval(displayTime, 1000);
displayDate();
setInterval(displayDate, 60000);
function displayTime() {
let date = new Date();
let hours = date.getHours();
let minutes = date.getMinutes();
let ampm = hours >= 12 ? "PM" : "AM";
hours = hours % 12;
hours = hours ? hours : 12;
minutes = minutes < 10 ? "0" + minutes : minutes;
let time = hours + ":" + minutes + " " + ampm;
clock_text.innerHTML = time;
}
function displayDate() {
let date = new Date();
let days = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
];
let day = days[date.getDay()];
let dayNumber = date.getDate();
let month = date.toLocaleString("default", { month: "long" });
let year = date.getFullYear();
if (dayNumber == 1 || dayNumber == 21 || dayNumber == 31) {
dayNumber += "st";
} else if (dayNumber == 2 || dayNumber == 22) {
dayNumber += "nd";
} else if (dayNumber == 3 || dayNumber == 23) {
dayNumber += "rd";
} else {
dayNumber += "th";
}
let dateText = day + ", " + dayNumber + " " + month + " " + year;
date_text.innerHTML = dateText;
}

View File

@@ -1,21 +0,0 @@
html,
body {
font-family: "JetBrainsMono NF", system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
sans-serif;
color: #ebdbb2;
text-align: center;
background: #282828;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
}
.clock {
font-size: 8rem;
}
.date {
font-size: 2rem;
}

View File

@@ -1 +0,0 @@
<svg height="14" width="14" xmlns="http://www.w3.org/2000/svg"><g style="display:inline"><path d="M388 342c-2.207 0-4 1.793-4 4s1.793 4 4 4c2.208 0 4-1.793 4-4s-1.792-4-4-4z" style="color:#bebebe;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:'Andale Mono';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.389;marker:none" transform="translate(-381 -339)"/></g></svg>

Before

Width:  |  Height:  |  Size: 689 B

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