Compare commits
2 Commits
984018cfc9
...
master
Author | SHA1 | Date | |
---|---|---|---|
00a6d6523d
|
|||
f6fffb906a
|
43
dot_local/bin/executable_bwrap_npm_mise.sh
Normal file
43
dot_local/bin/executable_bwrap_npm_mise.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Wrap npm in bubblewrap, modified to use mise's node environment.
|
||||
#
|
||||
# See: https://news.ycombinator.com/item?id=45034496
|
||||
|
||||
mise_npm_path=$(mise which npm 2> /dev/null)
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "There is no active mise environment providing npm"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get path to this environment's node
|
||||
mise_node_path=$(mise where node)
|
||||
|
||||
echo "================================="
|
||||
echo "Wrapping mise's npm in bubblewrap"
|
||||
echo "================================="
|
||||
|
||||
exec bwrap \
|
||||
--ro-bind "$mise_node_path" "$mise_node_path" \
|
||||
--bind ~/.cache ~/.cache \
|
||||
--bind "${PWD}" "${PWD}" \
|
||||
--dev /dev \
|
||||
--die-with-parent \
|
||||
--disable-userns \
|
||||
--new-session \
|
||||
--proc /proc \
|
||||
--ro-bind /etc/ca-certificates /etc/ca-certificates \
|
||||
--ro-bind /etc/resolv.conf /etc/resolv.conf \
|
||||
--ro-bind /etc/ssl /etc/ssl \
|
||||
--ro-bind /usr /usr \
|
||||
--setenv PATH /usr/bin \
|
||||
--symlink /usr/bin /bin \
|
||||
--symlink /usr/bin /sbin \
|
||||
--symlink /usr/lib /lib \
|
||||
--symlink /usr/lib64 /lib64 \
|
||||
--tmpfs /tmp \
|
||||
--unshare-all \
|
||||
--unshare-user \
|
||||
--share-net \
|
||||
"$mise_npm_path" "$@"
|
@@ -1 +1 @@
|
||||
/home/aorth/.local/bin/bwrap_tool.sh
|
||||
/home/aorth/.local/bin/bwrap_npm_mise.sh
|
||||
|
@@ -1,64 +0,0 @@
|
||||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# OS-specific things
|
||||
if [[ "$OSTYPE" =~ ^darwin.*$ ]]; then
|
||||
PATH=$(brew --prefix coreutils)/libexec/gnubin:/usr/local/sbin:$PATH
|
||||
|
||||
if [[ -f $(brew --prefix)/etc/bash_completion ]]; then
|
||||
. $(brew --prefix)/etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# Aliases
|
||||
alias ls='ls -F --color=auto'
|
||||
alias less='less -R' # preserves colors in GNU coreutils' `less`
|
||||
|
||||
# Environment
|
||||
PS1='[\u@\h: \w]\$ '
|
||||
export EDITOR=/usr/bin/vim
|
||||
export PAGER=/usr/bin/less
|
||||
# sequence to set the terminal title to "user@hostname: pwd"
|
||||
TITLEBAR='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
|
||||
# ignore commands starting with space and duplicates
|
||||
HISTCONTROL=ignoreboth
|
||||
# ignore common commands in bash history
|
||||
HISTIGNORE='ls:bg:fg:history'
|
||||
PROMPT_COMMAND="$TITLEBAR"
|
||||
|
||||
# look for Ansible hosts file in current directory
|
||||
export ANSIBLE_HOSTS=hosts
|
||||
|
||||
# look for Node binaries in current directory
|
||||
# if we have npm, we probably want to use npm binaries
|
||||
# I don't like installing globally (npm -g), so add local
|
||||
# node modules' bin to PATH
|
||||
command -v npm >/dev/null 2>&1
|
||||
if [[ $? -eq 0 ]]; then
|
||||
export PATH=$PATH:node_modules/.bin
|
||||
fi
|
||||
|
||||
# If a private bin directory exists, add it to PATH
|
||||
[[ -d ~/bin ]] && PATH="$PATH:~/bin"
|
||||
|
||||
# selenized dircolors
|
||||
# see: https://github.com/jan-warchol/selenized/tree/master/other-apps/dircolors
|
||||
export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
|
||||
|
||||
# Settings
|
||||
# Don't exit when accidentally pressing ^D
|
||||
set -o ignoreeof
|
||||
|
||||
# Append, rather than overwrite history files
|
||||
# Useful for when multiple bash sessions are running
|
||||
shopt -s histappend
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
export PATH
|
@@ -1 +0,0 @@
|
||||
usegeoclue: true
|
@@ -1,28 +0,0 @@
|
||||
# -*- conf -*-
|
||||
|
||||
# 2021-01-20: avoid errors on remote systems when using less etc when the foot
|
||||
# terminfo is not available. Check with `infocmp tmux-256color`.
|
||||
term=xterm-256color
|
||||
|
||||
# Use fc-list to check fonts and styles
|
||||
{%@@ if profile == "knafeh" @@%}
|
||||
font=Cascadia Mono:style=Roman:size=12
|
||||
font-bold=Cascadia Mono:style=SemiBold:size=12
|
||||
font-italic=Cascadia Mono:style=Italic:size=12
|
||||
{%@@ elif profile == "balozi" @@%}
|
||||
font=Cascadia Mono:style=Roman:size=13.5
|
||||
font-bold=Cascadia Mono:style=SemiBold:size=13.5
|
||||
font-italic=Cascadia Mono:style=Italic:size=13.5
|
||||
{%@@ endif @@%}
|
||||
# I don't know where any bold italic is used, but this should work if I ever
|
||||
# find any.
|
||||
{%@@ if profile == "knafeh" @@%}
|
||||
font-bold-italic=Cascadia Mono:style=Bold Italic:size=12
|
||||
{%@@ elif profile == "balozi" @@%}
|
||||
font-bold-italic=Cascadia Mono:style=Bold Italic:size=13.5
|
||||
{%@@ endif @@%}
|
||||
|
||||
# Selenized dark
|
||||
include=/usr/share/foot/themes/selenized-dark
|
||||
|
||||
# vim: ft=dosini
|
@@ -1,28 +0,0 @@
|
||||
dpi-aware=auto
|
||||
# Use fc-list to check fonts and styles
|
||||
font=Source Sans Pro:style=Roman:size=12
|
||||
fields=name,generic,comment,categories,filename,keywords
|
||||
terminal=foot -e
|
||||
prompt="❯ "
|
||||
layer=overlay
|
||||
[colors]
|
||||
# Selenized colors
|
||||
# base03
|
||||
background=103c48ff
|
||||
# base0
|
||||
text=adbcbcff
|
||||
# magenta
|
||||
match=f275beff
|
||||
# base02
|
||||
selection=184956ff
|
||||
# base0
|
||||
selection-text=adbcbcff
|
||||
border=adbcbcfa
|
||||
|
||||
[border]
|
||||
radius=20
|
||||
|
||||
[dmenu]
|
||||
exit-immediately-if-empty=yes
|
||||
|
||||
# vim: ft=dosini
|
@@ -1,35 +0,0 @@
|
||||
profile external-dell {
|
||||
output eDP-1 disable
|
||||
# Dell P2416D, 23.8 inches, 123.41 PPI (see https://www.sven.de/dpi/)
|
||||
# "make model serial" from `swaymsg -t get_outputs`
|
||||
output "Dell Inc. DELL P2416D 6RC2C54O0NWS" mode 2560x1440 position 0,0 scale 1.75
|
||||
}
|
||||
|
||||
profile external-dell-4k {
|
||||
output eDP-1 disable
|
||||
# DELL U3219Q 9RSG413, 31.5 inches, 139.87 PPI (see https://www.sven.de/dpi/)
|
||||
# "make model serial" from `swaymsg -t get_outputs`
|
||||
output "Dell Inc. DELL U3219Q 9RSG413" mode 3840x2160 position 0,0 scale 2
|
||||
}
|
||||
|
||||
profile external-hp1 {
|
||||
output eDP-1 disable
|
||||
# HP E243, 23 inches, 95.78 PPI (see https://www.sven.de/dpi/)
|
||||
# "make model serial" from `swaymsg -t get_outputs`
|
||||
output "Unknown HP E243 CNK0470PZR" mode 1920x1080 position 0,0 scale 1.33
|
||||
}
|
||||
|
||||
profile external-hp2 {
|
||||
output eDP-1 disable
|
||||
# HP E231, 23 inches, 95.78 PPI (see https://www.sven.de/dpi/)
|
||||
# "make model serial" from `swaymsg -t get_outputs`
|
||||
output "Hewlett Packard HP E231 6CM3472DH4" mode 1920x1080 position 0,0 scale 1.33
|
||||
}
|
||||
|
||||
profile internal {
|
||||
{%@@ if profile == "knafeh" @@%}
|
||||
output eDP-1 enable mode 2560x1440 scale 1.75 position 0,0
|
||||
{%@@ elif profile == "balozi" @@%}
|
||||
output eDP-1 enable mode 1920x1080 scale 1.33 position 0,0
|
||||
{%@@ endif @@%}
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
# Format
|
||||
font=Source Sans Pro Semi-Bold 10
|
||||
border-color=#073642
|
||||
background-color=#002B36AA
|
||||
text-color=#FDF6E3
|
||||
format=<b>%s</b> <span color="#93A1A1">(%a)</span>\n%b
|
||||
default-timeout=5000
|
||||
|
||||
# Hidden format (used when there are too many notifications)
|
||||
[hidden]
|
||||
format=Hidden: %h [%t]
|
||||
|
||||
[urgency=low]
|
||||
text-color=#93A1A1
|
||||
|
||||
[urgency=low actionable]
|
||||
border-color=#93A1A1
|
||||
|
||||
[urgency=normal actionable]
|
||||
border-color=#268BD2
|
||||
|
||||
[urgency=high]
|
||||
border-color=#9C2220
|
||||
|
||||
[urgency=high actionable]
|
||||
border-color=#6C71C4
|
@@ -1,281 +0,0 @@
|
||||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod1
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term foot
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu fuzzel | xargs swaymsg exec --
|
||||
|
||||
### Display
|
||||
|
||||
font pango:Source Sans Pro Semi-Bold 10
|
||||
|
||||
### Layout of apps
|
||||
# check app_id with: swaymsg -t get_tree | grep "app_id"
|
||||
|
||||
assign [app_id="firefox"] 1
|
||||
assign [app_id="Alacritty"] 2
|
||||
assign [app_id="foot"] 2
|
||||
assign [app_id="geary"] 3
|
||||
assign [app_id="thunderbird"] 3
|
||||
for_window [app_id="org.gnome.Calculator"] floating enable
|
||||
for_window [app_id="firefox" title="About Firefox"] floating enable
|
||||
for_window [app_id="firefox" title="^Picture-in-Picture$"] floating enable; sticky enable
|
||||
# Send the sharing indicator in Chrome and Firefox to the scratchpad
|
||||
# https://www.reddit.com/r/swaywm/comments/kee35j/permanently_floating_windows/
|
||||
for_window [title=".+[Ss]haring (Indicator|your screen)"] floating enable, move to scratchpad
|
||||
for_window [title="Extension: \(PassFF\).*"] floating enable
|
||||
for_window [title="Office 365 - Manual authentication"] floating enable
|
||||
for_window [app_id="org.jellyfin.jellyfinmediaplayer"] inhibit_idle visible
|
||||
for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable, resize set width 1030 height 710
|
||||
for_window [shell="xwayland"] title_format "%title [XWayland]"
|
||||
# 2022-06-27 Chromium windows launched with --app disable shortcuts
|
||||
# See: https://www.reddit.com/r/swaywm/comments/vlvpws/chromeium_app_flag_spawns_windows_with_shortcut/
|
||||
for_window [app_id="^chrome-.*__-.*$"] shortcuts_inhibitor disable
|
||||
for_window [app_id="org.twosheds.iwgtk"] floating enable
|
||||
# LibreOffice Calc import window
|
||||
for_window [app_id="soffice"] floating enable
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
# Wayland overlay bar for sound and brightness level
|
||||
set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# exec swayidle -w \
|
||||
# timeout 300 'swaylock -f -c 000000' \
|
||||
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
# before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# natural_scroll enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
|
||||
input type:touchpad {
|
||||
# note that DWT only works for internal touchpads (see libinput issue #524)
|
||||
dwt enabled
|
||||
tap enabled
|
||||
drag_lock enabled
|
||||
natural_scroll enabled
|
||||
middle_emulation enabled
|
||||
}
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout "us,bg(phonetic),ara"
|
||||
xkb_options grp:caps_toggle,grp_led:caps
|
||||
}
|
||||
|
||||
### Key bindings
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+Shift+Tab focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
bindsym $mod+Tab focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
|
||||
# Start with tabbed layout in new workspaces
|
||||
workspace_layout tabbed
|
||||
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Fix accidental tiling containers like T[Alacritty Alacritty gedit]
|
||||
# See: https://www.reddit.com/r/swaywm/comments/kzr2xl/how_do_i_undo_talacritty_alacritty_alacritty/
|
||||
bindsym $mod+ctrl+a [tiling workspace="__focused__"] move workspace "reorder"; [workspace="reorder"] move workspace current
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
#
|
||||
# Utilities:
|
||||
#
|
||||
# Special keys to adjust volume via PulseAudio
|
||||
bindsym --locked XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK
|
||||
bindsym --locked XF86AudioLowerVolume exec pamixer -ud 5 && pamixer --get-volume > $WOBSOCK
|
||||
bindsym --locked XF86AudioRaiseVolume exec pamixer -ui 5 && pamixer --get-volume > $WOBSOCK
|
||||
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
# Special keys to adjust brightness via brightnessctl
|
||||
bindsym --locked XF86MonBrightnessUp exec light -S "$(light -G | awk '{ print int(($1 + .72) * 1.4) }')" && light -G | cut -d'.' -f1 > $WOBSOCK
|
||||
bindsym --locked XF86MonBrightnessDown exec light -S "$(light -G | awk '{ print int($1 / 1.4) }')" && light -G | cut -d'.' -f1 > $WOBSOCK
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
# Start sway-session.target, to which kanshi.service and swayidle.service bind.
|
||||
exec_always "systemctl --user start sway-session.target"
|
@@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Geoclue agent
|
||||
BindsTo=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/lib/geoclue-2.0/demos/agent
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
@@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=Dynamic output configuration for Wayland compositors
|
||||
Documentation=https://github.com/emersion/kanshi
|
||||
BindsTo=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/kanshi
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
@@ -1,13 +0,0 @@
|
||||
# From: https://wiki.archlinux.org/title/SSH_keys#SSH_agents
|
||||
[Unit]
|
||||
Description=SSH key agent
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
# DISPLAY required for ssh-askpass to work
|
||||
Environment=DISPLAY=:0
|
||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
@@ -1,8 +0,0 @@
|
||||
# See: https://github.com/swaywm/sway/wiki/Systemd-integration
|
||||
# See: https://wiki.archlinux.org/title/Sway#Manage_Sway-specific_daemons_with_systemd
|
||||
[Unit]
|
||||
Description=sway compositor session
|
||||
Documentation=man:systemd.special(7)
|
||||
BindsTo=graphical-session.target
|
||||
Wants=graphical-session-pre.target
|
||||
After=graphical-session-pre.target
|
@@ -1,17 +0,0 @@
|
||||
[Unit]
|
||||
Description=Idle manager for Wayland
|
||||
Documentation=man:swayidle(1)
|
||||
BindsTo=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/swayidle -w \
|
||||
timeout 300 'swaylock -f -c 000000 \
|
||||
-i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg' \
|
||||
timeout 600 'swaymsg "output * power off"' \
|
||||
resume 'swaymsg "output * power on"' \
|
||||
before-sleep 'swaylock -f -c 000000 \
|
||||
-i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg'
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
@@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=A lightweight overlay volume/backlight/progress/anything bar for Wayland
|
||||
Documentation=man:wob(1)
|
||||
BindsTo=sway-session.target
|
||||
ConditionEnvironment=WAYLAND_DISPLAY
|
||||
|
||||
[Service]
|
||||
StandardInput=socket
|
||||
ExecStart=/usr/bin/wob
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
@@ -1,6 +0,0 @@
|
||||
[Socket]
|
||||
ListenFIFO=%t/wob.sock
|
||||
SocketMode=0600
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
@@ -1,143 +0,0 @@
|
||||
unbind C-b
|
||||
set-option -g prefix ^A
|
||||
bind a send-prefix
|
||||
|
||||
# Bind appropriate commands similar to screen.
|
||||
# lockscreen ^X x
|
||||
unbind ^X
|
||||
bind ^X lock-server
|
||||
unbind x
|
||||
bind x lock-server
|
||||
|
||||
# screen ^C c
|
||||
unbind ^C
|
||||
bind ^C new-window
|
||||
unbind c
|
||||
bind c new-window
|
||||
|
||||
# detach ^D d
|
||||
unbind ^D
|
||||
bind ^D detach
|
||||
|
||||
# displays *
|
||||
unbind *
|
||||
bind * list-clients
|
||||
|
||||
# next ^@ ^N sp n
|
||||
unbind ^@
|
||||
bind ^@ next-window
|
||||
unbind ^N
|
||||
bind ^N next-window
|
||||
unbind " "
|
||||
bind " " next-window
|
||||
unbind n
|
||||
bind n next-window
|
||||
|
||||
# title A
|
||||
unbind A
|
||||
bind A command-prompt "rename-window %%"
|
||||
|
||||
# other ^A
|
||||
unbind ^A
|
||||
bind ^A last-window
|
||||
|
||||
# prev ^H ^P p ^?
|
||||
unbind ^H
|
||||
bind ^H previous-window
|
||||
unbind ^P
|
||||
bind ^P previous-window
|
||||
unbind p
|
||||
bind p previous-window
|
||||
unbind BSpace
|
||||
bind BSpace previous-window
|
||||
|
||||
# windows ^W w
|
||||
unbind ^W
|
||||
bind ^W list-windows
|
||||
unbind w
|
||||
bind w list-windows
|
||||
|
||||
# kill K k
|
||||
unbind K
|
||||
bind K confirm-before "kill-window"
|
||||
unbind k
|
||||
bind k confirm-before "kill-window"
|
||||
|
||||
# redisplay ^L l
|
||||
unbind ^L
|
||||
bind ^L refresh-client
|
||||
unbind l
|
||||
bind l refresh-client
|
||||
|
||||
# " windowlist -b
|
||||
unbind '"'
|
||||
bind '"' choose-window
|
||||
|
||||
# use Escape for entering copy mode, like screen
|
||||
bind Escape copy-mode
|
||||
|
||||
# less time between commands in a command sequence
|
||||
set -s escape-time 0
|
||||
|
||||
# use vi-style key bindings
|
||||
set-option -g mode-keys vi
|
||||
|
||||
# start numbering windows a 1
|
||||
set -g base-index 1
|
||||
|
||||
# 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.
|
||||
set-window-option -g aggressive-resize on
|
||||
|
||||
# the visual bell causes a micro delay when typing. Tab completion triggers
|
||||
# the bell and typing halts for a second and it's really annoying.
|
||||
set-option -g visual-bell off
|
||||
|
||||
# status bar
|
||||
set-option -g status-justify left
|
||||
set-option -g status-left ''
|
||||
set-option -g status-right '#[fg=colour47]#H #[fg=red]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=colour227]%Y-%m-%d %H:%M#[default]'
|
||||
|
||||
# scrollback buffer
|
||||
set-option -g history-limit 4096
|
||||
|
||||
# 2022-11-26: According to the tmux FAQ, inside tmux TERM must be "screen",
|
||||
# "tmux" or similar (such as "tmux-256color"). As of CentOS Stream 8, now
|
||||
# all my systems support this (check with `infocmp tmux-256color`).
|
||||
#
|
||||
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
|
||||
# 2022-11-26: Tell Tmux that the outside terminal supports true color. I
|
||||
# need to use the tmux-specific extension "Tc" for now until all my hosts
|
||||
# are on tmux 3.2+.
|
||||
#
|
||||
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
|
||||
# See: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/
|
||||
set -as terminal-overrides ",*-256color*:Tc"
|
||||
|
||||
#### COLOUR (Solarized dark)
|
||||
|
||||
# default statusbar colors
|
||||
set-option -g status-style "bg=black fg=yellow default"
|
||||
|
||||
# default window title colors
|
||||
set-window-option -g window-status-style "fg=brightblue bg=default"
|
||||
|
||||
# active window title colors
|
||||
set-window-option -g window-status-current-style "fg=brightred bg=default"
|
||||
|
||||
# pane border
|
||||
set-option -g pane-border-style "fg=black"
|
||||
set-option -g pane-active-border-style "fg=brightgreen"
|
||||
|
||||
# message text
|
||||
set-option -g message-style "bg=black fg=brightred"
|
||||
|
||||
# pane number display
|
||||
set-option -g display-panes-active-colour blue #blue
|
||||
set-option -g display-panes-colour brightred #orange
|
||||
|
||||
# clock
|
||||
set-window-option -g clock-mode-colour green #green
|
@@ -1,70 +0,0 @@
|
||||
{
|
||||
"position": "bottom", // Waybar position (top|bottom|left|right)
|
||||
"height": 25, // Waybar height (to be removed for auto height)
|
||||
"spacing": 2, // Gaps between modules (4px)
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-right": ["idle_inhibitor", "wireplumber", "network", "sway/language", "battery", "clock", "tray"],
|
||||
// Modules configuration
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"sway/scratchpad": {
|
||||
"format": "{icon} {count}",
|
||||
"show-empty": false,
|
||||
"format-icons": ["", ""],
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{app}: {title}"
|
||||
},
|
||||
"sway/window": {
|
||||
"format": "{title}",
|
||||
"max-length": 50,
|
||||
},
|
||||
"sway/language": {
|
||||
"format": "{short} {variant}",
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": "{:%Y-%m-%d %H:%M %p}"
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-muted": "",
|
||||
"on-click": "helvum",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
}
|
@@ -1,127 +0,0 @@
|
||||
/* List of selenized-dark colors vs solarized-dark */
|
||||
|
||||
/* {
|
||||
--base03: #103c48 (002b36);
|
||||
--base02: #184956 (073642);
|
||||
--base01: #84c747 (586e75);
|
||||
--base00: #ebc13d (657b83);
|
||||
--base0: #adbcbc (839496);
|
||||
--base1: #53d6c7 (93a1a1);
|
||||
--base2: #72898f (eee8d5);
|
||||
--base3: #cad8d9 (fdf6e3);
|
||||
--yellow: #dbb32d (b58900);
|
||||
--orange: #ff665c (cb4b16);
|
||||
--red: #fa5750 (dc322f);
|
||||
--magenta: #f275be (d33682);
|
||||
--violet: #ff84cd (6c71c4);
|
||||
--blue: #4695f7 (268bd2);
|
||||
--cyan: #41c7b9 (2aa198);
|
||||
--green: #75b938 (859900);
|
||||
} */
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Source Sans Pro Semibold, "Font Awesome 6 Free", sans-serif;
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: #103c48;
|
||||
color: #f275be;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 3px;
|
||||
background-color: transparent;
|
||||
color: #adbcbc;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #184956;
|
||||
border-bottom: 2px solid #fa5750;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #f275be;
|
||||
}
|
||||
|
||||
#clock, #battery, #network, #wireplumber, #tray, #mode, #language, #idle_inhibitor, #window {
|
||||
padding: 0 10px;
|
||||
margin: 0 2px;
|
||||
color: #adbcbc;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #103c48;
|
||||
background-color: #75b938;
|
||||
}
|
||||
|
||||
#language {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #f275be;
|
||||
color: #53d6c7;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #fa5750;
|
||||
color: #53d6c7;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #184956;
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
#show=drun
|
||||
#filter_rate=100
|
||||
#allow_markup=true
|
||||
#no_actions=true
|
||||
#halign=fill
|
||||
#orientation=vertical
|
||||
#content_halign=fill
|
||||
#insensitive=true
|
||||
allow_images=true
|
||||
image_size=40
|
||||
#width=300
|
||||
#height=200
|
||||
insensitive=true
|
||||
mode=drun,run
|
||||
columns=1
|
||||
padding:5
|
||||
lines=6
|
@@ -1,60 +0,0 @@
|
||||
/**
|
||||
* Selenized dark variant Wofi Color theme
|
||||
**/
|
||||
|
||||
|
||||
window {
|
||||
margin: 1px;
|
||||
border: 1px solid #adbcbc;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#input {
|
||||
margin: 1px;
|
||||
border: 2px dashed #84c747;
|
||||
border-top-color: #103c48;
|
||||
border-left-color: #103c48;
|
||||
border-right-color: #103c48;
|
||||
border-bottom-color: #84c747;
|
||||
background-color: #103c48;
|
||||
color: #adbcbc;
|
||||
font: 14px DejaVu Sans Mono;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
margin: 1px;
|
||||
border: 2px none #103c48;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 1px;
|
||||
border: 2px none #103c48;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 1px;
|
||||
border: 2px solid #103c48;
|
||||
background-color: #103c48;
|
||||
color: #adbcbc;
|
||||
}
|
||||
|
||||
#text {
|
||||
margin: 1px;
|
||||
border: 1px none #103c48;
|
||||
font: 14px DejaVu Sans Mono;
|
||||
}
|
||||
|
||||
#selected {
|
||||
margin: 0px;
|
||||
border: 2px none #325b66;
|
||||
background-color: #325b66;
|
||||
color: #adbcbc;
|
||||
}
|
||||
|
||||
#entry {
|
||||
margin: 1px;
|
||||
border: 1px none #103c48;
|
||||
background-color: #103c48;
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
# 2021-05-24: See https://github.com/emersion/xdg-desktop-portal-wlr/issues/124
|
||||
[screencast]
|
||||
chooser_cmd = fuzzel --dmenu --lines=3 --no-icons --prompt='Select the monitor to share:'
|
||||
chooser_type = dmenu
|
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
magick convert "$1" -trim \( +clone -background grey25 -shadow 80x40+5+30 \) +swap -background transparent -layers merge +repage "$1-shadow.png"
|
@@ -1,216 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# v2022-06-13
|
||||
#
|
||||
# I run it like this (using zsh syntax):
|
||||
#
|
||||
# $ for video (~/Pictures/2021/**/*.mp4(ND.)); do ~/Downloads/av1-tests/convert-libaom.sh "$video"; done
|
||||
#
|
||||
# Reference:
|
||||
# - https://ffmpeg.org/ffmpeg-codecs.html#libaom_002dav1
|
||||
# - https://trac.ffmpeg.org/wiki/Encode/AV1
|
||||
#
|
||||
# Changes:
|
||||
# 2024-01-21: minor improvement to handling of output file name
|
||||
# 2022-06-13: use _max_crf in mkvpropedit if we don't find an acceptable vmaf
|
||||
# 2022-04-05: update VMAF log parsing
|
||||
# 2021-10-21: I tested 2-pass and found it doesn't do anything for constant
|
||||
# quality mode. cpu-used 2 still takes ~5x longer than cpu-used 4
|
||||
# at all tiling levels. 4x4 tiles much faster than 2x1 and 2x2 on
|
||||
# all cpu-used levels, with quality less than 0.5 VMAF difference.
|
||||
# Using 4x4 creates a grid of 16 tiles which just seems wrong...
|
||||
# especially if you don't have many threads (I was using 12), so
|
||||
# I will default to 2x2 as a compromise.
|
||||
# 2021-10-20: use tiles instead of columns and rows
|
||||
# 2021-10-16: use tile-columns 2 and tile-rows 2 (oops, this is 4x4 tiles!)
|
||||
# 2021-08-31: strip spaces and commas from VMAF log file name as well
|
||||
# 2021-05-14: benchmarked two pass and file sizes are larger by .5-1MB
|
||||
# 2021-04-29: make sure input file exists
|
||||
# 2021-03-07: benchmarked 10-bit and it's only .5 or less improvment to VMAF
|
||||
# 2021-02-22: allow overriding threads
|
||||
# 2021-02-15: fix handling of apostrophes in ffmpeg's log_path
|
||||
# 2021-01-27: round VMAF before comparing, simplifies code a bit
|
||||
# 2021-01-25: stop trying lower CRFs if VMAF is not likely to improve
|
||||
# 2021-01-19: embed encoding parameters in webm metadata with mkvpropedit
|
||||
# 2021-01-18: use 1-pass encoding (2-pass is only for trying to hit a target
|
||||
# bitrate!)
|
||||
# 2021-01-18: allow overriding variables
|
||||
# 2021-01-17: detect if video already processed
|
||||
# 2021-01-08: use cpu-used 4
|
||||
# 2021-01-07: use tile-columns 2 and tile-rows 2 with cpu-used 4
|
||||
# 2021-01-07: use tile-columns 2 and tile-rows 2 with cpu-used 3
|
||||
# 2021-01-07: use -g 300 (30fps x 10)
|
||||
|
||||
# exit on first error
|
||||
set -o errexit
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "No input file specified."
|
||||
|
||||
exit 1
|
||||
elif [[ ! -r "$1" ]]; then
|
||||
echo "Input file missing or unreadable: $1"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INPUT_FILE_BASENAME=$(basename -- "$1")
|
||||
INPUT_FILE_EXTENSION=${INPUT_FILE_BASENAME##*.}
|
||||
INPUT_FILE_DIRNAME=$(dirname -- "$1")
|
||||
|
||||
# Check if an output file name was specified (like if we are calling from the
|
||||
# benchmarking script, in which case we want to exit as soon as possible). If
|
||||
# not then we can continue with a simple filename based on the input file's.
|
||||
if [[ -z $_output_file ]]; then
|
||||
# Strip file extension from end of string and replace with webm
|
||||
_output_file="${INPUT_FILE_BASENAME%$INPUT_FILE_EXTENSION}webm";
|
||||
_benchmark_mode="false"
|
||||
else
|
||||
_benchmark_mode="true"
|
||||
fi
|
||||
|
||||
# aq-mode not recommended in AV1 yet
|
||||
_aq_mode=${_aq_mode:-0}
|
||||
# 2021-01-08 (libaom 2.0.1): realistic range between 3 and 5, lower takes *much*
|
||||
# longer with very little boost to VMAF. In my experience, cpu-used 2 is *three*
|
||||
# times slower than cpu-used 4 at the same CRF for only a 0.5% boost in VMAF. 6
|
||||
# is the same as 5 in all my tests *shrug*.
|
||||
_cpu_used=${_cpu_used:-4}
|
||||
# 2021-10-20 -tile-columns and -tile-rows are for compatibility with libvpx. The
|
||||
# new option for libaom is -tiles. Convert any columns/rows to tiles using 2^n.
|
||||
if [[ ! -z $_tile_columns || ! -z $_tile_rows ]]; then
|
||||
_tile_columns=${_tile_columns:-1}
|
||||
_tile_rows=${_tile_rows:-1}
|
||||
|
||||
# Compute 2^n tile columns and tile rows (the power operator is ** in bash)
|
||||
_tiles="$((2 ** $_tile_columns))x$((2 ** $_tile_rows))"
|
||||
else
|
||||
_tiles=${_tiles:-2x2}
|
||||
fi
|
||||
|
||||
# 2021-02-22 use nproc number of threads unless threads is already set.
|
||||
_nproc=$(nproc)
|
||||
_threads=${_threads:-$_nproc}
|
||||
|
||||
# Range of CRFs to try, where higher is faster, but lower quality. Based on my
|
||||
# testing 52 to 40 should cover most crappy phone videos.
|
||||
_crf_max=${_crf_max:-52}
|
||||
_crf_min=${_crf_min:-40}
|
||||
|
||||
_libaom_version=$(pacman -Qi aom | grep Version | awk '{print $3}')
|
||||
|
||||
# For grainy mobile phone videos 90 is fine
|
||||
_target_vmaf=${_target_vmaf:-90}
|
||||
# Don't bother trying lower CRF values if the CRF score is more than five points
|
||||
# above the target. In my experience each successively lower CRF step gives you
|
||||
# ~1 VMAF point. In these cases it isn't likely we'll ever reach the target, so
|
||||
# we might as well just settle on the current CRF straight away.
|
||||
_target_vmaf_threshold=${_target_vmaf_threshold:-5}
|
||||
|
||||
_acceptable_output_found="no"
|
||||
|
||||
# Change to the input file's directory
|
||||
pushd "$INPUT_FILE_DIRNAME" >/dev/null
|
||||
|
||||
# We want the highest VMAF score possible with the highest CRF possible. Start
|
||||
# with high CRF first to see if we can get an acceptable VMAF score as soon as
|
||||
# possible. Step through values by 2.
|
||||
for _crf in $(seq $_crf_max -2 $_crf_min); do
|
||||
_processed=$(find . -maxdepth 1 -type f -iname "$_output_file" | wc -l)
|
||||
if [[ $_processed -gt 0 ]]; then
|
||||
echo "${INPUT_FILE_BASENAME}: already processed"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ $_benchmark_mode == "false" ]]; then
|
||||
echo "Processing ${INPUT_FILE_BASENAME} with libaom $_libaom_version CRF ${_crf}..."
|
||||
fi
|
||||
|
||||
chrt -b 0 nice ffmpeg -hide_banner -y -i "$INPUT_FILE_BASENAME" -c:v libaom-av1 -b:v 0 -crf $_crf \
|
||||
-aq-mode $_aq_mode -c:a libopus -b:a 16k \
|
||||
-sc_threshold 0 -cpu-used $_cpu_used \
|
||||
-tiles $_tiles -row-mt 1 \
|
||||
-auto-alt-ref 1 -lag-in-frames 25 \
|
||||
-g 300 -threads $_threads \
|
||||
-f webm "$_output_file" 2>/dev/null
|
||||
|
||||
# Return quickly if we are in benchmark mode so the benchmark script can get
|
||||
# an accurate time and compute its own VMAF score.
|
||||
if [[ $_benchmark_mode == "true" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
_vmaf_log="${_output_file/.*/}.log"
|
||||
|
||||
# strip apostrophes, spaces, and commas (if any) from log file name because
|
||||
# ffmpeg's log_path doesn't seem to be able to handle them. The // performs
|
||||
# a global replace.
|
||||
_vmaf_log="${_vmaf_log//\'}"
|
||||
_vmaf_log="${_vmaf_log//\,}"
|
||||
_vmaf_log="${_vmaf_log// }"
|
||||
|
||||
# Get VMAF score with harmonic mean to emphasize small outliers
|
||||
# See: https://netflixtechblog.com/vmaf-the-journey-continues-44b51ee9ed12
|
||||
chrt -b 0 nice ffmpeg -hide_banner -y -i "$_output_file" -i "$INPUT_FILE_BASENAME" \
|
||||
-filter_complex "libvmaf=pool=harmonic_mean:log_path=${_vmaf_log}:log_fmt=json" \
|
||||
-f null - 2>/dev/null
|
||||
|
||||
_vmaf_score=$(jq '.["pooled_metrics"]["vmaf"]["harmonic_mean"]' "$_vmaf_log")
|
||||
# bash can't do floating point so we use bc
|
||||
# See: https://stackoverflow.com/questions/8654051/how-to-compare-two-floating-point-numbers-in-bash
|
||||
_vmaf_score_round=$(printf %.$2f $(echo "scale=0;(((10^0)*$_vmaf_score)+0.5)/(10^0)" | bc))
|
||||
|
||||
rm "$_vmaf_log"
|
||||
|
||||
# Check if rounded VMAF score is >= target VMAF
|
||||
if [[ $_vmaf_score_round -ge $_target_vmaf ]]; then
|
||||
printf "$INPUT_FILE_BASENAME: acceptable VMAF (%.3f) at AV1 CRF ${_crf}.\n" $_vmaf_score
|
||||
|
||||
# Set the title with information about the encoding in the MKV title
|
||||
mkvpropedit --edit info --set "title=${INPUT_FILE_BASENAME/.*/}-libaom_${_libaom_version}-crf${_crf}-cpu${_cpu_used}-${_tiles}-tiles-vmaf_${_vmaf_score}" "$_output_file" >/dev/null
|
||||
|
||||
_acceptable_output_found="yes"
|
||||
|
||||
# Break from the for loop because we have an acceptable output
|
||||
break
|
||||
# Check if the VMAF score is anywhere near our target, otherwise just keep
|
||||
# current output.
|
||||
elif (($_target_vmaf - $_vmaf_score_round >= $_target_vmaf_threshold)); then
|
||||
printf "$INPUT_FILE_BASENAME: unacceptable VMAF (%.3f) at AV1 CRF ${_crf}, unlikely to reach target soon.\n" $_vmaf_score
|
||||
|
||||
_acceptable_output_found="yes"
|
||||
|
||||
# Break from the for loop and keep the current output, even though it's
|
||||
# unacceptable.
|
||||
break
|
||||
else
|
||||
printf "$INPUT_FILE_BASENAME: unacceptable VMAF (%.3f) at AV1 CRF ${_crf}, continuing.\n" $_vmaf_score
|
||||
|
||||
# Clean up the unacceptable output
|
||||
rm "$_output_file"
|
||||
fi
|
||||
done
|
||||
|
||||
# If we finished going over all the CRFs and still didn't get an acceptable VMAF
|
||||
# score then the video is probably just really low quality so let's just convert
|
||||
# using our max CRF and be done with it.
|
||||
if [[ $_acceptable_output_found == "no" ]]; then
|
||||
echo "${INPUT_FILE_BASENAME}: no acceptable output found, settling on AV1 CRF ${_crf_max}."
|
||||
|
||||
chrt -b 0 nice ffmpeg -hide_banner -y -i "$INPUT_FILE_BASENAME" -c:v libaom-av1 -b:v 0 -crf $_crf_max \
|
||||
-aq-mode $_aq_mode -c:a libopus -b:a 16k \
|
||||
-sc_threshold 0 -cpu-used $_cpu_used \
|
||||
-tiles $_tiles -row-mt 1 \
|
||||
-auto-alt-ref 1 -lag-in-frames 25 \
|
||||
-g 300 -threads $_threads \
|
||||
-f webm "$_output_file" 2>/dev/null
|
||||
|
||||
# Set the title with information about the encoding in the MKV title
|
||||
mkvpropedit --edit info --set "title=${INPUT_FILE_BASENAME/.*/}-libaom_${_libaom_version}-crf${_max_crf}-cpu${_cpu_used}-${_tiles}-tiles" "$_output_file" >/dev/null
|
||||
fi
|
||||
|
||||
# Change back to our starting directory
|
||||
popd >/dev/null
|
||||
|
||||
exit 0
|
@@ -1,133 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# pre-process-media.sh v2024-04-28
|
||||
#
|
||||
# Prepare a directory of images and videos for long-term archival by normalizing
|
||||
# their names, optimizing JPEGs with jpeg-archive, and stripping embedded MP4s
|
||||
# from Android Motion Photos.
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
# Changes:
|
||||
#
|
||||
# v2024-04-28: support Pixel portrait images
|
||||
# v2022-08-01: fix minor syntax issue
|
||||
# v2022-01-15: support Pixel panorama images
|
||||
# v2021-12-26: add 'ftypiso6' for Nokia Android 9 MVIMG files, anchor regexes to
|
||||
# beginning of line to prevent renaming files prematurely.
|
||||
|
||||
# Exit on first error
|
||||
set -o errexit
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "No target directory specified."
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Preprocessing images and videos in $1"
|
||||
|
||||
# Change to the input file's directory
|
||||
pushd "$1" >/dev/null
|
||||
|
||||
echo "Changing permissions to 640..."
|
||||
find . -type f -exec chmod 640 {} \;
|
||||
|
||||
# Rename IMG_20210217_204834.jpg to 2021-02-17_204834.jpg
|
||||
echo "Renaming images to ISO 8601 and removing IMG_..."
|
||||
perl-rename 's/^IMG_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
perl-rename 's/^IMG_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.JPG/$1-$2-$3_$4.jpg/' *.JPG
|
||||
perl-rename 's/^IMG_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.jpeg/$1-$2-$3_$4.jpg/' *.jpeg
|
||||
perl-rename 's/^IMG_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.JPEG/$1-$2-$3_$4.jpg/' *.JPEG
|
||||
# Rename 20220501_174346.jpg (Samsung A52)
|
||||
perl-rename 's/^([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
# Rename IMG_2180.HEIC to 2180.HEIC (iPhone)
|
||||
perl-rename 's/^IMG_([0-9]{4}).HEIC/$1.heic/' *.HEIC
|
||||
# Rename PXL_20210717_043834784.jpg to 2021-07-17_043834784.jpg (Pixel)
|
||||
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
# Remove embedded MP4s from Pixel motion images. Depending on the Android vers-
|
||||
# ion the MP4 header could be ftypmp42, ftypmp4, ftypisom, etc. We have to check
|
||||
# each one in succession, but note that grep will return a non-zero exit code
|
||||
# if it doesn't find the pattern, so we need to temporarily disable errexit. To
|
||||
# make matters worse, it seems some images are called MP and appear to contain
|
||||
# multiple images in the Android Photos app, but don't contain an MP4!
|
||||
#
|
||||
# See: https://stackoverflow.com/questions/53104989/how-to-extract-the-photo-video-component-of-a-mvimg
|
||||
# See: https://medium.com/android-news/working-with-motion-photos-da0aa49b50c
|
||||
# See: https://linuxreviews.org/Google_Pixel_%22Motion_Photo%22
|
||||
set +o errexit
|
||||
for file in PXL_*.MP.jpg MVIMG_*.jpg; do
|
||||
# Don't crash when there are no files matching the glob
|
||||
[ -f "$file" ] || continue
|
||||
|
||||
# Check MP4 header, newer versions first
|
||||
unset ofs
|
||||
for header in 'ftypisom' 'ftypmp4' 'ftypmp42' 'ftypiso6'; do
|
||||
ofs=$(grep -F --byte-offset --only-matching --text "$header" "$file")
|
||||
|
||||
if [[ $ofs ]]; then
|
||||
ofs=${ofs%:*}
|
||||
truncate -s $((ofs-4)) "$file"
|
||||
|
||||
# Go to next image
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Re-set exit on first error
|
||||
set -o errexit
|
||||
|
||||
# Rename PXL_20210717_043834784.MP.jpg to 2021-07-17_043834784.jpg (Pixel Motion Images)
|
||||
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.MP\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
# Rename MVIMG_20190618_124507.jpg to 2019-06-18_124507.jpg (Android Motion Images)
|
||||
perl-rename 's/^MVIMG_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
# Rename PXL_20210910_193159741.NIGHT.jpg to 2021-09-10_193159741.jpg (Pixel Night mode)
|
||||
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.NIGHT\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
# Rename PXL_20211118_162823829.PORTRAIT.jpg to 2021-11-18_162823829.jpg (Pixel Portrait mode)
|
||||
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PORTRAIT\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
# Rename PXL_20230413_231026946.PORTRAIT.ORIGINAL.jpg to 2023-04-13_231026946.jpg (Pixel portrait original?)
|
||||
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PORTRAIT\.ORIGINAL\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
# Rename PXL_20210925_150154460.PANO.jpg to 2021-09-25_150154460.jpg (Pixel Panorama mode)
|
||||
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PANO\.jpg/$1-$2-$3_$4.jpg/' *.jpg
|
||||
|
||||
for file in *.heic; do
|
||||
[ -f "$file" ] || continue
|
||||
|
||||
# We are going to rename the HEIC files according to their embedded dates,
|
||||
# but exiftool syntax is hard so I will just check if these files were al-
|
||||
# ready renamed and skip them. These files come from iPhones.
|
||||
if [[ ! $file =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{4}\.HEIC$ ]]; then
|
||||
# Rename file based on DateTimeOriginal EXIF tag and the original file
|
||||
# name (I removed the "IMG_" part with perl-rename first).
|
||||
exiftool '-filename<${DateTimeOriginal}_${FileName}' -d %Y-%m-%d "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Rename VID_20210205_112539.mp4 to 2021-02-05_112539.mp4
|
||||
echo "Renaming videos to ISO 8601 and removing VID_..."
|
||||
perl-rename 's/VID_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4.mp4/' *.mp4
|
||||
perl-rename 's/VID_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.MP4/$1-$2-$3_$4.mp4/' *.MP4
|
||||
|
||||
# Rename 20220502_124146.mp4 (Samsung A52)
|
||||
perl-rename 's/^([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4.mp4/' *.mp4
|
||||
|
||||
# Rename PXL_20210714_145336054.mp4 to 2021-07-14_145336054.mp4
|
||||
perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4\.mp4/' *.mp4
|
||||
|
||||
# Rename PXL_20240101_142720131.TS.MP4 to 2024-01-01_142720131.mp4 (Pixel 7a TopShot feature)
|
||||
perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.TS\.mp4/$1-$2-$3_$4\.mp4/' *.mp4
|
||||
|
||||
# Optimize JPEGs with jpeg-archive
|
||||
find . -name '*.jpg' | chrt -b 0 parallel --no-notice "jpeg-recompress -q high {} {}"
|
||||
|
||||
# Change back to our starting directory
|
||||
popd >/dev/null
|
||||
|
||||
exit 0
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
|
||||
gsettings set org.gnome.desktop.interface color-scheme "prefer-light"
|
@@ -1,12 +0,0 @@
|
||||
\set QUIET 1
|
||||
\timing on
|
||||
\set ON_ERROR_ROLLBACK interactive
|
||||
\set VERBOSITY verbose
|
||||
\set PROMPT1 '%[%033[1;35m%]%M/%/%R%[%033[0m%]% ☘ '
|
||||
\set PROMPT2 '%[%033[1;30m%]...%[%033[0m%] %R '
|
||||
\set HISTFILE ~/.psql_history- :DBNAME
|
||||
\set HISTCONTROL ignoredups
|
||||
\set COMP_KEYWORD_CASE upper
|
||||
\pset null ␀
|
||||
\pset linestyle unicode
|
||||
\unset QUIET
|
@@ -1 +0,0 @@
|
||||
AddKeysToAgent yes
|
@@ -1,720 +0,0 @@
|
||||
" Name: Selenized dark/light, beta version
|
||||
" Author: Jan Warchoł <jan.warchol@gmail.com>
|
||||
" Maintainer: Jan Warchoł <jan.warchol@gmail.com>
|
||||
" License: Vim License (see `:help license`)
|
||||
" Last Updated: Sat 25 Apr 2020 17:38:38
|
||||
|
||||
" Generated by Colortemplate v2.0.0
|
||||
|
||||
hi clear
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = 'selenized'
|
||||
|
||||
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2
|
||||
let s:italics = (&t_ZH != '' && &t_ZH != '[7m') || has('gui_running') || has('nvim')
|
||||
|
||||
if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
if &background ==# 'dark'
|
||||
let g:terminal_ansi_colors = ['#184956', '#fa5750', '#75b938', '#dbb32d',
|
||||
\ '#4695f7', '#f275be', '#41c7b9', '#72898f', '#2d5b69', '#ff665c',
|
||||
\ '#84c747', '#ebc13d', '#58a3ff', '#ff84cd', '#53d6c7', '#cad8d9']
|
||||
if has('nvim')
|
||||
let g:terminal_color_0 = '#184956'
|
||||
let g:terminal_color_1 = '#fa5750'
|
||||
let g:terminal_color_2 = '#75b938'
|
||||
let g:terminal_color_3 = '#dbb32d'
|
||||
let g:terminal_color_4 = '#4695f7'
|
||||
let g:terminal_color_5 = '#f275be'
|
||||
let g:terminal_color_6 = '#41c7b9'
|
||||
let g:terminal_color_7 = '#72898f'
|
||||
let g:terminal_color_8 = '#2d5b69'
|
||||
let g:terminal_color_9 = '#ff665c'
|
||||
let g:terminal_color_10 = '#84c747'
|
||||
let g:terminal_color_11 = '#ebc13d'
|
||||
let g:terminal_color_12 = '#58a3ff'
|
||||
let g:terminal_color_13 = '#ff84cd'
|
||||
let g:terminal_color_14 = '#53d6c7'
|
||||
let g:terminal_color_15 = '#cad8d9'
|
||||
endif
|
||||
hi Normal guifg=#adbcbc guibg=#103c48 guisp=NONE gui=NONE cterm=NONE
|
||||
hi IncSearch guifg=#ed8649 guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi Search guifg=#dbb32d guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi! link QuickFixLine Search
|
||||
hi Visual guifg=NONE guibg=#2d5b69 guisp=NONE gui=NONE cterm=NONE
|
||||
hi MatchParen guifg=#ebc13d guibg=#2d5b69 guisp=NONE gui=bold cterm=bold
|
||||
hi Cursor guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi! link lCursor Cursor
|
||||
hi CursorLine guifg=NONE guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Folded guifg=NONE guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi ColorColumn guifg=NONE guibg=#2d5b69 guisp=NONE gui=NONE cterm=NONE
|
||||
hi LineNr guifg=#72898f guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLineNr guifg=#cad8d9 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi VertSplit guifg=#72898f guibg=#72898f guisp=NONE gui=NONE cterm=NONE
|
||||
hi StatusLine guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi StatusLineNC guifg=NONE guibg=#2d5b69 guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
hi TabLineSel guifg=#cad8d9 guibg=#184956 guisp=NONE gui=bold,reverse cterm=bold,reverse
|
||||
hi TabLine guifg=#72898f guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi TabLineFill guifg=#72898f guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi ToolbarButton guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ToolbarLine guifg=NONE guibg=#2d5b69 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Pmenu guifg=#72898f guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSel guifg=NONE guibg=#2d5b69 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuThumb guifg=NONE guibg=#72898f guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSbar guifg=NONE guibg=#2d5b69 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffAdd guifg=#75b938 guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffChange guifg=NONE guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffDelete guifg=#fa5750 guibg=#184956 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffText guifg=#184956 guibg=#dbb32d guisp=NONE gui=NONE cterm=NONE
|
||||
hi Comment guifg=#72898f guibg=NONE guisp=NONE gui=italic cterm=italic
|
||||
hi Constant guifg=#41c7b9 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link String Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Float Constant
|
||||
hi Identifier guifg=#58a3ff guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Function Identifier
|
||||
hi Statement guifg=#ebc13d guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Operator Statement
|
||||
hi PreProc guifg=#ed8649 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Define PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Include PreProc
|
||||
hi! link Macro Include
|
||||
hi Type guifg=#75b938 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Typedef Type
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi Special guifg=#fa5750 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi! link Tag Special
|
||||
hi Error guifg=#fa5750 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Todo guifg=#f275be guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Underlined guifg=#af88eb guibg=NONE guisp=NONE gui=underline cterm=underline
|
||||
hi Ignore guifg=#2d5b69 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi VimCommand guifg=#dbb32d guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi RubyDefine guifg=#cad8d9 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
if !s:italics
|
||||
hi Comment gui=NONE cterm=NONE
|
||||
endif
|
||||
if get(g:, 'selenized_green_keywords', 0)
|
||||
hi Statement guifg=#75b938 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Type guifg=#dbb32d guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
endif
|
||||
hi Terminal guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Conceal guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Directory guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi EndOfBuffer guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ModeMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi MoreMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi NonText guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Question guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SignColumn guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpellBad guifg=NONE guibg=NONE guisp=#fa5750 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi SpellCap guifg=NONE guibg=NONE guisp=#fa5750 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi SpellLocal guifg=NONE guibg=NONE guisp=#dbb32d gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi SpellRare guifg=NONE guibg=NONE guisp=#41c7b9 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi Title guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi VisualNOS guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WildMenu guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
unlet s:t_Co s:italics
|
||||
finish
|
||||
endif
|
||||
" Light background
|
||||
let g:terminal_ansi_colors = ['#e9e4d0', '#d2212d', '#489100', '#ad8900',
|
||||
\ '#0072d4', '#ca4898', '#009c8f', '#909995', '#cfcebe', '#cc1729',
|
||||
\ '#428b00', '#a78300', '#006dce', '#c44392', '#00978a', '#3a4d53']
|
||||
if has('nvim')
|
||||
let g:terminal_color_0 = '#e9e4d0'
|
||||
let g:terminal_color_1 = '#d2212d'
|
||||
let g:terminal_color_2 = '#489100'
|
||||
let g:terminal_color_3 = '#ad8900'
|
||||
let g:terminal_color_4 = '#0072d4'
|
||||
let g:terminal_color_5 = '#ca4898'
|
||||
let g:terminal_color_6 = '#009c8f'
|
||||
let g:terminal_color_7 = '#909995'
|
||||
let g:terminal_color_8 = '#cfcebe'
|
||||
let g:terminal_color_9 = '#cc1729'
|
||||
let g:terminal_color_10 = '#428b00'
|
||||
let g:terminal_color_11 = '#a78300'
|
||||
let g:terminal_color_12 = '#006dce'
|
||||
let g:terminal_color_13 = '#c44392'
|
||||
let g:terminal_color_14 = '#00978a'
|
||||
let g:terminal_color_15 = '#3a4d53'
|
||||
endif
|
||||
hi Normal guifg=#53676d guibg=#fbf3db guisp=NONE gui=NONE cterm=NONE
|
||||
hi IncSearch guifg=#c25d1e guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi Search guifg=#ad8900 guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi! link QuickFixLine Search
|
||||
hi Visual guifg=NONE guibg=#cfcebe guisp=NONE gui=NONE cterm=NONE
|
||||
hi MatchParen guifg=#a78300 guibg=#cfcebe guisp=NONE gui=bold cterm=bold
|
||||
hi Cursor guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi! link lCursor Cursor
|
||||
hi CursorLine guifg=NONE guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Folded guifg=NONE guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi ColorColumn guifg=NONE guibg=#cfcebe guisp=NONE gui=NONE cterm=NONE
|
||||
hi LineNr guifg=#909995 guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLineNr guifg=#3a4d53 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi VertSplit guifg=#909995 guibg=#909995 guisp=NONE gui=NONE cterm=NONE
|
||||
hi StatusLine guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi StatusLineNC guifg=NONE guibg=#cfcebe guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
hi TabLineSel guifg=#3a4d53 guibg=#e9e4d0 guisp=NONE gui=bold,reverse cterm=bold,reverse
|
||||
hi TabLine guifg=#909995 guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi TabLineFill guifg=#909995 guibg=NONE guisp=NONE gui=reverse cterm=reverse
|
||||
hi ToolbarButton guifg=NONE guibg=NONE guisp=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ToolbarLine guifg=NONE guibg=#cfcebe guisp=NONE gui=NONE cterm=NONE
|
||||
hi Pmenu guifg=#909995 guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSel guifg=NONE guibg=#cfcebe guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuThumb guifg=NONE guibg=#909995 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSbar guifg=NONE guibg=#cfcebe guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffAdd guifg=#489100 guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffChange guifg=NONE guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffDelete guifg=#d2212d guibg=#e9e4d0 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffText guifg=#e9e4d0 guibg=#ad8900 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Comment guifg=#909995 guibg=NONE guisp=NONE gui=italic cterm=italic
|
||||
hi Constant guifg=#009c8f guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link String Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Float Constant
|
||||
hi Identifier guifg=#006dce guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Function Identifier
|
||||
hi Statement guifg=#a78300 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Operator Statement
|
||||
hi PreProc guifg=#c25d1e guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Define PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Include PreProc
|
||||
hi! link Macro Include
|
||||
hi Type guifg=#489100 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link Typedef Type
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi Special guifg=#d2212d guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi! link Tag Special
|
||||
hi Error guifg=#d2212d guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Todo guifg=#ca4898 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Underlined guifg=#8762c6 guibg=NONE guisp=NONE gui=underline cterm=underline
|
||||
hi Ignore guifg=#cfcebe guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi VimCommand guifg=#ad8900 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi RubyDefine guifg=#3a4d53 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
if !s:italics
|
||||
hi Comment gui=NONE cterm=NONE
|
||||
endif
|
||||
if get(g:, 'selenized_green_keywords', 0)
|
||||
hi Statement guifg=#489100 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Type guifg=#ad8900 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
endif
|
||||
hi Terminal guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Conceal guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Directory guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi EndOfBuffer guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ModeMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi MoreMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi NonText guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Question guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SignColumn guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpellBad guifg=NONE guibg=NONE guisp=#d2212d gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi SpellCap guifg=NONE guibg=NONE guisp=#d2212d gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi SpellLocal guifg=NONE guibg=NONE guisp=#ad8900 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi SpellRare guifg=NONE guibg=NONE guisp=#009c8f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=undercurl
|
||||
hi Title guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi VisualNOS guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WildMenu guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
unlet s:t_Co s:italics
|
||||
finish
|
||||
endif
|
||||
|
||||
if s:t_Co >= 256
|
||||
if &background ==# 'dark'
|
||||
hi Normal ctermfg=250 ctermbg=237 cterm=NONE
|
||||
if !has('patch-8.0.0616') && !has('nvim') " Fix for Vim bug
|
||||
set background=dark
|
||||
endif
|
||||
hi IncSearch ctermfg=173 ctermbg=NONE cterm=reverse
|
||||
hi Search ctermfg=178 ctermbg=NONE cterm=reverse
|
||||
hi! link QuickFixLine Search
|
||||
hi Visual ctermfg=NONE ctermbg=240 cterm=NONE
|
||||
hi MatchParen ctermfg=178 ctermbg=240 cterm=bold
|
||||
hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi! link lCursor Cursor
|
||||
hi CursorLine ctermfg=NONE ctermbg=238 cterm=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=238 cterm=NONE
|
||||
hi Folded ctermfg=NONE ctermbg=238 cterm=NONE
|
||||
hi ColorColumn ctermfg=NONE ctermbg=240 cterm=NONE
|
||||
hi LineNr ctermfg=245 ctermbg=238 cterm=NONE
|
||||
hi CursorLineNr ctermfg=252 ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=245 ctermbg=245 cterm=NONE
|
||||
hi StatusLine ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi StatusLineNC ctermfg=NONE ctermbg=240 cterm=NONE
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
hi TabLineSel ctermfg=252 ctermbg=238 cterm=bold,reverse
|
||||
hi TabLine ctermfg=245 ctermbg=NONE cterm=reverse
|
||||
hi TabLineFill ctermfg=245 ctermbg=NONE cterm=reverse
|
||||
hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=240 cterm=NONE
|
||||
hi Pmenu ctermfg=245 ctermbg=238 cterm=NONE
|
||||
hi PmenuSel ctermfg=NONE ctermbg=240 cterm=NONE
|
||||
hi PmenuThumb ctermfg=NONE ctermbg=245 cterm=NONE
|
||||
hi PmenuSbar ctermfg=NONE ctermbg=240 cterm=NONE
|
||||
hi DiffAdd ctermfg=70 ctermbg=238 cterm=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=238 cterm=NONE
|
||||
hi DiffDelete ctermfg=203 ctermbg=238 cterm=NONE
|
||||
hi DiffText ctermfg=238 ctermbg=178 cterm=NONE
|
||||
hi Comment ctermfg=245 ctermbg=NONE cterm=italic
|
||||
hi Constant ctermfg=44 ctermbg=NONE cterm=NONE
|
||||
hi! link String Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Float Constant
|
||||
hi Identifier ctermfg=39 ctermbg=NONE cterm=NONE
|
||||
hi! link Function Identifier
|
||||
hi Statement ctermfg=178 ctermbg=NONE cterm=NONE
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Operator Statement
|
||||
hi PreProc ctermfg=173 ctermbg=NONE cterm=NONE
|
||||
hi! link Define PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Include PreProc
|
||||
hi! link Macro Include
|
||||
hi Type ctermfg=70 ctermbg=NONE cterm=NONE
|
||||
hi! link Typedef Type
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi Special ctermfg=203 ctermbg=NONE cterm=NONE
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi! link Tag Special
|
||||
hi Error ctermfg=203 ctermbg=NONE cterm=bold
|
||||
hi Todo ctermfg=205 ctermbg=NONE cterm=bold
|
||||
hi Underlined ctermfg=141 ctermbg=NONE cterm=underline
|
||||
hi Ignore ctermfg=240 ctermbg=NONE cterm=NONE
|
||||
hi VimCommand ctermfg=178 ctermbg=NONE cterm=NONE
|
||||
hi RubyDefine ctermfg=252 ctermbg=NONE cterm=bold
|
||||
if !s:italics
|
||||
hi Comment cterm=NONE
|
||||
endif
|
||||
if get(g:, 'selenized_green_keywords', 0)
|
||||
hi Statement ctermfg=70 ctermbg=NONE cterm=NONE
|
||||
hi Type ctermfg=178 ctermbg=NONE cterm=NONE
|
||||
endif
|
||||
hi Terminal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Question ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpellBad ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellCap ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellLocal ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellRare ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi Title ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WildMenu ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
unlet s:t_Co s:italics
|
||||
finish
|
||||
endif
|
||||
" Light background
|
||||
hi Normal ctermfg=241 ctermbg=230 cterm=NONE
|
||||
hi IncSearch ctermfg=166 ctermbg=NONE cterm=reverse
|
||||
hi Search ctermfg=136 ctermbg=NONE cterm=reverse
|
||||
hi! link QuickFixLine Search
|
||||
hi Visual ctermfg=NONE ctermbg=252 cterm=NONE
|
||||
hi MatchParen ctermfg=136 ctermbg=252 cterm=bold
|
||||
hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi! link lCursor Cursor
|
||||
hi CursorLine ctermfg=NONE ctermbg=187 cterm=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=187 cterm=NONE
|
||||
hi Folded ctermfg=NONE ctermbg=187 cterm=NONE
|
||||
hi ColorColumn ctermfg=NONE ctermbg=252 cterm=NONE
|
||||
hi LineNr ctermfg=246 ctermbg=187 cterm=NONE
|
||||
hi CursorLineNr ctermfg=239 ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=246 ctermbg=246 cterm=NONE
|
||||
hi StatusLine ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi StatusLineNC ctermfg=NONE ctermbg=252 cterm=NONE
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
hi TabLineSel ctermfg=239 ctermbg=187 cterm=bold,reverse
|
||||
hi TabLine ctermfg=246 ctermbg=NONE cterm=reverse
|
||||
hi TabLineFill ctermfg=246 ctermbg=NONE cterm=reverse
|
||||
hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=252 cterm=NONE
|
||||
hi Pmenu ctermfg=246 ctermbg=187 cterm=NONE
|
||||
hi PmenuSel ctermfg=NONE ctermbg=252 cterm=NONE
|
||||
hi PmenuThumb ctermfg=NONE ctermbg=246 cterm=NONE
|
||||
hi PmenuSbar ctermfg=NONE ctermbg=252 cterm=NONE
|
||||
hi DiffAdd ctermfg=64 ctermbg=187 cterm=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=187 cterm=NONE
|
||||
hi DiffDelete ctermfg=160 ctermbg=187 cterm=NONE
|
||||
hi DiffText ctermfg=187 ctermbg=136 cterm=NONE
|
||||
hi Comment ctermfg=246 ctermbg=NONE cterm=italic
|
||||
hi Constant ctermfg=37 ctermbg=NONE cterm=NONE
|
||||
hi! link String Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Float Constant
|
||||
hi Identifier ctermfg=25 ctermbg=NONE cterm=NONE
|
||||
hi! link Function Identifier
|
||||
hi Statement ctermfg=136 ctermbg=NONE cterm=NONE
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Operator Statement
|
||||
hi PreProc ctermfg=166 ctermbg=NONE cterm=NONE
|
||||
hi! link Define PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Include PreProc
|
||||
hi! link Macro Include
|
||||
hi Type ctermfg=64 ctermbg=NONE cterm=NONE
|
||||
hi! link Typedef Type
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi Special ctermfg=160 ctermbg=NONE cterm=NONE
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi! link Tag Special
|
||||
hi Error ctermfg=160 ctermbg=NONE cterm=bold
|
||||
hi Todo ctermfg=169 ctermbg=NONE cterm=bold
|
||||
hi Underlined ctermfg=98 ctermbg=NONE cterm=underline
|
||||
hi Ignore ctermfg=252 ctermbg=NONE cterm=NONE
|
||||
hi VimCommand ctermfg=136 ctermbg=NONE cterm=NONE
|
||||
hi RubyDefine ctermfg=239 ctermbg=NONE cterm=bold
|
||||
if !s:italics
|
||||
hi Comment cterm=NONE
|
||||
endif
|
||||
if get(g:, 'selenized_green_keywords', 0)
|
||||
hi Statement ctermfg=64 ctermbg=NONE cterm=NONE
|
||||
hi Type ctermfg=136 ctermbg=NONE cterm=NONE
|
||||
endif
|
||||
hi Terminal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Question ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpellBad ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellCap ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellLocal ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellRare ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi Title ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WildMenu ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
unlet s:t_Co s:italics
|
||||
finish
|
||||
endif
|
||||
|
||||
if s:t_Co >= 16
|
||||
if &background ==# 'dark'
|
||||
hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi IncSearch ctermfg=DarkMagenta ctermbg=NONE cterm=reverse
|
||||
hi Search ctermfg=DarkYellow ctermbg=NONE cterm=reverse
|
||||
hi! link QuickFixLine Search
|
||||
hi Visual ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi MatchParen ctermfg=LightYellow ctermbg=DarkGrey cterm=bold
|
||||
hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi! link lCursor Cursor
|
||||
hi CursorLine ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi Folded ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi ColorColumn ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi LineNr ctermfg=LightGrey ctermbg=Black cterm=NONE
|
||||
hi CursorLineNr ctermfg=White ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=LightGrey ctermbg=LightGrey cterm=NONE
|
||||
hi StatusLine ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi StatusLineNC ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
hi TabLineSel ctermfg=White ctermbg=Black cterm=bold,reverse
|
||||
hi TabLine ctermfg=LightGrey ctermbg=NONE cterm=reverse
|
||||
hi TabLineFill ctermfg=LightGrey ctermbg=NONE cterm=reverse
|
||||
hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi Pmenu ctermfg=LightGrey ctermbg=Black cterm=NONE
|
||||
hi PmenuSel ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi PmenuThumb ctermfg=NONE ctermbg=LightGrey cterm=NONE
|
||||
hi PmenuSbar ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi DiffAdd ctermfg=DarkGreen ctermbg=Black cterm=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi DiffDelete ctermfg=DarkRed ctermbg=Black cterm=NONE
|
||||
hi DiffText ctermfg=Black ctermbg=DarkYellow cterm=NONE
|
||||
hi Comment ctermfg=LightGrey ctermbg=NONE cterm=italic
|
||||
hi Constant ctermfg=DarkCyan ctermbg=NONE cterm=NONE
|
||||
hi! link String Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Float Constant
|
||||
hi Identifier ctermfg=LightBlue ctermbg=NONE cterm=NONE
|
||||
hi! link Function Identifier
|
||||
hi Statement ctermfg=LightYellow ctermbg=NONE cterm=NONE
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Operator Statement
|
||||
hi PreProc ctermfg=DarkMagenta ctermbg=NONE cterm=NONE
|
||||
hi! link Define PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Include PreProc
|
||||
hi! link Macro Include
|
||||
hi Type ctermfg=DarkGreen ctermbg=NONE cterm=NONE
|
||||
hi! link Typedef Type
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi Special ctermfg=DarkRed ctermbg=NONE cterm=NONE
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi! link Tag Special
|
||||
hi Error ctermfg=DarkRed ctermbg=NONE cterm=bold
|
||||
hi Todo ctermfg=DarkMagenta ctermbg=NONE cterm=bold
|
||||
hi Underlined ctermfg=LightBlue ctermbg=NONE cterm=underline
|
||||
hi Ignore ctermfg=DarkGrey ctermbg=NONE cterm=NONE
|
||||
hi VimCommand ctermfg=DarkYellow ctermbg=NONE cterm=NONE
|
||||
hi RubyDefine ctermfg=White ctermbg=NONE cterm=bold
|
||||
if !s:italics
|
||||
hi Comment cterm=NONE
|
||||
endif
|
||||
if get(g:, 'selenized_green_keywords', 0)
|
||||
hi Statement ctermfg=DarkGreen ctermbg=NONE cterm=NONE
|
||||
hi Type ctermfg=DarkYellow ctermbg=NONE cterm=NONE
|
||||
endif
|
||||
hi Terminal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Question ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpellBad ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellCap ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellLocal ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellRare ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi Title ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WildMenu ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
unlet s:t_Co s:italics
|
||||
finish
|
||||
endif
|
||||
" Light background
|
||||
hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi IncSearch ctermfg=DarkMagenta ctermbg=NONE cterm=reverse
|
||||
hi Search ctermfg=DarkYellow ctermbg=NONE cterm=reverse
|
||||
hi! link QuickFixLine Search
|
||||
hi Visual ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi MatchParen ctermfg=LightYellow ctermbg=DarkGrey cterm=bold
|
||||
hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi! link lCursor Cursor
|
||||
hi CursorLine ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi Folded ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi ColorColumn ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi LineNr ctermfg=LightGrey ctermbg=Black cterm=NONE
|
||||
hi CursorLineNr ctermfg=White ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=LightGrey ctermbg=LightGrey cterm=NONE
|
||||
hi StatusLine ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi StatusLineNC ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi! link StatusLineTerm StatusLine
|
||||
hi! link StatusLineTermNC StatusLineNC
|
||||
hi TabLineSel ctermfg=White ctermbg=Black cterm=bold,reverse
|
||||
hi TabLine ctermfg=LightGrey ctermbg=NONE cterm=reverse
|
||||
hi TabLineFill ctermfg=LightGrey ctermbg=NONE cterm=reverse
|
||||
hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=reverse
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi Pmenu ctermfg=LightGrey ctermbg=Black cterm=NONE
|
||||
hi PmenuSel ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi PmenuThumb ctermfg=NONE ctermbg=LightGrey cterm=NONE
|
||||
hi PmenuSbar ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi DiffAdd ctermfg=DarkGreen ctermbg=Black cterm=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=Black cterm=NONE
|
||||
hi DiffDelete ctermfg=DarkRed ctermbg=Black cterm=NONE
|
||||
hi DiffText ctermfg=Black ctermbg=DarkYellow cterm=NONE
|
||||
hi Comment ctermfg=LightGrey ctermbg=NONE cterm=italic
|
||||
hi Constant ctermfg=DarkCyan ctermbg=NONE cterm=NONE
|
||||
hi! link String Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Character Constant
|
||||
hi! link Float Constant
|
||||
hi Identifier ctermfg=LightBlue ctermbg=NONE cterm=NONE
|
||||
hi! link Function Identifier
|
||||
hi Statement ctermfg=LightYellow ctermbg=NONE cterm=NONE
|
||||
hi! link Conditional Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Label Statement
|
||||
hi! link Exception Statement
|
||||
hi! link Operator Statement
|
||||
hi PreProc ctermfg=DarkMagenta ctermbg=NONE cterm=NONE
|
||||
hi! link Define PreProc
|
||||
hi! link PreCondit PreProc
|
||||
hi! link Include PreProc
|
||||
hi! link Macro Include
|
||||
hi Type ctermfg=DarkGreen ctermbg=NONE cterm=NONE
|
||||
hi! link Typedef Type
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi Special ctermfg=DarkRed ctermbg=NONE cterm=NONE
|
||||
hi! link SpecialChar Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
hi! link Tag Special
|
||||
hi Error ctermfg=DarkRed ctermbg=NONE cterm=bold
|
||||
hi Todo ctermfg=DarkMagenta ctermbg=NONE cterm=bold
|
||||
hi Underlined ctermfg=LightBlue ctermbg=NONE cterm=underline
|
||||
hi Ignore ctermfg=DarkGrey ctermbg=NONE cterm=NONE
|
||||
hi VimCommand ctermfg=DarkYellow ctermbg=NONE cterm=NONE
|
||||
hi RubyDefine ctermfg=White ctermbg=NONE cterm=bold
|
||||
if !s:italics
|
||||
hi Comment cterm=NONE
|
||||
endif
|
||||
if get(g:, 'selenized_green_keywords', 0)
|
||||
hi Statement ctermfg=DarkGreen ctermbg=NONE cterm=NONE
|
||||
hi Type ctermfg=DarkYellow ctermbg=NONE cterm=NONE
|
||||
endif
|
||||
hi Terminal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Directory ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ErrorMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi FoldColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi Question ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpecialKey ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi SpellBad ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellCap ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellLocal ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi SpellRare ctermfg=NONE ctermbg=NONE cterm=underline
|
||||
hi Title ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WarningMsg ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi WildMenu ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
unlet s:t_Co s:italics
|
||||
finish
|
||||
endif
|
||||
|
||||
" Background: dark
|
||||
" Color: bg_0 #103c48 237 none
|
||||
" Color: bg_1 #184956 238 Black
|
||||
" Color: bg_2 #2d5b69 240 DarkGrey
|
||||
" Color: dim_0 #72898f 245 LightGrey
|
||||
" Color: fg_0 #adbcbc 250 none
|
||||
" Color: fg_1 #cad8d9 252 White
|
||||
" Color: red #fa5750 ~ DarkRed
|
||||
" Color: green #75b938 ~ DarkGreen
|
||||
" Color: yellow #dbb32d ~ DarkYellow
|
||||
" Color: blue #4695f7 33 DarkBlue
|
||||
" Color: magenta #f275be ~ DarkMagenta
|
||||
" Color: cyan #41c7b9 ~ DarkCyan
|
||||
" Color: br_red #ff665c ~ LightRed
|
||||
" Color: br_green #84c747 ~ LightGreen
|
||||
" Color: br_yellow #ebc13d ~ LightYellow
|
||||
" Color: br_blue #58a3ff 39 LightBlue
|
||||
" Color: br_magenta #ff84cd ~ LightMagenta
|
||||
" Color: br_cyan #53d6c7 ~ LightCyan
|
||||
" Color: orange #ed8649 ~ DarkMagenta
|
||||
" Color: violet #af88eb ~ LightBlue
|
||||
" Color: br_orange #fd9456 ~ LightMagenta
|
||||
" Color: br_violet #bd96fa ~ LightBlue
|
||||
" Term colors: bg_1 red green yellow blue magenta cyan dim_0
|
||||
" Term colors: bg_2 br_red br_green br_yellow br_blue br_magenta br_cyan fg_1
|
||||
" Background: light
|
||||
" Color: bg_0 #fbf3db ~ none
|
||||
" Color: bg_1 #e9e4d0 ~ Black
|
||||
" Color: bg_2 #cfcebe ~ DarkGrey
|
||||
" Color: dim_0 #909995 ~ LightGrey
|
||||
" Color: fg_0 #53676d ~ none
|
||||
" Color: fg_1 #3a4d53 ~ White
|
||||
" Color: red #d2212d ~ DarkRed
|
||||
" Color: green #489100 ~ DarkGreen
|
||||
" Color: yellow #ad8900 ~ DarkYellow
|
||||
" Color: blue #0072d4 ~ DarkBlue
|
||||
" Color: magenta #ca4898 ~ DarkMagenta
|
||||
" Color: cyan #009c8f ~ DarkCyan
|
||||
" Color: br_red #cc1729 ~ LightRed
|
||||
" Color: br_green #428b00 ~ LightGreen
|
||||
" Color: br_yellow #a78300 ~ LightYellow
|
||||
" Color: br_blue #006dce ~ LightBlue
|
||||
" Color: br_magenta #c44392 ~ LightMagenta
|
||||
" Color: br_cyan #00978a ~ LightCyan
|
||||
" Color: orange #c25d1e ~ DarkMagenta
|
||||
" Color: violet #8762c6 ~ LightBlue
|
||||
" Color: br_orange #bc5819 ~ LightMagenta
|
||||
" Color: br_violet #825dc0 ~ LightBlue
|
||||
" Term colors: bg_1 red green yellow blue magenta cyan dim_0
|
||||
" Term colors: bg_2 br_red br_green br_yellow br_blue br_magenta br_cyan fg_1
|
||||
" vim: et ts=2 sw=2
|
@@ -1,51 +0,0 @@
|
||||
set number " show line numbers
|
||||
set tabstop=4 " number of visual spaces per tab
|
||||
set softtabstop=4 " number of spaces in tab when editing
|
||||
set shiftwidth=4 " number of spaces in an indent
|
||||
set expandtab " tabs are spaces
|
||||
set backspace=2 " backspace like in a graphical text editor
|
||||
set wildmode=longest,list " change filename autocomplete to be more like bash
|
||||
set mouse=v " some vim defaults to mouse=a, which sucks for copying and pasting in Xorg
|
||||
set textwidth=80 " set textwidth to 80 characters
|
||||
set colorcolumn=+1 " make it obvious where 80 characters is
|
||||
syntax on
|
||||
filetype on " enable file type detection
|
||||
filetype plugin on " enable file type plugins
|
||||
filetype indent on " enable file type indents
|
||||
|
||||
" You might have to force true color when using regular vim inside tmux as the
|
||||
" colorscheme can appear to be grayscale with "termguicolors" option enabled.
|
||||
" See: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
|
||||
if !has('gui_running') && &term =~ '^\%(screen\|tmux\)'
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" " set foreground color
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" " set background color
|
||||
endif
|
||||
|
||||
colorscheme selenized
|
||||
set termguicolors
|
||||
set background=dark
|
||||
|
||||
" for per-directory vimrc files
|
||||
" see: https://jezenthomas.com/how-i-write-invoices-in-vim/
|
||||
set exrc " Enable use of directory-specific .vimrc
|
||||
set secure " Only run autocommands owned by me
|
||||
|
||||
" from: https://github.com/jfrazelle/.vim/blob/master/vimrc
|
||||
set noswapfile " Don't use swapfile
|
||||
set nobackup " Don't create annoying backup files
|
||||
set nowritebackup
|
||||
set splitright " Split vertical windows right to the current windows
|
||||
set splitbelow " Split horizontal windows below to the current windows
|
||||
set encoding=utf-8 " Set default encoding to UTF-8
|
||||
|
||||
set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats
|
||||
|
||||
set nocompatible
|
||||
set incsearch " Shows the match while typing
|
||||
set hlsearch " Highlight found searches
|
||||
set ignorecase " Search case insensitive...
|
||||
set smartcase " ... but not when search pattern contains upper case characters
|
||||
|
||||
" speed up syntax highlighting
|
||||
set nocursorcolumn
|
||||
set nocursorline
|
@@ -1,32 +0,0 @@
|
||||
-- Pull in the wezterm API
|
||||
local wezterm = require 'wezterm'
|
||||
|
||||
-- This table will hold the configuration.
|
||||
local config = {}
|
||||
|
||||
-- In newer versions of wezterm, use the config_builder which will
|
||||
-- help provide clearer error messages
|
||||
if wezterm.config_builder then
|
||||
config = wezterm.config_builder()
|
||||
end
|
||||
|
||||
config.font = wezterm.font 'Cascadia Mono'
|
||||
config.font_size = 13.5
|
||||
|
||||
-- This is where you actually apply your config choices
|
||||
config.color_scheme = 'Selenized Dark (Gogh)'
|
||||
|
||||
-- Disable bold colors for Solarized / Selenized
|
||||
config.bold_brightens_ansi_colors = false
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
|
||||
-- Disable default padding
|
||||
config.window_padding = {
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
}
|
||||
|
||||
-- and finally, return the configuration to wezterm
|
||||
return config
|
128
dotfiles/zshrc
128
dotfiles/zshrc
@@ -1,128 +0,0 @@
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=5000
|
||||
SAVEHIST=5000
|
||||
setopt append_history # append
|
||||
setopt hist_ignore_all_dups # no duplicate
|
||||
setopt hist_ignore_space # ignore space prefixed commands
|
||||
setopt hist_reduce_blanks # trim blanks
|
||||
setopt inc_append_history # add commands as they are typed, don't wait until shell exit
|
||||
setopt share_history # share hist between sessions
|
||||
setopt ignoreeof # don't exit the shell on ^D (EOF)
|
||||
|
||||
# emacs bindings
|
||||
bindkey -e
|
||||
# make delete key work
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
|
||||
# make Ctrl-arrow work
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
|
||||
# autocomplete
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# OS-specific things
|
||||
if [[ "$OSTYPE" =~ ^linux.*$ ]]; then
|
||||
# Only add local bin if it's not already present
|
||||
[[ ! $PATH == *.local/bin* ]] && PATH=~/.local/bin:$PATH
|
||||
|
||||
{%@@ if profile == "knafeh" or profile == "balozi" @@%}
|
||||
# Export these variables in our TTY so that Sway can read them when it
|
||||
# starts. It's not pretty, but it's all we can do since support for
|
||||
# ~/.pam_environment was removed from pambase in Arch Linux recently.
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
# 2021-06-22: fix "Firefox is already running" message
|
||||
# See: https://mastransky.wordpress.com/2020/03/16/wayland-x11-how-to-run-firefox-in-mixed-environment/
|
||||
export MOZ_DBUS_REMOTE=1
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export CLUTTER_BACKEND=wayland
|
||||
# 2020-02-10: https://github.com/swaywm/sway/wiki#issues-with-java-applications
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# Signal to xdg-desktop-portal that we're on Sway
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
|
||||
# 2023-02-05: tell pip/poetry not to probe for keyrings. I'm not publishing
|
||||
# packages to pypi.org and the popup during pip/poetry install is annoying.
|
||||
# See: https://github.com/python-poetry/poetry/issues/1917
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
|
||||
# For rsync breaking change in arg parsing since 2022
|
||||
# See: https://github.com/bit-team/backintime/issues/1247
|
||||
export RSYNC_OLD_ARGS=1
|
||||
{%@@ endif @@%}
|
||||
|
||||
{%@@ if profile == "knafeh" or profile == "balozi" @@%}
|
||||
export WLR_RENDERER=vulkan
|
||||
{%@@ endif @@%}
|
||||
fi
|
||||
|
||||
# Enable zsh completions for mise version manager
|
||||
if [[ -f /usr/bin/mise ]]; then
|
||||
eval "$(/usr/bin/mise activate zsh)"
|
||||
fi
|
||||
|
||||
alias ls='ls -F --color=auto'
|
||||
alias less='less -R' # preserves colors in GNU coreutils' `less`
|
||||
|
||||
# selenized dircolors
|
||||
# see: https://github.com/jan-warchol/selenized/tree/master/other-apps/dircolors
|
||||
export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
|
||||
|
||||
# Environment
|
||||
export PS1='[%n@%m: %~]$ '
|
||||
export EDITOR=vim
|
||||
export PAGER=less
|
||||
|
||||
# resize images using GraphicsMagick
|
||||
#
|
||||
# $ smartresize DSC_0788.JPG 1920x1080 outputdir [quality]
|
||||
#
|
||||
# Similar to the one from SmashingMagazine, but ported to GraphicsMagick
|
||||
# see: http://www.smashingmagazine.com/2015/06/efficient-image-resizing-with-imagemagick/
|
||||
smartresize() {
|
||||
if [[ -z $4 ]]; then QUALITY=82; else QUALITY=$4; fi
|
||||
|
||||
gm mogrify -filter Triangle -define filter:support=2 -thumbnail $2 -unsharp 2x0.5+0.7+0 -dither -quality $QUALITY -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace Line -strip -output-directory $3 $1
|
||||
}
|
||||
|
||||
# optimize jpeg using GraphicsMagick
|
||||
#
|
||||
# $ jpegoptimize DSC_0788.JPG outputdir [quality]
|
||||
#
|
||||
# Similar to smartresize above, but just optmizes the jpeg
|
||||
jpegoptimize() {
|
||||
if [[ -z $3 ]]; then QUALITY=82; else QUALITY=$3; fi
|
||||
|
||||
gm mogrify -filter Triangle -define filter:support=2 -unsharp 2x0.5+0.7+0 -dither -quality $QUALITY -define jpeg:fancy-upsampling=off -interlace Line -strip -output-directory $2 $1
|
||||
}
|
||||
|
||||
# Generate a random hex password 20 characters long. The input from /dev/urandom
|
||||
# does not need to be any particular length due to SHA-2 256's design (for exam-
|
||||
# ple, the "avalanche" effect and the input padding), so I just read 1 byte with
|
||||
# dd. Some sites (see below) recommend using a minimum of 20 characters for hex
|
||||
# passwords.
|
||||
#
|
||||
# See: https://www.ssh.com/academy/ssh/passphrase-generator
|
||||
genpass() {
|
||||
dd if=/dev/urandom bs=1 count=1 2>/dev/null | \
|
||||
sha256sum -b | \
|
||||
sed 's/ .*//' | \
|
||||
head -c 20; echo
|
||||
}
|
||||
|
||||
# set GPG TTY for pinentry-curses
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Refresh gpg-agent tty in case user switches into an X Session
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
|
||||
# Export location to SSH agent socket, see ssh-agent.service
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
|
||||
# Speed up JVM start for short-lived Java programs
|
||||
# See: https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/
|
||||
export MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
|
||||
export PATH
|
Reference in New Issue
Block a user