mirror of https://github.com/zoomiti/dotfiles.git
Huge update before setting up new laptop
parent
d6b703ac88
commit
7189c077a5
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Generates an alacritty color config from currently loaded X resources.
|
||||||
|
|
||||||
|
xrdb_grep() {
|
||||||
|
xrdb -query | grep -E '^\*'"$1"':'
|
||||||
|
}
|
||||||
|
|
||||||
|
color_from_line() {
|
||||||
|
read -r line && readonly line
|
||||||
|
echo "${line/\#/0x}" | tr -d '[:space:]' | cut -d ':' -f 2
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly color_idx=(black red green yellow blue magenta cyan white)
|
||||||
|
|
||||||
|
# Begin to print alacritty config.
|
||||||
|
printf 'colors:\n'
|
||||||
|
|
||||||
|
printf ' primary:\n'
|
||||||
|
|
||||||
|
printf ' background:\t%s\n' "$(xrdb_grep 'background' | color_from_line)"
|
||||||
|
printf ' foreground:\t%s\n' "$(xrdb_grep 'foreground' | color_from_line)"
|
||||||
|
|
||||||
|
printf ' normal:\n'
|
||||||
|
declare -i i=0
|
||||||
|
while read -r line; do
|
||||||
|
if [[ $i == 8 ]]; then
|
||||||
|
printf ' bright:\n'
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf ' %s:\t%s\n' \
|
||||||
|
"${color_idx[((i % 8))]}" \
|
||||||
|
"$(echo "$line" | color_from_line)"
|
||||||
|
|
||||||
|
i+=1
|
||||||
|
done < <(xrdb_grep 'color[[:digit:]]+' | sort -V)
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
schemes:
|
||||||
|
zoomiti: &dark
|
||||||
|
primary:
|
||||||
|
background: '#381818'
|
||||||
|
foreground: '#f2a97d'
|
||||||
|
normal:
|
||||||
|
black: '#41444a'
|
||||||
|
red: '#a54242'
|
||||||
|
green: '#8c9440'
|
||||||
|
yellow: '#DE803F'
|
||||||
|
blue: '#256295'
|
||||||
|
magenta: '#85678f'
|
||||||
|
cyan: '#5e8d87'
|
||||||
|
white: '#707880'
|
||||||
|
bright:
|
||||||
|
black: '#373b41'
|
||||||
|
red: '#cc6666'
|
||||||
|
green: '#b5bd68'
|
||||||
|
yellow: '#F0B94E'
|
||||||
|
blue: '#5185B1'
|
||||||
|
magenta: '#b294bb'
|
||||||
|
cyan: '#8abeb7'
|
||||||
|
white: '#c5c8c6'
|
||||||
|
|
||||||
|
colors: *dark
|
||||||
|
|
||||||
|
background_opacity: 0.8
|
||||||
@ -0,0 +1,472 @@
|
|||||||
|
[global]
|
||||||
|
### Display ###
|
||||||
|
|
||||||
|
# Which monitor should the notifications be displayed on.
|
||||||
|
monitor = 0
|
||||||
|
|
||||||
|
# Display notification on focused monitor. Possible modes are:
|
||||||
|
# mouse: follow mouse pointer
|
||||||
|
# keyboard: follow window with keyboard focus
|
||||||
|
# none: don't follow anything
|
||||||
|
#
|
||||||
|
# "keyboard" needs a window manager that exports the
|
||||||
|
# _NET_ACTIVE_WINDOW property.
|
||||||
|
# This should be the case for almost all modern window managers.
|
||||||
|
#
|
||||||
|
# If this option is set to mouse or keyboard, the monitor option
|
||||||
|
# will be ignored.
|
||||||
|
follow = mouse
|
||||||
|
|
||||||
|
### Geometry ###
|
||||||
|
|
||||||
|
# dynamic width from 0 to 300
|
||||||
|
# width = (0, 300)
|
||||||
|
# constant width of 300
|
||||||
|
width = (0, 400)
|
||||||
|
|
||||||
|
# The maximum height of a single notification, excluding the frame.
|
||||||
|
height = 300
|
||||||
|
|
||||||
|
# Position the notification in the top right corner
|
||||||
|
origin = top-right
|
||||||
|
|
||||||
|
# Offset from the origin
|
||||||
|
offset = 0x32
|
||||||
|
|
||||||
|
# Scale factor. It is auto-detected if value is 0.
|
||||||
|
scale = 0
|
||||||
|
|
||||||
|
# Maximum number of notification (0 means no limit)
|
||||||
|
notification_limit = 0
|
||||||
|
|
||||||
|
# Turn on the progess bar
|
||||||
|
progress_bar = true
|
||||||
|
|
||||||
|
# Set the progress bar height. This includes the frame, so make sure
|
||||||
|
# it's at least twice as big as the frame width.
|
||||||
|
progress_bar_height = 10
|
||||||
|
|
||||||
|
# Set the frame width of the progress bar
|
||||||
|
progress_bar_frame_width = 1
|
||||||
|
|
||||||
|
# Set the minimum width for the progress bar
|
||||||
|
progress_bar_min_width = 150
|
||||||
|
|
||||||
|
# Set the maximum width for the progress bar
|
||||||
|
progress_bar_max_width = 300
|
||||||
|
|
||||||
|
|
||||||
|
# Show how many messages are currently hidden (because of geometry).
|
||||||
|
indicate_hidden = yes
|
||||||
|
|
||||||
|
# The transparency of the window. Range: [0; 100].
|
||||||
|
# This option will only work if a compositing window manager is
|
||||||
|
# present (e.g. xcompmgr, compiz, etc.).
|
||||||
|
transparency = 10
|
||||||
|
|
||||||
|
# The height of the entire notification. If the height is smaller
|
||||||
|
# than the font height and padding combined, it will be raised
|
||||||
|
# to the font height and padding.
|
||||||
|
notification_height = 0
|
||||||
|
|
||||||
|
# Draw a line of "separator_height" pixel height between two
|
||||||
|
# notifications.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
separator_height = 2
|
||||||
|
|
||||||
|
# Padding between text and separator.
|
||||||
|
padding = 8
|
||||||
|
|
||||||
|
# Horizontal padding.
|
||||||
|
horizontal_padding = 8
|
||||||
|
|
||||||
|
# Padding between text and icon.
|
||||||
|
text_icon_padding = 0
|
||||||
|
|
||||||
|
# Defines width in pixels of frame around the notification window.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
frame_width = 3
|
||||||
|
|
||||||
|
# Defines color of the frame around the notification window.
|
||||||
|
frame_color = "#aaaaaa"
|
||||||
|
|
||||||
|
# Define a color for the separator.
|
||||||
|
# possible values are:
|
||||||
|
# * auto: dunst tries to find a color fitting to the background;
|
||||||
|
# * foreground: use the same color as the foreground;
|
||||||
|
# * frame: use the same color as the frame;
|
||||||
|
# * anything else will be interpreted as a X color.
|
||||||
|
separator_color = frame
|
||||||
|
|
||||||
|
# Sort messages by urgency.
|
||||||
|
sort = yes
|
||||||
|
|
||||||
|
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||||
|
# for longer than idle_threshold seconds.
|
||||||
|
# Set to 0 to disable.
|
||||||
|
# A client can set the 'transient' hint to bypass this. See the rules
|
||||||
|
# section for how to disable this if necessary
|
||||||
|
idle_threshold = 120
|
||||||
|
|
||||||
|
### Text ###
|
||||||
|
|
||||||
|
font = Monospace 8
|
||||||
|
|
||||||
|
# The spacing between lines. If the height is smaller than the
|
||||||
|
# font height, it will get raised to the font height.
|
||||||
|
line_height = 0
|
||||||
|
|
||||||
|
# Possible values are:
|
||||||
|
# full: Allow a small subset of html markup in notifications:
|
||||||
|
# <b>bold</b>
|
||||||
|
# <i>italic</i>
|
||||||
|
# <s>strikethrough</s>
|
||||||
|
# <u>underline</u>
|
||||||
|
#
|
||||||
|
# For a complete reference see
|
||||||
|
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
|
||||||
|
#
|
||||||
|
# strip: This setting is provided for compatibility with some broken
|
||||||
|
# clients that send markup even though it's not enabled on the
|
||||||
|
# server. Dunst will try to strip the markup but the parsing is
|
||||||
|
# simplistic so using this option outside of matching rules for
|
||||||
|
# specific applications *IS GREATLY DISCOURAGED*.
|
||||||
|
#
|
||||||
|
# no: Disable markup parsing, incoming notifications will be treated as
|
||||||
|
# plain text. Dunst will not advertise that it has the body-markup
|
||||||
|
# capability if this is set as a global setting.
|
||||||
|
#
|
||||||
|
# It's important to note that markup inside the format option will be parsed
|
||||||
|
# regardless of what this is set to.
|
||||||
|
markup = full
|
||||||
|
|
||||||
|
# The format of the message. Possible variables are:
|
||||||
|
# %a appname
|
||||||
|
# %s summary
|
||||||
|
# %b body
|
||||||
|
# %i iconname (including its path)
|
||||||
|
# %I iconname (without its path)
|
||||||
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
|
# %n progress value if set without any extra characters
|
||||||
|
# %% Literal %
|
||||||
|
# Markup is allowed
|
||||||
|
format = "<b>%s</b>\n%b"
|
||||||
|
|
||||||
|
# Alignment of message text.
|
||||||
|
# Possible values are "left", "center" and "right".
|
||||||
|
alignment = left
|
||||||
|
|
||||||
|
# Vertical alignment of message text and icon.
|
||||||
|
# Possible values are "top", "center" and "bottom".
|
||||||
|
vertical_alignment = center
|
||||||
|
|
||||||
|
# Show age of message if message is older than show_age_threshold
|
||||||
|
# seconds.
|
||||||
|
# Set to -1 to disable.
|
||||||
|
show_age_threshold = 60
|
||||||
|
|
||||||
|
# Split notifications into multiple lines if they don't fit into
|
||||||
|
# geometry.
|
||||||
|
word_wrap = no
|
||||||
|
|
||||||
|
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||||
|
# Possible values are "start", "middle" and "end".
|
||||||
|
ellipsize = middle
|
||||||
|
|
||||||
|
# Ignore newlines '\n' in notifications.
|
||||||
|
ignore_newline = no
|
||||||
|
|
||||||
|
# Stack together notifications with the same content
|
||||||
|
stack_duplicates = true
|
||||||
|
|
||||||
|
# Hide the count of stacked notifications with the same content
|
||||||
|
hide_duplicate_count = false
|
||||||
|
|
||||||
|
# Display indicators for URLs (U) and actions (A).
|
||||||
|
show_indicators = no
|
||||||
|
|
||||||
|
### Icons ###
|
||||||
|
|
||||||
|
# Align icons left/right/off
|
||||||
|
icon_position = left
|
||||||
|
|
||||||
|
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||||
|
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||||
|
# max_icon_size takes precedence over this.
|
||||||
|
min_icon_size = 0
|
||||||
|
|
||||||
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
|
max_icon_size = 32
|
||||||
|
|
||||||
|
# Paths to default icons.
|
||||||
|
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||||
|
|
||||||
|
### History ###
|
||||||
|
|
||||||
|
# Should a notification popped up from history be sticky or timeout
|
||||||
|
# as if it would normally do.
|
||||||
|
sticky_history = yes
|
||||||
|
|
||||||
|
# Maximum amount of notifications kept in history
|
||||||
|
history_length = 20
|
||||||
|
|
||||||
|
### Misc/Advanced ###
|
||||||
|
|
||||||
|
# dmenu path.
|
||||||
|
dmenu = /usr/bin/dmenu -p dunst:
|
||||||
|
|
||||||
|
# Browser for opening urls in context menu.
|
||||||
|
browser = /usr/bin/firefox -new-tab
|
||||||
|
|
||||||
|
# Always run rule-defined scripts, even if the notification is suppressed
|
||||||
|
always_run_script = true
|
||||||
|
|
||||||
|
# Define the title of the windows spawned by dunst
|
||||||
|
title = Dunst
|
||||||
|
|
||||||
|
# Define the class of the windows spawned by dunst
|
||||||
|
class = Dunst
|
||||||
|
|
||||||
|
# Print a notification on startup.
|
||||||
|
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||||
|
# automatically after a crash.
|
||||||
|
startup_notification = false
|
||||||
|
|
||||||
|
# Manage dunst's desire for talking
|
||||||
|
# Can be one of the following values:
|
||||||
|
# crit: Critical features. Dunst aborts
|
||||||
|
# warn: Only non-fatal warnings
|
||||||
|
# mesg: Important Messages
|
||||||
|
# info: all unimportant stuff
|
||||||
|
# debug: all less than unimportant stuff
|
||||||
|
verbosity = mesg
|
||||||
|
|
||||||
|
# Define the corner radius of the notification window
|
||||||
|
# in pixel size. If the radius is 0, you have no rounded
|
||||||
|
# corners.
|
||||||
|
# The radius will be automatically lowered if it exceeds half of the
|
||||||
|
# notification height to avoid clipping text and/or icons.
|
||||||
|
corner_radius = 0
|
||||||
|
|
||||||
|
# Ignore the dbus closeNotification message.
|
||||||
|
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||||
|
# parameter, an application may close the notification sent before the
|
||||||
|
# user defined timeout.
|
||||||
|
ignore_dbusclose = false
|
||||||
|
|
||||||
|
### Wayland ###
|
||||||
|
# These settings are Wayland-specific. They have no effect when using X11
|
||||||
|
|
||||||
|
# Uncomment this if you want to let notications appear under fullscreen
|
||||||
|
# applications (default: overlay)
|
||||||
|
# layer = top
|
||||||
|
|
||||||
|
# Set this to true to use X11 output on Wayland.
|
||||||
|
force_xwayland = false
|
||||||
|
|
||||||
|
### Legacy
|
||||||
|
|
||||||
|
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||||
|
# This setting is provided for compatibility with older nVidia drivers that
|
||||||
|
# do not support RandR and using it on systems that support RandR is highly
|
||||||
|
# discouraged.
|
||||||
|
#
|
||||||
|
# By enabling this setting dunst will not be able to detect when a monitor
|
||||||
|
# is connected or disconnected which might break follow mode if the screen
|
||||||
|
# layout changes.
|
||||||
|
force_xinerama = false
|
||||||
|
|
||||||
|
### mouse
|
||||||
|
|
||||||
|
# Defines list of actions for each mouse event
|
||||||
|
# Possible values are:
|
||||||
|
# * none: Don't do anything.
|
||||||
|
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||||
|
# invoke it. If there are multiple and no default, open the context menu.
|
||||||
|
# * close_current: Close current notification.
|
||||||
|
# * close_all: Close all notifications.
|
||||||
|
# These values can be strung together for each mouse event, and
|
||||||
|
# will be executed in sequence.
|
||||||
|
mouse_left_click = close_current
|
||||||
|
mouse_middle_click = do_action, close_current
|
||||||
|
mouse_right_click = close_all
|
||||||
|
|
||||||
|
# Experimental features that may or may not work correctly. Do not expect them
|
||||||
|
# to have a consistent behaviour across releases.
|
||||||
|
[experimental]
|
||||||
|
# Calculate the dpi to use on a per-monitor basis.
|
||||||
|
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||||
|
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||||
|
# using the resolution and physical size. This might be useful in setups
|
||||||
|
# where there are multiple screens with very different dpi values.
|
||||||
|
per_monitor_dpi = false
|
||||||
|
|
||||||
|
# The internal keyboard shortcut support in dunst is now considered deprecated
|
||||||
|
# and should be replaced by dunstctl calls. You can use the configuration of your
|
||||||
|
# WM or DE to bind these to shortcuts of your choice.
|
||||||
|
# Check the dunstctl manual page for more info.
|
||||||
|
[shortcuts]
|
||||||
|
|
||||||
|
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||||
|
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||||
|
# "mod3" and "mod4" (windows-key).
|
||||||
|
# Xev might be helpful to find names for keys.
|
||||||
|
|
||||||
|
# Close notification. Equivalent dunstctl command:
|
||||||
|
# dunstctl close
|
||||||
|
# close = ctrl+space
|
||||||
|
|
||||||
|
# Close all notifications. Equivalent dunstctl command:
|
||||||
|
# dunstctl close-all
|
||||||
|
# close_all = ctrl+shift+space
|
||||||
|
|
||||||
|
# Redisplay last message(s). Equivalent dunstctl command:
|
||||||
|
# dunstctl history-pop
|
||||||
|
# history = ctrl+grave
|
||||||
|
|
||||||
|
# Context menu. Equivalent dunstctl command:
|
||||||
|
# dunstctl context
|
||||||
|
# context = ctrl+shift+period
|
||||||
|
|
||||||
|
[urgency_low]
|
||||||
|
# IMPORTANT: colors have to be defined in quotation marks.
|
||||||
|
# Otherwise the "#" and following would be interpreted as a comment.
|
||||||
|
background = "#222222"
|
||||||
|
foreground = "#888888"
|
||||||
|
timeout = 10
|
||||||
|
# Icon for notifications with low urgency, uncomment to enable
|
||||||
|
#icon = /path/to/icon
|
||||||
|
|
||||||
|
[urgency_normal]
|
||||||
|
background = "#c76612"
|
||||||
|
# "#285577"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
frame_color = "#dddddd"
|
||||||
|
timeout = 10
|
||||||
|
# Icon for notifications with normal urgency, uncomment to enable
|
||||||
|
#icon = /path/to/icon
|
||||||
|
|
||||||
|
[urgency_critical]
|
||||||
|
background = "#900000"
|
||||||
|
foreground = "#ffffff"
|
||||||
|
frame_color = "#ff0000"
|
||||||
|
timeout = 0
|
||||||
|
# Icon for notifications with critical urgency, uncomment to enable
|
||||||
|
#icon = /path/to/icon
|
||||||
|
|
||||||
|
# Every section that isn't one of the above is interpreted as a rules to
|
||||||
|
# override settings for certain messages.
|
||||||
|
#
|
||||||
|
# Messages can be matched by
|
||||||
|
# appname (discouraged, see desktop_entry)
|
||||||
|
# body
|
||||||
|
# category
|
||||||
|
# desktop_entry
|
||||||
|
# icon
|
||||||
|
# match_transient
|
||||||
|
# msg_urgency
|
||||||
|
# stack_tag
|
||||||
|
# summary
|
||||||
|
#
|
||||||
|
# and you can override the
|
||||||
|
# background
|
||||||
|
# foreground
|
||||||
|
# format
|
||||||
|
# frame_color
|
||||||
|
# fullscreen
|
||||||
|
# new_icon
|
||||||
|
# set_stack_tag
|
||||||
|
# set_transient
|
||||||
|
# timeout
|
||||||
|
# urgency
|
||||||
|
#
|
||||||
|
# Shell-like globbing will get expanded.
|
||||||
|
#
|
||||||
|
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||||
|
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||||
|
# the desktop-entry won't get localized.
|
||||||
|
#
|
||||||
|
# SCRIPTING
|
||||||
|
# You can specify a script that gets run when the rule matches by
|
||||||
|
# setting the "script" option.
|
||||||
|
# The script will be called as follows:
|
||||||
|
# script appname summary body icon urgency
|
||||||
|
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||||
|
#
|
||||||
|
# NOTE: if you don't want a notification to be displayed, set the format
|
||||||
|
# to "".
|
||||||
|
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||||
|
# to find fitting options for rules.
|
||||||
|
|
||||||
|
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||||
|
# client
|
||||||
|
#[transient_disable]
|
||||||
|
# match_transient = yes
|
||||||
|
# set_transient = no
|
||||||
|
#
|
||||||
|
# Make the handling of transient notifications more strict by making them not
|
||||||
|
# be placed in history.
|
||||||
|
#[transient_history_ignore]
|
||||||
|
# match_transient = yes
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
# fullscreen values
|
||||||
|
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||||
|
# delay: displays the new notification, if there is no fullscreen window active
|
||||||
|
# If the notification is already drawn, it won't get undrawn.
|
||||||
|
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||||
|
# withdrawn from screen again and will get delayed like a new notification
|
||||||
|
#[fullscreen_delay_everything]
|
||||||
|
# fullscreen = delay
|
||||||
|
#[fullscreen_show_critical]
|
||||||
|
# msg_urgency = critical
|
||||||
|
# fullscreen = show
|
||||||
|
|
||||||
|
#[espeak]
|
||||||
|
# summary = "*"
|
||||||
|
# script = dunst_espeak.sh
|
||||||
|
|
||||||
|
#[script-test]
|
||||||
|
# summary = "*script*"
|
||||||
|
# script = dunst_test.sh
|
||||||
|
|
||||||
|
#[ignore]
|
||||||
|
# # This notification will not be displayed
|
||||||
|
# summary = "foobar"
|
||||||
|
# format = ""
|
||||||
|
|
||||||
|
#[history-ignore]
|
||||||
|
# # This notification will not be saved in history
|
||||||
|
# summary = "foobar"
|
||||||
|
# history_ignore = yes
|
||||||
|
|
||||||
|
#[skip-display]
|
||||||
|
# # This notification will not be displayed, but will be included in the history
|
||||||
|
# summary = "foobar"
|
||||||
|
# skip_display = yes
|
||||||
|
|
||||||
|
#[signed_on]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = "*signed on*"
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[signed_off]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *signed off*
|
||||||
|
# urgency = low
|
||||||
|
#
|
||||||
|
#[says]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *says*
|
||||||
|
# urgency = critical
|
||||||
|
#
|
||||||
|
#[twitter]
|
||||||
|
# appname = Pidgin
|
||||||
|
# summary = *twitter.com*
|
||||||
|
# urgency = normal
|
||||||
|
#
|
||||||
|
#[stack-volumes]
|
||||||
|
# appname = "some_volume_notifiers"
|
||||||
|
# set_stack_tag = "volume"
|
||||||
|
#
|
||||||
|
# vim: ft=cfg
|
||||||
@ -1 +1 @@
|
|||||||
set spell
|
setlocal spell
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
set spell
|
setlocal spell
|
||||||
|
|||||||
Binary file not shown.
@ -0,0 +1,68 @@
|
|||||||
|
" You can edit this file by hand.
|
||||||
|
" The " character at the beginning of a line comments out the line.
|
||||||
|
" Blank lines are ignored.
|
||||||
|
|
||||||
|
" The Default color scheme is used for any directory that does not have
|
||||||
|
" a specified scheme and for parts of user interface like menus. A
|
||||||
|
" color scheme set for a base directory will also
|
||||||
|
" be used for the sub directories.
|
||||||
|
|
||||||
|
" The standard ncurses colors are:
|
||||||
|
" Default = -1 = None, can be used for transparency or default color
|
||||||
|
" Black = 0
|
||||||
|
" Red = 1
|
||||||
|
" Green = 2
|
||||||
|
" Yellow = 3
|
||||||
|
" Blue = 4
|
||||||
|
" Magenta = 5
|
||||||
|
" Cyan = 6
|
||||||
|
" White = 7
|
||||||
|
|
||||||
|
" Light versions of colors are also available (they set bold
|
||||||
|
" attribute in terminals with less than 16 colors):
|
||||||
|
" LightBlack
|
||||||
|
" LightRed
|
||||||
|
" LightGreen
|
||||||
|
" LightYellow
|
||||||
|
" LightBlue
|
||||||
|
" LightMagenta
|
||||||
|
" LightCyan
|
||||||
|
" LightWhite
|
||||||
|
|
||||||
|
" Available attributes (some of them can be combined):
|
||||||
|
" bold
|
||||||
|
" underline
|
||||||
|
" reverse or inverse
|
||||||
|
" standout
|
||||||
|
" italic (on unsupported systems becomes reverse)
|
||||||
|
" combine
|
||||||
|
" none
|
||||||
|
|
||||||
|
" Vifm supports 256 colors you can use color numbers 0-255
|
||||||
|
" (requires properly set up terminal: set your TERM environment variable
|
||||||
|
" (directly or using resources) to some color terminal name (e.g.
|
||||||
|
" xterm-256color) from /usr/lib/terminfo/; you can check current number
|
||||||
|
" of colors in your terminal with tput colors command)
|
||||||
|
|
||||||
|
" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color
|
||||||
|
|
||||||
|
highlight clear
|
||||||
|
|
||||||
|
highlight Win cterm=none ctermfg=default ctermbg=default
|
||||||
|
highlight Directory cterm=bold ctermfg=blue ctermbg=default
|
||||||
|
highlight Link cterm=bold ctermfg=cyan ctermbg=default
|
||||||
|
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
|
||||||
|
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
|
||||||
|
highlight Device cterm=bold ctermfg=red ctermbg=default
|
||||||
|
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
|
||||||
|
highlight Executable cterm=bold ctermfg=green ctermbg=default
|
||||||
|
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
|
||||||
|
highlight CurrLine cterm=bold ctermfg=lightblue ctermbg=blue
|
||||||
|
highlight TopLine cterm=reverse ctermfg=default ctermbg=default
|
||||||
|
highlight TopLineSel cterm=bold,reverse ctermfg=default ctermbg=default
|
||||||
|
highlight StatusLine cterm=bold,reverse ctermfg=default ctermbg=default
|
||||||
|
highlight WildMenu cterm=underline,reverse ctermfg=default ctermbg=default
|
||||||
|
highlight CmdLine cterm=none ctermfg=default ctermbg=default
|
||||||
|
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
|
||||||
|
highlight Border cterm=reverse ctermfg=default ctermbg=default
|
||||||
|
highlight JobLine cterm=bold,reverse ctermfg=default ctermbg=default
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
This directory is dedicated for user-supplied scripts/executables.
|
||||||
|
vifm modifies its PATH environment variable to let user run those
|
||||||
|
scripts without specifying full path. All subdirectories are added
|
||||||
|
as well. File in a subdirectory overrules file with the same name
|
||||||
|
in parent directories. Restart might be needed to recognize files
|
||||||
|
in newly created or renamed subdirectories.
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,544 @@
|
|||||||
|
" vim: filetype=vifm :
|
||||||
|
" Sample configuration file for vifm (last updated: 31 August, 2021)
|
||||||
|
" You can edit this file by hand.
|
||||||
|
" The " character at the beginning of a line comments out the line.
|
||||||
|
" Blank lines are ignored.
|
||||||
|
" The basic format for each item is shown with an example.
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Command used to edit files in various contexts. The default is vim.
|
||||||
|
" If you would like to use another vi clone such as Elvis or Vile
|
||||||
|
" you will need to change this setting.
|
||||||
|
|
||||||
|
set vicmd=nvim
|
||||||
|
" set vicmd=elvis\ -G\ termcap
|
||||||
|
" set vicmd=vile
|
||||||
|
|
||||||
|
" This makes vifm perform file operations on its own instead of relying on
|
||||||
|
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
||||||
|
" solution, it's also much slower when processing large amounts of files and
|
||||||
|
" doesn't support progress measuring.
|
||||||
|
|
||||||
|
set syscalls
|
||||||
|
|
||||||
|
" Trash Directory
|
||||||
|
" The default is to move files that are deleted with dd or :d to
|
||||||
|
" the trash directory. If you change this you will not be able to move
|
||||||
|
" files by deleting them and then using p to put the file in the new location.
|
||||||
|
" I recommend not changing this until you are familiar with vifm.
|
||||||
|
" This probably shouldn't be an option.
|
||||||
|
|
||||||
|
set trash
|
||||||
|
|
||||||
|
" This is how many directories to store in the directory history.
|
||||||
|
|
||||||
|
set history=100
|
||||||
|
|
||||||
|
" Automatically resolve symbolic links on l or Enter.
|
||||||
|
|
||||||
|
set nofollowlinks
|
||||||
|
|
||||||
|
" Natural sort of (version) numbers within text.
|
||||||
|
|
||||||
|
set sortnumbers
|
||||||
|
|
||||||
|
" Maximum number of changes that can be undone.
|
||||||
|
|
||||||
|
set undolevels=100
|
||||||
|
|
||||||
|
" Use Vim's format of help file (has highlighting and "hyperlinks").
|
||||||
|
" If you would rather use a plain text help file set novimhelp.
|
||||||
|
|
||||||
|
set vimhelp
|
||||||
|
|
||||||
|
" If you would like to run an executable file when you
|
||||||
|
" press Enter, l or Right Arrow, set this.
|
||||||
|
|
||||||
|
set norunexec
|
||||||
|
|
||||||
|
" List of color schemes to try (picks the first one supported by the terminal)
|
||||||
|
|
||||||
|
colorscheme Default Default-256
|
||||||
|
|
||||||
|
" Format for displaying time in file list. For example:
|
||||||
|
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
||||||
|
" See man date or man strftime for details.
|
||||||
|
|
||||||
|
set timefmt=%m/%d\ %H:%M
|
||||||
|
|
||||||
|
" Show list of matches on tab completion in command-line mode
|
||||||
|
|
||||||
|
set wildmenu
|
||||||
|
|
||||||
|
" Display completions in a form of popup with descriptions of the matches
|
||||||
|
|
||||||
|
set wildstyle=popup
|
||||||
|
|
||||||
|
" Display suggestions in normal, visual and view modes for keys, marks and
|
||||||
|
" registers (at most 5 files). In other view, when available.
|
||||||
|
|
||||||
|
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
||||||
|
|
||||||
|
" Ignore case in search patterns unless it contains at least one uppercase
|
||||||
|
" letter
|
||||||
|
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
" Don't highlight search results automatically
|
||||||
|
|
||||||
|
set nohlsearch
|
||||||
|
|
||||||
|
" Use increment searching (search while typing)
|
||||||
|
set incsearch
|
||||||
|
|
||||||
|
" Try to leave some space from cursor to upper/lower border in lists
|
||||||
|
|
||||||
|
set scrolloff=4
|
||||||
|
|
||||||
|
" Don't do too many requests to slow file systems
|
||||||
|
|
||||||
|
if !has('win')
|
||||||
|
set slowfs=curlftpfs
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Set custom status line look
|
||||||
|
|
||||||
|
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" :mark mark /full/directory/path [filename]
|
||||||
|
|
||||||
|
mark b ~/bin/
|
||||||
|
mark h ~/
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" :com[mand][!] command_name action
|
||||||
|
" The following macros can be used in a command
|
||||||
|
" %a is replaced with the user arguments.
|
||||||
|
" %c the current file under the cursor.
|
||||||
|
" %C the current file under the cursor in the other directory.
|
||||||
|
" %f the current selected file, or files.
|
||||||
|
" %F the current selected file, or files in the other directory.
|
||||||
|
" %b same as %f %F.
|
||||||
|
" %d the current directory name.
|
||||||
|
" %D the other window directory name.
|
||||||
|
" %m run the command in a menu window
|
||||||
|
|
||||||
|
command! df df -h %m 2> /dev/null
|
||||||
|
command! diff vim -d %f %F
|
||||||
|
command! zip zip -r %c.zip %f
|
||||||
|
command! run !! ./%f
|
||||||
|
command! make !!make %a
|
||||||
|
command! mkcd :mkdir %a | cd %a
|
||||||
|
command! vgrep vim "+grep %a"
|
||||||
|
command! reload :write | restart full
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" The file type is for the default programs to be used with
|
||||||
|
" a file extension.
|
||||||
|
" :filetype pattern1,pattern2 defaultprogram,program2
|
||||||
|
" :fileviewer pattern1,pattern2 consoleviewer
|
||||||
|
" The other programs for the file type can be accessed with the :file command
|
||||||
|
" The command macros like %f, %F, %d, %D may be used in the commands.
|
||||||
|
" The %a macro is ignored. To use a % you must put %%.
|
||||||
|
|
||||||
|
" For automated FUSE mounts, you must register an extension with :file[x]type
|
||||||
|
" in one of following formats:
|
||||||
|
"
|
||||||
|
" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables
|
||||||
|
" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime.
|
||||||
|
" A sample line might look like this:
|
||||||
|
" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
|
||||||
|
"
|
||||||
|
" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables
|
||||||
|
" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime.
|
||||||
|
" A sample line might look like this:
|
||||||
|
" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
|
||||||
|
" %PARAM value is filled from the first line of file (whole line).
|
||||||
|
" Example first line for SshMount filetype: root@127.0.0.1:/
|
||||||
|
"
|
||||||
|
" You can also add %CLEAR if you want to clear screen before running FUSE
|
||||||
|
" program.
|
||||||
|
|
||||||
|
" Pdf
|
||||||
|
filextype {*.pdf},<application/pdf> zathura %c %i &, apvlv %c, xpdf %c
|
||||||
|
" fileviewer {*.pdf},<application/pdf> pdftotext -nopgbrk %c -
|
||||||
|
fileviewer *.pdf
|
||||||
|
\ vifmimg pdf %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" PostScript
|
||||||
|
filextype {*.ps,*.eps,*.ps.gz},<application/postscript>
|
||||||
|
\ {View in zathura}
|
||||||
|
\ zathura %f,
|
||||||
|
\ {View in gv}
|
||||||
|
\ gv %c %i &,
|
||||||
|
|
||||||
|
" Djvu
|
||||||
|
filextype {*.djvu},<image/vnd.djvu>
|
||||||
|
\ {View in zathura}
|
||||||
|
\ zathura %f,
|
||||||
|
\ {View in apvlv}
|
||||||
|
\ apvlv %f,
|
||||||
|
|
||||||
|
fileviewer *.djvu
|
||||||
|
\ vifmimg djvu %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" Audio
|
||||||
|
filetype {*.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus},
|
||||||
|
\<audio/*>
|
||||||
|
\ {Play using mpv}
|
||||||
|
\ mpv --save-position-on-quit=yes --no-video %f,
|
||||||
|
\ {Play using ffplay}
|
||||||
|
\ ffplay -nodisp -autoexit %c,
|
||||||
|
\ {Play using MPlayer}
|
||||||
|
\ mplayer %f,
|
||||||
|
" fileviewer {*.mp3},<audio/mpeg> mp3inf
|
||||||
|
fileviewer {*.mp3,*.m4a},
|
||||||
|
\ vifmimg audio %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
fileviewer <audio/*>
|
||||||
|
\ vifmimg audio %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
" fileviewer {*.flac},<audio/flac> soxi
|
||||||
|
|
||||||
|
" Video
|
||||||
|
filextype {*.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
|
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||||
|
\*.as[fx]},
|
||||||
|
\<video/*>
|
||||||
|
\ {Play using mpv}
|
||||||
|
\ mpv --save-position-on-quit=yes %c,
|
||||||
|
\ {View using ffplay}
|
||||||
|
\ ffplay -fs -autoexit %f,
|
||||||
|
\ {View using Dragon}
|
||||||
|
\ dragon %f:p,
|
||||||
|
\ {View using mplayer}
|
||||||
|
\ mplayer %f,
|
||||||
|
|
||||||
|
fileviewer <video/*>
|
||||||
|
\ vifmimg video %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" fileviewer {*.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
||||||
|
" \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
||||||
|
" \*.as[fx]},
|
||||||
|
" \<video/*>
|
||||||
|
" \ ffprobe -pretty %c 2>&1
|
||||||
|
|
||||||
|
" Web
|
||||||
|
filextype {*.html,*.htm},<text/html>
|
||||||
|
\ {Open with dwb}
|
||||||
|
\ dwb %f %i &,
|
||||||
|
\ {Open with firefox}
|
||||||
|
\ firefox %f &,
|
||||||
|
\ {Open with uzbl}
|
||||||
|
\ uzbl-browser %f %i &,
|
||||||
|
filetype {*.html,*.htm},<text/html> links, lynx
|
||||||
|
|
||||||
|
fileviewer *.epub
|
||||||
|
\ vifmimg epub %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" Object
|
||||||
|
filetype {*.o},<application/x-object> nm %f | less
|
||||||
|
|
||||||
|
" Man page
|
||||||
|
filetype {*.[1-8]},<text/troff> man ./%c
|
||||||
|
fileviewer {*.[1-8]},<text/troff> man ./%c | col -b
|
||||||
|
|
||||||
|
" Images
|
||||||
|
filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
|
||||||
|
\ {View in sxiv}
|
||||||
|
\ sxiv %f,
|
||||||
|
\ {View in gpicview}
|
||||||
|
\ gpicview %c,
|
||||||
|
\ {View in shotwell}
|
||||||
|
\ shotwell,
|
||||||
|
\ {View in feh}
|
||||||
|
\ feh %f,
|
||||||
|
|
||||||
|
fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
|
||||||
|
\ vifmimg draw %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear,
|
||||||
|
\ identify %f
|
||||||
|
|
||||||
|
" OpenRaster
|
||||||
|
filextype *.ora
|
||||||
|
\ {Edit in MyPaint}
|
||||||
|
\ mypaint %f,
|
||||||
|
|
||||||
|
" Mindmap
|
||||||
|
filextype *.vym
|
||||||
|
\ {Open with VYM}
|
||||||
|
\ vym %f &,
|
||||||
|
|
||||||
|
" MD5
|
||||||
|
filetype *.md5
|
||||||
|
\ {Check MD5 hash sum}
|
||||||
|
\ md5sum -c %f %S,
|
||||||
|
|
||||||
|
" SHA1
|
||||||
|
filetype *.sha1
|
||||||
|
\ {Check SHA1 hash sum}
|
||||||
|
\ sha1sum -c %f %S,
|
||||||
|
|
||||||
|
" SHA256
|
||||||
|
filetype *.sha256
|
||||||
|
\ {Check SHA256 hash sum}
|
||||||
|
\ sha256sum -c %f %S,
|
||||||
|
|
||||||
|
" SHA512
|
||||||
|
filetype *.sha512
|
||||||
|
\ {Check SHA512 hash sum}
|
||||||
|
\ sha512sum -c %f %S,
|
||||||
|
|
||||||
|
" GPG signature
|
||||||
|
filetype {*.asc},<application/pgp-signature>
|
||||||
|
\ {Check signature}
|
||||||
|
\ !!gpg --verify %c,
|
||||||
|
|
||||||
|
" Torrent
|
||||||
|
filetype {*.torrent},<application/x-bittorrent> ktorrent %f &
|
||||||
|
fileviewer {*.torrent},<application/x-bittorrent> dumptorrent -v %c
|
||||||
|
|
||||||
|
" FuseZipMount
|
||||||
|
filetype {*.zip,*.jar,*.war,*.ear,*.oxt,*.apkg},
|
||||||
|
\<application/zip,application/java-archive>
|
||||||
|
\ {Mount with fuse-zip}
|
||||||
|
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
\ {View contents}
|
||||||
|
\ zip -sf %c | less,
|
||||||
|
\ {Extract here}
|
||||||
|
\ tar -xf %c,
|
||||||
|
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c
|
||||||
|
|
||||||
|
" ArchiveMount
|
||||||
|
filetype {*.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz,*.tar.zst,*.tzst},
|
||||||
|
\<application/x-tar>
|
||||||
|
\ {Mount with archivemount}
|
||||||
|
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
||||||
|
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
||||||
|
fileviewer *.tar.xz,*.txz tar -tJf %c
|
||||||
|
fileviewer *.tar.zst,*.tzst tar -t --zstd -f %c
|
||||||
|
fileviewer {*.tar},<application/x-tar> tar -tf %c
|
||||||
|
|
||||||
|
" Rar2FsMount and rar archives
|
||||||
|
filetype {*.rar},<application/x-rar>
|
||||||
|
\ {Mount with rar2fs}
|
||||||
|
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
fileviewer {*.rar},<application/x-rar> unrar v %c
|
||||||
|
|
||||||
|
" IsoMount
|
||||||
|
filetype {*.iso},<application/x-iso9660-image>
|
||||||
|
\ {Mount with fuseiso}
|
||||||
|
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
|
||||||
|
" SshMount
|
||||||
|
filetype *.ssh
|
||||||
|
\ {Mount with sshfs}
|
||||||
|
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||||
|
|
||||||
|
" FtpMount
|
||||||
|
filetype *.ftp
|
||||||
|
\ {Mount with curlftpfs}
|
||||||
|
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
||||||
|
|
||||||
|
" Fuse7z and 7z archives
|
||||||
|
filetype {*.7z},<application/x-7z-compressed>
|
||||||
|
\ {Mount with fuse-7z}
|
||||||
|
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
||||||
|
fileviewer {*.7z},<application/x-7z-compressed> 7z l %c
|
||||||
|
|
||||||
|
" Office files
|
||||||
|
filextype {*.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx,*.ppt},
|
||||||
|
\<application/vnd.openxmlformats-officedocument.*,
|
||||||
|
\application/msword,
|
||||||
|
\application/vnd.ms-excel>
|
||||||
|
\ libreoffice %f &
|
||||||
|
fileviewer {*.doc},<application/msword> catdoc %c
|
||||||
|
fileviewer {*.docx},
|
||||||
|
\<application/
|
||||||
|
\vnd.openxmlformats-officedocument.wordprocessingml.document>
|
||||||
|
\ docx2txt.pl %f -
|
||||||
|
|
||||||
|
" Fonts
|
||||||
|
fileviewer {*.ttf,*.otf},<font/*>
|
||||||
|
\ vifmimg font %px %py %pw %ph %c
|
||||||
|
\ %pc
|
||||||
|
\ vifmimg clear
|
||||||
|
|
||||||
|
" TuDu files
|
||||||
|
filetype *.tudu tudu -f %c
|
||||||
|
|
||||||
|
" Qt projects
|
||||||
|
filextype *.pro qtcreator %f &
|
||||||
|
|
||||||
|
" Directories
|
||||||
|
filextype */
|
||||||
|
\ {View in thunar}
|
||||||
|
\ Thunar %f &,
|
||||||
|
|
||||||
|
" Syntax highlighting in preview
|
||||||
|
"
|
||||||
|
" Explicitly set highlight type for some extensions
|
||||||
|
"
|
||||||
|
" 256-color terminal
|
||||||
|
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
|
||||||
|
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
|
||||||
|
"
|
||||||
|
" 16-color terminal
|
||||||
|
" fileviewer *.c,*.h highlight -O ansi -s dante %c
|
||||||
|
"
|
||||||
|
" Or leave it for automatic detection
|
||||||
|
"
|
||||||
|
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
||||||
|
|
||||||
|
" Displaying pictures in terminal
|
||||||
|
"
|
||||||
|
" fileviewer *.jpg,*.png shellpic %c
|
||||||
|
|
||||||
|
" Open all other files with default system programs (you can also remove all
|
||||||
|
" :file[x]type commands above to ensure they don't interfere with system-wide
|
||||||
|
" settings). By default all unknown files are opened with 'vi[x]cmd'
|
||||||
|
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
|
||||||
|
" for unknown file types.
|
||||||
|
" For *nix:
|
||||||
|
" filetype * xdg-open
|
||||||
|
" For OS X:
|
||||||
|
" filetype * open
|
||||||
|
" For Windows:
|
||||||
|
" filetype * start, explorer %"f &
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" What should be saved automatically between vifm sessions. Drop "savedirs"
|
||||||
|
" value if you don't want vifm to remember last visited directories for you.
|
||||||
|
set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
||||||
|
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Examples of configuring both panels
|
||||||
|
|
||||||
|
" Customize view columns a bit (enable ellipsis for truncated file names)
|
||||||
|
"
|
||||||
|
" set viewcolumns=-{name}..,6{}.
|
||||||
|
|
||||||
|
" Filter-out build and temporary files
|
||||||
|
"
|
||||||
|
" filter! {*.lo,*.o,*.d,*.class,*.pyc,*.pyo,.*~}
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Sample mappings
|
||||||
|
|
||||||
|
" Start shell in current directory
|
||||||
|
nnoremap s :shell<cr>
|
||||||
|
|
||||||
|
" Display sorting dialog
|
||||||
|
nnoremap S :sort<cr>
|
||||||
|
|
||||||
|
" Toggle visibility of preview window
|
||||||
|
nnoremap w :view<cr>
|
||||||
|
vnoremap w :view<cr>gv
|
||||||
|
|
||||||
|
" Open file in existing instance of gvim
|
||||||
|
nnoremap o :!gvim --remote-tab-silent %f<cr>
|
||||||
|
" Open file in new instance of gvim
|
||||||
|
nnoremap O :!gvim %f<cr>
|
||||||
|
|
||||||
|
" Open file in the background using its default program
|
||||||
|
nnoremap gb :file &<cr>l
|
||||||
|
|
||||||
|
" Interaction with system clipboard
|
||||||
|
if has('win')
|
||||||
|
" Yank current directory path to Windows clipboard with forward slashes
|
||||||
|
nnoremap yp :!echo %"d:gs!\!/! %i | clip<cr>
|
||||||
|
" Yank path to current file to Windows clipboard with forward slashes
|
||||||
|
nnoremap yf :!echo %"c:gs!\!/! %i | clip<cr>
|
||||||
|
elseif executable('xclip')
|
||||||
|
" Yank current directory path into the clipboard
|
||||||
|
nnoremap yd :!echo %d | xclip %i<cr>
|
||||||
|
" Yank current file path into the clipboard
|
||||||
|
nnoremap yf :!echo %c:p | xclip %i<cr>
|
||||||
|
elseif executable('xsel')
|
||||||
|
" Yank current directory path into primary and selection clipboards
|
||||||
|
nnoremap yd :!echo -n %d | xsel --input --primary %i &&
|
||||||
|
\ echo -n %d | xsel --clipboard --input %i<cr>
|
||||||
|
" Yank current file path into into primary and selection clipboards
|
||||||
|
nnoremap yf :!echo -n %c:p | xsel --input --primary %i &&
|
||||||
|
\ echo -n %c:p | xsel --clipboard --input %i<cr>
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Mappings for faster renaming
|
||||||
|
nnoremap I cw<c-a>
|
||||||
|
nnoremap cc cw<c-u>
|
||||||
|
nnoremap A cw
|
||||||
|
|
||||||
|
" Open console in current directory
|
||||||
|
nnoremap ,t :!xterm &<cr>
|
||||||
|
|
||||||
|
" Open editor to edit vifmrc and apply settings after returning to vifm
|
||||||
|
nnoremap ,c :write | edit $MYVIFMRC | restart full<cr>
|
||||||
|
" Open gvim to edit vifmrc
|
||||||
|
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
||||||
|
|
||||||
|
" Toggle wrap setting on ,w key
|
||||||
|
nnoremap ,w :set wrap!<cr>
|
||||||
|
|
||||||
|
" Example of standard two-panel file managers mappings
|
||||||
|
nnoremap <f3> :!less %f<cr>
|
||||||
|
nnoremap <f4> :edit<cr>
|
||||||
|
nnoremap <f5> :copy<cr>
|
||||||
|
nnoremap <f6> :move<cr>
|
||||||
|
nnoremap <f7> :mkdir<space>
|
||||||
|
nnoremap <f8> :delete<cr>
|
||||||
|
|
||||||
|
" Midnight commander alike mappings
|
||||||
|
" Open current directory in the other pane
|
||||||
|
nnoremap <a-i> :sync<cr>
|
||||||
|
" Open directory under cursor in the other pane
|
||||||
|
nnoremap <a-o> :sync %c<cr>
|
||||||
|
" Swap panes
|
||||||
|
nnoremap <c-u> <c-w>x
|
||||||
|
|
||||||
|
" ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Various customization examples
|
||||||
|
|
||||||
|
" Use ag (the silver searcher) instead of grep
|
||||||
|
"
|
||||||
|
" set grepprg='ag --line-numbers %i %a %s'
|
||||||
|
|
||||||
|
" Add additional place to look for executables
|
||||||
|
"
|
||||||
|
" let $PATH = $HOME.'/bin/fuse:'.$PATH
|
||||||
|
|
||||||
|
" Block particular shortcut
|
||||||
|
"
|
||||||
|
" nnoremap <left> <nop>
|
||||||
|
|
||||||
|
" Export IPC name of current instance as environment variable and use it to
|
||||||
|
" communicate with the instance later.
|
||||||
|
"
|
||||||
|
" It can be used in some shell script that gets run from inside vifm, for
|
||||||
|
" example, like this:
|
||||||
|
" vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'"
|
||||||
|
"
|
||||||
|
" let $VIFM_SERVER_NAME = v:servername
|
||||||
Loading…
Reference in New Issue