mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 18:03:11 -05:00
Initial commit
This commit is contained in:
commit
60bac0d7bc
37 changed files with 6394 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
24
.gitignore.dual-monitor-fhd
Normal file
24
.gitignore.dual-monitor-fhd
Normal file
|
@ -0,0 +1,24 @@
|
|||
bin/mirror-outputs
|
||||
config/*
|
||||
!config/bspwm
|
||||
config/bspwm/*
|
||||
!config/bspwm/bspwmrc
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/config.ini
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/sxhkd
|
||||
config/sxhkd/*
|
||||
!config/sxhkd/sxhkdrc
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
23
.gitignore.laptop-hidpi
Normal file
23
.gitignore.laptop-hidpi
Normal file
|
@ -0,0 +1,23 @@
|
|||
config/*
|
||||
!config/bspwm
|
||||
config/bspwm/*
|
||||
!config/bspwm/bspwmrc
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/config.ini
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/sxhkd
|
||||
config/sxhkd/*
|
||||
!config/sxhkd/sxhkdrc
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
21
.gitignore.main
Normal file
21
.gitignore.main
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
install.sh
|
||||
Xresources
|
||||
bin/mirror-outputs
|
||||
config/*
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
||||
|
23
.gitignore.single-monitor-fhd
Normal file
23
.gitignore.single-monitor-fhd
Normal file
|
@ -0,0 +1,23 @@
|
|||
config/*
|
||||
!config/bspwm
|
||||
config/bspwm/*
|
||||
!config/bspwm/bspwmrc
|
||||
!config/dunst
|
||||
!config/kitty
|
||||
!config/nvim
|
||||
config/nvim/*
|
||||
!config/nvim/init.vim
|
||||
!config/polybar
|
||||
config/polybar/*
|
||||
!config/polybar/config.ini
|
||||
!config/polybar/colors.ini
|
||||
!config/polybar/modules.ini
|
||||
!config/polybar/custom_modules.ini
|
||||
!config/ranger
|
||||
!config/rofi
|
||||
!config/sxhkd
|
||||
config/sxhkd/*
|
||||
!config/sxhkd/sxhkdrc
|
||||
emacs.d/*
|
||||
!emacs.d/init.el
|
||||
!emacs.d/snippets
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2021 Andrew Scott
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
35
README.md
Normal file
35
README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# dotfiles
|
||||
|
||||
### Configuration files for Arch Linux with bspwm and a dark gruvbox theme
|
||||
|
||||
```
|
||||
git clone https://codeberg.org/acscott/dotfiles.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
# list branches
|
||||
git branch -l
|
||||
# checkout desired branch
|
||||
git checkout <branch>
|
||||
# update install.sh as needed, then run it
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Note that laptop labeled branches can also be used for single monitor
|
||||
desktops. The difference is that they have Thinkpad specific keybinds for some
|
||||
function keys (sxhkdrc), and the screen dims when idle (xidlehook in bspwmrc).
|
||||
|
||||
If something goes wrong, the install.sh script creates backups
|
||||
in ~/dotfiles_backup. The script is simple enough that it should be
|
||||
easily editable, but obviously feel free to copy or symlink the
|
||||
files how you see fit.
|
||||
|
||||
### laptop-hidpi configuration
|
||||
![Desktop screenshot of the laptop-hidpi configuration](info/screenshots/screenshot.png)
|
||||
|
||||
![Desktop screenshot of the laptop-hidpi configuration](info/screenshots/screenshot2.png)
|
||||
[Wallpaper](https://www.reddit.com/r/wallpaper/comments/ll1gov/arch_gruvbox_wallpaper_v2_dark_light_3840x2160/ "Wallpaper")
|
||||
|
||||
### dual-monitor-fhd configuration
|
||||
![Desktop sceenshot of the dual-monitor-fhd configuration](info/screenshots/dual-monitor-screenshot.png)
|
||||
[Wallpaper](https://www.wallpaperflare.com/minimalism-gruvbox-wallpaper-qcaln "Wallpaper")
|
||||
|
||||
Licensed under the [MIT License](LICENSE) unless otherwise noted here, or by placing a separate license in a directory.
|
11
bash_profile
Normal file
11
bash_profile
Normal file
|
@ -0,0 +1,11 @@
|
|||
#
|
||||
# ~/.bash_profile
|
||||
#
|
||||
. ~/.profile
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
|
||||
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
|
||||
exec startx
|
||||
fi
|
||||
|
18
bashrc
Normal file
18
bashrc
Normal file
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
PS1='[\u@\h \W]\$ '
|
||||
|
||||
# make Java behave when not using a DE
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
||||
alias nv=nvim
|
||||
alias rr="/usr/bin/kitty --class Ranger --name Ranger /usr/bin/ranger & disown"
|
||||
alias kssh="/usr/bin/kitty +kitten ssh"
|
||||
|
||||
neofetch
|
13
bin/dual-polybar-launcher
Executable file
13
bin/dual-polybar-launcher
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
polybar one -r --config=~/.config/polybar/config.ini &
|
||||
polybar two -r --config=~/.config/polybar/config.ini &
|
||||
|
||||
echo "Polybar launched..."
|
13
bin/single-polybar-launcher
Executable file
13
bin/single-polybar-launcher
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
polybar one -r --config=~/.config/polybar/config.ini &
|
||||
#polybar two -r --config=~/.config/polybar/config.ini &
|
||||
|
||||
echo "Polybar launched..."
|
9
bin/toggle-wifi
Executable file
9
bin/toggle-wifi
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
## A simple script to turn wifi on/off
|
||||
|
||||
if [ $(nmcli radio wifi | awk '/led/ {print}') = 'enabled' ] ; then
|
||||
nmcli radio wifi off
|
||||
else
|
||||
nmcli radio wifi on
|
||||
fi
|
||||
|
414
config/dunst/dunstrc
Normal file
414
config/dunst/dunstrc
Normal file
|
@ -0,0 +1,414 @@
|
|||
[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
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "300x5-30+50"
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# 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 = 0
|
||||
|
||||
# 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
|
||||
|
||||
# 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 = "#222222"
|
||||
|
||||
# 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 = Fira Mono 11
|
||||
|
||||
# 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
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.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. Dunstwill 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
|
||||
|
||||
# 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 = yes
|
||||
|
||||
# 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 = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = off
|
||||
|
||||
# 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
|
||||
|
||||
### 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 action of 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.
|
||||
mouse_left_click = do_action
|
||||
mouse_middle_click = close_all
|
||||
mouse_right_click = close_current
|
||||
|
||||
# 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
|
||||
|
||||
[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.
|
||||
close = ctrl+space
|
||||
|
||||
# Close all notifications.
|
||||
close_all = ctrl+shift+space
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1". Make sure this key actually exists on your keyboard layout,
|
||||
# e.g. check output of 'xmodmap -pke'
|
||||
history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
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 = "#555555"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#222222"
|
||||
foreground = "#dfdfdf"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#222222"
|
||||
foreground = "#8a4644"
|
||||
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
|
||||
|
38
config/kitty/gruvbox.conf
Normal file
38
config/kitty/gruvbox.conf
Normal file
|
@ -0,0 +1,38 @@
|
|||
foreground #ebdbb2
|
||||
# background: hard contrast 1d2021, medium 282828, soft 32302f
|
||||
background #1d2021
|
||||
selection_foreground #655b53
|
||||
selection_background #ebdbb2
|
||||
url_color #d65c0d
|
||||
|
||||
# black
|
||||
color0 #272727
|
||||
color8 #928373
|
||||
|
||||
# red
|
||||
color1 #cc231c
|
||||
color9 #fb4833
|
||||
|
||||
# green
|
||||
color2 #989719
|
||||
color10 #b8ba25
|
||||
|
||||
# yellow
|
||||
color3 #d79920
|
||||
color11 #fabc2e
|
||||
|
||||
# blue
|
||||
color4 #448488
|
||||
color12 #83a597
|
||||
|
||||
# magenta
|
||||
color5 #b16185
|
||||
color13 #d3859a
|
||||
|
||||
# cyan
|
||||
color6 #689d69
|
||||
color14 #8ec07b
|
||||
|
||||
# white
|
||||
color7 #a89983
|
||||
color15 #ebdbb2
|
6
config/kitty/kitty.conf
Normal file
6
config/kitty/kitty.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
font_family Hack
|
||||
font_size 12
|
||||
#background_opacity 0.9
|
||||
window_padding_width 20
|
||||
#background #202020
|
||||
include gruvbox.conf
|
63
config/nvim/init.vim
Normal file
63
config/nvim/init.vim
Normal file
|
@ -0,0 +1,63 @@
|
|||
" set leader key
|
||||
let g:mapleader = "\<Space>"
|
||||
|
||||
syntax enable " Enables syntax highlighing
|
||||
set hidden " Required to keep multiple buffers open multiple buffers
|
||||
set nowrap " Display long lines as just one line
|
||||
set encoding=utf-8 " The encoding displayed
|
||||
set pumheight=10 " Makes popup menu smaller
|
||||
set fileencoding=utf-8 " The encoding written to file
|
||||
set ruler " Show the cursor position all the time
|
||||
set cmdheight=2 " More space for displaying messages
|
||||
set iskeyword+=- " treat dash separated words as a word text object"
|
||||
"set mouse=a " Enable your mouse
|
||||
set splitbelow " Horizontal splits will automatically be below
|
||||
set splitright " Vertical splits will automatically be to the right
|
||||
set t_Co=256 " Support 256 colors
|
||||
set conceallevel=0 " So that I can see `` in markdown files
|
||||
set tabstop=4 " Insert 4 spaces for a tab
|
||||
set shiftwidth=4 " Change the number of space characters inserted for indentation
|
||||
set smarttab " Makes tabbing smarter will realize you have 2 vs 4
|
||||
set expandtab " Converts tabs to spaces
|
||||
set smartindent " Makes indenting smart
|
||||
set autoindent " Good auto indent
|
||||
set laststatus=0 " Always display the status line
|
||||
set number " Line numbers
|
||||
"set cursorline " Enable highlighting of the current line
|
||||
set background=dark " tell vim what the background color looks like
|
||||
set showtabline=4 " Always show tabs
|
||||
"set noshowmode " We don't need to see things like -- INSERT -- anymore
|
||||
set nobackup " This is recommended by coc
|
||||
set nowritebackup " This is recommended by coc
|
||||
set updatetime=300 " Faster completion
|
||||
set timeoutlen=500 " By default timeoutlen is 1000 ms
|
||||
set formatoptions-=cro " Stop newline continution of comments
|
||||
"set clipboard=unnamedplus " Copy paste between vim and everything else
|
||||
set autochdir " Your working directory will always be the same as your working directory
|
||||
|
||||
au! BufWritePost $MYVIMRC source % " auto source when writing to init.vim alternatively you can run :source $MYVIMRC
|
||||
|
||||
" You can't stop me
|
||||
cmap w!! w !sudo tee %
|
||||
|
||||
" neovim-plug-git
|
||||
call plug#begin()
|
||||
Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||
Plug 'Raimondi/delimitMate'
|
||||
"Plug 'morhetz/gruvbox'
|
||||
"Plug 'ryanoasis/vim-devicons'
|
||||
"Plug 'neovim/nvim-lsp'
|
||||
"Plug 'jackguo380/vim-lsp-cxx-highlight'
|
||||
call plug#end()
|
||||
|
||||
" Theme
|
||||
"colorscheme gruvbox
|
||||
|
||||
" plug-in autostart
|
||||
"augroup nerdtree_open
|
||||
" autocmd!
|
||||
" autocmd VimEnter * NERDTree | wincmd p
|
||||
"augroup END
|
||||
|
||||
" NERDTree Toggle
|
||||
nmap <silent> <Leader>k :NERDTreeToggle<CR>
|
21
config/polybar/colors.ini
Normal file
21
config/polybar/colors.ini
Normal file
|
@ -0,0 +1,21 @@
|
|||
[color]
|
||||
background = ${xrdb:background}
|
||||
foreground = ${xrdb:foreground}
|
||||
sep = ${xrdb:color8}
|
||||
|
||||
white = ${xrdb:color15}
|
||||
black = ${xrdb:color0}
|
||||
dark-grey = ${xrdb:color8}
|
||||
light-grey = ${xrdb:color7}
|
||||
dark-red = ${xrdb:color1}
|
||||
red = ${xrdb:color9}
|
||||
dark-green = ${xrdb:color2}
|
||||
green = ${xrdb:color10}
|
||||
dark-yellow = ${xrdb:color3}
|
||||
yellow = ${xrdb:color11}
|
||||
dark-blue = ${xrdb:color4}
|
||||
blue = ${xrdb:color12}
|
||||
dark-magenta = ${xrdb:color5}
|
||||
magenta = ${xrdb:color13}
|
||||
dark-cyan = ${xrdb:color6}
|
||||
cyan = ${xrdb:color14}
|
107
config/polybar/custom_modules.ini
Normal file
107
config/polybar/custom_modules.ini
Normal file
|
@ -0,0 +1,107 @@
|
|||
[module/sep]
|
||||
type = custom/text
|
||||
content = |
|
||||
|
||||
content-foreground = ${color.sep}
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
; If true, <label-toggle> will be to the left of the menu items (default).
|
||||
; If false, it will be on the right of all the items.
|
||||
expand-right = true
|
||||
|
||||
; "menu-LEVEL-N" has the same properties as "label-NAME" with
|
||||
; the additional "exec" property
|
||||
;
|
||||
; Available exec commands:
|
||||
; menu-open-LEVEL
|
||||
; menu-close
|
||||
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
|
||||
|
||||
menu-0-0 = " Log Out |"
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-1 = " Suspend |"
|
||||
menu-0-1-exec = menu-open-2
|
||||
menu-0-2 = " Reboot |"
|
||||
menu-0-2-exec = menu-open-3
|
||||
menu-0-3 = " Shutdown "
|
||||
menu-0-3-exec = menu-open-4
|
||||
|
||||
menu-1-0 = " Back |"
|
||||
menu-1-0-exec = menu-open-0
|
||||
menu-1-1 = " Log Out "
|
||||
menu-1-1-exec = loginctl kill-session $XDG_SESSION_ID
|
||||
|
||||
menu-2-0 = " Back |"
|
||||
menu-2-0-exec = menu-open-0
|
||||
menu-2-1 = " Suspend "
|
||||
menu-2-1-exec = systemctl suspend
|
||||
menu-2-2 = " Suspend-then-Hibernate "
|
||||
menu-2-2-exec = systemctl suspend-then-hibernate
|
||||
menu-2-3 = " Hibernate "
|
||||
menu-2-3-exec = systemctl hibernate
|
||||
|
||||
menu-3-0 = " Back |"
|
||||
menu-3-0-exec = menu-open-0
|
||||
menu-3-1 = " Reboot "
|
||||
menu-3-1-exec = systemctl reboot
|
||||
|
||||
menu-4-0 = " Back |"
|
||||
menu-4-0-exec = menu-open-0
|
||||
menu-4-1 = " Shutdown "
|
||||
menu-4-1-exec = systemctl poweroff
|
||||
|
||||
|
||||
; Available tags:
|
||||
; <label-toggle> (default) - gets replaced with <label-(open|close)>
|
||||
; <menu> (default)
|
||||
; Note that if you use <label-toggle> you must also include
|
||||
; the definition for <label-open>
|
||||
|
||||
format = <label-toggle><menu>
|
||||
|
||||
label-open =
|
||||
label-open-foreground = ${color.dark-cyan}
|
||||
label-open-padding = 1
|
||||
label-close =
|
||||
label-close-foreground = ${color.red}
|
||||
label-close-padding = 1
|
||||
|
||||
; Optional item separator
|
||||
; Default: none
|
||||
;label-separator = " | "
|
||||
;label-separator-foreground = ${color.foreground}
|
||||
;label-separator-background = ${color.background-alt}
|
||||
|
||||
;;label-open-foreground = ${color.foreground}
|
||||
;;label-close-foreground = ${color.background}
|
||||
|
||||
[module/pulseaudio-control]
|
||||
type = custom/script
|
||||
tail = true
|
||||
;format-underline = ${colors.cyan}
|
||||
;label-padding = 2
|
||||
;label-foreground = ${color.foreground}
|
||||
label-foreground = ${color.dark-blue}
|
||||
|
||||
# You can copy-paste your options for each possible action, which is more
|
||||
# trouble-free but repetitive, or apply only the relevant ones (for example
|
||||
# --sink-blacklist is only needed for next-sink).
|
||||
exec = pulseaudio-control --icons-volume " , , " --icon-muted " " --sink-nicknames-from "device.name" listen
|
||||
#exec = pulseaudio-control --icons-volume " , , " --icon-muted " " --sink-nicknames-from "device.description" --sink-nickname "alsa_output.pci-0000_00_1b.0.analog-stereo: Speakers" --sink-nickname "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo: Headphones" listen
|
||||
click-right = exec pavucontrol &
|
||||
click-left = pulseaudio-control togmute
|
||||
click-middle = pulseaudio-control next-sink
|
||||
#click-middle = pulseaudio-control --sink-blacklist "alsa_output.pci-0000_01_00.1.hdmi-stereo-extra2" next-sink
|
||||
scroll-up = pulseaudio-control --volume-max 130 up
|
||||
scroll-down = pulseaudio-control --volume-max 130 down
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
interval = 1
|
||||
format-prefix = " "
|
||||
format = <label>
|
||||
exec = python /usr/bin/polybar-spotify -f '{artist}: {song}'
|
||||
format-prefix-foreground = ${color.dark-green}
|
||||
;format-underline = ${color.green}
|
897
config/polybar/modules.ini
Normal file
897
config/polybar/modules.ini
Normal file
|
@ -0,0 +1,897 @@
|
|||
[module/alsa]
|
||||
type = internal/alsa
|
||||
|
||||
; Soundcard to be used
|
||||
; Usually in the format hw:# where # is the card number
|
||||
; You can find the different card numbers in `/proc/asound/cards`
|
||||
master-soundcard = default
|
||||
speaker-soundcard = default
|
||||
headphone-soundcard = default
|
||||
|
||||
; Name of the master, speaker and headphone mixers
|
||||
; Use the following command to list available mixer controls:
|
||||
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
|
||||
; If master, speaker or headphone-soundcard isn't the default,
|
||||
; use `amixer -c # scontrols` instead where # is the number
|
||||
; of the master, speaker or headphone soundcard respectively
|
||||
;
|
||||
; Default: Master
|
||||
master-mixer = Master
|
||||
|
||||
; Optionally define speaker and headphone mixers
|
||||
; Default: none
|
||||
;speaker-mixer = Speaker
|
||||
; Default: none
|
||||
;headphone-mixer = Headphone
|
||||
|
||||
; NOTE: This is required if headphone_mixer is defined
|
||||
; Use the following command to list available device controls
|
||||
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
|
||||
; You may also need to use `amixer -c # controls` as above for the mixer names
|
||||
; Default: none
|
||||
;headphone-id = 9
|
||||
|
||||
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
|
||||
; Default: false
|
||||
mapped = true
|
||||
|
||||
; Interval for volume increase/decrease (in percent points)
|
||||
; Default: 5
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
|
||||
; Available tags:
|
||||
; <label-muted> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix =
|
||||
format-muted-prefix-foreground = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-volume = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-muted = " Muted"
|
||||
label-muted-foreground = ${color.sep}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-foreground = ${color.blue}
|
||||
|
||||
; If defined, it will replace <ramp-volume> when
|
||||
; headphones are plugged in to `headphone_control_numid`
|
||||
; If undefined, <ramp-volume> will be used for both
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-headphones-0 =
|
||||
ramp-headphones-1 =
|
||||
ramp-headphones-foreground = ${color.blue}
|
||||
|
||||
[module/battery0]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 99
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT0
|
||||
adapter = AC
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 2
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <label-full>
|
||||
format-full-prefix =
|
||||
format-full-prefix-foreground = ${color.dark-green}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
label-charging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-full = " Full"
|
||||
|
||||
; Only applies if <ramp-capacity> is used
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
ramp-capacity-foreground = ${color.dark-yellow}
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
;bar-capacity-width = 10
|
||||
|
||||
; Only applies if <animation-charging> is used
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
animation-charging-foreground = ${color.green}
|
||||
; Framerate in milliseconds
|
||||
animation-charging-framerate = 750
|
||||
|
||||
; Only applies if <animation-discharging> is used
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-3 =
|
||||
animation-discharging-4 =
|
||||
; Framerate in milliseconds
|
||||
animation-discharging-framerate = 500
|
||||
|
||||
[module/battery1]
|
||||
type = internal/battery
|
||||
|
||||
; This is useful in case the battery never reports 100% charge
|
||||
full-at = 89
|
||||
|
||||
; Use the following command to list batteries and adapters:
|
||||
; $ ls -1 /sys/class/power_supply/
|
||||
battery = BAT1
|
||||
adapter = AC
|
||||
|
||||
; If an inotify event haven't been reported in this many
|
||||
; seconds, manually poll for new values.
|
||||
;
|
||||
; Needed as a fallback for systems that don't report events
|
||||
; on sysfs/procfs.
|
||||
;
|
||||
; Disable polling by setting the interval to 0.
|
||||
;
|
||||
; Default: 5
|
||||
poll-interval = 2
|
||||
|
||||
; see "man date" for details on how to format the time string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
; Default: %H:%M:%S
|
||||
time-format = %H:%M
|
||||
|
||||
; Available tags:
|
||||
; <label-charging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-charging>
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
; Available tags:
|
||||
; <label-discharging> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
; <animation-discharging>
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
|
||||
; Available tags:
|
||||
; <label-full> (default)
|
||||
; <bar-capacity>
|
||||
; <ramp-capacity>
|
||||
format-full = <label-full>
|
||||
format-full-prefix =
|
||||
format-full-prefix-foreground = ${color.dark-green}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current charge rate in watts)
|
||||
label-charging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %time%
|
||||
; %consumption% (shows current discharge rate in watts)
|
||||
label-discharging = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
label-full = " Full"
|
||||
|
||||
; Only applies if <ramp-capacity> is used
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-3 =
|
||||
ramp-capacity-4 =
|
||||
ramp-capacity-foreground = ${color.dark-yellow}
|
||||
|
||||
; Only applies if <bar-capacity> is used
|
||||
;bar-capacity-width = 10
|
||||
|
||||
; Only applies if <animation-charging> is used
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-3 =
|
||||
animation-charging-4 =
|
||||
animation-charging-foreground = ${color.green}
|
||||
; Framerate in milliseconds
|
||||
animation-charging-framerate = 750
|
||||
|
||||
; Only applies if <animation-discharging> is used
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-3 =
|
||||
animation-discharging-4 =
|
||||
; Framerate in milliseconds
|
||||
animation-discharging-framerate = 500
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
|
||||
; Only show workspaces defined on the same output as the bar
|
||||
; NOTE: The bspwm and XRandR monitor names must match, which they do by default.
|
||||
; Default: true
|
||||
pin-workspaces = true
|
||||
|
||||
; Output mode flags after focused state label
|
||||
; Default: false
|
||||
;;inline-mode = false
|
||||
|
||||
; Create click handler used to focus workspace
|
||||
; Default: true
|
||||
enable-click = true
|
||||
|
||||
; Create scroll handlers used to cycle workspaces
|
||||
; Default: true
|
||||
enable-scroll = true
|
||||
|
||||
; Set the scroll cycle direction
|
||||
; Default: true
|
||||
;;reverse-scroll = false
|
||||
|
||||
; Use fuzzy (partial) matching on labels when assigning
|
||||
; icons to workspaces
|
||||
; Example: code;♚ will apply the icon to all workspaces
|
||||
; containing 'code' in the label
|
||||
; Default: false
|
||||
;;fuzzy-match = true
|
||||
|
||||
; ws-icon-[0-9]+ = label;icon
|
||||
; Note that the label needs to correspond with the bspwm workspace name
|
||||
;;ws-icon-0 = code;♚
|
||||
;;ws-icon-1 = office;♛
|
||||
;;ws-icon-2 = graphics;♜
|
||||
;;ws-icon-3 = mail;♝
|
||||
;;ws-icon-4 = web;♞
|
||||
;;ws-icon-default = ♟
|
||||
|
||||
; Available tags:
|
||||
; <label-monitor>
|
||||
; <label-state> - gets replaced with <label-(focused|urgent|occupied|empty)>
|
||||
; <label-mode> - gets replaced with <label-(monocle|tiled|fullscreen|floating|locked|sticky|private)>
|
||||
; Default: <label-state>
|
||||
format = <label-state> <label-mode>
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; Default: %name%
|
||||
label-monitor = %name%
|
||||
|
||||
; If any values for label-dimmed-N are defined, the workspace/mode
|
||||
; colors will get overridden with those values if the monitor is out of focus
|
||||
; To only override workspaces in a specific state, use:
|
||||
; label-dimmed-focused
|
||||
; label-dimmed-occupied
|
||||
; label-dimmed-urgent
|
||||
; label-dimmed-empty
|
||||
;;label-dimmed-foreground = #555
|
||||
;;label-dimmed-underline = ${bar/top.background}
|
||||
;;label-dimmed-focused-background = #f00
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-focused = %icon%
|
||||
label-focused-foreground = ${color.foreground}
|
||||
label-focused-background = ${color.background}
|
||||
;label-focused-underline = #fba922
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-occupied = %icon%
|
||||
;label-occupied-underline = #555555
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-urgent = %icon%
|
||||
label-urgent-foreground = ${color.white}
|
||||
label-urgent-background = ${color.red}
|
||||
;label-urgent-underline = #9b0a20
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-empty = %icon%
|
||||
label-empty-foreground = ${color.foreground}
|
||||
|
||||
; The following labels will be used to indicate the layout/mode
|
||||
; for the focused workspace. Requires <label-mode>
|
||||
;
|
||||
; Available tokens:
|
||||
; None
|
||||
label-monocle =
|
||||
label-tiled =
|
||||
label-fullscreen =
|
||||
label-floating =
|
||||
label-pseudotiled = P
|
||||
label-locked =
|
||||
label-locked-foreground = #bd2c40
|
||||
label-sticky =
|
||||
label-sticky-foreground = #fba922
|
||||
label-private =
|
||||
label-private-foreground = #bd2c40
|
||||
|
||||
; Separator in between workspaces
|
||||
label-separator = |
|
||||
label-separator-padding = 2
|
||||
label-separator-foreground = ${color.sep}
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 1
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-load>
|
||||
; <ramp-load>
|
||||
; <ramp-coreload>
|
||||
;;format = <label> <ramp-coreload>
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default) - total cpu load averaged over all cores
|
||||
; %percentage-sum% - Cumulative load on all cores
|
||||
; %percentage-cores% - load percentage for each core
|
||||
; %percentage-core[1-9]% - load percentage for specific core
|
||||
label = " %percentage%%"
|
||||
|
||||
; Spacing between individual per-core ramps
|
||||
;;ramp-coreload-spacing = 1
|
||||
;;ramp-coreload-0 = ${cpu.load0}
|
||||
;;ramp-coreload-1 = ${cpu.load1}
|
||||
|
||||
;;ramp-load-0 = ${cpu.load0}
|
||||
;;ramp-load-1 = ${cpu.load1}i
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
|
||||
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string.
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
date = %a, %d %b
|
||||
|
||||
; Optional time format
|
||||
time = at %I:%M %p
|
||||
|
||||
; if `date-alt` or `time-alt` is defined, clicking
|
||||
; the module will toggle between formats
|
||||
;date-alt = It's %A, %d %B %Y
|
||||
;time-alt = at %k:%M:%S
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
format = %{A1:gsimplecal:} <label> %{A}
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
; %date%
|
||||
; %time%
|
||||
; Default: %date%
|
||||
label = %date% %time%
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
|
||||
; Mountpoints to display
|
||||
mount-0 = /
|
||||
#mount-1 = /home
|
||||
;mount-2 = /var
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 30
|
||||
interval = 30
|
||||
|
||||
; Display fixed precision values
|
||||
; Default: false
|
||||
fixed-values = true
|
||||
|
||||
; Spacing between entries
|
||||
; Default: 2
|
||||
spacing = 0
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = <label-mounted>
|
||||
format-mounted-prefix =
|
||||
format-mounted-prefix-foreground = ${color.dark-green}
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted = <label-unmounted>
|
||||
format-unmounted-prefix =
|
||||
format-unmounted-prefix-foreground = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
label-mounted = " %mountpoint% %percentage_used%% Used "
|
||||
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; Default: %mountpoint% is not mounted
|
||||
label-unmounted = " %mountpoint%: NA"
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <bar-used>
|
||||
; <bar-free>
|
||||
; <ramp-used>
|
||||
; <ramp-free>
|
||||
; <bar-swap-used>
|
||||
; <bar-swap-free>
|
||||
; <ramp-swap-used>
|
||||
; <ramp-swap-free>
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${color.blue}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = " %mb_used%"
|
||||
|
||||
; Only applies if <ramp-used> is used
|
||||
;;ramp-used-0 = ${memory.used0}
|
||||
;;ramp-used-1 = ${memory.used1}
|
||||
;;ramp-used-2 = ${memory.used2}
|
||||
|
||||
; Only applies if <ramp-free> is used
|
||||
;;ramp-free-0 = ${memory.free0}
|
||||
;;ramp-free-1 = ${memory.free1}
|
||||
;;ramp-free-2 = ${memory.free2}
|
||||
|
||||
; If you use both a wired and a wireless network, just add 2 module definitions.
|
||||
[module/wired-network]
|
||||
type = internal/network
|
||||
interface = eth0
|
||||
|
||||
[module/wireless-network]
|
||||
type = internal/network
|
||||
interface = wlp4s0
|
||||
|
||||
; Normal Module
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface = wlp4s0
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 1.0
|
||||
|
||||
; Test connectivity every Nth update
|
||||
; A value of 0 disables the feature
|
||||
; NOTE: Experimental (needs more testing)
|
||||
; Default: 0
|
||||
;ping-interval = 3
|
||||
|
||||
; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
|
||||
; Minimum output width of upload/download rate
|
||||
; Default: 3
|
||||
;;udspeed-minwidth = 5
|
||||
|
||||
; Accumulate values from all interfaces
|
||||
; when querying for up/downspeed rate
|
||||
; Default: false
|
||||
accumulate-stats = true
|
||||
|
||||
; Consider an `UNKNOWN` interface state as up.
|
||||
; Some devices have an unknown state, even when they're running
|
||||
; Default: false
|
||||
unknown-as-up = true
|
||||
|
||||
; Available tags:
|
||||
; <label-connected> (default)
|
||||
; <ramp-signal>
|
||||
format-connected = <label-connected>
|
||||
|
||||
; Available tags:
|
||||
; <label-disconnected> (default)
|
||||
format-disconnected = <label-disconnected>
|
||||
format-disconnected-prefix =
|
||||
format-disconnected-prefix-foreground = ${color.dark-yellow}
|
||||
|
||||
; Available tags:
|
||||
; <label-connected> (default)
|
||||
; <label-packetloss>
|
||||
; <animation-packetloss>
|
||||
;;format-packetloss = <animation-packetloss> <label-connected>
|
||||
|
||||
; Available tokens:
|
||||
; %ifname% [wireless+wired]
|
||||
; %local_ip% [wireless+wired]
|
||||
; %local_ip6% [wireless+wired]
|
||||
; %essid% [wireless]
|
||||
; %signal% [wireless]
|
||||
; %upspeed% [wireless+wired]
|
||||
; %downspeed% [wireless+wired]
|
||||
; %linkspeed% [wired]
|
||||
; Default: %ifname% %local_ip%
|
||||
label-connected = " %essid% %downspeed:10%"
|
||||
label-connected-foreground = ${color.magenta}
|
||||
; Available tokens:
|
||||
; %ifname% [wireless+wired]
|
||||
; Default: (none)
|
||||
label-disconnected = "Offline"
|
||||
label-disconnected-foreground = ${color.dark-red}
|
||||
; Available tokens:
|
||||
; %ifname% [wireless+wired]
|
||||
; %local_ip% [wireless+wired]
|
||||
; %local_ip6% [wireless+wired]
|
||||
; %essid% [wireless]
|
||||
; %signal% [wireless]
|
||||
; %upspeed% [wireless+wired]
|
||||
; %downspeed% [wireless+wired]
|
||||
; %linkspeed% [wired]
|
||||
; Default: (none)
|
||||
;label-packetloss = %essid%
|
||||
;label-packetloss-foreground = #eefafafa
|
||||
|
||||
; Only applies if <ramp-signal> is used
|
||||
;ramp-signal-0 =
|
||||
;ramp-signal-1 =
|
||||
;ramp-signal-2 =
|
||||
;ramp-signal-3 =
|
||||
;ramp-signal-foreground = ${color.purple}
|
||||
|
||||
; Only applies if <animation-packetloss> is used
|
||||
;;animation-packetloss-0 = ⚠
|
||||
;;animation-packetloss-0-foreground = #ffa64c
|
||||
;;animation-packetloss-1 = ⚠
|
||||
;;animation-packetloss-1-foreground = #000000
|
||||
; Framerate in milliseconds
|
||||
;;animation-packetloss-framerate = 500
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
|
||||
; If not, uses default sink
|
||||
sink = alsa_output.pci-0000_12_00.3.analog-stereo
|
||||
|
||||
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
|
||||
; Default: true
|
||||
use-ui-max = true
|
||||
|
||||
; Interval for volume increase/decrease (in percent points)
|
||||
; Default: 5
|
||||
interval = 5
|
||||
|
||||
; Available tags:
|
||||
; <label-volume> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-volume = <ramp-volume> <label-volume>
|
||||
|
||||
; Available tags:
|
||||
; <label-muted> (default)
|
||||
; <ramp-volume>
|
||||
; <bar-volume>
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix =
|
||||
format-muted-prefix-foreground = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %decibels%
|
||||
label-volume = %percentage%%
|
||||
|
||||
; Available tokens:
|
||||
; %percentage% (default)
|
||||
; %decibels%
|
||||
label-muted = " Muted"
|
||||
label-muted-foreground = ${color.sep}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
ramp-volume-foreground = ${color.dark-blue}
|
||||
|
||||
; Right and Middle click
|
||||
click-right = pavucontrol
|
||||
; click-middle =
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 5
|
||||
|
||||
; Thermal zone to use
|
||||
; To list all the zone types, run
|
||||
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
|
||||
; Default: 0
|
||||
thermal-zone = 1
|
||||
|
||||
; Full path of temperature sysfs path
|
||||
; Use `sensors` to find preferred temperature source, then run
|
||||
; $ for i in /sys/class/hwmon/hwmon*/temp*_input;
|
||||
; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null ||
|
||||
; echo $(basename ${i%_*})) $(readlink -f $i)"; done
|
||||
; to find path to desired file
|
||||
; Default reverts to thermal zone setting
|
||||
;;hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
|
||||
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
|
||||
;hwmon-path = /sys/class/hwmon/hwmon1/temp1_input
|
||||
|
||||
; Threshold temperature to display warning label (in degrees celsius)
|
||||
; Default: 80
|
||||
warn-temperature = 84
|
||||
|
||||
; Whether or not to show units next to the temperature tokens (°C, °F)
|
||||
; Default: true
|
||||
units = true
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
; <ramp>
|
||||
format = <ramp> <label>
|
||||
|
||||
; Available tags:
|
||||
; <label-warn> (default)
|
||||
; <ramp>
|
||||
format-warn = <ramp> <label-warn>
|
||||
|
||||
; Available tokens:
|
||||
; %temperature% (deprecated)
|
||||
; %temperature-c% (default, temperature in °C)
|
||||
; %temperature-f% (temperature in °F)
|
||||
label = %temperature-c%
|
||||
|
||||
; Available tokens:
|
||||
; %temperature% (deprecated)
|
||||
; %temperature-c% (default, temperature in °C)
|
||||
; %temperature-f% (temperature in °F)
|
||||
label-warn = "%temperature-c%"
|
||||
label-warn-foreground = ${color.red}
|
||||
|
||||
; Requires the <ramp> tag
|
||||
; The icon selection will range from 0 to `warn-temperature`
|
||||
; with the current temperature as index.
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-3 =
|
||||
ramp-4 =
|
||||
ramp-foreground = ${color.cyan}
|
||||
|
||||
[module/keyboard]
|
||||
type = internal/xkeyboard
|
||||
|
||||
; List of indicators to ignore
|
||||
blacklist-0 = num lock
|
||||
blacklist-1 = scroll lock
|
||||
|
||||
; Available tags:
|
||||
; <label-layout> (default)
|
||||
; <label-indicator> (default)
|
||||
format = <label-layout> <label-indicator>
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${color.magenta}
|
||||
|
||||
; Available tokens:
|
||||
; %layout%
|
||||
; %name%
|
||||
; %number%
|
||||
; Default: %layout%
|
||||
label-layout = " %layout%"
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; Default: %name%
|
||||
label-indicator-on = "%name%"
|
||||
label-indicator-on-foreground = ${color.white}
|
||||
label-indicator-on-background = ${color.dark-red}
|
||||
|
||||
[module/title]
|
||||
type = internal/xwindow
|
||||
|
||||
; Available tags:
|
||||
; <label> (default)
|
||||
format = <label>
|
||||
format-prefix =
|
||||
format-foreground = ${color.foreground}
|
||||
|
||||
; Available tokens:
|
||||
; %title%
|
||||
; Default: %title%
|
||||
label = " %title%"
|
||||
label-maxlen = 30
|
||||
|
||||
; Used instead of label when there is no window title
|
||||
label-empty = " Desktop"
|
||||
|
||||
[module/workspaces]
|
||||
type = internal/xworkspaces
|
||||
|
||||
; Only show workspaces defined on the same output as the bar
|
||||
;
|
||||
; Useful if you want to show monitor specific workspaces
|
||||
; on different bars
|
||||
;
|
||||
; Default: false
|
||||
pin-workspaces = true
|
||||
|
||||
; Create click handler used to focus desktop
|
||||
; Default: true
|
||||
enable-click = true
|
||||
|
||||
; Create scroll handlers used to cycle desktops
|
||||
; Default: true
|
||||
enable-scroll = true
|
||||
|
||||
; icon-[0-9]+ = <desktop-name>;<icon>
|
||||
; NOTE: The desktop name needs to match the name configured by the WM
|
||||
; You can get a list of the defined desktops using:
|
||||
; $ xprop -root _NET_DESKTOP_NAMES
|
||||
icon-0 = 1;
|
||||
icon-1 = 2;
|
||||
icon-2 = 3;
|
||||
icon-3 = 4;
|
||||
icon-4 = 5;
|
||||
icon-5 = 6;
|
||||
icon-6 = 7;
|
||||
icon-7 = 8;
|
||||
icon-8 = 9;
|
||||
icon-9 = 10;
|
||||
icon-default =
|
||||
|
||||
; Available tags:
|
||||
; <label-monitor>
|
||||
; <label-state> - gets replaced with <label-(active|urgent|occupied|empty)>
|
||||
; Default: <label-state>
|
||||
format = <label-state>
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; Default: %name%
|
||||
label-monitor = %name%
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-active = %icon%
|
||||
label-active-foreground = ${color.red}
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-occupied = %icon%
|
||||
label-occupied-foreground = ${color.cyan}
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-urgent = %icon%
|
||||
label-urgent-foreground = ${color.dark-red}
|
||||
|
||||
; Available tokens:
|
||||
; %name%
|
||||
; %icon%
|
||||
; %index%
|
||||
; Default: %icon% %name%
|
||||
label-empty = %icon%
|
||||
label-empty-foreground = ${color.foreground}
|
||||
|
||||
label-active-padding = 1
|
||||
label-urgent-padding = 1
|
||||
label-occupied-padding = 1
|
||||
label-empty-padding = 1
|
||||
|
675
config/ranger/LICENSE
Normal file
675
config/ranger/LICENSE
Normal file
|
@ -0,0 +1,675 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
62
config/ranger/commands.py
Normal file
62
config/ranger/commands.py
Normal file
|
@ -0,0 +1,62 @@
|
|||
# This is a sample commands.py. You can add your own commands here.
|
||||
#
|
||||
# Please refer to commands_full.py for all the default commands and a complete
|
||||
# documentation. Do NOT add them all here, or you may end up with defunct
|
||||
# commands when upgrading ranger.
|
||||
|
||||
# A simple command for demonstration purposes follows.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
# You can import any python module as needed.
|
||||
import os
|
||||
|
||||
# You always need to import ranger.api.commands here to get the Command class:
|
||||
from ranger.api.commands import Command
|
||||
|
||||
|
||||
# Any class that is a subclass of "Command" will be integrated into ranger as a
|
||||
# command. Try typing ":my_edit<ENTER>" in ranger!
|
||||
class my_edit(Command):
|
||||
# The so-called doc-string of the class will be visible in the built-in
|
||||
# help that is accessible by typing "?c" inside ranger.
|
||||
""":my_edit <filename>
|
||||
|
||||
A sample command for demonstration purposes that opens a file in an editor.
|
||||
"""
|
||||
|
||||
# The execute method is called when you run this command in ranger.
|
||||
def execute(self):
|
||||
# self.arg(1) is the first (space-separated) argument to the function.
|
||||
# This way you can write ":my_edit somefilename<ENTER>".
|
||||
if self.arg(1):
|
||||
# self.rest(1) contains self.arg(1) and everything that follows
|
||||
target_filename = self.rest(1)
|
||||
else:
|
||||
# self.fm is a ranger.core.filemanager.FileManager object and gives
|
||||
# you access to internals of ranger.
|
||||
# self.fm.thisfile is a ranger.container.file.File object and is a
|
||||
# reference to the currently selected file.
|
||||
target_filename = self.fm.thisfile.path
|
||||
|
||||
# This is a generic function to print text in ranger.
|
||||
self.fm.notify("Let's edit the file " + target_filename + "!")
|
||||
|
||||
# Using bad=True in fm.notify allows you to print error messages:
|
||||
if not os.path.exists(target_filename):
|
||||
self.fm.notify("The given file does not exist!", bad=True)
|
||||
return
|
||||
|
||||
# This executes a function from ranger.core.acitons, a module with a
|
||||
# variety of subroutines that can help you construct commands.
|
||||
# Check out the source, or run "pydoc ranger.core.actions" for a list.
|
||||
self.fm.edit_file(target_filename)
|
||||
|
||||
# The tab method is called when you press tab, and should return a list of
|
||||
# suggestions that the user will tab through.
|
||||
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
|
||||
def tab(self, tabnum):
|
||||
# This is a generic tab-completion function that iterates through the
|
||||
# content of the current directory.
|
||||
return self._tab_directory_content()
|
1993
config/ranger/commands_full.py
Normal file
1993
config/ranger/commands_full.py
Normal file
File diff suppressed because it is too large
Load diff
760
config/ranger/rc.conf
Normal file
760
config/ranger/rc.conf
Normal file
|
@ -0,0 +1,760 @@
|
|||
# ===================================================================
|
||||
# This file contains the default startup commands for ranger.
|
||||
# To change them, it is recommended to create either /etc/ranger/rc.conf
|
||||
# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
|
||||
# commands there.
|
||||
#
|
||||
# If you copy this whole file there, you may want to set the environment
|
||||
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
|
||||
#
|
||||
# The purpose of this file is mainly to define keybindings and settings.
|
||||
# For running more complex python code, please create a plugin in "plugins/" or
|
||||
# a command in "commands.py".
|
||||
#
|
||||
# Each line is a command that will be run before the user interface
|
||||
# is initialized. As a result, you can not use commands which rely
|
||||
# on the UI such as :delete or :mark.
|
||||
# ===================================================================
|
||||
|
||||
# ===================================================================
|
||||
# == Options
|
||||
# ===================================================================
|
||||
|
||||
# Which viewmode should be used? Possible values are:
|
||||
# miller: Use miller columns which show multiple levels of the hierarchy
|
||||
# multipane: Midnight-commander like multipane view showing all tabs next
|
||||
# to each other
|
||||
set viewmode miller
|
||||
#set viewmode multipane
|
||||
|
||||
# How many columns are there, and what are their relative widths?
|
||||
set column_ratios 1,3,4
|
||||
|
||||
# Which files should be hidden? (regular expression)
|
||||
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
|
||||
|
||||
# Show hidden files? You can toggle this by typing 'zh'
|
||||
set show_hidden false
|
||||
|
||||
# Ask for a confirmation when running the "delete" command?
|
||||
# Valid values are "always", "never", "multiple" (default)
|
||||
# With "multiple", ranger will ask only if you delete multiple files at once.
|
||||
set confirm_on_delete multiple
|
||||
|
||||
# Use non-default path for file preview script?
|
||||
# ranger ships with scope.sh, a script that calls external programs (see
|
||||
# README.md for dependencies) to preview images, archives, etc.
|
||||
#set preview_script ~/.config/ranger/scope.sh
|
||||
|
||||
# Use the external preview script or display simple plain text or image previews?
|
||||
set use_preview_script true
|
||||
|
||||
# Automatically count files in the directory, even before entering them?
|
||||
set automatically_count_files true
|
||||
|
||||
# Open all images in this directory when running certain image viewers
|
||||
# like feh or sxiv? You can still open selected files by marking them.
|
||||
set open_all_images true
|
||||
|
||||
# Be aware of version control systems and display information.
|
||||
set vcs_aware false
|
||||
|
||||
# State of the four backends git, hg, bzr, svn. The possible states are
|
||||
# disabled, local (only show local info), enabled (show local and remote
|
||||
# information).
|
||||
set vcs_backend_git enabled
|
||||
set vcs_backend_hg disabled
|
||||
set vcs_backend_bzr disabled
|
||||
set vcs_backend_svn disabled
|
||||
|
||||
# Truncate the long commit messages to this length when shown in the statusbar.
|
||||
set vcs_msg_length 50
|
||||
|
||||
# Use one of the supported image preview protocols
|
||||
set preview_images false
|
||||
|
||||
# Set the preview image method. Supported methods:
|
||||
#
|
||||
# * w3m (default):
|
||||
# Preview images in full color with the external command "w3mimgpreview"?
|
||||
# This requires the console web browser "w3m" and a supported terminal.
|
||||
# It has been successfully tested with "xterm" and "urxvt" without tmux.
|
||||
#
|
||||
# * iterm2:
|
||||
# Preview images in full color using iTerm2 image previews
|
||||
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
|
||||
# with image preview support.
|
||||
#
|
||||
# This feature relies on the dimensions of the terminal's font. By default, a
|
||||
# width of 8 and height of 11 are used. To use other values, set the options
|
||||
# iterm2_font_width and iterm2_font_height to the desired values.
|
||||
#
|
||||
# * terminology:
|
||||
# Previews images in full color in the terminology terminal emulator.
|
||||
# Supports a wide variety of formats, even vector graphics like svg.
|
||||
#
|
||||
# * urxvt:
|
||||
# Preview images in full color using urxvt image backgrounds. This
|
||||
# requires using urxvt compiled with pixbuf support.
|
||||
#
|
||||
# * urxvt-full:
|
||||
# The same as urxvt but utilizing not only the preview pane but the
|
||||
# whole terminal window.
|
||||
#
|
||||
# * kitty:
|
||||
# Preview images in full color using kitty image protocol.
|
||||
# Requires python PIL or pillow library.
|
||||
# If ranger does not share the local filesystem with kitty
|
||||
# the transfer method is changed to encode the whole image;
|
||||
# while slower, this allows remote previews,
|
||||
# for example during an ssh session.
|
||||
# Tmux is unsupported.
|
||||
#
|
||||
# * ueberzug:
|
||||
# Preview images in full color with the external command "ueberzug".
|
||||
# Images are shown by using a child window.
|
||||
# Only for users who run X11 in GNU/Linux.
|
||||
set preview_images_method w3m
|
||||
|
||||
# Delay in seconds before displaying an image with the w3m method.
|
||||
# Increase it in case of experiencing display corruption.
|
||||
set w3m_delay 0.02
|
||||
|
||||
# Manually adjust the w3mimg offset when using a terminal which needs this
|
||||
set w3m_offset 0
|
||||
|
||||
# Default iTerm2 font size (see: preview_images_method: iterm2)
|
||||
set iterm2_font_width 8
|
||||
set iterm2_font_height 11
|
||||
|
||||
# Use a unicode "..." character to mark cut-off filenames?
|
||||
set unicode_ellipsis false
|
||||
|
||||
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
|
||||
# Requires the python-bidi pip package
|
||||
set bidi_support false
|
||||
|
||||
# Show dotfiles in the bookmark preview box?
|
||||
set show_hidden_bookmarks true
|
||||
|
||||
# Which colorscheme to use? These colorschemes are available by default:
|
||||
# default, jungle, snow, solarized
|
||||
set colorscheme default
|
||||
|
||||
# Preview files on the rightmost column?
|
||||
# And collapse (shrink) the last column if there is nothing to preview?
|
||||
set preview_files true
|
||||
set preview_directories true
|
||||
set collapse_preview true
|
||||
|
||||
# Wrap long lines in plain text previews?
|
||||
set wrap_plaintext_previews false
|
||||
|
||||
# Save the console history on exit?
|
||||
set save_console_history true
|
||||
|
||||
# Draw the status bar on top of the browser window (default: bottom)
|
||||
set status_bar_on_top false
|
||||
|
||||
# Draw a progress bar in the status bar which displays the average state of all
|
||||
# currently running tasks which support progress bars?
|
||||
set draw_progress_bar_in_status_bar true
|
||||
|
||||
# Draw borders around columns? (separators, outline, both, or none)
|
||||
# Separators are vertical lines between columns.
|
||||
# Outline draws a box around all the columns.
|
||||
# Both combines the two.
|
||||
set draw_borders none
|
||||
|
||||
# Display the directory name in tabs?
|
||||
set dirname_in_tabs false
|
||||
|
||||
# Enable the mouse support?
|
||||
set mouse_enabled true
|
||||
|
||||
# Display the file size in the main column or status bar?
|
||||
set display_size_in_main_column true
|
||||
set display_size_in_status_bar true
|
||||
|
||||
# Display the free disk space in the status bar?
|
||||
set display_free_space_in_status_bar true
|
||||
|
||||
# Display files tags in all columns or only in main column?
|
||||
set display_tags_in_all_columns true
|
||||
|
||||
# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
|
||||
set update_title false
|
||||
|
||||
# Set the tmux/screen window-name to "ranger"?
|
||||
set update_tmux_title true
|
||||
|
||||
# Shorten the title if it gets long? The number defines how many
|
||||
# directories are displayed at once, 0 turns off this feature.
|
||||
set shorten_title 3
|
||||
|
||||
# Show hostname in titlebar?
|
||||
set hostname_in_titlebar true
|
||||
|
||||
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
|
||||
set tilde_in_titlebar false
|
||||
|
||||
# How many directory-changes or console-commands should be kept in history?
|
||||
set max_history_size 20
|
||||
set max_console_history_size 50
|
||||
|
||||
# Try to keep so much space between the top/bottom border when scrolling:
|
||||
set scroll_offset 8
|
||||
|
||||
# Flush the input after each key hit? (Noticeable when ranger lags)
|
||||
set flushinput true
|
||||
|
||||
# Padding on the right when there's no preview?
|
||||
# This allows you to click into the space to run the file.
|
||||
set padding_right true
|
||||
|
||||
# Save bookmarks (used with mX and `X) instantly?
|
||||
# This helps to synchronize bookmarks between multiple ranger
|
||||
# instances but leads to *slight* performance loss.
|
||||
# When false, bookmarks are saved when ranger is exited.
|
||||
set autosave_bookmarks true
|
||||
|
||||
# Save the "`" bookmark to disk. This can be used to switch to the last
|
||||
# directory by typing "``".
|
||||
set save_backtick_bookmark true
|
||||
|
||||
# You can display the "real" cumulative size of directories by using the
|
||||
# command :get_cumulative_size or typing "dc". The size is expensive to
|
||||
# calculate and will not be updated automatically. You can choose
|
||||
# to update it automatically though by turning on this option:
|
||||
set autoupdate_cumulative_size false
|
||||
|
||||
# Turning this on makes sense for screen readers:
|
||||
set show_cursor false
|
||||
|
||||
# One of: size, natural, basename, atime, ctime, mtime, type, random
|
||||
set sort natural
|
||||
|
||||
# Additional sorting options
|
||||
set sort_reverse false
|
||||
set sort_case_insensitive true
|
||||
set sort_directories_first true
|
||||
set sort_unicode false
|
||||
|
||||
# Enable this if key combinations with the Alt Key don't work for you.
|
||||
# (Especially on xterm)
|
||||
set xterm_alt_key false
|
||||
|
||||
# Whether to include bookmarks in cd command
|
||||
set cd_bookmarks true
|
||||
|
||||
# Changes case sensitivity for the cd command tab completion
|
||||
set cd_tab_case sensitive
|
||||
|
||||
# Use fuzzy tab completion with the "cd" command. For example,
|
||||
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
|
||||
set cd_tab_fuzzy false
|
||||
|
||||
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
||||
# disable this feature.
|
||||
set preview_max_size 0
|
||||
|
||||
# The key hint lists up to this size have their sublists expanded.
|
||||
# Otherwise the submaps are replaced with "...".
|
||||
set hint_collapse_threshold 10
|
||||
|
||||
# Add the highlighted file to the path in the titlebar
|
||||
set show_selection_in_titlebar true
|
||||
|
||||
# The delay that ranger idly waits for user input, in milliseconds, with a
|
||||
# resolution of 100ms. Lower delay reduces lag between directory updates but
|
||||
# increases CPU load.
|
||||
set idle_delay 2000
|
||||
|
||||
# When the metadata manager module looks for metadata, should it only look for
|
||||
# a ".metadata.json" file in the current directory, or do a deep search and
|
||||
# check all directories above the current one as well?
|
||||
set metadata_deep_search false
|
||||
|
||||
# Clear all existing filters when leaving a directory
|
||||
set clear_filters_on_dir_change false
|
||||
|
||||
# Disable displaying line numbers in main column.
|
||||
# Possible values: false, absolute, relative.
|
||||
set line_numbers false
|
||||
|
||||
# When line_numbers=relative show the absolute line number in the
|
||||
# current line.
|
||||
set relative_current_zero false
|
||||
|
||||
# Start line numbers from 1 instead of 0
|
||||
set one_indexed false
|
||||
|
||||
# Save tabs on exit
|
||||
set save_tabs_on_exit false
|
||||
|
||||
# Enable scroll wrapping - moving down while on the last item will wrap around to
|
||||
# the top and vice versa.
|
||||
set wrap_scroll false
|
||||
|
||||
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
|
||||
# directories, files and symlinks respectively.
|
||||
set global_inode_type_filter
|
||||
|
||||
# This setting allows to freeze the list of files to save I/O bandwidth. It
|
||||
# should be 'false' during start-up, but you can toggle it by pressing F.
|
||||
set freeze_files false
|
||||
|
||||
# Print file sizes in bytes instead of the default human-readable format.
|
||||
set size_in_bytes false
|
||||
|
||||
# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
|
||||
# give a warning when you nest ranger in a subshell started by ranger.
|
||||
# Special value "error" makes the warning more visible.
|
||||
set nested_ranger_warning true
|
||||
|
||||
# ===================================================================
|
||||
# == Local Options
|
||||
# ===================================================================
|
||||
# You can set local options that only affect a single directory.
|
||||
|
||||
# Examples:
|
||||
# setlocal path=~/downloads sort mtime
|
||||
|
||||
# ===================================================================
|
||||
# == Command Aliases in the Console
|
||||
# ===================================================================
|
||||
|
||||
alias e edit
|
||||
alias q quit
|
||||
alias q! quit!
|
||||
alias qa quitall
|
||||
alias qa! quitall!
|
||||
alias qall quitall
|
||||
alias qall! quitall!
|
||||
alias setl setlocal
|
||||
|
||||
alias filter scout -prts
|
||||
alias find scout -aets
|
||||
alias mark scout -mr
|
||||
alias unmark scout -Mr
|
||||
alias search scout -rs
|
||||
alias search_inc scout -rts
|
||||
alias travel scout -aefklst
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the browser
|
||||
# ===================================================================
|
||||
|
||||
# Basic
|
||||
map Q quitall
|
||||
map q quit
|
||||
copymap q ZZ ZQ
|
||||
|
||||
map R reload_cwd
|
||||
map F set freeze_files!
|
||||
map <C-r> reset
|
||||
map <C-l> redraw_window
|
||||
map <C-c> abort
|
||||
map <esc> change_mode normal
|
||||
map ~ set viewmode!
|
||||
|
||||
map i display_file
|
||||
map <A-j> scroll_preview 1
|
||||
map <A-k> scroll_preview -1
|
||||
map ? help
|
||||
map W display_log
|
||||
map w taskview_open
|
||||
map S shell $SHELL
|
||||
|
||||
map : console
|
||||
map ; console
|
||||
map ! console shell%space
|
||||
map @ console -p6 shell %%s
|
||||
map # console shell -p%space
|
||||
map s console shell%space
|
||||
map r chain draw_possible_programs; console open_with%space
|
||||
map f console find%space
|
||||
map cd console cd%space
|
||||
|
||||
map <C-p> chain console; eval fm.ui.console.history_move(-1)
|
||||
|
||||
# Change the line mode
|
||||
map Mf linemode filename
|
||||
map Mi linemode fileinfo
|
||||
map Mm linemode mtime
|
||||
map Mh linemode humanreadablemtime
|
||||
map Mp linemode permissions
|
||||
map Ms linemode sizemtime
|
||||
map MH linemode sizehumanreadablemtime
|
||||
map Mt linemode metatitle
|
||||
|
||||
# Tagging / Marking
|
||||
map t tag_toggle
|
||||
map ut tag_remove
|
||||
map "<any> tag_toggle tag=%any
|
||||
map <Space> mark_files toggle=True
|
||||
map v mark_files all=True toggle=True
|
||||
map uv mark_files all=True val=False
|
||||
map V toggle_visual_mode
|
||||
map uV toggle_visual_mode reverse=True
|
||||
|
||||
# For the nostalgics: Midnight Commander bindings
|
||||
map <F1> help
|
||||
map <F2> rename_append
|
||||
map <F3> display_file
|
||||
map <F4> edit
|
||||
map <F5> copy
|
||||
map <F6> cut
|
||||
map <F7> console mkdir%space
|
||||
map <F8> console delete
|
||||
#map <F8> console trash
|
||||
map <F10> exit
|
||||
|
||||
# In case you work on a keyboard with dvorak layout
|
||||
map <UP> move up=1
|
||||
map <DOWN> move down=1
|
||||
map <LEFT> move left=1
|
||||
map <RIGHT> move right=1
|
||||
map <HOME> move to=0
|
||||
map <END> move to=-1
|
||||
map <PAGEDOWN> move down=1 pages=True
|
||||
map <PAGEUP> move up=1 pages=True
|
||||
map <CR> move right=1
|
||||
#map <DELETE> console delete
|
||||
map <INSERT> console touch%space
|
||||
|
||||
# VIM-like
|
||||
copymap <UP> k
|
||||
copymap <DOWN> j
|
||||
copymap <LEFT> h
|
||||
copymap <RIGHT> l
|
||||
copymap <HOME> gg
|
||||
copymap <END> G
|
||||
copymap <PAGEDOWN> <C-F>
|
||||
copymap <PAGEUP> <C-B>
|
||||
|
||||
map J move down=0.5 pages=True
|
||||
map K move up=0.5 pages=True
|
||||
copymap J <C-D>
|
||||
copymap K <C-U>
|
||||
|
||||
# Jumping around
|
||||
map H history_go -1
|
||||
map L history_go 1
|
||||
map ] move_parent 1
|
||||
map [ move_parent -1
|
||||
map } traverse
|
||||
map { traverse_backwards
|
||||
map ) jump_non
|
||||
|
||||
map gh cd ~
|
||||
map ge cd /etc
|
||||
map gu cd /usr
|
||||
map gd cd /dev
|
||||
map gl cd -r .
|
||||
map gL cd -r %f
|
||||
map go cd /opt
|
||||
map gv cd /var
|
||||
map gm cd /media
|
||||
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
|
||||
map gM cd /mnt
|
||||
map gs cd /srv
|
||||
map gp cd /tmp
|
||||
map gr cd /
|
||||
map gR eval fm.cd(ranger.RANGERDIR)
|
||||
map g/ cd /
|
||||
map g? cd /usr/share/doc/ranger
|
||||
|
||||
# External Programs
|
||||
map E edit
|
||||
map du shell -p du --max-depth=1 -h --apparent-size
|
||||
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
|
||||
map yp yank path
|
||||
map yd yank dir
|
||||
map yn yank name
|
||||
map y. yank name_without_extension
|
||||
|
||||
# Filesystem Operations
|
||||
map = chmod
|
||||
|
||||
map cw console rename%space
|
||||
map a rename_append
|
||||
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
|
||||
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
|
||||
|
||||
map pp paste
|
||||
map po paste overwrite=True
|
||||
map pP paste append=True
|
||||
map pO paste overwrite=True append=True
|
||||
map pl paste_symlink relative=False
|
||||
map pL paste_symlink relative=True
|
||||
map phl paste_hardlink
|
||||
map pht paste_hardlinked_subtree
|
||||
map pd console paste dest=
|
||||
map p`<any> paste dest=%any_path
|
||||
map p'<any> paste dest=%any_path
|
||||
|
||||
map dD console delete
|
||||
map dT console trash
|
||||
|
||||
map DD shell trash-put %s
|
||||
map dd cut
|
||||
map ud uncut
|
||||
map da cut mode=add
|
||||
map dr cut mode=remove
|
||||
map dt cut mode=toggle
|
||||
|
||||
map yy copy
|
||||
map uy uncut
|
||||
map ya copy mode=add
|
||||
map yr copy mode=remove
|
||||
map yt copy mode=toggle
|
||||
|
||||
# Temporary workarounds
|
||||
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
|
||||
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
|
||||
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
|
||||
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
|
||||
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
|
||||
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
|
||||
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
|
||||
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
|
||||
|
||||
# Searching
|
||||
map / console search%space
|
||||
map n search_next
|
||||
map N search_next forward=False
|
||||
map ct search_next order=tag
|
||||
map cs search_next order=size
|
||||
map ci search_next order=mimetype
|
||||
map cc search_next order=ctime
|
||||
map cm search_next order=mtime
|
||||
map ca search_next order=atime
|
||||
|
||||
# Tabs
|
||||
map <C-n> tab_new
|
||||
map <C-w> tab_close
|
||||
map <TAB> tab_move 1
|
||||
map <S-TAB> tab_move -1
|
||||
map <A-Right> tab_move 1
|
||||
map <A-Left> tab_move -1
|
||||
map gt tab_move 1
|
||||
map gT tab_move -1
|
||||
map gn tab_new
|
||||
map gc tab_close
|
||||
map uq tab_restore
|
||||
map <a-1> tab_open 1
|
||||
map <a-2> tab_open 2
|
||||
map <a-3> tab_open 3
|
||||
map <a-4> tab_open 4
|
||||
map <a-5> tab_open 5
|
||||
map <a-6> tab_open 6
|
||||
map <a-7> tab_open 7
|
||||
map <a-8> tab_open 8
|
||||
map <a-9> tab_open 9
|
||||
map <a-r> tab_shift 1
|
||||
map <a-l> tab_shift -1
|
||||
|
||||
# Sorting
|
||||
map or set sort_reverse!
|
||||
map oz set sort=random
|
||||
map os chain set sort=size; set sort_reverse=False
|
||||
map ob chain set sort=basename; set sort_reverse=False
|
||||
map on chain set sort=natural; set sort_reverse=False
|
||||
map om chain set sort=mtime; set sort_reverse=False
|
||||
map oc chain set sort=ctime; set sort_reverse=False
|
||||
map oa chain set sort=atime; set sort_reverse=False
|
||||
map ot chain set sort=type; set sort_reverse=False
|
||||
map oe chain set sort=extension; set sort_reverse=False
|
||||
|
||||
map oS chain set sort=size; set sort_reverse=True
|
||||
map oB chain set sort=basename; set sort_reverse=True
|
||||
map oN chain set sort=natural; set sort_reverse=True
|
||||
map oM chain set sort=mtime; set sort_reverse=True
|
||||
map oC chain set sort=ctime; set sort_reverse=True
|
||||
map oA chain set sort=atime; set sort_reverse=True
|
||||
map oT chain set sort=type; set sort_reverse=True
|
||||
map oE chain set sort=extension; set sort_reverse=True
|
||||
|
||||
map dc get_cumulative_size
|
||||
|
||||
# Settings
|
||||
map zc set collapse_preview!
|
||||
map zd set sort_directories_first!
|
||||
map zh set show_hidden!
|
||||
map <C-h> set show_hidden!
|
||||
copymap <C-h> <backspace>
|
||||
copymap <backspace> <backspace2>
|
||||
map zI set flushinput!
|
||||
map zi set preview_images!
|
||||
map zm set mouse_enabled!
|
||||
map zp set preview_files!
|
||||
map zP set preview_directories!
|
||||
map zs set sort_case_insensitive!
|
||||
map zu set autoupdate_cumulative_size!
|
||||
map zv set use_preview_script!
|
||||
map zf console filter%space
|
||||
copymap zf zz
|
||||
|
||||
# Filter stack
|
||||
map .d filter_stack add type d
|
||||
map .f filter_stack add type f
|
||||
map .l filter_stack add type l
|
||||
map .m console filter_stack add mime%space
|
||||
map .n console filter_stack add name%space
|
||||
map .# console filter_stack add hash%space
|
||||
map ." filter_stack add duplicate
|
||||
map .' filter_stack add unique
|
||||
map .| filter_stack add or
|
||||
map .& filter_stack add and
|
||||
map .! filter_stack add not
|
||||
map .r filter_stack rotate
|
||||
map .c filter_stack clear
|
||||
map .* filter_stack decompose
|
||||
map .p filter_stack pop
|
||||
map .. filter_stack show
|
||||
|
||||
# Bookmarks
|
||||
map `<any> enter_bookmark %any
|
||||
map '<any> enter_bookmark %any
|
||||
map m<any> set_bookmark %any
|
||||
map um<any> unset_bookmark %any
|
||||
|
||||
map m<bg> draw_bookmarks
|
||||
copymap m<bg> um<bg> `<bg> '<bg>
|
||||
|
||||
# Generate all the chmod bindings with some python help:
|
||||
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
|
||||
|
||||
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
|
||||
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
|
||||
|
||||
# ===================================================================
|
||||
# == Define keys for the console
|
||||
# ===================================================================
|
||||
# Note: Unmapped keys are passed directly to the console.
|
||||
|
||||
# Basic
|
||||
cmap <tab> eval fm.ui.console.tab()
|
||||
cmap <s-tab> eval fm.ui.console.tab(-1)
|
||||
cmap <ESC> eval fm.ui.console.close()
|
||||
cmap <CR> eval fm.ui.console.execute()
|
||||
cmap <C-l> redraw_window
|
||||
|
||||
copycmap <ESC> <C-c>
|
||||
copycmap <CR> <C-j>
|
||||
|
||||
# Move around
|
||||
cmap <up> eval fm.ui.console.history_move(-1)
|
||||
cmap <down> eval fm.ui.console.history_move(1)
|
||||
cmap <left> eval fm.ui.console.move(left=1)
|
||||
cmap <right> eval fm.ui.console.move(right=1)
|
||||
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
|
||||
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
|
||||
cmap <a-b> eval fm.ui.console.move_word(left=1)
|
||||
cmap <a-f> eval fm.ui.console.move_word(right=1)
|
||||
|
||||
copycmap <a-b> <a-left>
|
||||
copycmap <a-f> <a-right>
|
||||
|
||||
# Line Editing
|
||||
cmap <backspace> eval fm.ui.console.delete(-1)
|
||||
cmap <delete> eval fm.ui.console.delete(0)
|
||||
cmap <C-w> eval fm.ui.console.delete_word()
|
||||
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
|
||||
cmap <C-k> eval fm.ui.console.delete_rest(1)
|
||||
cmap <C-u> eval fm.ui.console.delete_rest(-1)
|
||||
cmap <C-y> eval fm.ui.console.paste()
|
||||
|
||||
# And of course the emacs way
|
||||
copycmap <ESC> <C-g>
|
||||
copycmap <up> <C-p>
|
||||
copycmap <down> <C-n>
|
||||
copycmap <left> <C-b>
|
||||
copycmap <right> <C-f>
|
||||
copycmap <home> <C-a>
|
||||
copycmap <end> <C-e>
|
||||
copycmap <delete> <C-d>
|
||||
copycmap <backspace> <C-h>
|
||||
|
||||
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
|
||||
# and <backspace2> (code 127). To be sure, use both.
|
||||
copycmap <backspace> <backspace2>
|
||||
|
||||
# This special expression allows typing in numerals:
|
||||
cmap <allow_quantifiers> false
|
||||
|
||||
# ===================================================================
|
||||
# == Pager Keybindings
|
||||
# ===================================================================
|
||||
|
||||
# Movement
|
||||
pmap <down> pager_move down=1
|
||||
pmap <up> pager_move up=1
|
||||
pmap <left> pager_move left=4
|
||||
pmap <right> pager_move right=4
|
||||
pmap <home> pager_move to=0
|
||||
pmap <end> pager_move to=-1
|
||||
pmap <pagedown> pager_move down=1.0 pages=True
|
||||
pmap <pageup> pager_move up=1.0 pages=True
|
||||
pmap <C-d> pager_move down=0.5 pages=True
|
||||
pmap <C-u> pager_move up=0.5 pages=True
|
||||
|
||||
copypmap <UP> k <C-p>
|
||||
copypmap <DOWN> j <C-n> <CR>
|
||||
copypmap <LEFT> h
|
||||
copypmap <RIGHT> l
|
||||
copypmap <HOME> g
|
||||
copypmap <END> G
|
||||
copypmap <C-d> d
|
||||
copypmap <C-u> u
|
||||
copypmap <PAGEDOWN> n f <C-F> <Space>
|
||||
copypmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Basic
|
||||
pmap <C-l> redraw_window
|
||||
pmap <ESC> pager_close
|
||||
copypmap <ESC> q Q i <F3>
|
||||
pmap E edit_file
|
||||
|
||||
# ===================================================================
|
||||
# == Taskview Keybindings
|
||||
# ===================================================================
|
||||
|
||||
# Movement
|
||||
tmap <up> taskview_move up=1
|
||||
tmap <down> taskview_move down=1
|
||||
tmap <home> taskview_move to=0
|
||||
tmap <end> taskview_move to=-1
|
||||
tmap <pagedown> taskview_move down=1.0 pages=True
|
||||
tmap <pageup> taskview_move up=1.0 pages=True
|
||||
tmap <C-d> taskview_move down=0.5 pages=True
|
||||
tmap <C-u> taskview_move up=0.5 pages=True
|
||||
|
||||
copytmap <UP> k <C-p>
|
||||
copytmap <DOWN> j <C-n> <CR>
|
||||
copytmap <HOME> g
|
||||
copytmap <END> G
|
||||
copytmap <C-u> u
|
||||
copytmap <PAGEDOWN> n f <C-F> <Space>
|
||||
copytmap <PAGEUP> p b <C-B>
|
||||
|
||||
# Changing priority and deleting tasks
|
||||
tmap J eval -q fm.ui.taskview.task_move(-1)
|
||||
tmap K eval -q fm.ui.taskview.task_move(0)
|
||||
tmap dd eval -q fm.ui.taskview.task_remove()
|
||||
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
|
||||
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
|
||||
tmap <delete> eval -q fm.ui.taskview.task_remove()
|
||||
|
||||
# Basic
|
||||
tmap <C-l> redraw_window
|
||||
tmap <ESC> taskview_close
|
||||
copytmap <ESC> q Q w <C-c>
|
284
config/ranger/rifle.conf
Normal file
284
config/ranger/rifle.conf
Normal file
|
@ -0,0 +1,284 @@
|
|||
# vim: ft=cfg
|
||||
#
|
||||
# This is the configuration file of "rifle", ranger's file executor/opener.
|
||||
# Each line consists of conditions and a command. For each line the conditions
|
||||
# are checked and if they are met, the respective command is run.
|
||||
#
|
||||
# Syntax:
|
||||
# <condition1> , <condition2> , ... = command
|
||||
#
|
||||
# The command can contain these environment variables:
|
||||
# $1-$9 | The n-th selected file
|
||||
# $@ | All selected files
|
||||
#
|
||||
# If you use the special command "ask", rifle will ask you what program to run.
|
||||
#
|
||||
# Prefixing a condition with "!" will negate its result.
|
||||
# These conditions are currently supported:
|
||||
# match <regexp> | The regexp matches $1
|
||||
# ext <regexp> | The regexp matches the extension of $1
|
||||
# mime <regexp> | The regexp matches the mime type of $1
|
||||
# name <regexp> | The regexp matches the basename of $1
|
||||
# path <regexp> | The regexp matches the absolute path of $1
|
||||
# has <program> | The program is installed (i.e. located in $PATH)
|
||||
# env <variable> | The environment variable "variable" is non-empty
|
||||
# file | $1 is a file
|
||||
# directory | $1 is a directory
|
||||
# number <n> | change the number of this command to n
|
||||
# terminal | stdin, stderr and stdout are connected to a terminal
|
||||
# X | A graphical environment is available (darwin, Xorg, or Wayland)
|
||||
#
|
||||
# There are also pseudo-conditions which have a "side effect":
|
||||
# flag <flags> | Change how the program is run. See below.
|
||||
# label <label> | Assign a label or name to the command so it can
|
||||
# | be started with :open_with <label> in ranger
|
||||
# | or `rifle -p <label>` in the standalone executable.
|
||||
# else | Always true.
|
||||
#
|
||||
# Flags are single characters which slightly transform the command:
|
||||
# f | Fork the program, make it run in the background.
|
||||
# | New command = setsid $command >& /dev/null &
|
||||
# r | Execute the command with root permissions
|
||||
# | New command = sudo $command
|
||||
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
||||
# | rifle will attempt to extract it from $TERM.
|
||||
# | New command = $TERMCMD -e $command
|
||||
# Note: The "New command" serves only as an illustration, the exact
|
||||
# implementation may differ.
|
||||
# Note: When using rifle in ranger, there is an additional flag "c" for
|
||||
# only running the current file even if you have marked multiple files.
|
||||
|
||||
#-------------------------------------------
|
||||
# Websites
|
||||
#-------------------------------------------
|
||||
# Rarely installed browsers get higher priority; It is assumed that if you
|
||||
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
|
||||
# other hand are often only installed as fallback browsers.
|
||||
ext x?html?, has surf, X, flag f = surf -- file://"$1"
|
||||
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
|
||||
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
|
||||
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
|
||||
ext x?html?, has dwb, X, flag f = dwb -- "$@"
|
||||
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
|
||||
ext x?html?, has luakit, X, flag f = luakit -- "$@"
|
||||
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
|
||||
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
|
||||
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
|
||||
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
|
||||
ext x?html?, has midori, X, flag f = midori -- "$@"
|
||||
ext x?html?, has opera, X, flag f = opera -- "$@"
|
||||
ext x?html?, has firefox, X, flag f = firefox -- "$@"
|
||||
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
|
||||
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
|
||||
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
|
||||
ext x?html?, has chromium, X, flag f = chromium -- "$@"
|
||||
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
|
||||
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
|
||||
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
|
||||
ext x?html?, has elinks, terminal = elinks "$@"
|
||||
ext x?html?, has links2, terminal = links2 "$@"
|
||||
ext x?html?, has links, terminal = links "$@"
|
||||
ext x?html?, has lynx, terminal = lynx -- "$@"
|
||||
ext x?html?, has w3m, terminal = w3m "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
# Define the "editor" for text files as first action
|
||||
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
|
||||
mime ^text, label pager = "$PAGER" -- "$@"
|
||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
ext 1 = man "$1"
|
||||
ext s[wmf]c, has zsnes, X = zsnes "$1"
|
||||
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
|
||||
ext nes, has fceux, X = fceux "$1"
|
||||
ext exe = wine "$1"
|
||||
name ^[mM]akefile$ = make
|
||||
|
||||
#--------------------------------------------
|
||||
# Scripts
|
||||
#-------------------------------------------
|
||||
ext py = python -- "$1"
|
||||
ext pl = perl -- "$1"
|
||||
ext rb = ruby -- "$1"
|
||||
ext js = node -- "$1"
|
||||
ext sh = sh -- "$1"
|
||||
ext php = php -- "$1"
|
||||
|
||||
#--------------------------------------------
|
||||
# Audio without X
|
||||
#-------------------------------------------
|
||||
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
|
||||
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video/Audio with a GUI
|
||||
#-------------------------------------------
|
||||
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
|
||||
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv -- "$@"
|
||||
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
|
||||
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
|
||||
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
|
||||
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem -- "$@"
|
||||
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
|
||||
|
||||
#--------------------------------------------
|
||||
# Video without X
|
||||
#-------------------------------------------
|
||||
mime ^video, terminal, !X, has mpv = mpv -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
|
||||
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Documents
|
||||
#-------------------------------------------
|
||||
ext pdf, has llpp, X, flag f = llpp "$@"
|
||||
ext pdf, has zathura, X, flag f = zathura -- "$@"
|
||||
ext pdf, has mupdf, X, flag f = mupdf "$@"
|
||||
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
|
||||
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
|
||||
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
|
||||
ext pdf, has evince, X, flag f = evince -- "$@"
|
||||
ext pdf, has atril, X, flag f = atril -- "$@"
|
||||
ext pdf, has okular, X, flag f = okular -- "$@"
|
||||
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
|
||||
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
|
||||
ext pdf, has open, X, flag f = open "$@"
|
||||
|
||||
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
|
||||
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
|
||||
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
|
||||
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
|
||||
|
||||
ext djvu, has zathura,X, flag f = zathura -- "$@"
|
||||
ext djvu, has evince, X, flag f = evince -- "$@"
|
||||
ext djvu, has atril, X, flag f = atril -- "$@"
|
||||
ext djvu, has djview, X, flag f = djview -- "$@"
|
||||
|
||||
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
ext epub, has zathura, X, flag f = zathura -- "$@"
|
||||
ext epub, has mupdf, X, flag f = mupdf -- "$@"
|
||||
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
|
||||
|
||||
ext cbr, has zathura, X, flag f = zathura -- "$@"
|
||||
ext cbz, has zathura, X, flag f = zathura -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Images
|
||||
#-------------------------------------------
|
||||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
|
||||
mime ^image/svg, has display, X, flag f = display -- "$@"
|
||||
|
||||
mime ^image, has imv, X, flag f = imv -- "$@"
|
||||
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
|
||||
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
|
||||
mime ^image, has feh, X, flag f = feh -- "$@"
|
||||
mime ^image, has mirage, X, flag f = mirage -- "$@"
|
||||
mime ^image, has ristretto, X, flag f = ristretto "$@"
|
||||
mime ^image, has eog, X, flag f = eog -- "$@"
|
||||
mime ^image, has eom, X, flag f = eom -- "$@"
|
||||
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
|
||||
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
|
||||
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
|
||||
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
|
||||
mime ^image, has gimp, X, flag f = gimp -- "$@"
|
||||
ext xcf, X, flag f = gimp -- "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Archives
|
||||
#-------------------------------------------
|
||||
|
||||
# avoid password prompt by providing empty password
|
||||
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
|
||||
# This requires atool
|
||||
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
|
||||
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
|
||||
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
|
||||
|
||||
# Listing and extracting archives without atool:
|
||||
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
|
||||
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
|
||||
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
|
||||
ext zip, has unzip = unzip -l "$1" | less
|
||||
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
|
||||
ext ace, has unace = unace l "$1" | less
|
||||
ext ace, has unace = for file in "$@"; do unace e "$file"; done
|
||||
ext rar, has unrar = unrar l "$1" | less
|
||||
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
|
||||
|
||||
#-------------------------------------------
|
||||
# Fonts
|
||||
#-------------------------------------------
|
||||
mime ^font, has fontforge, X, flag f = fontforge "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Flag t fallback terminals
|
||||
#-------------------------------------------
|
||||
# Rarely installed terminal emulators get higher priority; It is assumed that
|
||||
# if you install a rare terminal emulator, you probably use it.
|
||||
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
|
||||
# a desktop environment or as fallback terminal emulators.
|
||||
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
|
||||
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
|
||||
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
|
||||
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
|
||||
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
|
||||
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
|
||||
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
|
||||
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
|
||||
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
|
||||
|
||||
#-------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
|
||||
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
|
||||
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
|
||||
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||
|
||||
#-------------------------------------------
|
||||
# Generic file openers
|
||||
#-------------------------------------------
|
||||
label open, has xdg-open = xdg-open -- "$@"
|
||||
label open, has open = open -- "$@"
|
||||
|
||||
# Define the editor for non-text files + pager as last action
|
||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
|
||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
|
||||
######################################################################
|
||||
# The actions below are left so low down in this file on purpose, so #
|
||||
# they are never triggered accidentally. #
|
||||
######################################################################
|
||||
|
||||
# Execute a file as program/script.
|
||||
mime application/x-executable = "$1"
|
||||
|
||||
# Move the file to trash using trash-cli.
|
||||
label trash, has trash-put = trash-put -- "$@"
|
||||
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash
|
350
config/ranger/scope.sh
Executable file
350
config/ranger/scope.sh
Executable file
|
@ -0,0 +1,350 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o noclobber -o noglob -o nounset -o pipefail
|
||||
IFS=$'\n'
|
||||
|
||||
## If the option `use_preview_script` is set to `true`,
|
||||
## then this script will be called and its output will be displayed in ranger.
|
||||
## ANSI color codes are supported.
|
||||
## STDIN is disabled, so interactive scripts won't work properly
|
||||
|
||||
## This script is considered a configuration file and must be updated manually.
|
||||
## It will be left untouched if you upgrade ranger.
|
||||
|
||||
## Because of some automated testing we do on the script #'s for comments need
|
||||
## to be doubled up. Code that is commented out, because it's an alternative for
|
||||
## example, gets only one #.
|
||||
|
||||
## Meanings of exit codes:
|
||||
## code | meaning | action of ranger
|
||||
## -----+------------+-------------------------------------------
|
||||
## 0 | success | Display stdout as preview
|
||||
## 1 | no preview | Display no preview at all
|
||||
## 2 | plain text | Display the plain content of the file
|
||||
## 3 | fix width | Don't reload when width changes
|
||||
## 4 | fix height | Don't reload when height changes
|
||||
## 5 | fix both | Don't ever reload
|
||||
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
|
||||
## 7 | image | Display the file directly as an image
|
||||
|
||||
## Script arguments
|
||||
FILE_PATH="${1}" # Full path of the highlighted file
|
||||
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
|
||||
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
|
||||
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
|
||||
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
|
||||
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
|
||||
|
||||
FILE_EXTENSION="${FILE_PATH##*.}"
|
||||
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
|
||||
|
||||
## Settings
|
||||
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
|
||||
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
|
||||
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
|
||||
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
|
||||
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
|
||||
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
|
||||
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
|
||||
|
||||
handle_extension() {
|
||||
case "${FILE_EXTENSION_LOWER}" in
|
||||
## Archive
|
||||
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
|
||||
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
|
||||
atool --list -- "${FILE_PATH}" && exit 5
|
||||
bsdtar --list --file "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
rar)
|
||||
## Avoid password prompt by providing empty password
|
||||
unrar lt -p- -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
7z)
|
||||
## Avoid password prompt by providing empty password
|
||||
7z l -p -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## PDF
|
||||
pdf)
|
||||
## Preview as text conversion
|
||||
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
|
||||
fmt -w "${PV_WIDTH}" && exit 5
|
||||
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
|
||||
fmt -w "${PV_WIDTH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## BitTorrent
|
||||
torrent)
|
||||
transmission-show -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## OpenDocument
|
||||
odt|ods|odp|sxw)
|
||||
## Preview as text conversion
|
||||
odt2txt "${FILE_PATH}" && exit 5
|
||||
## Preview as markdown conversion
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## XLSX
|
||||
xlsx)
|
||||
## Preview as csv conversion
|
||||
## Uses: https://github.com/dilshod/xlsx2csv
|
||||
xlsx2csv -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## HTML
|
||||
htm|html|xhtml)
|
||||
## Preview as text conversion
|
||||
w3m -dump "${FILE_PATH}" && exit 5
|
||||
lynx -dump -- "${FILE_PATH}" && exit 5
|
||||
elinks -dump "${FILE_PATH}" && exit 5
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
;;
|
||||
|
||||
## JSON
|
||||
json)
|
||||
jq --color-output . "${FILE_PATH}" && exit 5
|
||||
python -m json.tool -- "${FILE_PATH}" && exit 5
|
||||
;;
|
||||
|
||||
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
|
||||
## by file(1).
|
||||
dff|dsf|wv|wvc)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
;; # Continue with next handler on failure
|
||||
esac
|
||||
}
|
||||
|
||||
handle_image() {
|
||||
## Size of the preview if there are multiple options or it has to be
|
||||
## rendered from vector graphics. If the conversion program allows
|
||||
## specifying only one dimension while keeping the aspect ratio, the width
|
||||
## will be used.
|
||||
local DEFAULT_SIZE="1920x1080"
|
||||
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
## SVG
|
||||
# image/svg+xml|image/svg)
|
||||
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## DjVu
|
||||
# image/vnd.djvu)
|
||||
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
|
||||
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
## Image
|
||||
image/*)
|
||||
local orientation
|
||||
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
|
||||
## If orientation data is present and the image actually
|
||||
## needs rotating ("1" means no rotation)...
|
||||
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
|
||||
## ...auto-rotate the image according to the EXIF data.
|
||||
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
|
||||
fi
|
||||
|
||||
## `w3mimgdisplay` will be called for all images (unless overriden
|
||||
## as above), but might fail for unsupported types.
|
||||
exit 7;;
|
||||
|
||||
## Video
|
||||
# video/*)
|
||||
# # Thumbnail
|
||||
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## PDF
|
||||
# application/pdf)
|
||||
# pdftoppm -f 1 -l 1 \
|
||||
# -scale-to-x "${DEFAULT_SIZE%x*}" \
|
||||
# -scale-to-y -1 \
|
||||
# -singlefile \
|
||||
# -jpeg -tiffcompression jpeg \
|
||||
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
|
||||
# && exit 6 || exit 1;;
|
||||
|
||||
|
||||
## ePub, MOBI, FB2 (using Calibre)
|
||||
# application/epub+zip|application/x-mobipocket-ebook|\
|
||||
# application/x-fictionbook+xml)
|
||||
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
|
||||
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
|
||||
# "${DEFAULT_SIZE%x*}" && exit 6
|
||||
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
|
||||
# >/dev/null && exit 6
|
||||
# exit 1;;
|
||||
|
||||
## Font
|
||||
application/font*|application/*opentype)
|
||||
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
|
||||
if fontimage -o "${preview_png}" \
|
||||
--pixelsize "120" \
|
||||
--fontname \
|
||||
--pixelsize "80" \
|
||||
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
|
||||
--text " abcdefghijklmnopqrstuvwxyz " \
|
||||
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
|
||||
--text " The quick brown fox jumps over the lazy dog. " \
|
||||
"${FILE_PATH}";
|
||||
then
|
||||
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
|
||||
&& rm "${preview_png}" \
|
||||
&& exit 6
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
## Preview archives using the first image inside.
|
||||
## (Very useful for comic book collections for example.)
|
||||
# application/zip|application/x-rar|application/x-7z-compressed|\
|
||||
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
|
||||
# local fn=""; local fe=""
|
||||
# local zip=""; local rar=""; local tar=""; local bsd=""
|
||||
# case "${mimetype}" in
|
||||
# application/zip) zip=1 ;;
|
||||
# application/x-rar) rar=1 ;;
|
||||
# application/x-7z-compressed) ;;
|
||||
# *) tar=1 ;;
|
||||
# esac
|
||||
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
|
||||
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
|
||||
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
|
||||
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
|
||||
#
|
||||
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
|
||||
# [ print(l, end='') for l in sys.stdin if \
|
||||
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
|
||||
# sort -V | head -n 1)
|
||||
# [ "$fn" = "" ] && return
|
||||
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
|
||||
#
|
||||
# [ "$tar" ] && tar --extract --to-stdout \
|
||||
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
|
||||
# [ "$bsd" ] && bsdtar --extract --to-stdout \
|
||||
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
|
||||
# "${IMAGE_CACHE_PATH}" && exit 6
|
||||
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
|
||||
# ;;
|
||||
esac
|
||||
|
||||
# openscad_image() {
|
||||
# TMPPNG="$(mktemp -t XXXXXX.png)"
|
||||
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
|
||||
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
|
||||
# -o "${TMPPNG}" "${1}"
|
||||
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
|
||||
# }
|
||||
|
||||
# case "${FILE_EXTENSION_LOWER}" in
|
||||
# ## 3D models
|
||||
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
|
||||
# ## is hardcoded as jpeg. So we make a tempfile.png and just
|
||||
# ## move/rename it to jpg. This works because image libraries are
|
||||
# ## smart enough to handle it.
|
||||
# csg|scad)
|
||||
# openscad_image "${FILE_PATH}" && exit 6
|
||||
# ;;
|
||||
# 3mf|amf|dxf|off|stl)
|
||||
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
|
||||
# ;;
|
||||
# esac
|
||||
}
|
||||
|
||||
handle_mime() {
|
||||
local mimetype="${1}"
|
||||
case "${mimetype}" in
|
||||
## RTF and DOC
|
||||
text/rtf|*msword)
|
||||
## Preview as text conversion
|
||||
## note: catdoc does not always work for .doc files
|
||||
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||
catdoc -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## DOCX, ePub, FB2 (using markdown)
|
||||
## You might want to remove "|epub" and/or "|fb2" below if you have
|
||||
## uncommented other methods to preview those formats
|
||||
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
|
||||
## Preview as markdown conversion
|
||||
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## XLS
|
||||
*ms-excel)
|
||||
## Preview as csv conversion
|
||||
## xls2csv comes with catdoc:
|
||||
## http://www.wagner.pp.ru/~vitus/software/catdoc/
|
||||
xls2csv -- "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Text
|
||||
text/* | */xml)
|
||||
## Syntax highlight
|
||||
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
if [[ "$( tput colors )" -ge 256 ]]; then
|
||||
local pygmentize_format='terminal256'
|
||||
local highlight_format='xterm256'
|
||||
else
|
||||
local pygmentize_format='terminal'
|
||||
local highlight_format='ansi'
|
||||
fi
|
||||
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
|
||||
--out-format="${highlight_format}" \
|
||||
--force -- "${FILE_PATH}" && exit 5
|
||||
env COLORTERM=8bit bat --color=always --style="plain" \
|
||||
-- "${FILE_PATH}" && exit 5
|
||||
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
|
||||
-- "${FILE_PATH}" && exit 5
|
||||
exit 2;;
|
||||
|
||||
## DjVu
|
||||
image/vnd.djvu)
|
||||
## Preview as text conversion (requires djvulibre)
|
||||
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Image
|
||||
image/*)
|
||||
## Preview as text conversion
|
||||
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
|
||||
## Video and audio
|
||||
video/* | audio/*)
|
||||
mediainfo "${FILE_PATH}" && exit 5
|
||||
exiftool "${FILE_PATH}" && exit 5
|
||||
exit 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle_fallback() {
|
||||
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
|
||||
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
|
||||
handle_image "${MIMETYPE}"
|
||||
fi
|
||||
handle_extension
|
||||
handle_mime "${MIMETYPE}"
|
||||
handle_fallback
|
||||
|
||||
exit 1
|
7
config/rofi/config.rasi
Normal file
7
config/rofi/config.rasi
Normal file
|
@ -0,0 +1,7 @@
|
|||
/** Basic config file **/
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
icon-theme: "Papirus";
|
||||
}
|
||||
@import "/usr/share/rofi/themes/gruvbox-dark-hard.rasi"
|
330
emacs.d/init.el
Normal file
330
emacs.d/init.el
Normal file
|
@ -0,0 +1,330 @@
|
|||
;; No thanks
|
||||
(setq inhibit-startup-message t) ; Disable startup message
|
||||
(scroll-bar-mode -1) ; Disable visible scrollbar
|
||||
(tool-bar-mode -1) ; Disable the toolbar
|
||||
(tooltip-mode -1) ; Disable tooltips
|
||||
(set-fringe-mode 10) ; Give some breathing room
|
||||
(menu-bar-mode -1) ; Disable the menu bar
|
||||
(setq-default custom-file null-device) ; Write customizations not in this file to the null device (AKA stop littering in my init.el)
|
||||
|
||||
;; Visible bell
|
||||
(setq visible-bell t)
|
||||
|
||||
; Font
|
||||
(set-face-attribute 'default nil :font "Hack" :height 120)
|
||||
|
||||
;; Make ESC quit prompts
|
||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
|
||||
;; paren/bracket pairs
|
||||
(show-paren-mode t)
|
||||
(setq-default show-paren-style 'parenthesis)
|
||||
(electric-pair-mode 1)
|
||||
|
||||
;; Profile emacs startup
|
||||
(add-hook 'emacs-startup-hook
|
||||
(lambda ()
|
||||
(message "*** Emacs loaded in %s with %d garbage collections."
|
||||
(format "%.2f seconds"
|
||||
(float-time
|
||||
(time-subtract after-init-time before-init-time)))
|
||||
gcs-done)))
|
||||
|
||||
;; Change the user-emacs-directory to keep ~/.emacs.d clean
|
||||
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
|
||||
url-history-file (expand-file-name "url/history" user-emacs-directory))
|
||||
|
||||
;; No annoying Windows errors
|
||||
(set-default-coding-systems 'utf-8)
|
||||
|
||||
;; Improved scrolling
|
||||
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
|
||||
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
|
||||
(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse
|
||||
(setq scroll-step 1) ;; keyboard scroll one line at a time
|
||||
|
||||
;; Tabs
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
(setq indent-line-function 'insert-tab)
|
||||
|
||||
;;Line numbers
|
||||
(setq column-number-mode t)
|
||||
(dolist (mode '(text-mode-hook
|
||||
prog-mode-hook
|
||||
conf-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 1))))
|
||||
|
||||
;; Show vertical line at column 80 to keep code clean in prog-mode
|
||||
(setq-default fill-column 80)
|
||||
(add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)
|
||||
|
||||
; Override some modes which derive from the above
|
||||
(dolist (mode '(org-mode-hook))
|
||||
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
||||
|
||||
;; Initialize package sources
|
||||
(require 'package)
|
||||
|
||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("org" . "https://orgmode.org/elpa/")
|
||||
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
(package-initialize)
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
|
||||
;; Initialize use-package on non-Linux platforms
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-install 'use-package))
|
||||
|
||||
(require 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
|
||||
;;; Packages
|
||||
|
||||
;; Theme
|
||||
(setq custom-safe-themes t)
|
||||
|
||||
(use-package doom-themes
|
||||
:config
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t)
|
||||
(load-theme 'doom-gruvbox)
|
||||
(doom-themes-visual-bell-config)
|
||||
(setq doom-themes-treemacs-theme "doom-colors")
|
||||
(doom-themes-treemacs-config)
|
||||
(doom-themes-org-config))
|
||||
|
||||
;(use-package gruvbox-theme
|
||||
; :init
|
||||
; (load-theme 'gruvbox-dark-medium t))
|
||||
|
||||
;; Make grey look nicer
|
||||
(use-package solaire-mode
|
||||
:diminish
|
||||
:init
|
||||
(solaire-global-mode))
|
||||
|
||||
;; Icons
|
||||
(use-package all-the-icons)
|
||||
|
||||
;; Modeline
|
||||
(use-package minions
|
||||
:hook (doom-modeline-mode . minions-mode))
|
||||
|
||||
(use-package doom-modeline
|
||||
:init (doom-modeline-mode)
|
||||
:custom-face
|
||||
(mode-line ((t (:height 0.8))))
|
||||
(mode-line-inactive ((t (:height 0.75))))
|
||||
:custom
|
||||
(doom-modeline-height 30)
|
||||
(doom-modeline-bar-width 4)
|
||||
(doom-modeline-window-width-limit fill-column)
|
||||
(doom-modeline-lsp t)
|
||||
(doom-modeline-minor-modes t)
|
||||
(doom-modeline-persp-name nil)
|
||||
(doom-modeline-buffer-file-name-style 'truncate-upto-project)
|
||||
(doom-modeline-major-mode-icon t)
|
||||
(doom-modeline-major-mode-color-icon t)
|
||||
(doom-modeline-enable-word-count t)
|
||||
(doom-modeline-env-version t)
|
||||
(doom-modeline-env-load-string "..."))
|
||||
|
||||
;; Don't remind me about some minor modes
|
||||
(use-package diminish)
|
||||
|
||||
;; Automatically set paths to the new user-emacs-directory
|
||||
(use-package no-littering)
|
||||
|
||||
;; Automatically clean whitespace
|
||||
(use-package ws-butler
|
||||
:diminish
|
||||
:hook ((text-mode . ws-butler-mode)
|
||||
(prog-mode . ws-butler-mode)))
|
||||
|
||||
;; Overview of keybindings available based on prefix keys
|
||||
(use-package which-key
|
||||
:init (which-key-mode)
|
||||
:config
|
||||
(setq which-key-idle-delay 0.3))
|
||||
|
||||
;; Navigation: Ivy/Counsel/Swiper
|
||||
(use-package ivy
|
||||
:init
|
||||
(ivy-mode 1)
|
||||
:config
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
(setq ivy-wrap t)
|
||||
(setq ivy-count-format "(%d/%d) ")
|
||||
(setq enable-recursive-minibuffers t))
|
||||
|
||||
(use-package ivy-rich
|
||||
:after ivy
|
||||
:hook (counsel-mode . ivy-rich-mode)
|
||||
:config
|
||||
(setq ivy-rich-parse-remote-buffer nil))
|
||||
|
||||
(use-package counsel
|
||||
:after ivy
|
||||
:config
|
||||
(counsel-mode 1)
|
||||
(setq ivy-initial-inputs-alist nil))
|
||||
|
||||
(use-package swiper
|
||||
:after ivy
|
||||
:bind (("C-s" . swiper)))
|
||||
|
||||
(use-package treemacs
|
||||
:defer t
|
||||
:bind
|
||||
(:map global-map
|
||||
("M-0" . treemacs-select-window)
|
||||
("C-x t 1" . treemacs-delete-other-windows)
|
||||
("C-x t t" . treemacs)
|
||||
("C-x t B" . treemacs-bookmark)
|
||||
("C-x t C-t" . treemacs-find-file)
|
||||
("C-x t M-t" . treemacs-find-tag)))
|
||||
|
||||
(use-package lsp-treemacs
|
||||
:defer t
|
||||
:config
|
||||
(lsp-treemacs-sync-mode 1))
|
||||
|
||||
;; Git
|
||||
(use-package magit
|
||||
:bind ("C-M-;" . magit-status)
|
||||
:commands (magit-status magit-get-current-branch)
|
||||
:custom
|
||||
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
|
||||
|
||||
;; LSP & debugging
|
||||
|
||||
(use-package lsp-mode
|
||||
:init
|
||||
(setq lsp-keymap-prefix "C-c l")
|
||||
:commands (lsp lsp-deferred)
|
||||
:hook
|
||||
((c-mode . lsp)
|
||||
(c++-mode . lsp)
|
||||
(java-mode . lsp)
|
||||
(python-mode . lsp)
|
||||
(rust-mode . lsp)
|
||||
(tex-mode . lsp)
|
||||
(latex-mode . lsp)
|
||||
(zig-mode . lsp)
|
||||
(lsp-mode . lsp-enable-which-key-integration))
|
||||
:config
|
||||
(setq lsp-prefer-flymake nil)) ;; prefer lsp-ui (flycheck) to flymake
|
||||
; :bind
|
||||
; (:map lsp-mode-map
|
||||
; ("TAB" . completion-at-point)))
|
||||
|
||||
(use-package lsp-ui
|
||||
:requires lsp-mode flycheck
|
||||
:hook (lsp-mode . lsp-ui-mode)
|
||||
:commands lsp-ui-mode
|
||||
:config
|
||||
(setq lsp-ui-doc-enable t)
|
||||
(setq lsp-ui-doc-use-childframe t)
|
||||
(setq lsp-ui-doc-position 'bottom-and-right)
|
||||
(setq lsp-ui-doc-include-signature t)
|
||||
(setq lsp-ui-sideline-enable t)
|
||||
(setq lsp-ui-sideline-show-hover nil)
|
||||
(setq lsp-ui-flycheck-enable t)
|
||||
(setq lsp-ui-flycheck-list-position 'right)
|
||||
(setq lsp-ui-flycheck-live-reporting t)
|
||||
(setq lsp-ui-peek-enable t)
|
||||
(setq lsp-ui-peek-list-width 60)
|
||||
(setq lsp-ui-peek-peek-height 25)
|
||||
(lsp-ui-doc-show))
|
||||
|
||||
(use-package dap-mode
|
||||
:config
|
||||
(dap-ui-mode 1)
|
||||
(dap-tooltip-mode 1))
|
||||
|
||||
(use-package company
|
||||
:config
|
||||
(global-company-mode 1)
|
||||
:custom
|
||||
(company-idle-delay 0)
|
||||
(company-minimum-prefix-length 1)
|
||||
(company-tooltip-align-annotations t)
|
||||
:bind
|
||||
(:map company-active-map
|
||||
("RET" . nil)
|
||||
("[return]" . nil)
|
||||
("TAB" . company-complete-selection)
|
||||
("<tab>" . company-complete-selection)
|
||||
("C-n" . company-select-next)
|
||||
("C-p" . company-select-previous)))
|
||||
|
||||
;; Full terminal applications within Emacs
|
||||
(use-package vterm
|
||||
:commands vterm
|
||||
:config
|
||||
(setq vterm-max-scrollback 10000))
|
||||
|
||||
;;; Languages
|
||||
|
||||
;; C/C++
|
||||
(setq-default c-default-style "k&r")
|
||||
(setq-default c-basic-offset 2)
|
||||
|
||||
;(use-package ccls
|
||||
; :hook ((c-mode c++-mode objc-mode cuda-mode) .
|
||||
; (lambda () (require 'ccls) (lsp))))
|
||||
|
||||
;(use-package modern-cpp-font-lock
|
||||
; :config
|
||||
; (modern-c++-font-lock-global-mode))
|
||||
|
||||
;; Java
|
||||
|
||||
;(use-package lsp-java)
|
||||
|
||||
;; LaTeX
|
||||
|
||||
(use-package lsp-latex)
|
||||
|
||||
(setq lsp-tex-server 'digestif)
|
||||
|
||||
;; Python
|
||||
(use-package lsp-pyright
|
||||
:hook (python-mode . (lambda ()
|
||||
(require 'lsp-pyright)
|
||||
(lsp)))) ; or lsp-deferred
|
||||
|
||||
;; Rust
|
||||
|
||||
;(use-package rust-mode)
|
||||
|
||||
;; Zig
|
||||
|
||||
;(use-package zig-mode
|
||||
; :custom (zig-format-on-save nil)
|
||||
; :config
|
||||
; (add-to-list 'lsp-language-id-configuration '(zig-mode . "zig"))
|
||||
; (make-lsp-client
|
||||
; :new-connection (lsp-stdio-connection "/usr/bin/zls")
|
||||
; :major-modes '(zig-mode)
|
||||
; :server-id 'zls))
|
||||
|
||||
;; Syntax checking
|
||||
(use-package flycheck
|
||||
:hook (lsp-mode . flycheck-mode))
|
||||
|
||||
;; Templating
|
||||
(use-package yasnippet
|
||||
:bind
|
||||
("C-c y s" . yas-insert-snippet)
|
||||
("C-c y v" . yas-visit-snippet-file)
|
||||
:config
|
||||
(add-to-list 'yas-snippet-dirs "~/.emacs.d/snippets")
|
||||
(yas-reload-all)
|
||||
(yas-global-mode))
|
||||
|
||||
(use-package yasnippet-snippets)
|
||||
;;; End init.el
|
27
emacs.d/snippets/latex-mode/discrete-math-hw.yasnippet
Normal file
27
emacs.d/snippets/latex-mode/discrete-math-hw.yasnippet
Normal file
|
@ -0,0 +1,27 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key : 225
|
||||
# group: school
|
||||
# name : discrete math
|
||||
# --
|
||||
\documentclass[12pt,letterpaper]{article}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{setspace}
|
||||
\usepackage{parskip}
|
||||
\usepackage[margin=1in]{geometry}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{amsmath}
|
||||
|
||||
\linespread{1.25}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\large
|
||||
$1\\\\
|
||||
CS-225: Discrete Structures in CS\\\\
|
||||
Homework $2, Part $3\\\\
|
||||
Exercise Set $4: Problems $5
|
||||
$6
|
||||
\normalsize
|
||||
|
||||
|
||||
\end{document}
|
|
@ -0,0 +1,8 @@
|
|||
# -*- mode: snippet -*-
|
||||
# key : 161
|
||||
# group: school
|
||||
# name : cs hw header
|
||||
# --
|
||||
# Author: $1
|
||||
# Date: `(format-time-string "%m-%d-%Y")`$0
|
||||
# Description: $2
|
53
info/Packages.txt
Normal file
53
info/Packages.txt
Normal file
|
@ -0,0 +1,53 @@
|
|||
# List of basic packages I typically install. You may not need all of them.
|
||||
# Adjust as necessary.
|
||||
|
||||
# Arch repos
|
||||
bspwm
|
||||
sxhkd
|
||||
pulseaudio
|
||||
pulseaudio-bluetooth
|
||||
pavucontrol
|
||||
neofetch
|
||||
dunst
|
||||
gsimplecal
|
||||
dex
|
||||
feh
|
||||
emacs
|
||||
neovim
|
||||
kitty
|
||||
ranger
|
||||
rofi
|
||||
rxvt-unicode
|
||||
papirus-icon-theme
|
||||
ttf-font-awesome
|
||||
ttf-hack
|
||||
xsecurelock
|
||||
xss-lock
|
||||
polkit-gnome
|
||||
gnome-keyring
|
||||
xorg-xserver
|
||||
xorg-xinit
|
||||
xorg-xsetroot
|
||||
xorg-xrandr
|
||||
xorg-xset
|
||||
xclip
|
||||
maim
|
||||
xdotool
|
||||
dbus-pyton
|
||||
|
||||
# AUR
|
||||
polybar
|
||||
pulseaudio-control
|
||||
neovim-plug-git
|
||||
xidlehook
|
||||
gruvbox-dark-gtk
|
||||
spotify
|
||||
spotify-adblock-git
|
||||
polybar-spotify
|
||||
rofi-power-menu
|
||||
st
|
||||
|
||||
# Laptop/Thinkpads (for xbacklight etc., your needs may vary)
|
||||
acpi_call
|
||||
acpi_call-lts # only if LTS kernel installed, see 'acpi_call-dkms' for other variants
|
||||
acpilight # or 'light' is sometimes needed for older thinkpads
|
31
info/post-checkout
Normal file
31
info/post-checkout
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
### Post checkout hook to update .git/info/exclude with
|
||||
### branch specific .gitignore.[branch-name] files.
|
||||
### Copy to .git/hooks and chmod +x after fresh clone
|
||||
### to ensure proper .gitignore configuration.
|
||||
|
||||
branch_switched=$3
|
||||
|
||||
if [ "$branch_switched" != "1" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
echo "---- POST CHECKOUT ----"
|
||||
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
root_dir="$(pwd -P)"
|
||||
info_dir="$root_dir/.git/info"
|
||||
|
||||
exclude_target='.gitignore'
|
||||
if [ -f "$root_dir/$exclude_target.$current_branch" ]
|
||||
then
|
||||
echo "Prepare to use .gitignore.$current_branch as exclude file"
|
||||
exclude_target=.gitignore.$current_branch
|
||||
fi
|
||||
cd "$info_dir" || exit
|
||||
rm exclude
|
||||
#ln -s $exclude_target exclude
|
||||
echo "Copy .gitignore.$current_branch file in place of exclude"
|
||||
cp "$root_dir/$exclude_target" exclude
|
||||
echo "--- POST CHECKOUT END ---"
|
BIN
info/screenshots/dual-monitor-screenshot.png
Normal file
BIN
info/screenshots/dual-monitor-screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 435 KiB |
BIN
info/screenshots/screenshot.png
Normal file
BIN
info/screenshots/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
BIN
info/screenshots/screenshot2.png
Normal file
BIN
info/screenshots/screenshot2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 299 KiB |
2
profile
Normal file
2
profile
Normal file
|
@ -0,0 +1,2 @@
|
|||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/share/gem/ruby/3.0.0/bin:$PATH"
|
2
vimrc
Normal file
2
vimrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
source $VIMRUNTIME/defaults.vim
|
||||
set mouse-=a
|
52
xinitrc
Normal file
52
xinitrc
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
|
||||
userresources=$HOME/.Xresources
|
||||
usermodmap=$HOME/.Xmodmap
|
||||
sysresources=/etc/X11/xinit/.Xresources
|
||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||
|
||||
# merge in defaults and keymaps
|
||||
|
||||
if [ -f $sysresources ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
xrdb -merge $sysresources
|
||||
|
||||
fi
|
||||
|
||||
if [ -f $sysmodmap ]; then
|
||||
xmodmap $sysmodmap
|
||||
fi
|
||||
|
||||
if [ -f "$userresources" ]; then
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
xrdb -merge "$userresources"
|
||||
|
||||
fi
|
||||
|
||||
if [ -f "$usermodmap" ]; then
|
||||
xmodmap "$usermodmap"
|
||||
fi
|
||||
|
||||
# start some nice programs
|
||||
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
xsetroot -cursor_name left_ptr &
|
||||
exec bspwm
|
Loading…
Reference in a new issue