Cleanup unused files

This commit is contained in:
tristaan
2023-11-11 20:00:39 +01:00
parent c63319a6a1
commit 473c43a508
43 changed files with 48 additions and 3302 deletions

View File

@@ -18,8 +18,8 @@ env:
# (changes require restart)
window:
dimensions:
columns: 80
lines: 24
columns: 100
lines: 30
# Adds this many blank pixels of padding around the window
# Units are physical pixels; this is not DPI aware.

View File

@@ -1,361 +0,0 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
# If this property is not set, alacritty will set it to xterm-256color.
#
# Note that some xterm terminfo databases don't declare support for italics.
# You can verify this by checking for the presence of `smso` and `sitm` in
# `infocmp xterm-256color`.
TERM: xterm-256color
# Window dimensions in character columns and lines
# Falls back to size specified by window manager if set to 0x0.
# (changes require restart)
window:
dimensions:
columns: 80
lines: 24
# Adds this many blank pixels of padding around the window
# Units are physical pixels; this is not DPI aware.
# (change requires restart)
padding:
x: 2
y: 0
# Display tabs using this many cells (changes require restart)
tabspaces: 4
# When true, bold text is drawn using the bright variant of colors.
draw_bold_text_with_bright_colors: true
# Font configuration (changes require restart)
#
# Important font attributes like antialiasing, subpixel aa, and hinting can be
# controlled through fontconfig. Specifically, the following attributes should
# have an effect:
#
# * hintstyle
# * antialias
# * lcdfilter
# * rgba
#
# For instance, if you wish to disable subpixel antialiasing, you might set the
# rgba property to "none". If you wish to completely disable antialiasing, you
# can set antialias to false.
#
# Please see these resources for more information on how to use fontconfig
#
# * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration
# * file:///usr/share/doc/fontconfig/fontconfig-user.html
font:
# The normal (roman) font face to use.
normal:
family: "xos4 Terminess Powerline" # should be "Menlo" or something on macOS.
# Style can be specified to pick a specific face.
style: Regular
# The bold font face
bold:
family: "xos4 Terminess Powerline" # should be "Menlo" or something on macOS.
# Style can be specified to pick a specific face.
style: Bold
# The italic font face
italic:
family: "xos4 Terminess Powerline" # should be "Menlo" or something on macOS.
# Style can be specified to pick a specific face.
# style: Italic
# Point size of the font
size: 18.0
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
offset:
x: 0
y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increase the x offset to move the glyph to
# the right, increase the y offset to move the glyph upward.
glyph_offset:
x: 0
y: 0
# OS X only: use thin stroke font rendering. Thin strokes are suitable
# for retina displays, but for non-retina you probably want this set to
# false.
use_thin_strokes: true
# Should display the render timer
render_timer: false
# Colors (Tomorrow Night Bright)
colors:
# Default colors
primary:
background: '0x1d1f21'
foreground: '0xd1d4d2'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x1d1f21'
cursor: '0xd1d4d2'
# Normal colors
normal:
black: '0x1d1d1d'
red: '0xd73555'
green: '0x35d755'
yellow: '0xd7d755'
blue: '0x3555d7'
magenta: '0xd755d7'
cyan: '0x55b7b7'
white: '0xe7e7e7'
# Bright colors
bright:
black: '0x303030'
red: '0xc76484'
green: '0x64c784'
yellow: '0xc7c784'
blue: '0x6484c7'
magenta: '0x7355d7'
cyan: '0x84c7c7'
white: '0xd7d7d7'
# Dim colors (Optional)
dim:
black: '0x050505'
red: '0xf2777a'
green: '0x99cc99'
yellow: '0xffcc66'
blue: '0x6699cc'
magenta: '0xcc99cc'
cyan: '0x66cccc'
white: '0xdddddd'
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Possible values for `animation`
# `Ease`
# `EaseOut`
# `EaseOutSine`
# `EaseOutQuad`
# `EaseOutCubic`
# `EaseOutQuart`
# `EaseOutQuint`
# `EaseOutExpo`
# `EaseOutCirc`
# `Linear`
#
# To completely disable the visual bell, set its duration to 0.
#
visual_bell:
animation: EaseOutExpo
duration: 0
# Background opacity
background_opacity: 1.0
# Mouse bindings
#
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
# be specified.
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy (TODO)
mouse_bindings:
- { mouse: Middle, action: PasteSelection }
mouse:
double_click: { threshold: 300 }
triple_click: { threshold: 300 }
hide_when_typing: true
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
# Style of the cursor
#
# Values for 'cursor_style':
# - Block
# - Underline
# - Beam
cursor:
style: Block
# Live config reload (changes require restart)
live_config_reload: true
# Shell
#
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
# Entries in shell.args are passed unmodified as arguments to the shell.
# shell:
# program: /bin/bash
# args:
# - --login
# Key bindings
#
# Each binding is defined as an object with some properties. Most of the
# properties are optional. All of the alphabetical keys should have a letter for
# the `key` value such as `V`. Function keys are probably what you would expect
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
# etc. These all match the glutin::VirtualKeyCode variants.
#
# Possible values for `mods`
# `Command`, `Super` refer to the super/command/windows key
# `Control` for the control key
# `Shift` for the Shift key
# `Alt` and `Option` refer to alt/option
#
# mods may be combined with a `|`. For example, requiring control and shift
# looks like:
#
# mods: Control|Shift
#
# The parser is currently quite sensitive to whitespace and capitalization -
# capitalization must match exactly, and piped items must not have whitespace
# around them.
#
# Either an `action`, `chars`, or `command` field must be present.
# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`.
# `chars` writes the specified string every time that binding is activated.
# These should generally be escape sequences, but they can be configured to
# send arbitrary strings of bytes.
# `command` must be a map containing a `program` string, and `args` array of
# strings. For example:
# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } }
#
# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence
# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux,
# then run `showkey -a` to get the sequence associated to a key combination.
key_bindings:
- { key: V, mods: Control|Shift, action: Paste }
- { key: C, mods: Control|Shift, action: Copy }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: Insert, mods: Shift, action: PasteSelection }
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Subtract, mods: Control, action: DecreaseFontSize }
- { key: Home, chars: "\x1bOH", mode: AppCursor }
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
- { key: End, chars: "\x1bOF", mode: AppCursor }
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
- { key: PageUp, chars: "\x1b[5~" }
#- { key: PageUp, mods: Shift, action: PageUp }
#- { key: PageDown, mods: Shift, action: PageDown }
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
- { key: PageDown, chars: "\x1b[6~" }
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
- { key: Insert, chars: "\x1b[2~" }
- { key: Delete, chars: "\x1b[3~" }
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
- { key: Left, chars: "\x1bOD", mode: AppCursor }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
- { key: Right, chars: "\x1bOC", mode: AppCursor }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
- { key: Up, chars: "\x1bOA", mode: AppCursor }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
- { key: Down, chars: "\x1bOB", mode: AppCursor }
- { key: F1, chars: "\x1bOP" }
- { key: F2, chars: "\x1bOQ" }
- { key: F3, chars: "\x1bOR" }
- { key: F4, chars: "\x1bOS" }
- { key: F5, chars: "\x1b[15~" }
- { key: F6, chars: "\x1b[17~" }
- { key: F7, chars: "\x1b[18~" }
- { key: F8, chars: "\x1b[19~" }
- { key: F9, chars: "\x1b[20~" }
- { key: F10, chars: "\x1b[21~" }
- { key: F11, chars: "\x1b[23~" }
- { key: F12, chars: "\x1b[24~" }
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
- { key: F1, mods: Super, chars: "\x1b[1;3P" }
- { key: F2, mods: Super, chars: "\x1b[1;3Q" }
- { key: F3, mods: Super, chars: "\x1b[1;3R" }
- { key: F4, mods: Super, chars: "\x1b[1;3S" }
- { key: F5, mods: Super, chars: "\x1b[15;3~" }
- { key: F6, mods: Super, chars: "\x1b[17;3~" }
- { key: F7, mods: Super, chars: "\x1b[18;3~" }
- { key: F8, mods: Super, chars: "\x1b[19;3~" }
- { key: F9, mods: Super, chars: "\x1b[20;3~" }
- { key: F10, mods: Super, chars: "\x1b[21;3~" }
- { key: F11, mods: Super, chars: "\x1b[23;3~" }
- { key: F12, mods: Super, chars: "\x1b[24;3~" }

View File

@@ -1,203 +0,0 @@
conky.config = {
-------------------------------------
-- Generic Settings
-------------------------------------
background=false,
update_interval=1,
double_buffer=true,
no_buffers=true,
imlib_cache_size=10,
draw_shades=false,
draw_outline=false,
draw_borders=false,
draw_graph_borders=false,
default_graph_height=26,
default_graph_width=80,
show_graph_scale=false,
show_graph_range=false,
-------------------------------------
-- Window Specifications
-------------------------------------
-- gap_x=100,
-- gap_y=70,
minimum_height=620,
minimum_width=268,
own_window=true,
own_window_type="override",
own_window_transparent=true,
own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager",
border_inner_margin=0,
border_outer_margin=0,
alignment="top_right",
--own_window_argb_visual=true,
--own_window_argb_value=0,
-------------------------------------
-- Text Settings
-------------------------------------
use_xft=true,
xftalpha=1,
font="Droid Sans:size=8",
text_buffer_size=256,
override_utf8_locale=true,
short_units=true,
short_units=true,
pad_percents=2,
top_name_width=7,
-------------------------------------
-- Color Scheme
-------------------------------------
default_color="FFFFFF",
color1="FFFFFF",
color2="FFFFFF",
color3="FFFFFF",
color4="FFFFFF",
color5="DCDCDC",
color6="FFFFFF",
color7="FFFFFF",
color8="FFFFFF",
-------------------------------------
-- API Key
-------------------------------------
template6="2a44967bd3377edc7fe39db81c72e0d8",
-------------------------------------
-- City ID
-------------------------------------
template7="3196359",
-------------------------------------
-- Temp Unit (default, metric, imperial)
-------------------------------------
template8="metric",
-------------------------------------
-- Locale (e.g. "es_ES.UTF-8")
-- Leave empty for default
-------------------------------------
template9=""
}
---------------------------------------------------
---------------------------------------------------
conky.text = [[
\
\
${execi 300 ~/.harmattan-assets/get_weather ${template6} ${template7} ${template8} ${template9}}\
\
\
\
\
\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-v.png -p 95,185 -s 1x76}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-v.png -p 172,185 -s 1x76}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-h.png -p 33,90 -s 202x1}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-h.png -p 33,176 -s 202x1}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-h.png -p 33,269 -s 202x1}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-h.png -p 33,369 -s 202x1}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/separator-h.png -p 33,474 -s 202x1}\
\
\
\
\
${color3}${voffset 187}${alignc 77}${execi 300 LANG=${template9} LC_TIME=${template9} date +%^a}${color}
${color3}${voffset -13}${alignc}${execi 300 LANG=${template9} LC_TIME=${template9} date -d +1day +%^a}${color}
${color3}${voffset -13}${alignc -77}${execi 300 LANG=${template9} LC_TIME=${template9} date -d +2day +%^a}${color}
\
\
\
\
${color2}${voffset 51}${alignc 77}${execi 300 ~/.harmattan-assets/parse_weather 'avg' '.main.temp_min' '0'}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}/${execi 300 ~/.harmattan-assets/parse_weather 'avg' '.main.temp_max' '0'}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}${color}
${color2}${voffset -13}${alignc}${execi 300 ~/.harmattan-assets/parse_weather 'avg' '.main.temp_min' '1'}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}/${execi 300 ~/.harmattan-assets/parse_weather 'avg' '.main.temp_max' '1'}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}${color}
${color2}${voffset -13}${alignc -77}${execi 300 ~/.harmattan-assets/parse_weather 'avg' '.main.temp_min' '2'}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}/${execi 300 ~/.harmattan-assets/parse_weather 'avg' '.main.temp_max' '2'}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}${color}
\
\
\
\
${goto 36}${voffset -172}${font Droid Sans :size=36}${color1}${execi 300 jq -r .main.temp ~/.cache/harmattan-conky/weather.json | awk '{print int($1+0.5)}' # round num}${if_match "$template8" == "metric"} °C${else}${if_match "$template8" == "imperial"} °F${else}${if_match "$template8" == "default"} K${endif}${endif}${endif}${font}${color}
${goto 46}${voffset 14}${font Droid Sans :size=12}${color1}${execi 300 jq -r .weather[0].description ~/.cache/harmattan-conky/weather.json | sed "s|\<.|\U&|g"}${font}${color}
${color1}${alignr 62}${voffset -73}${execi 300 jq -r .main.pressure ~/.cache/harmattan-conky/weather.json | awk '{print int($1+0.5)}' # round num} hPa
${color1}${alignr 62}${voffset 7}${execi 300 jq -r .main.humidity ~/.cache/harmattan-conky/weather.json | awk '{print int($1+0.5)}' # round num} %${color}
${color1}${alignr 62}${voffset 7}${execi 300 jq -r .wind.speed ~/.cache/harmattan-conky/weather.json | awk '{print int($1+0.5)}' # round num}${if_match "$template8" == "metric"} m/s${else}${if_match "$template8" == "default"} m/s${else}${if_match "$template8" == "imperial"} mi/h${endif}${endif}${endif}${color}
\
\
\
\
${voffset -117}${font Droid Sans Mono :size=22}${alignc}${color2}${time %H:%M}${font}${color}
${voffset 4}${font Droid Sans :size=10}${alignc}${color6}${execi 300 LANG=${template9} LC_TIME=${template9} date +"%A, %B %-d"}${font}${color}
\
\
\
\
${voffset 294}${goto 40}${color2}Cpu:${color}
${voffset 4}${goto 40}${color2}Mem:${color}
${voffset 4}${goto 40}${color2}Uptime:${color}
${voffset -47}${alignr 39}${color2}${cpu cpu0}%${color}
${voffset 4}${alignr 39}${color2}${memperc}%${color}
${voffset 4}${alignr 39}${color2}${uptime_short}${color}
${voffset -47}${alignc}${color2}${cpubar 5,36}${color}
${voffset 4}${alignc}${color2}${membar 5,36}${color}
${voffset 29}${goto 40}${loadgraph 26,190 FFFFFF FFFFFF -l}
\
\
\
\
${voffset 26}${goto 40}${color2}${top_mem name 1}${color}
${voffset 4}${goto 40}${color2}${top_mem name 2}${color}
${voffset 4}${goto 40}${color2}${top_mem name 3}${color}
${voffset 4}${goto 40}${color2}${top_mem name 4}${color}
${voffset 4}${goto 40}${color2}${top_mem name 5}${color}
${voffset -81}${alignc}${color5}${top_mem mem 1}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 2}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 3}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 4}%${color}
${voffset 4}${alignc}${color5}${top_mem mem 5}%${color}
${voffset -81}${alignr 39}${color6}${top_mem mem_res 1}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 2}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 3}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 4}${color}
${voffset 4}${alignr 39}${color6}${top_mem mem_res 5}${color}
${voffset -104}${goto 40}${color1}Proc${color}
${voffset -13}${alignc}${color1}Mem%${color}
${voffset -13}${alignr 39}${color1}Mem${color}
\
\
\
\
${if_existing /proc/net/route enp11s0}
${voffset -230}${goto 40}${color5}Up: ${color2}${upspeed enp11s0}${color5}${goto 150}Down: ${color2}${downspeed enp11s0}
${voffset 10}${goto 40}${upspeedgraph enp11s0 26,80 FFFFFF FFFFFF}${goto 150}${downspeedgraph enp11s0 26,80 FFFFFF FFFFFF}
${voffset 9}${goto 40}${color5}Sent: ${color2}${totalup enp11s0}${color5}${goto 150}Received: ${color2}${totaldown enp11s0}
${else}
${voffset -311}${goto 40}${color5}Network disconnected${color}
${image ~/.harmattan-assets/misc/Transparent/God-Mode/offline.png -p 44,284 -s 16x16}
${endif}
\
\
\
\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/pressure.png -p 210,95 -s 16x16}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/humidity.png -p 210,115 -s 16x16}\
${image ~/.harmattan-assets/misc/Transparent/God-Mode/wind-2.png -p 210,136 -s 16x16}\
${execi 300 cp -f ~/.harmattan-assets/icons/#fff__32/$(~/.harmattan-assets/parse_weather 'first' '.weather[0].id' '0').png ~/.cache/harmattan-conky/weather-1.png}${image ~/.cache/harmattan-conky/weather-1.png -p 41,207 -s 32x32}\
${execi 300 cp -f ~/.harmattan-assets/icons/#fff__32/$(~/.harmattan-assets/parse_weather 'first' '.weather[0].id' '1').png ~/.cache/harmattan-conky/weather-2.png}${image ~/.cache/harmattan-conky/weather-2.png -p 119,207 -s 32x32}\
${execi 300 cp -f ~/.harmattan-assets/icons/#fff__32/$(~/.harmattan-assets/parse_weather 'first' '.weather[0].id' '2').png ~/.cache/harmattan-conky/weather-3.png}${image ~/.cache/harmattan-conky/weather-3.png -p 195,207 -s 32x32}${font}${voffset -120}\
]]

View File

@@ -1,245 +0,0 @@
[global]
font = Hack-Regular 9
# Allow a small subset of html markup:
# <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>.
# If markup is not allowed, those tags will be stripped out of the
# message.
allow_markup = yes
# 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
# Markup is allowed
format = "<b>%s</b>\n%b"
# Sort messages by urgency.
sort = yes
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# The frequency with wich text that is longer than the notification
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 0
# 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
# Ignore newlines '\n' in notifications.
ignore_newline = no
# 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 respectevly.
# 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 = "300x10-20+30"
# 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 windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 0
# 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.
idle_threshold = 120
# 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 windowmanager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern windowmanagers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
# 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
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
# The height of a single line. If the height is smaller than the
# font height, it will get raised to the font height.
# This adds empty space above and under the text.
line_height = 0
# Draw a line of "separatpr_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 2
# Padding between text and separator.
padding = 4
# Horizontal padding.
horizontal_padding = 4
# 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
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = false
# dmenu path.
dmenu = /usr/bin/rofi -dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/firefox-nightly -new-tab
# Align icons left/right/off
icon_position = left
# Paths to default icons.
icon_folders = /usr/share/icons/Numix-Circle/16/panel:/usr/share/icons/Numix/16/devices:/usr/share/icons/Numix/16/status
[frame]
width = 3
color = "#225396"
[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 = mod4+mod2+space
# Close all notifications.
# close_all = mod4+mod2+shift+space
# Redisplay last message(s).
# On the US keyboard layout "grave" is normally above TAB and left
# of "1".
# history = mod4+mod2+grave
# Context menu.
# context = mod4+mod2+shift+period
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#0c0c0c"
foreground = "#ffffff"
timeout = 10
[urgency_normal]
background = "#15325A"
foreground = "#ffffff"
timeout = 10
[urgency_critical]
background = "#CC0033"
foreground = "#ffffff"
timeout = 0
# 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", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# 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.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[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
#
# vim: ft=cfg

Binary file not shown.

View File

@@ -1,234 +0,0 @@
# T's desktop v3
#exec --no-stratup-id xrandr --output eDP1 --primary --auto
#exec --no-startup-id xrandr --output HDMI-0 --auto --mode 2048x1152 --primary
exec_always --no-startup-id $HOME/.config/i3/scripts/polybar_launch.sh
exec --no-startup-id compton -G -b
#exec --no-startup-id mplayer -fs $HOME/.i3/boot.mp4
#exec --no-startup-id conky -c $HOME/.config/conky/conkyrc
exec --no-startup-id xset -dpms && xset s noblank && xset s noexpose && xset dpms 600 1800 360
exec --no-startup-id synclient TapButton1=1
exec xautolock -time 10 -locker $HOME/config/i3/scripts/locker.sh
#exec xautolock -locknow
#DAEMONS
exec --no-startup-id udiskie -t
exec --no-startup-id nitrogen --restore
exec --no-startup-id dunst
#exec --no-startup-id mpd
#exec --no-startup-id megasync
#exec --no-startup-id parcellite
exec --no-startup-id blueman-applet
#Layout
exec setxkbmap us altgr-intl
#exec xmodmap $HOME/.i3/custom.map
#exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings
exec--no-startup-id gnome-power-manager
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
#exec --no-startup-id gnome-flashback
font pango: xos4 Terminus, Font Awesome 5 Free, Font Awesome 5 Brands 12
#--APPEARANCE--#
#-----T-i3-----#
#class border backgr. text indicator
client.focused #f8f8f2 #f8f8f2 #44475a #bd93f9
client.focused_inactive #44475a #44475a #ffffff #6272a4
client.urgent #ff79c6 #900000 #ffffff #900000
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #ffffff
#//APPEARANCE//#
set $mod Mod4
set $alt Mod1
set $m Mod3
#--WINDOW-SETTINGS--#
floating_modifier $mod
for_window [class=".*"] title_format "-> %title"
for_window [class=".*"] border pixel 2
for_window [class="Pavucontrol"] floating enable
for_window [class="octopi"] floating enable
for_window [class="lxappearance"] floating enable
for_window [class="mojo"] floating enable
for_window [class="nitrogen"] floating enable
for_window [title="Hold On*"] floating enable
for_window [title="Cerebro*"] floating enable
for_window [title="florence"] floating enable
for_window [title="Starting Unity...*"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
assign [class="^ranger$"] → $WS4
assign [title="^ncmpcpp$"] → $WS5
assign [class="^URxvt$"] → $WS3
assign [class="^Termite$"] → $WS3
assign [class="^Alacritty$"] → $WS3
assign [class="^Firefox$"] → $WS2
assign [class="^Steam*"] → $WSW2
assign [class="^Gimp$"] → $WSW4
#//WINDOW-SETTINGS//#
#--CONTAINERS+WINDOWS--#
bindsym $mod+Shift+q kill
bindsym --release button2 kill
bindsym $mod+f fullscreen toggle
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+p focus parent
bindsym $mod+a layout toggle split
bindsym $mod+s layout stacking
bindsym $mod+v layout tabbed
bindsym $mod+x split h
bindsym $mod+c split v
bindsym $mod+u border pixel 4
bindsym $mod+Shift+space floating toggle
#//CONTAINERS+WINDOWS//#
#--CUSTOM COMMANDS--#
#KEYBOARD LAYOUT SWITCHING
bindsym $mod+space exec --no-startup-id ~/.config/i3/scripts/kbd_layout.sh
#LAUNCH PROGRAM
bindsym $mod+d exec --no-startup-id rofi -color-enabled -show run -font "xos4 Terminus 18"
bindsym $mod+Shift+d exec --no-startup-id rofi -show drun -font "xos4 Terminus 18" -o 85 -p "Run:"
bindsym $alt+Tab exec --no-startup-id rofi -show window -font "xos4 Terminus 18"
bindsym $mod+t exec alacritty
bindsym $mod+w exec firefox
bindsym $mod+Shift+f exec alacritty --config-file "$HOME/.config/alacritty/alacritty_ranger.yml" -t ranger -e ranger ~
bindsym $mod+m exec alacritty -e ncmpcpp
#INTEGRATED-SETTINGS
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioStop exec mpc stop
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc previous
bindsym XF86AudioMute exec ~/.config/i3/scripts/volume_set.sh mute
bindsym XF86AudioRaiseVolume exec ~/.config/i3/scripts/volume_set.sh up
bindsym XF86AudioLowerVolume exec ~/.config/i3/scripts/volume_set.sh down
bindsym XF86MonBrightnessUp exec xbacklight +5
bindsym XF86MonBrightnessDown exec xbacklight -5
bindsym XF86KbdBrightnessUp exec asus-kbd-backlight up
bindsym XF86KbdBrightnessDown exec asus-kbd-backlight down
bindsym XF86Sleep exec ~/.config/i3/scripts/locker.sh & systemctl suspend
bindsym $mod+Shift+p exec ~/.config/i3/scripts/locker.sh & systemctl suspend
bindsym $mod+Shift+o exec ~/.config/i3/scripts/locker.sh
#SHUTDOWN+RESTART
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+z exec "i3-msg exit"
bindsym $mod+Shift+e exec ~/.config/i3/scripts/locker.sh
#//CUSTOM COMMANDS//#
#--WORKSPACES--#
workspace_auto_back_and_forth yes
workspace $WS1 output primary
#Primary workspaces
set $WS1 "1:"
set $WS2 "2:"
set $WS3 "3:"
set $WS4 "4:"
set $WS5 "5:"
bindsym $mod+1 workspace $WS1
bindsym $mod+2 workspace $WS2
bindsym $mod+3 workspace $WS3
bindsym $mod+4 workspace $WS4
bindsym $mod+5 workspace $WS5
bindsym $mod+Shift+1 move container to workspace $WS1
bindsym $mod+Shift+2 move container to workspace $WS2
bindsym $mod+Shift+3 move container to workspace $WS3
bindsym $mod+Shift+4 move container to workspace $WS4
bindsym $mod+Shift+5 move container to workspace $WS5
bindsym $m+1 workspace $WS1
bindsym $m+2 workspace $WS2
bindsym $m+3 workspace $WS3
bindsym $m+4 workspace $WS4
bindsym $m+5 workspace $WS5
bindsym $m+Shift+1 move container to workspace $WS1
bindsym $m+Shift+2 move container to workspace $WS2
bindsym $m+Shift+3 move container to workspace $WS3
bindsym $m+Shift+4 move container to workspace $WS4
bindsym $m+Shift+5 move container to workspace $WS5
#Secondary workspaces
set $WSW1 "6:"
set $WSW2 "7:"
set $WSW3 "8:"
set $WSW4 "9:"
bindsym $mod+F1 workspace $WSW1
bindsym $mod+F2 workspace $WSW2
bindsym $mod+F3 workspace $WSW3
bindsym $mod+F4 workspace $WSW4
bindsym $mod+Shift+F1 move container to workspace $WSW1
bindsym $mod+Shift+F2 move container to workspace $WSW2
bindsym $mod+Shift+F3 move container to workspace $WSW3
bindsym $mod+Shift+F4 move container to workspace $WSW4
bindsym $m+F1 workspace $WSW1
bindsym $m+F2 workspace $WSW2
bindsym $m+F3 workspace $WSW3
bindsym $m+F4 workspace $WSW4
bindsym $m+Shift+F1 move container to workspace $WSW1
bindsym $m+Shift+F2 move container to workspace $WSW2
bindsym $m+Shift+F3 move container to workspace $WSW3
bindsym $m+Shift+F4 move container to workspace $WSW4
#Multiple screens
bindsym $mod+Left move container to output left
bindsym $mod+Right move container to output right
bindsym $mod+Shift+Left move workspace to output left
bindsym $mod+Shift+Right move workspace to output right
bindsym $mod+Up move container to output up
bindsym $mod+Down move container to output down
bindsym $mod+Shift+Up move workspace to output up
bindsym $mod+Shift+Down move workspace to output down
#//WORKSPACES//#
#--BORDER--#
default_border pixel 2
default_floating_border normal 4
smart_borders on
gaps inner 4
gaps outer 10
smart_gaps on
#//BORDER//#
#--LAYOUTS--#
#bindsym $alt+Shift+l exec $HOME/.i3/scripts/workspace.sh "$HOME/.i3/layouts/workspace-3.json" "$HOME/build/doc24_backend"
#//LAYOUTS//#
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "ignore" {
bindsym $alt+Shift+i mode "default"
}
bindsym $alt+i mode "ignore"
# vim:filetype=i3

View File

@@ -1,6 +0,0 @@
clear mod4
clear mod3
keycode 94 = Hyper_L Hyper_L Hyper_L Hyper_L Hyper_L Hyper_L Hyper_L
keycode 135 = Super_R Super_R Super_R Super_R Super_R Super_R Super_R
add mod3 = Hyper_L
add mod4 = Super_L Super_R

View File

@@ -1,73 +0,0 @@
// vim:ts=4:sw=4:et
{
"border": "normal",
"current_border_width": 5,
"floating": "user_off",
"geometry": {
"height": 820,
"width": 210,
"x": 3599,
"y": 0
},
"name": "Layers - Brushes",
"percent": 0.1078125,
"swallows": [
{
// "class": "^Gimp$",
// "instance": "^gimp$",
// "title": "^Layers\\ \\-\\ Brushes$",
// "transient_for": "^$",
// "window_role": "^gimp\\-dock$"
}
],
"type": "con"
}
{
"border": "pixel",
"current_border_width": 5,
"floating": "user_off",
"geometry": {
"height": 200,
"width": 620,
"x": 410,
"y": 370
},
"name": "*[progress_bar] (imported)-1.0 (RGB color, 1 layer) 192x12 GIMP",
"percent": 0.777083333333333,
"swallows": [
{
// "class": "^Gimp$",
// "instance": "^gimp$",
// "title": "^\\*\\[progress_bar\\]\\ \\(imported\\)\\-1\\.0\\ \\(RGB\\ color\\,\\ 1\\ layer\\)\\ 192x12\\ \\\\ GIMP$",
// "transient_for": "^$",
// "window_role": "^gimp\\-image\\-window$"
}
],
"type": "con"
}
{
"border": "normal",
"current_border_width": 5,
"floating": "user_off",
"geometry": {
"height": 820,
"width": 170,
"x": 0,
"y": 0
},
"name": "Toolbox - Tool Options",
"percent": 0.115104166666667,
"swallows": [
{
// "class": "^Gimp$",
// "instance": "^gimp$",
// "title": "^Toolbox\\ \\-\\ Tool\\ Options$",
// "transient_for": "^$",
// "window_role": "^gimp\\-toolbox$"
}
],
"type": "con"
}

View File

@@ -1,101 +0,0 @@
// vim:ts=4:sw=4:et
{
// stacked split container with 2 children
"border": "pixel",
"floating": "auto_off",
"layout": "stacked",
"percent": 0.7,
"type": "con",
"nodes": [
{
"border": "none",
"current_border_width": 4,
"floating": "auto_off",
"geometry": {
"height": 768,
"width": 1024,
"x": 0,
"y": 0
},
"name": "tristan@T-i3: ~/build/doc24_backend",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^alacritty$"
}
],
"type": "con"
},
{
"border": "none",
"current_border_width": 4,
"floating": "auto_off",
"geometry": {
"height": 768,
"width": 1024,
"x": 0,
"y": 0
},
"name": "i3-save-tree --workspace 3 > ~/.i3/layouts/workspace-3.json",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^alacritty$"
}
],
"type": "con"
}
]
}
{
// splitv split container with 2 children
"border": "pixel",
"floating": "auto_off",
"layout": "splitv",
"percent": 0.3,
"type": "con",
"nodes": [
{
"border": "none",
"current_border_width": 4,
"floating": "auto_off",
"geometry": {
"height": 768,
"width": 1024,
"x": 0,
"y": 0
},
"name": "tristan@T-i3: ~",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$"
}
],
"type": "con"
},
{
"border": "none",
"current_border_width": 4,
"floating": "auto_off",
"geometry": {
"height": 768,
"width": 1024,
"x": 0,
"y": 0
},
"name": "tristan@T-i3: ~/build/doc24_backend",
"percent": 0.5,
"swallows": [
{
"class": "^Alacritty$"
}
],
"type": "con"
}
]
}

Binary file not shown.

Binary file not shown.

View File

@@ -1,8 +0,0 @@
#!/bin/sh
CURR_MAP=$(setxkbmap -query | grep layout | sed 's/layout: //g')
if [ "$CURR_MAP" = "si" ]
then
setxkbmap us altgr-intl
else
setxkbmap si
fi

View File

@@ -1,29 +0,0 @@
#!/bin/sh
ARGS=(
"--screen=0"
"--blur=5"
# "-i${HOME}/Pictures/bg_1440p/Linux-Wallpapers-19-2560-x-1920.png"
# "-i${HOME}/Pictures/backgrounds/0c7e1f_5775038.jpg"
"--clock"
"--timecolor=dfdfdfff"
"--datecolor=dfdfdfff"
"--insidevercolor=35d75588"
"--insidewrongcolor=d7355588"
"--insidecolor=00000000"
"--ringvercolor=64c784ff"
"--ringwrongcolor=c76484ff"
"--ringcolor=3555d7ff"
"--linecolor=00000000"
"--radius=30"
"--indpos=x+200:h-70"
"--timepos=x+90:h-70"
"--datepos=tx:ty+25"
"--statuspos=ix:iy+10"
"--separatorcolor=6484c7ff"
"--keyhlcolor=35d755ff"
"--bshlcolor=d73555ff"
"--veriftext=V" "--wrongtext=E")
i3lock "${ARGS[@]}" &
i3lockpid=$!
sleep 2

View File

@@ -1,23 +0,0 @@
#!/usr/bin/env sh
# 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
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
export COLOR_CYAN="#8be9fd"
export COLOR_BLUE="#6272a4"
export COLOR_GREEN="#50fa7b"
export LABEL_MOUNTED="%{F$COLOR_CYAN}%mountpoint%%{F-}:%free%"
export LABEL_NETWORK_CONNECTED="%{F$COLOR_CYAN}%local_ip%%{F-}:%downspeed:4%"
MONITOR=$m polybar --reload top &
MONITOR=$m polybar --reload bottom &
done
else
polybar --reload top &
fi
echo "Bars launched..."

View File

@@ -1,9 +0,0 @@
#! /bin/bash
WALLPAPERS="/home/tristan/Pictures/bg_1440p"
ALIST=( `ls -w1 $WALLPAPERS` )
RANGE=${#ALIST[@]}
let "number = $RANDOM"
let LASTNUM="`cat $WALLPAPERS/.last` + $number"
let "number = $LASTNUM % $RANGE"
echo $number > $WALLPAPERS/.last
nitrogen --set-scaled --save $WALLPAPERS/${ALIST[$number]}

View File

@@ -1,40 +0,0 @@
#!/bin/bash
#LOCKSCRIPT="i3lock-extra -m pixelize"
FG_COLOR="#d7d7d7"
BG_COLOR="#15325A"
SF_COLOR="#3555d7"
SB_COLOR="#6484c7"
color="-bg $BG_COLOR -fg $FG_COLOR -hlfg $SF_COLOR -hlbg $SB_COLOR -bw 0"
# menu defined as an associative array
typeset -A menu
# Menu with keys/commands
menu=(
[Shutdown]="systemctl poweroff"
[Reboot]="systemctl reboot"
[Hibernate]="systemctl hibernate"
[Suspend]="systemctl suspend"
[Halt]="systemctl halt"
[Lock]="~/.i3/scripts/locker.sh"
[Logout]="exit"
[Cancel]="Cancel"
)
# Menu entries that may trigger a confirmation message
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
launcher="rofi -dmenu -hide-scrollbar -width 10"
launcher_opt="-i -yoffset 23 -location 3 $color"
selection=$(printf '%s\n' ${!menu[@]} | sort | eval '$launcher $launcher_opt -font "Hack-Regular 12" -lines 8')
if [ $selection == "Cancel" ] || [ -z $selection ]; then
exit 1
else
if [[ ${menu_confirm[*]} =~ $selection ]]; then
confirm=$(printf 'Yes\nNo\n' | eval '$launcher $launcher_opt -l 2 -font "Hack-Regular 12"')
if [[ $confirm == 'Yes' ]]; then
i3-msg -q "exec ${menu[${selection}]}"
fi
else
i3-msg -q "exec ${menu[${selection}]}"
fi
fi

View File

@@ -1,7 +0,0 @@
#!/bin/bash
while getopts "d:" option; do
case "${option}" in
d)
alacritty --working-directory ${OPTARG} & ;;
esac
done

View File

@@ -1,18 +0,0 @@
#!/bin/bash
if [ "$1" == "up" ]
then
pulsemixer --change-volume +5
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
elif [ "$1" == "down" ]
then
pulsemixer --change-volume -5
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
elif [ "$1" == "mute" ]
then
pulsemixer --toggle-mute
TEXT="Mute: $(pulsemixer --get-mute | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
else
echo "usage volume_set.sh {up|down|mute}"
fi
dunstify -r 33223 "Volume changed" "$TEXT"

View File

@@ -1,13 +0,0 @@
#!/bin/zsh
#First arg is icon for WAN IP, Second argument is icon for local IP, third for offline
wanip=$(dig +short myip.opendns.com @resolver1.opendns.com);
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
echo "<span foreground='#00CC33'>$1</span>:$wanip"
else
wanip=$(ip addr show dev wlan0 | grep "inet " | awk '{print $2}')
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]; then
echo "<span foreground='#3300CC'>$2</span>:$wanip"
else
echo "<span foreground='#CC0033'>$3</span>"
fi
fi

View File

@@ -1,2 +0,0 @@
#!/bin/sh
i3-msg "append_layout $1" && bash $HOME/.i3/scripts/term_runner.sh -d "$2" -d "$2" -d "$2" -d "$HOME"

View File

@@ -1,351 +0,0 @@
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
black = #0a0a0a
dark_gray = #404040
white = #f2f8f8
blue = ${env:COLOR_BLUE}
cyan = ${env:COLOR_CYAN}
pink = #ff79c6
purple = #bd93f9
green = ${env:COLOR_GREEN}
orange = #ffb86c
red = #ff5555
yellow = #f1fa8c
;++++++++++++++++++++++
background = ${colors.dark_gray}
background-alt = ${colors.black}
foreground = ${colors.white}
foreground-alt = ${colors.white}
primary = ${colors.purple}
secondary = ${colors.white}
alert = ${colors.red}
[bar/top]
monitor = ${env:MONITOR}
width = 100%
height = 30
;offset-x = 1%
;offset-y = 1%
radius = 0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 1
line-color = #f00
border-size = 0
border-color = ${colors.background-alt}
spacing = 1
padding = 1
module-margin-left = 2
module-margin-right = 0
font-0 = "xos4 Terminess Powerline:pixelsize=16;3"
font-1 = "Font Awesome 5 Free:style=Solid:pixelsize=16;3"
font-2 = "Font Awesome 5 Brands:style=Regular:pixelsize=16;3"
modules-left = filesystem wired-network wireless-network volume
modules-center = xwindow
modules-right = battery xkeyboard date
tray-position = right
tray-padding = 0
tray-background = ${colors.background}
tray-transparent = true
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
cursor-click = pointer
cursor-scroll = ns-resize
[bar/bottom]
monitor = ${env:MONITOR}
bottom = true
width = 100%
height = 30
background = ${colors.background}
foreground = ${colors.foreground}
line-color = ${bar/top.background}
line-size = 2
font-0 = "xos4 Terminess Powerline:pixelsize=16;2"
font-1 = "Font Awesome 5 Free:style=Solid:pixelsize=16;3"
font-2 = "Font Awesome 5 Brands:style=Regular:pixelsize=16;3"
spacing = 0
padding = 1
module-margin-left = 1
module-margin-right = 1
modules-left = i3
modules-right = cpu memory powermenu
border-size = 0
border-color = ${colors.background}
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
strip-wsnumbers = true
; Only show workspaces on the same output as the bar
pin-workspaces = true
label-mode-padding = 1
label-mode-foreground = ${colors.foreground}
label-mode-background = ${colors.background-alt2}
; focused = Active workspace on focused monitor
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 1
; unfocused = Inactive workspace on any monitor
label-unfocused = %index%
label-unfocused-padding = 1
; visible = Active workspace on unfocused monitor
label-visible = %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; urgent = Workspace with urgency hint set
label-urgent = %index%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
format-foreground = ${colors.foreground-alt}
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = scroll lock
blacklist-2 = caps lock
label-layout = %layout%
[module/filesystem]
type = internal/fs
interval = 25
format-mounted = <label-mounted>
format-unmounted = <label-unmounted>
mount-0 = /
mount-2 = /home
mount-1 = /media
spacing = 1
label-mounted = ${env:LABEL_MOUNTED}
label-unmounted =
label-unmounted-foreground = ${colors.foreground-alt}
[module/cpu]
type = internal/cpu
interval = 2
format = <ramp-coreload>
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
ramp-coreload-0 = ▁
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
ramp-coreload-7 = █
[module/memory]
type = internal/memory
interval = 2
format = <bar-used>
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
label = %gb_used%/%gb_total%
bar-used-indicator =
bar-used-width = 12
bar-used-foreground-0 = ${colors.green}
bar-used-foreground-1 = ${colors.foreground}
bar-used-foreground-2 = ${colors.orange}
bar-used-foreground-3 = ${colors.red}
bar-used-fill = ▐
bar-used-empty = ▐
bar-used-empty-foreground = ${colors.foreground-alt}
[module/wireless-network]
type = internal/network
interface-type = wireless
interval = 1.0
udspeed-minwidth = 5
accumulate-stats = true
format-connected = %{A:networkmanager_dmenu&:}<ramp-signal> <label-connected>%{A}
format-disconnected = %{A:networkmanager_dmenu&:}<label-disconnected>%{A}
format-packetloss = <animation-packetloss> <label-connected>
label-connected = %essid%
label-connected-foreground = ${colors.green}
label-disconnected = %ifname%
label-disconnected-foreground = ${colors.alert}
ramp-signal-0 = ▁
ramp-signal-1 = ▃
ramp-signal-2 = ▄
ramp-signal-3 = ▅
ramp-signal-4 = ▆
ramp-signal-5 = █
; Only applies if <animation-packetloss> is used
animation-packetloss-0 = 
animation-packetloss-0-foreground = ${colors.yellow}
animation-packetloss-1 = 
animation-packetloss-1-foreground = ${colors.foreground-alt}
; Framerate in milliseconds
animation-packetloss-framerate = 500
[module/wired-network]
type = internal/network
interface-type = wired
interval = 2
udspeed-minwidth = 2
accumulate-stats = true
format-connected = <label-connected>
format-disconnected = <label-disconnected>
format-packetloss = <animation-packetloss> <label-connected>
label-connected = ${env:LABEL_NETWORK_CONNECTED}
label-connected-foreground = ${colors.green}
label-disconnected = %ifname%
label-disconnected-foreground = ${colors.alert}
; Only applies if <animation-packetloss> is used
animation-packetloss-0 = 
animation-packetloss-0-foreground = ${colors.yellow}
animation-packetloss-1 = 
animation-packetloss-1-foreground = ${colors.foreground-alt}
; Framerate in milliseconds
animation-packetloss-framerate = 500
[module/battery]
type = internal/battery
full-at = 99
battery = BAT0
adapter = ADP1
time-format = %H:%M
format-charging = <animation-charging><label-charging>
format-discharging = <ramp-capacity><label-discharging>
format-full-foreground = ${colors.green}
format-charging-foreground = ${colors.yellow}
format-discharging-foreground = ${colors.green}
label-charging = %percentage%%
label-discharging = %time%
label-full = 
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
bar-capacity-width = 10
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
; Framerate in milliseconds
animation-charging-framerate = 500
poll-interval = 5
[module/date]
type = internal/date
interval = 5
date =
date-alt = " %d/%m/%Y"
time = %H:%M
time-alt = %H:%M:%S
label = %time%%date%
[module/volume]
type = internal/pulseaudio
format-volume = <ramp-volume><label-volume>
label-muted = : MUTE
label-muted-foreground = ${colors.foreground-alt}
ramp-volume-foreground = ${colors.white}
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
ramp-volume-3 = 
[module/powermenu]
type = custom/menu
expand-right = true
format-spacing = 1
label-open = 
label-open-foreground = ${colors.red}
label-close =  cancel
label-close-foreground = ${colors.red}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 =  Power
menu-0-0-exec = menu-open-1
menu-0-1 =  User
menu-0-1-exec = menu-open-2
menu-1-0 = Reboot
menu-1-0-exec = systemctl reboot
menu-1-1 = Shutdown
menu-1-1-exec = systemctl poweroff
menu-1-2 = Hibernate
menu-1-2-exec = systemctl hibernate
menu-1-3 = Suspend
menu-1-3-exec = systemctl suspend
menu-2-0 =  Lock
menu-2-0-exec = bash ~/.i3/scripts/locker.sh
menu-2-1 =  Logout
menu-2-1-exec = i3-msg exit
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 0
margin-bottom = 3
; vim:ft=dosini

View File

@@ -1,2 +0,0 @@
/history
tagged

View File

@@ -1 +0,0 @@
n:/home/tristan/build/sneider.si/assets/css/images

View File

@@ -1,100 +0,0 @@
# 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.
# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import *
# A simple command for demonstration purposes follows.
# -----------------------------------------------------------------------------
# You can import any python module as needed.
from ranger.core.loader import CommandLoader
import os
# 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()
class extracthere(Command):
def execute(self):
""" Extract copied files to current directory """
copied_files = tuple(self.fm.copy_buffer)
if not copied_files:
return
def refresh(_):
cwd = self.fm.get_directory(original_path)
cwd.load_content()
one_file = copied_files[0]
cwd = self.fm.thisdir
original_path = cwd.path
au_flags = ['-X', cwd.path]
au_flags += self.line.split()[1:]
au_flags += ['-e']
self.fm.copy_buffer.clear()
self.fm.cut_buffer = False
if len(copied_files) == 1:
descr = "extracting: " + os.path.basename(one_file.path)
else:
descr = "extracting files from: " + os.path.basename(one_file.dirname)
obj = CommandLoader(args=['atool'] + au_flags \
+ [f.path for f in copied_files], descr=descr)
obj.signal_bind('after', refresh)
self.fm.loader.add(obj)
class nvir(Command):
def execute(self):
cf = self.fm.thisfile
n= ['nvr','--servername','/tmp/nvimsocket','--remote']
n.extend([f.realpath for f in self.fm.thistab.get_selection()])
self.fm.execute_command(n)

View File

@@ -1,194 +0,0 @@
#!/usr/bin/python
# coding=UTF-8
# These glyphs, and the mapping of file extensions to glyphs
# has been copied from the vimscript code that is present in
# https://github.com/ryanoasis/vim-devicons
import re;
import os;
# all those glyphs will show as weird squares if you don't have the correct patched font
# My advice is to use NerdFonts which can be found here:
# https://github.com/ryanoasis/nerd-fonts
file_node_extensions = {
'styl' : '',
'scss' : '',
'htm' : '',
'html' : '',
'slim' : '',
'ejs' : '',
'css' : '',
'less' : '',
'md' : '',
'markdown' : '',
'json' : '',
'js' : '',
'jsx' : '',
'rb' : '',
'php' : '',
'py' : '',
'pyc' : '',
'pyo' : '',
'pyd' : '',
'coffee' : '',
'mustache' : '',
'hbs' : '',
'conf' : '',
'ini' : '',
'yml' : '',
'bat' : '',
'jpg' : '',
'jpeg' : '',
'bmp' : '',
'png' : '',
'gif' : '',
'ico' : '',
'twig' : '',
'cpp' : '',
'c++' : '',
'cxx' : '',
'cc' : '',
'cp' : '',
'c' : '',
'hs' : '',
'lhs' : '',
'lua' : '',
'java' : '',
'sh' : '',
'fish' : '',
'ml' : 'λ',
'mli' : 'λ',
'diff' : '',
'db' : '',
'sql' : '',
'dump' : '',
'clj' : '',
'cljc' : '',
'cljs' : '',
'edn' : '',
'scala' : '',
'go' : '',
'dart' : '',
'xul' : '',
'sln' : '',
'suo' : '',
'pl' : '',
'pm' : '',
't' : '',
'rss' : '',
'f#' : '',
'fsscript' : '',
'fsx' : '',
'fs' : '',
'fsi' : '',
'rs' : '',
'rlib' : '',
'd' : '',
'erl' : '',
'hrl' : '',
'vim' : '',
'vimrc' : '',
'ai' : '',
'psd' : '',
'psb' : '',
'ts' : '',
'jl' : '',
'rc' : '',
'xml' : '',
'log' : '',
'avi' : '',
'mpeg' : '',
'mpg' : '',
'mkv' : '',
'flv' : '',
'mp4' : '',
'mp3' : '',
'flac' : '',
'wav' : '',
'ogg' : '',
'epub' : '',
'pdf' : '',
'7z' : '',
'apk' : '',
'bz2' : '',
'cab' : '',
'cpio' : '',
'deb' : '',
'gem' : '',
'gz' : '',
'gzip' : '',
'lha' : '',
'lzh' : '',
'lzma' : '',
'rar' : '',
'rpm' : '',
'tar' : '',
'tgz' : '',
'xz' : '',
'zip' : ''
}
dir_node_exact_matches = {
# English
'.git' : '',
'Desktop' : '',
'Documents' : '',
'Downloads' : '',
'Dropbox' : '',
'Music' : '',
'Pictures' : '',
'Public' : '',
'Templates' : '',
'Videos' : '',
# French
'Bureau' : '',
'Documents' : '',
'Téléchargements' : '',
'Musique' : '',
'Images' : '',
'Publique' : '',
'Vidéos' : '',
}
file_node_exact_matches = {
'exact-match-case-sensitive-1.txt' : 'X1',
'exact-match-case-sensitive-2' : 'X2',
'gruntfile.coffee' : '',
'gruntfile.js' : '',
'gruntfile.ls' : '',
'gulpfile.coffee' : '',
'gulpfile.js' : '',
'gulpfile.ls' : '',
'dropbox' : '',
'.ds_store' : '',
'.gitconfig' : '',
'.gitignore' : '',
'.bashrc' : '',
'.bashprofile' : '',
'favicon.ico' : '',
'license' : '',
'node_modules' : '',
'react.jsx' : '',
'procfile' : '',
'.Xdefaults' : '',
'.Xresources' : '',
'.dmrc' : '',
'.fasd' : '',
'.gitconfig' : '',
'.jack-settings' : '',
'.mime.types' : '',
'.nvidia-settings-rc' : '',
'.pam_environment' : '',
'.profile' : '',
'.recently-used' : '',
'.selected_editor' : '',
'.vimrc' : '',
'.xinputrc' : '',
'mimeapps.list' : '',
'user-dirs.dirs' : '',
'ini' : '',
'config' : ''
}
def devicon(file):
if file.is_directory: return dir_node_exact_matches.get(file.relative_path, '')
return file_node_exact_matches.get(file.relative_path, file_node_extensions.get(file.extension, ''))

View File

@@ -1,19 +0,0 @@
import ranger.api
from ranger.core.linemode import LinemodeBase
from devicons import *
@ranger.api.register_linemode
class DevIconsLinemode(LinemodeBase):
name = "devicons"
uses_metadata = False
def filetitle(self, file, metadata):
return devicon(file) + ' ' + file.relative_path
@ranger.api.register_linemode
class DevIconsLinemodeFile(LinemodeBase):
name = "filename"
def filetitle(self, file, metadata):
return devicon(file) + ' ' + file.relative_path

View File

@@ -1,619 +0,0 @@
# ===================================================================
# This file contains the default startup commands for ranger.
# To change them, it is recommended to create the file
# ~/.config/ranger/rc.conf 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 2,3,5
# 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
# Which script is used to generate file previews?
# 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 three backends git, hg, bzr. 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
# Use one of the supported image preview protocols
set preview_images true
# 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.
#
# * 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.
set preview_images_method w3m
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis 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
# 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?
set draw_borders false
# 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 files tags in all columns or only in main column?
set display_tags_in_all_columns true
# Set a title for the window?
set update_title false
# Set the title to "ranger" in the tmux program?
set update_tmux_title false
# 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
# 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
# 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
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
# disable this feature.
set preview_max_size 0
# 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
set line_numbers false
# ===================================================================
# == Local Options
# ===================================================================
# You can set local options that only affect a single directory.
# Examples:
setlocal path=/media preview_files=False
setlocal path=/media preview_directories=False
# ===================================================================
# == Command Aliases in the Console
# ===================================================================
alias e edit
alias q quit
alias q! quitall
alias qa quitall
alias qall quitall
alias setl setlocal
alias filter scout -prt
alias find scout -aeit
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefiklst
# ===================================================================
# == Define keys for the browser
# ===================================================================
# Basic
map Q quit!
map q quit
copymap q ZZ ZQ
map R reload_cwd
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 ? 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
# Change the line mode
map Mf linemode filename
map Mi linemode fileinfo
map Mm linemode mtime
map Mp linemode permissions
map Ms linemode sizemtime
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 <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
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 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 gM cd /mnt
map gs cd /srv
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 shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b
map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b
# 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 dD console delete
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
# 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!
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
# 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-left> eval fm.ui.console.move_word(left=1)
cmap <a-right> eval fm.ui.console.move_word(right=1)
# 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 <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>
map pe extracthere
map gM cd /run/media/tristan
map e nvir
default_linemode devicons

View File

@@ -1,211 +0,0 @@
# 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 | $DISPLAY is not empty (i.e. Xorg runs)
#
# 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 chromium, X, flag f = chromium -- "$@"
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 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 = $EDITOR -- "$@"
mime ^text, label pager = "$PAGER" -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $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
#--------------------------------------------
# Code
#-------------------------------------------
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 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 -- "$@"
#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
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 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 als = als -- "$@" | "$PAGER"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als = als -- "$@" | "$PAGER"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has aunpack = aunpack -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack = aunpack -- "$@"
# Fallback:
ext tar|gz, has tar = tar vvtf "$@" | "$PAGER"
ext tar|gz, has tar = tar vvxf "$@"
#-------------------------------------------
# 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"
# 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 = $EDITOR -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
# The very last action, so that it's never triggered accidentally, is to execute a program:
mime application/x-executable = "$1"

View File

@@ -1,121 +0,0 @@
#!/usr/bin/env sh
# ranger supports enhanced previews. If the option "use_preview_script"
# is set to True and this file exists, this script will be called and its
# output is displayed in ranger. ANSI color codes are supported.
# NOTES: This script is considered a configuration file. If you upgrade
# ranger, it will be left untouched. (You must update it yourself.)
# Also, ranger disables STDIN here, so interactive scripts won't work properly
# Meanings of exit codes:
# code | meaning | action of ranger
# -----+------------+-------------------------------------------
# 0 | success | success. display stdout as preview
# 1 | no preview | failure. display no preview at all
# 2 | plain text | display the plain content of the file
# 3 | fix width | success. Don't reload when width changes
# 4 | fix height | success. Don't reload when height changes
# 5 | fix both | success. Don't ever reload
# 6 | image | success. display the image $cached points to as an image preview
# 7 | image | success. display the file directly as an image
# Meaningful aliases for arguments:
path="$1" # Full path of the selected file
width="$2" # Width of the preview pane (number of fitting characters)
height="$3" # Height of the preview pane (number of fitting characters)
cached="$4" # Path that should be used to cache image previews
preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
# Find out something about the file:
mimetype=$(file --mime-type -Lb "$path")
extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
# Functions:
# runs a command and saves its output into $output. Useful if you need
# the return value AND want to use the output in a pipe
try() { output=$(eval '"$@"'); }
# writes the output of the previously used "try" command
dump() { /bin/echo "$output"; }
# a common post-processing function used after most commands
trim() { head -n "$maxln"; }
# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
safepipe() { "$@"; test $? = 0 -o $? = 141; }
# Image previews, if enabled in ranger.
if [ "$preview_images" = "True" ]; then
case "$mimetype" in
# Image previews for SVG files, disabled by default.
###image/svg+xml)
### convert "$path" "$cached" && exit 6 || exit 1;;
# Image previews for image files. w3mimgdisplay will be called for all
# image files (unless overriden as above), but might fail for
# unsupported types.
image/*)
exit 7;;
# Image preview for video, disabled by default.:
###video/*)
### ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
esac
fi
case "$extension" in
# Archive extensions:
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)
#try als "$path" && { dump | trim; exit 0; }
#try acat "$path" && { dump | trim; exit 3; }
#try bsdtar -lf "$path" && { dump | trim; exit 0; }
exit 1;;
rar)
# avoid password prompt by providing empty password
try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
7z)
# avoid password prompt by providing empty password
try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
# PDF documents:
pdf)
try pdftotext -l 10 -nopgbrk -q "$path" - && \
{ dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
# BitTorrent Files
torrent)
try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
# ODT Files
odt|ods|odp|sxw)
try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
# HTML Pages:
htm|html|xhtml)
try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try lynx -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
try elinks -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
;; # fall back to highlight/cat if the text browsers fail
esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
if [ "$(tput colors)" -ge 256 ]; then
pygmentize_format=terminal256
highlight_format=xterm256
else
pygmentize_format=terminal
highlight_format=ansi
fi
try safepipe highlight --out-format=${highlight_format} "$path" && { dump | trim; exit 5; }
try safepipe pygmentize -f ${pygmentize_format} "$path" && { dump | trim; exit 5; }
exit 2;;
# Ascii-previews of images:
image/*)
img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
# Display information about media files:
video/* | audio/*)
exiftool "$path" && exit 5
# Use sed to remove spaces so the output fits into the narrow window
try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
esac
exit 1

View File

@@ -1,9 +0,0 @@
[Unit]
Description=This is an automatic background changer service
[Service]
Type=simple
ExecStart=/home/tristan/.i3/scripts/rotate_background.sh
[Install]
WantedBy=default.target

View File

@@ -1,13 +0,0 @@
[Unit]
Description=Run my job every week
RefuseManualStart=no
RefuseManualStop=no
[Timer]
Persistent=true
#when it is true systemd stores when the timer was last run and when the machine boots up after a long time, it will automatically catch up onto this timer if it should have run in the meantime
OnCalendar=weekly
Unit=background-rotate.service
[Install]
WantedBy=timers.target