wayland
swy7ch 3 years ago
commit fd6e1d2ce3

@ -0,0 +1,58 @@
# _____ _
# _____ ___ |___ |__| |__ Swy7ch's fish shell config file
# / __\ \ /\ / / | | | / / __| '_ \
# \__ \\ V V /| |_| |/ / (__| | | |
# |___/ \_/\_/ \__, /_/ \___|_| |_|
# |___/
# Start X at login
if status is-login
if test -z "$DISPLAY" -a $XDG_VTNR = 1
exec startx -- -keeptty
end
end
# True gruvbox colors in vim
#bash $HOME/.vim/plugins/gruvbox/gruvbox_256palette.sh
# User configuration
function fish_greeting
set_color $fish_color_autosuggestion
uname -msr
command -s uptime >/dev/null
and uptime
set_color normal
end
# Set less colors (-> manpages)
set -xU LESS_TERMCAP_md (printf "\e[01;36m")
set -xU LESS_TERMCAP_me (printf "\e[0m")
set -xU LESS_TERMCAP_se (printf "\e[0m")
set -xU LESS_TERMCAP_so (printf "\e[01;44;33em")
set -xU LESS_TERMCAP_ue (printf "\e[0m")
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
#################################################
############### PROMPT CONFIG ################
#################################################
# change colorscheme
set -g theme_color_scheme gruvbox
# show the name of the process in polybar
set -g theme_title_display_process yes
# set the right date formate
set -g theme_date_format "+%X"
# to use nerd fonts
# set -g theme_nerd_fonts yes
# do not alert untracked files in git
# set -g theme_display_git_untracked no
# changes to git glyphs
set -g git_plus_glyph \uF4A7 '' # PLUS
set -g git_minus_glyph \uF48B '' # MINUS

@ -0,0 +1,30 @@
# Swy7ch' config file for the FiSHell
# Start X at login
if status is-login
if test -z "$DISPLAY" -a $XDG_VTNR = 1
exec startx -- -keeptty
end
end
# True gruvbox colors in vim
#bash $HOME/.vim/plugins/gruvbox/gruvbox_256palette.sh
# User configuration
function fish_greeting
set_color $fish_color_autosuggestion
uname -msr
command -s uptime >/dev/null
and uptime
set_color normal
end
# Set less colors (-> manpages)
set -xU LESS_TERMCAP_md (printf "\e[01;36m")
set -xU LESS_TERMCAP_me (printf "\e[0m")
set -xU LESS_TERMCAP_se (printf "\e[0m")
set -xU LESS_TERMCAP_so (printf "\e[01;44;33em")
set -xU LESS_TERMCAP_ue (printf "\e[0m")
set -xU LESS_TERMCAP_us (printf "\e[01;32m")

@ -0,0 +1,50 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export LESS_TERMCAP_md:\x1b\x5b01\x3b36m
SETUVAR --export LESS_TERMCAP_me:\x1b\x5b0m
SETUVAR --export LESS_TERMCAP_se:\x1b\x5b0m
SETUVAR --export LESS_TERMCAP_so:\x1b\x5b01\x3b44\x3b33em
SETUVAR --export LESS_TERMCAP_ue:\x1b\x5b0m
SETUVAR --export LESS_TERMCAP_us:\x1b\x5b01\x3b32m
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR __fish_init_3_x:\x1d
SETUVAR _fish_abbr_backup:sudo\x20/usr/local/bin/snapbackup\x2esh
SETUVAR _fish_abbr_gu:git\x20fetch\x20upstream\x20\x26\x26\x20git\x20merge\x20upstream/master
SETUVAR _fish_abbr_hs:htop\x20\x2du\x20swytch
SETUVAR _fish_abbr_nf:neofetch
SETUVAR _fish_abbr_pc:sudo\x20pacman\x20\x2dRsn\x20\x28pacman\x20\x2dQdtq\x29
SETUVAR _fish_abbr_pd:expac\x20\x2d\x2dtimefmt\x3d\x27\x25Y\x2d\x25m\x2d\x25d\x20\x25T\x27\x20\x27\x25l\x5ct\x25n\x27\x20\x7c\x20sort\x20\x7c\x20tail\x20\x2dn\x2020
SETUVAR _fish_abbr_rbup:sudo\x20rsync\x20\x2daAXv\x20\x2d\x2dexclude\x3d\x7b\x22/dev/\x2a\x22\x2c\x22/proc/\x2a\x22\x2c\x22/sys/\x2a\x22\x2c\x22/tmp/\x2a\x22\x2c\x22/run/\x2a\x22\x2c\x22/mnt/\x2a\x22\x2c\x22/media/\x2a\x22\x2c\x22/lost\x2bfound\x22\x2c\x22home\x22\x7d\x20/\x20/mnt/backup/root/
SETUVAR _fish_abbr_sdn:shutdown\x20now
SETUVAR _fish_abbr_um:unimatrix\x20\x2da\x20\x2df\x20\x2dc\x3dcyan\x20\x2ds\x3d95
SETUVAR _fish_abbr_untar:tar\x20zxvf
SETUVAR _fish_abbr_yayu:yay\x20\x2dSyu
SETUVAR fish_color_autosuggestion:969896
SETUVAR fish_color_cancel:normal
SETUVAR fish_color_command:afd75f
SETUVAR fish_color_comment:f0c674
SETUVAR fish_color_cwd:008000
SETUVAR fish_color_cwd_root:800000
SETUVAR fish_color_end:b294bb
SETUVAR fish_color_error:cc6666
SETUVAR fish_color_escape:00a6b2
SETUVAR fish_color_history_current:normal
SETUVAR fish_color_host:normal
SETUVAR fish_color_match:normal
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:00a6b2
SETUVAR fish_color_param:f0c674
SETUVAR fish_color_quote:b294bb
SETUVAR fish_color_redirection:8abeb7
SETUVAR fish_color_search_match:ffff00
SETUVAR fish_color_selection:c0c0c0
SETUVAR fish_color_status:red
SETUVAR fish_color_user:00ff00
SETUVAR fish_color_valid_path:normal
SETUVAR fish_greeting:\x1d
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan

@ -0,0 +1,45 @@
# Options
#set __fish_git_prompt_showupstream "informative"
#set __fish_git_prompt_showdirtystate 1
#set __fish_git_prompt_showstashstate 1
#set __fish_git_prompt_showuntrackedfiles 1
set __fish_git_prompt_showcolorhints
set __fish_git_prompt_show_informative_status
# Colors
set green (set_color green)
set magenta (set_color magenta)
set normal (set_color normal)
set red (set_color red)
set yellow (set_color yellow)
set __fish_git_prompt_color_branch magenta --bold
set __fish_git_prompt_color_dirtystate white --bold
set __fish_git_prompt_color_stashstate magenta
set __fish_git_prompt_color_invalidstate red
set __fish_git_prompt_color_merging yellow
set __fish_git_prompt_color_stagedstate yellow
set __fish_git_prompt_color_upstream yellow --bold
# Icons
set __fish_git_prompt_char_cleanstate ' '
set __fish_git_prompt_char_invalidstate ' '
set __fish_git_prompt_char_dirtystate ' !'
set __fish_git_prompt_char_stagedstate ' '
set __fish_git_prompt_char_stashstate ' $'
set __fish_git_prompt_char_stateseparator ' |'
set __fish_git_prompt_char_untrackedfiles ' ?'
set __fish_git_prompt_char_upstream_ahead ' '
set __fish_git_prompt_char_upstream_behind ' '
set __fish_git_prompt_char_upstream_diverged ' 祈'
function fish_prompt
set last_status $status
set_color cyan --bold
printf '%s' (prompt_pwd)
set_color normal
printf '%s ' (__fish_git_prompt)
set_color normal
end

@ -0,0 +1,86 @@
# David JULIEN - GitLab@Swy7ch
# _____ _
# _____ ___ |___ |__| |__
# / __\ \ /\ / / | | | / / __| '_ \
# \__ \\ V V /| |_| |/ / (__| | | |
# |___/ \_/\_/ \__, /_/ \___|_| |_|
# |___/
# Start X at login
if status is-login
if test -z "$DISPLAY" -a $XDG_VTNR = 1
exec startx -- -keeptty
end
end
# True gruvbox colors in vim
#bash $HOME/.vim/plugins/gruvbox/gruvbox_256palette.sh
# User configuration
function fish_greeting
set_color $fish_color_autosuggestion
uname -msr
command -s uptime >/dev/null
and uptime
set_color normal
end
# Set less colors (-> manpages)
set -xU LESS_TERMCAP_md (printf "\e[01;36m")
set -xU LESS_TERMCAP_me (printf "\e[0m")
set -xU LESS_TERMCAP_se (printf "\e[0m")
set -xU LESS_TERMCAP_so (printf "\e[01;44;33em")
set -xU LESS_TERMCAP_ue (printf "\e[0m")
set -xU LESS_TERMCAP_us (printf "\e[01;32m")
# Set environment variables (user-wide)
export TERMINAL=st
#################################################
############### PROMPT CONFIG ################
#################################################
# CHAR
set SPACEFISH_CHAR_SYMBOL ""
# TIME
set SPACEFISH_TIME_SHOW false
#set SPACEFISH_TIME_COLOR white
set SPACEFISH_TIME_SUFFIX " > "
# USER
set SPACEFISH_USER_SHOW never
set SPACEFISH_USER_PREFIX"" # remove `with` before username
set SPACEFISH_USER_COLOR yellow
# DIR
set SPACEFISH_DIR_TRUNC 0
set SPACEFISH_DIR_PREFIX ""
# HOST
# Result will look like this:
# username@:(hostname)
set SPACEFISH_HOST_PREFIX "@["
set SPACEFISH_HOST_SUFFIX "]"
set SPACEFISH_HOST_SHOW never
# GIT
# Get spaces from `[...]`
set SPACEFISH_GIT_SYMBOL " "
set SPACEFISH_GIT_STATUS_DELETED ""
set SPACEFISH_GIT_STATUS_AHEAD ""
set SPACEFISH_GIT_STATUS_BEHIND ""
set SPACEFISH_GIT_TRUNC 3
# JOBS
set SPACEFISH_JOBS_SYMBOL ""

@ -0,0 +1,205 @@
# Swy7ch' config file for i3
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $super Mod4
set $alt Mod1
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango: FuraCode Nerd Font Mono 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesnt scale on retina/hidpi displays.
# Use Mouse+$super to drag floating windows to their wanted position
floating_modifier $super
# Execute at launch
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec_always --no-startup-id feh --bg-fill $HOME/.wallpaper.png
exec --no-startup-id compton --config $HOME/.config/compton/compton.conf
exec --no-startup-id xss-lock -- i3lock -n -i $HOME/.lockscreen.png
exec --no-startup-id redshift
exec --no-startup-id pamixer --set-volume 40
exec --no-startup-id setxkbmap 'fr(oss)'
# Trackpad settings
exec --no-startup-id xinput set-prop 13 'libinput Tapping Enabled' 1
exec --no-startup-id xinput set-prop 13 'libinput Natural Scrolling En abled' 1
# exec_always xinput --no-startup-id set-prop 13 'libinput Disable While Typing Enabled' 1
# Mouse acceleration
exec --no-startup-id xinput set-prop 13 'libinput Accel Speed' 0.4
# Common app launchers
bindsym $super+Return exec st;focus
bindsym $super+Shift+Return workspace 1;exec st;focus
bindsym $super+Shift+i workspace 1;exec st -e gotop;focus
bindsym $super+Shift+f workspace 1;exec st -e ranger;focus
bindsym $super+Shift+w exec qutebrowser;workspace 2; focus
bindsym $super+$alt+w exec firefox-beta;workspace 2;focus
bindsym $super+Shift+m workspace 2;exec st -e neomutt;focus
bindsym $super+Shift+n exec firefox-beta -private-window;workspace 2;focus
bindsym $super+Shift+c exec whatsie;workspace 4;focus
bindsym $super+Shift+p exec pavucontrol;workspace 5;focus
bindsym $super+Shift+s exec spotify;workspace 5; focus
# Control the audio
bindsym F3 exec pamixer --increase 7
bindsym F2 exec pamixer --decrease 7
bindsym F1 exec pamixer --toggle-mute
# Control display backlight
bindsym F6 exec xbacklight -inc 5
bindsym F5 exec xbacklight -dec 5
# kill focused window
bindsym $super+w kill
# start dmenu (a program launcher)
bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-supere -columns 3 -font 'FuraCode Nerd Font Mono 12' -theme purple
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $super+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $super+h focus left
bindsym $super+j focus down
bindsym $super+k focus up
bindsym $super+l focus right
# move focused window
bindsym $super+Shift+h move left
bindsym $super+Shift+j move down
bindsym $super+Shift+k move up
bindsym $super+Shift+l move right
# split in horizontal orientation
bindsym $super+c split h
# split in vertical orientation
bindsym $super+v split v
# enter fullscreen supere for the focused container
bindsym $super+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $super+s layout stacking
bindsym $super+z layout tabbed
bindsym $super+e layout toggle split
# toggle tiling / floating
bindsym $super+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $super+space focus mode_toggle
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $super+1 workspace $ws1
bindsym $super+2 workspace $ws2
bindsym $super+3 workspace $ws3
bindsym $super+4 workspace $ws4
bindsym $super+5 workspace $ws5
bindsym $super+6 workspace $ws6
bindsym $super+7 workspace $ws7
bindsym $super+8 workspace $ws8
bindsym $super+9 workspace $ws9
bindsym $super+0 workspace $ws10
# move focused container to workspace
bindsym $super+Shift+1 move container to workspace $ws1
bindsym $super+Shift+2 move container to workspace $ws2
bindsym $super+Shift+3 move container to workspace $ws3
bindsym $super+Shift+4 move container to workspace $ws4
bindsym $super+Shift+5 move container to workspace $ws5
bindsym $super+Shift+6 move container to workspace $ws6
bindsym $super+Shift+7 move container to workspace $ws7
bindsym $super+Shift+8 move container to workspace $ws8
bindsym $super+Shift+9 move container to workspace $ws9
bindsym $super+Shift+0 move container to workspace $ws10
# reload the configuration file
bindsym $super+Control+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $super+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $super+q exec "i3-nagbar -t warning -m 'Do you want to exit i3?' -B 'Yes, exit i3' 'i3-msg exit'"
# lock the screen
bindsym $super+Control+l exec i3lock -n -i $HOME/Images/red_rocks.png
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize supere
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym m resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
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
# back to normal: Enter or Escape or $super+r
bindsym Return supere "default"
bindsym Escape supere "default"
bindsym $super+r supere "default"
}
bindsym $super+r mode "resize"
# window rules, you can find the window class using xprop
for_window [class=".*"] border pixel 3
assign [class="Firefox Beta|Qutebrowser"] 2
assign [class="Inkscape"] 3
assign [class="Transmission"] 4
assign [class="Pavucontrol|Spotify|mpv"] 5
# colour of border, background, text, indicator, and child_border
client.focused #bf616a #2f343f #d8dee8 #b16286 #83a598
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #427b58
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.background #2f343f
# Gaps
gaps inner 5
gaps outer 5

@ -0,0 +1,293 @@
; Swy7ch' config file for polybar
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;==========================================================
[colors]
background = #171717
background-alt = #383838
foreground = #ebdbb2
foreground-alt = #d3869b
primary = #427b58
secondary = #d3869b
alert = #751715
;background = ${xrdb:color0:#222}
;background-alt = ${xrdb:color0:#222}
;foreground = ${xrdb:color7:#222}
;foreground-alt = ${xrdb:color7:#222}
;primary = ${xrdb:color1:#222}
;secondary = ${xrdb:color2:#222}
;alert = ${xrdb:color3:#222}
[bar/top]
dpi = 210
width = 100%
height = 35
radius = 0.0
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 5
line-color = #f00
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 3
module-margin-left = 2
module-margin-right = 1
font-0 = "Fira Code:style=Regular:size=8:antialias=true;4"
font-1 = "FuraCode Nerd Font Mono:style=Regular:size=9:antialias=true;4"
modules-left = i3 xwindow
modules-right = xkeyboard alsa xbacklight network battery date
tray-position = right
tray-padding = 0
wm-restack = i3
;override-redirect = true
;scroll-up = i3wm-wsprev
;scroll-down = i3wm-wsnext
################################################################################
################################################################################
################################ MODULES ####################################
################################################################################
################################################################################
[module/xwindow]
type = internal/xwindow
label = %title:0:56:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout =
label-layout-underline = ${colors.primary}
label-indicator-padding = 1
label-indicator-margin = 0
label-indicator-foreground = ${colors.foreground}
label-indicator-background = ${colors.primary}
label-indicator-underline = ${colors.primary}
[module/i3]
type = internal/i3
format = <label-state> <label-mode> //
index-sort = true
wrapping-scroll = true
strip-wsnumbers = true
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;調
ws-icon-default =
;
label-focused = %index% %icon%
label-focused-background = ${colors.background-alt}
label-focused-underline = ${colors.primary}
label-focused-padding = 1
label-unfocused = %index% %icon%
label-unfocused-padding = 1
label-visible = V %icon%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-background}
label-visible-padding = ${self.label-focused-padding}
label-urgent = %index% %icon%
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
;alt : 勞  
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #00000000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = "兩 "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #00000000
label = %percentage_used%%
[module/network]
type = internal/network
interface = wlp4s0
interval = 2.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #00000000
label-connected = "%essid%"
format-disconnected = <label-disconnected>
format-disconnected-underline = ${colors.alert}
label-disconnected = xx.xx.xx.xx
label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 =
ramp-signal-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 1
date = "%a. %d/%m"
date-alt = "%Y-%m-%d"
time = " %I:%M %p"
time-alt = " %H:%M:%S"
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #00000000
label = %time% | %date%
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 70
format = <ramp> <label>
format-underline = #00000000
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.foreground}
label-warn-background = ${colors.alert}
label-warn-padding = 2
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-foreground = ${colors.foreground-alt}
[module/xbacklight]
type = internal/xbacklight
format = <label>
label = "%percentage%%"
label-foreground = ${colors.foreground}
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
[module/alsa]
type = internal/alsa
format-volume = <bar-volume>
label-volume = "%percentage%%"
label-volume-foreground = ${colors.foreground}
format-volume-prefix = "蓼 "
format-volume-prefix-foreground = ${colors.foreground-alt}
format-muted-prefix =
format-muted-foreground = ${colors.foreground}
format-muted-background = ${colors.foreground-alt}
label-muted = 婢 sound muted
label-muted-padding = 1
label-muted-margin = 1
bar-volume-width = 15
bar-volume-foreground-0 = #f9b1a4
bar-volume-foreground-1 = #f9b1a4
bar-volume-foreground-2 = #f9b1a4
bar-volume-foreground-3 = #f9b1a4
bar-volume-foreground-4 = #f9b1a4
bar-volume-foreground-5 = #f9b1a4
bar-volume-foreground-6 = #f9b1a4
bar-volume-foreground-7 = #f9b1a4
bar-volume-foreground-8 = #f9b1a4
bar-volume-foreground-9 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 1
bar-volume-fill = ─
bar-volume-fill-font = 3
bar-volume-empty = ─
bar-volume-empty-font = 3
bar-volume-empty-foreground = ${colors.foreground}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
format-charging = <animation-charging> <label-charging>
format-discharging = <ramp-capacity> <label-discharging>
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 1500
animation-discharging-0 =
animation-discharging-1 =
animation-discharging-2 =
animation-discharging-foreground = ${colors.foreground-alt}
animation-discharging-framerate = 2000
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
[global/wm]
margin-top = 0
margin-bottom = 0

@ -0,0 +1,12 @@
#!/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 top &
echo "Polybar launched..."

@ -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()

File diff suppressed because it is too large Load Diff

@ -0,0 +1,725 @@
# ===================================================================
# 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 true
# 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
# 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.
#
# 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.
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
# 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
# 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 both
# Display the directory name in tabs?
set dirname_in_tabs false
# Enable the mouse support?
set mouse_enabled false
# 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?
set update_title false
# Set the title to "ranger" in the tmux program?
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
# ===================================================================
# == 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 ? 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 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 <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 <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 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
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 .n console filter_stack add name%space
map .m console filter_stack add mime%space
map .d filter_stack add type d
map .f filter_stack add type f
map .l filter_stack add type l
map .| filter_stack add or
map .& filter_stack add and
map .! filter_stack add not
map .r console 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>

@ -0,0 +1,256 @@
# 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-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 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 = ${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
#--------------------------------------------
# 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 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 mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
#-------------------------------------------
# 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 nomacs, X, flag f = nomacs -- "$@"