From a793b23435567f2d4f49846196ceebcc47cd764c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 7 Apr 2017 14:56:22 +0200 Subject: Remove stuff not needed on server --- config/dunst/dunstrc | 76 ----- config/i3/config | 241 ---------------- config/i3/scripts/keyboard_layout | 2 - config/i3/scripts/keyboard_switch | 14 - config/i3blocks/config | 132 --------- config/i3blocks/scripts/backup | 51 ---- config/i3blocks/scripts/bandwidth | 85 ------ config/i3blocks/scripts/battery | 75 ----- config/i3blocks/scripts/bbswitch | 9 - config/i3blocks/scripts/email | 4 - config/i3blocks/scripts/iface | 82 ------ config/i3blocks/scripts/mpd | 31 -- config/i3blocks/scripts/wifi | 47 --- config/mpd/mpd.conf | 416 --------------------------- config/ncmpcpp/config | 3 - config/offlineimap/config | 23 -- config/ranger/rc.conf | 582 -------------------------------------- config/ranger/rifle.conf | 123 -------- config/ranger/scope.sh | 89 ------ config/user-dirs.dirs | 8 - 20 files changed, 2093 deletions(-) delete mode 100644 config/dunst/dunstrc delete mode 100644 config/i3/config delete mode 100755 config/i3/scripts/keyboard_layout delete mode 100755 config/i3/scripts/keyboard_switch delete mode 100644 config/i3blocks/config delete mode 100755 config/i3blocks/scripts/backup delete mode 100755 config/i3blocks/scripts/bandwidth delete mode 100755 config/i3blocks/scripts/battery delete mode 100755 config/i3blocks/scripts/bbswitch delete mode 100755 config/i3blocks/scripts/email delete mode 100755 config/i3blocks/scripts/iface delete mode 100755 config/i3blocks/scripts/mpd delete mode 100755 config/i3blocks/scripts/wifi delete mode 100644 config/mpd/mpd.conf delete mode 100644 config/ncmpcpp/config delete mode 100755 config/offlineimap/config delete mode 100644 config/ranger/rc.conf delete mode 100644 config/ranger/rifle.conf delete mode 100755 config/ranger/scope.sh delete mode 100644 config/user-dirs.dirs (limited to 'config') diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc deleted file mode 100644 index f8721c2..0000000 --- a/config/dunst/dunstrc +++ /dev/null @@ -1,76 +0,0 @@ -[global] - font = "Monospace 8" - allow_markup = yes - format = "%s %p\n%b" - sort = yes - indicate_hidden = true - # geometry = "x5" - idle_threshold = 0 - geometry = "280x5-0+19" - alignment = center - show_age_threshold = 60 - sticky_history = yes - follow = mouse - word_wrap = yes - separator_height = 1 - padding = 3 - horizontal_padding = 3 - separator_color = frame - startup_notification = false - dmenu = "/usr/bin/dmenu -p dunst: -nb #FFFFFF -nf #000000 -sb #94DBFF -sf #000000" - browser = conkeror - - -[frame] - width = 1 - color = "#4c7899" - -[shortcuts] - close = ctrl+space - close_all = ctrl+shift+space - history = ctrl+grave - context = ctrl+shift+period - -[urgency_low] - background = "#000000" - foreground = "#ffffff" - timeout = 30 - -[urgency_normal] - background = "#000000" - foreground = "#94DBFF" - timeout = 45 - -[urgency_critical] - background = "#000000" - foreground = "#ff9999" - timeout = 0 - - -[libpurple_signed] - appname = libpurple - summary = *igned* - urgency = low - timeout = 3 - background = "#ccff33" - -[libpurple_came_back] - appname = libpurple - summary = "*came*" - format = "" - -[libpurple_went_away] - appname = libpurple - summary = "*went*" - format = "" - -[libpurple_says] - appname = libpurple - summary = *ays* - urgency = critical - background = "#ccff33" - -[libpurple] - appname = libpurple - urgency = critical - background = "#ccff33" diff --git a/config/i3/config b/config/i3/config deleted file mode 100644 index 7cd72c3..0000000 --- a/config/i3/config +++ /dev/null @@ -1,241 +0,0 @@ -# i3 config file (v4) -# -# Please see http://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 8 - -# 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 doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec urxvt -bindsym $mod+Shift+Return exec conkeror & pidgin - -# kill focused window -bindsym $mod+q kill - -# start dmenu (a program launcher) -#bindsym $mod+d exec dmenu_run -# 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 $mod+d exec --no-startup-id i3-dmenu-desktop --entry-type=filename - -# bar toggle, hide or show -bindsym $mod+m bar mode toggle - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+g split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# Scratchpad -bindsym $mod+Tab scratchpad show -bindsym $mod+Shift+Tab move scratchpad - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -bindsym $mod+Shift+a focus child - -# Output moving -bindsym $mod+x move container to output right -bindsym $mod+z move container to output left -bindsym $mod+Shift+x move workspace to output right -bindsym $mod+Shift+z move workspace to output left - -# switch to workspace -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 -bindsym $mod+grave workspace web -bindsym $mod+underscore workspace t - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace 1 -bindsym $mod+Shift+2 move container to workspace 2 -bindsym $mod+Shift+3 move container to workspace 3 -bindsym $mod+Shift+4 move container to workspace 4 -bindsym $mod+Shift+5 move container to workspace 5 -bindsym $mod+Shift+6 move container to workspace 6 -bindsym $mod+Shift+7 move container to workspace 7 -bindsym $mod+Shift+8 move container to workspace 8 -bindsym $mod+Shift+9 move container to workspace 9 -bindsym $mod+Shift+0 move container to workspace 10 -bindsym $mod+Shift+grave move container to workspace web -bindsym $mod+Shift+underscore move container to workspace t - -#assign [class="Firefox"] web -for_window [class="Pidgin"] move scratchpad - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart - -set $Locker i3lock -d -c 000000 && sleep 1 - -set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown -mode "$mode_system" { - bindsym l exec --no-startup-id $Locker, mode "default" - bindsym e exec --no-startup-id i3-msg exit, mode "default" - bindsym s exec --no-startup-id sys-suspend, mode "default" - bindsym r exec --no-startup-id sys-reboot, mode "default" - bindsym Shift+s exec --no-startup-id sys-shutdown, mode "default" - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Shift+q mode "$mode_system" - -set $displays (d)efault, toggle: 1:eDP 2:HDMI 3:VGA -mode "$displays" { - bindsym d exec --no-startup-id mxrandr, mode "default" - bindsym 1 exec --no-startup-id mxrandr toggle eDP-1, mode "default" - bindsym 2 exec --no-startup-id mxrandr toggle HDMI-1, mode "default" - bindsym 3 exec --no-startup-id mxrandr toggle VGA-1, mode "default" - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Shift+w mode "$displays" - -set $asus-fan fan: (f)ull, (a)uto -mode "$asus-fan" { - bindsym f exec --no-startup-id sudo asus-fan full, mode "default" - bindsym a exec --no-startup-id sudo asus-fan auto, mode "default" - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Shift+f mode "$asus-fan" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - 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 - - # 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 - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+r mode "resize" - -# Switch keyboard -bindsym Mod1+space exec --no-startup-id ~/.config/i3/scripts/keyboard_switch - -# Pulse audio control -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% && pkill -RTMIN+10 i3blocks -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% && pkill -RTMIN+10 i3blocks -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle && pkill -RTMIN+10 i3blocks - -# Sreen brightness controls -bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 20 # increase screen brightness -bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 20 # decrease screen brightness - -# Keyboard backlight -bindsym XF86KbdBrightnessUp exec --no-startup-id asus-kbd-backlight up -bindsym XF86KbdBrightnessDown exec --no-startup-id asus-kbd-backlight down - -# Media player controls -bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks -bindsym XF86AudioStop exec --no-startup-id mpc stop && pkill -RTMIN+12 i3blocks -bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+12 i3blocks -bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+12 i3blocks - -# Mouse bindings -# TODO fillter windows -bindsym --whole-window button11 exec --no-startup-id xdotool key ctrl+t -bindsym --whole-window button12 exec --no-startup-id xdotool key ctrl+w -bindsym --whole-window button13 exec --no-startup-id xdotool key ctrl+Tab -bindsym --whole-window button14 exec --no-startup-id xdotool key ctrl+shift+Tab - - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - position top - status_command i3blocks - #status_command i3status - tray_output primary -} - -# Start daemons -exec --no-startup-id dunst diff --git a/config/i3/scripts/keyboard_layout b/config/i3/scripts/keyboard_layout deleted file mode 100755 index 90b82e4..0000000 --- a/config/i3/scripts/keyboard_layout +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -setxkbmap -query | awk '/layout/{print $2}' diff --git a/config/i3/scripts/keyboard_switch b/config/i3/scripts/keyboard_switch deleted file mode 100755 index 7ba27f8..0000000 --- a/config/i3/scripts/keyboard_switch +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -active=`~/.config/i3/scripts/keyboard_layout` - -case "$active" in - us) - setxkbmap cz_qwerty - ;; - cz_qwerty) - setxkbmap us - ;; -esac - -# Send update to i3blocks -pkill -RTMIN+11 i3blocks diff --git a/config/i3blocks/config b/config/i3blocks/config deleted file mode 100644 index 116e2bd..0000000 --- a/config/i3blocks/config +++ /dev/null @@ -1,132 +0,0 @@ -# i3blocks config file -# -# Please see man i3blocks for a complete reference! -# The man page is also hosted at http://vivien.github.io/i3blocks -# -# List of valid properties: -# -# align -# color -# command -# full_text -# instance -# interval -# label -# min_width -# name -# separator -# separator_block_width -# short_text -# signal -# urgent - -# Global properties -# -# The top properties below are applied to every block, but can be overridden. -# Each block command defaults to the script name to avoid boilerplate. -command=/usr/lib/i3blocks/$BLOCK_NAME -separator_block_width=15 -markup=none - -[mpd] -command=~/.config/i3blocks/scripts/mpd -interval=5 -signal=12 - -[keymap] -command=~/.config/i3/scripts/keyboard_layout -interval=once -signal=11 - -[backup] -command=~/.config/i3blocks/scripts/backup -interval=86400 -signal=13 - -# Volume indicator -# -# The first parameter sets the step (and units to display) -# The second parameter overrides the mixer selection -# See the script for details. -[volume] -label=♪ -instance=Master -interval=once -signal=10 - -# CPU usage -# -# The script may be called with -w and -c switches to specify thresholds, -# see the script for details. -[cpu_usage] -label=cpu -interval=10 -separator=false - -# Memory usage -# -# The type defaults to "mem" if the instance is not specified. -# You can specify "swap". -[memory] -label=mem -interval=30 - -[bbswitch] -command=~/.config/i3blocks/scripts/bbswitch -interval=5 - -# Disk usage -# -# The directory defaults to $HOME if the instance is not specified. -# The script may be called with a optional argument to set the alert -# (defaults to 10 for 10%). -[disk] -label=/ -instance=/ -interval=30 -separator=false -[disk] -label=/home_hdd -instance=/home_hdd -interval=30 - -# Network interface monitoring -# -# If the instance is not specified, use the interface used for default route. -# The address can be forced to IPv4 or IPv6 with -4 or -6 switches. -[iface] -command=~/.config/i3blocks/scripts/iface -interval=2 -separator=false - -[bandwidth] -command=~/.config/i3blocks/scripts/bandwidth -interval=2 - -[wifi] -command=~/.config/i3blocks/scripts/wifi -interval=2 - -# Temperature -# -# Support multiple chips, though lm-sensors. -# The script may be called with -w and -c switches to specify thresholds, -# see the script for details. -[temperature] -interval=10 - -# Battery indicator -# -# The battery instance defaults to 0. -[battery] -command=~/.config/i3blocks/scripts/battery -interval=30 - -[email] -command=~/.config/i3blocks/scripts/email -interval=30 - -# Date Time -[time] -command=date '+%Y-%m-%d %H:%M:%S' -interval=1 diff --git a/config/i3blocks/scripts/backup b/config/i3blocks/scripts/backup deleted file mode 100755 index bfa3d39..0000000 --- a/config/i3blocks/scripts/backup +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -if [[ -n "$BLOCK_BUTTON" ]]; then - nohup urxvt -title "System backup" -hold -e sudo system-backup 2>&1 >/dev/null & -fi - -state=5 -if [[ -e ~/.backup_date ]]; then - now=$(date +"%s") - prev=$(cat ~/.backup_date) - dif=$(expr $now - $prev) - # 15 days - if [[ $dif -ge 648000 ]]; then - state=4 - # 12 days - elif [[ $dif -ge 518400 ]]; then - state=3 - # 5 days - elif [[ $dif -ge 216000 ]]; then - state=2 - # 2 days - elif [[ $dif -ge 86400 ]]; then - state=1 - else - state=0 - fi -fi - -if [[ $state -eq 0 ]]; then - exit 0 -fi - -echo "Do backup" -echo "Backup" -case $state in - 1) - echo - ;; - 2) - echo "#ffff00" - ;; - 3) - echo "#ff8a00" - ;; - 4) - echo "#ff5000" - ;; - 5) - echo "#ff0000" - ;; -esac diff --git a/config/i3blocks/scripts/bandwidth b/config/i3blocks/scripts/bandwidth deleted file mode 100755 index ba15a27..0000000 --- a/config/i3blocks/scripts/bandwidth +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# Copyright (C) 2012 Stefan Breunig -# Copyright (C) 2014 kaueraal -# Copyright (C) 2015 Thiago Perrotta - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -INTERFACE=$(ip route | awk '/^default .* (wlp|enp)/ { print $5 ; exit }') - -# Issue #36 compliant. -if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ] -then - echo down # full text - echo down # short text - echo \#FF0000 # color - exit 0 -fi - -# path to store the old results in -path="/dev/shm/$(basename $0)-${INTERFACE}" - -# grabbing data for each adapter. -read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes" -read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes" - -# get time -time=$(date +%s) - -# write current data if file does not exist. Do not exit, this will cause -# problems if this file is sourced instead of executed as another process. -if ! [[ -f "${path}" ]]; then - echo "${time} ${rx} ${tx}" > "${path}" - chmod 0666 "${path}" -fi - -# read previous state and update data storage -read old < "${path}" -echo "${time} ${rx} ${tx}" > "${path}" - -# parse old data and calc time passed -old=(${old//;/ }) -time_diff=$(( $time - ${old[0]} )) - -# sanity check: has a positive amount of time passed -[[ "${time_diff}" -gt 0 ]] || exit - -# calc bytes transferred, and their rate in byte/s -rx_diff=$(( $rx - ${old[1]} )) -tx_diff=$(( $tx - ${old[2]} )) -rx_rate=$(( $rx_diff / $time_diff )) -tx_rate=$(( $tx_diff / $time_diff )) - -# shift by 10 bytes to get KiB/s. If the value is larger than -# 1024^2 = 1048576, then display MiB/s instead - -# incoming -echo -n "IN " -rx_kib=$(( $rx_rate >> 10 )) -if [[ "$rx_rate" -gt 1048576 ]]; then - printf '%sM' "`echo "scale=1; $rx_kib / 1024" | bc`" -else - echo -n "${rx_kib}K" -fi - -echo -n " " - -# outgoing -echo -n "OUT " -tx_kib=$(( $tx_rate >> 10 )) -if [[ "$tx_rate" -gt 1048576 ]]; then - printf '%sM' "`echo "scale=1; $tx_kib / 1024" | bc`" -else - echo -n "${tx_kib}K" -fi diff --git a/config/i3blocks/scripts/battery b/config/i3blocks/scripts/battery deleted file mode 100755 index 7a5563a..0000000 --- a/config/i3blocks/scripts/battery +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/perl -# -# Copyright 2014 Pierre Mavro -# Copyright 2014 Vivien Didelot -# -# Licensed under the terms of the GNU GPL v3, or any later version. -# -# This script is meant to use with i3blocks. It parses the output of the "acpi" -# command (often provided by a package of the same name) to read the status of -# the battery, and eventually its remaining time (to full charge or discharge). -# -# The color will gradually change for a percentage below 85%, and the urgency -# (exit code 33) is set if there is less that 5% remaining. - -use strict; -use warnings; -use utf8; - -my $acpi; -my $status; -my $percent; -my $full_text; -my $short_text; -my $bat_number = $ENV{BLOCK_INSTANCE} || 0; - -# read the first line of the "acpi" command output -open (ACPI, "acpi -b | grep 'Battery $bat_number' |") or die; -$acpi = ; -close(ACPI); - -# fail on unexpected output -if ($acpi !~ /: (\w+), (\d+)%/) { - die "$acpi\n"; -} - -$status = $1; -$percent = $2; - -if ($status eq 'Discharging') { - $full_text = '🔋 '; -} elsif ($status eq 'Charging') { - $full_text = '🔌 '; -} - -$full_text .= "$percent%"; - -$short_text = $full_text; - -if ($acpi =~ /(\d\d:\d\d):/) { - $full_text .= " ($1)"; -} - -# print text -print "$full_text\n"; -print "$short_text\n"; - -# consider color and urgent flag only on discharge -if ($status eq 'Discharging') { - - if ($percent < 20) { - print "#FF0000\n"; - } elsif ($percent < 40) { - print "#FFAE00\n"; - } elsif ($percent < 60) { - print "#FFF600\n"; - } elsif ($percent < 85) { - print "#A8FF00\n"; - } - - if ($percent < 5) { - exit(33); - } -} - -exit(0); diff --git a/config/i3blocks/scripts/bbswitch b/config/i3blocks/scripts/bbswitch deleted file mode 100755 index a6ad24c..0000000 --- a/config/i3blocks/scripts/bbswitch +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ -e /proc/acpi/bbswitch ]; then - if [ -n "`cat /proc/acpi/bbswitch | grep ON`" ]; then - echo OPTIMUS - echo OP - echo '#ffff00' - fi -fi diff --git a/config/i3blocks/scripts/email b/config/i3blocks/scripts/email deleted file mode 100755 index 3c1fb1f..0000000 --- a/config/i3blocks/scripts/email +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -echo $(email-unread -s | tr "\n" " ") -echo -echo "#ffff00" diff --git a/config/i3blocks/scripts/iface b/config/i3blocks/scripts/iface deleted file mode 100755 index a9a558b..0000000 --- a/config/i3blocks/scripts/iface +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# Copyright (C) 2014 Julien Bonjean -# Copyright (C) 2014 Alexander Keller - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -#------------------------------------------------------------------------ - -# Locate current default interface, but use only wlp (wifi) or enp (ethernet) -# TODO probably also add connection over phone -IF=$(ip route | awk '/^default .* (wlp|enp)/ { print $5 ; exit }') - -#------------------------------------------------------------------------ - -# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless -# connection (think desktop), the corresponding block should not be displayed. -[[ ! -d /sys/class/net/${IF} ]] && exit -# Note this passes if IF is empty! - -#------------------------------------------------------------------------ - -# If no IF is selected then we want see down, not anything else. -if [ -z "$IF" ] || [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then - exit -fi - -case $1 in - -4) - AF=inet ;; - -6) - AF=inet6 ;; - *) - AF=inet6? ;; -esac - -# Use the first global scope address -IPADDR=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$1 and exit") - -case $BLOCK_BUTTON in - 3) echo -n "$IPADDR" | xclip -q -se c ;; -esac - -#------------------------------------------------------------------------ - -echo "$IPADDR" # full text -echo "$IPADDR" # short text - -#------------------------------------------------------------------------ -# Use ping to check if we have connection - -# We ping only once and wait for one second -PINGV="-c 1 -w 1" -# Ping nic.cz -if ping $PINGV nic.cz >/dev/null 2>&1; then - echo \#00FF00 # color -else - # Ping nic.cz by ip - if ping $PINGV 217.31.205.50 >/dev/null 2>&1; then - # No DNS - echo \#FFFF00 # color - else - # Ping default gateway of this interface - if ping $PINGV $(ip route show dev $IF | awk '/^default via/ {print $3}') >/dev/null 2>&1; then - # No internet connection but gateway accessible - echo \#FF0F00 # color - else - # No internet connection - echo \#FF0000 # color - fi - fi -fi diff --git a/config/i3blocks/scripts/mpd b/config/i3blocks/scripts/mpd deleted file mode 100755 index 637623e..0000000 --- a/config/i3blocks/scripts/mpd +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -case "$BLOCK_BUTTON" in - 1) - mpc toggle >/dev/null - ;; - 2) - mpc stop >/dev/null - ;; - 3) - nohup urxvt -title "Music player daemon client" -e ncmpcpp 2>&1 >/dev/null & - ;; - 4) - mpc prev >/dev/null - ;; - 5) - mpc next >/dev/null - ;; -esac - -if [ -n "`mpc status | grep -E "(playing|paused)"`" ]; then - echo `mpc -f "♫ %artist%, %album%, %title%" status | head -1` - echo - if [ -n `mpc status | grep playing` ]; then - echo "#ffff00" - elif [ -n `mpc status | grep paused` ]; then - echo "#00ff00" - fi -else - echo "♫" -fi diff --git a/config/i3blocks/scripts/wifi b/config/i3blocks/scripts/wifi deleted file mode 100755 index d549b10..0000000 --- a/config/i3blocks/scripts/wifi +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright (C) 2014 Alexander Keller - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -#------------------------------------------------------------------------ - -INTERFACE="$(ip link | awk '/wlp.*/ {print substr($2, 1, length($2)-1); exit}')" - -#------------------------------------------------------------------------ - -# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless -# connection (think desktop), the corresponding block should not be displayed. -[[ ! -d /sys/class/net/${INTERFACE}/wireless ]] || - [[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit - -#------------------------------------------------------------------------ - -QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }') -SSID=$(iwgetid $INTERFACE | sed 's/.*ESSID:"\([^"]*\)"/\1/') - -#------------------------------------------------------------------------ - -echo $SSID $QUALITY% # full text -echo $SSID # short text - -# color -if [[ $QUALITY -ge 80 ]]; then - echo "#00FF00" -elif [[ $QUALITY -lt 80 ]]; then - echo "#FFF600" -elif [[ $QUALITY -lt 60 ]]; then - echo "#FFAE00" -elif [[ $QUALITY -lt 40 ]]; then - echo "#FF0000" -fi diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf deleted file mode 100644 index 17a21cc..0000000 --- a/config/mpd/mpd.conf +++ /dev/null @@ -1,416 +0,0 @@ -# An example configuration file for MPD. -# Read the user manual for documentation: http://www.musicpd.org/doc/user/ - - -# Probably not supported -#mpd_crossfade_time = "3" - -# Files and directories ####################################################### -# -# This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This -# setting defaults to the XDG directory, otherwise the music directory will be -# be disabled and audio files will only be accepted over ipc socket (using -# file:// protocol) or streaming files over an accepted protocol. -# -music_directory "~/hdd/music" -# -# This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use -# playlist files not created by the server but only if they are in the MPD -# format. This setting defaults to playlist saving being disabled. -# -playlist_directory "~/.config/mpd/playlists" -# -# This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the -# server is not up. This setting defaults to disabled which will allow -# MPD to accept files over ipc socket (using file:// protocol) or streaming -# files over an accepted protocol. -# -db_file "~/.config/mpd/database" -# -# These settings are the locations for the daemon log files for the daemon. -# These logs are great for troubleshooting, depending on your log_level -# settings. -# -# The special value "syslog" makes MPD use the local syslog daemon. This -# setting defaults to logging to syslog, otherwise logging is disabled. -# -log_file "~/.config/mpd/log" -# -# This setting sets the location of the file which stores the process ID -# for use of mpd --kill and some init scripts. This setting is disabled by -# default and the pid file will not be stored. -# -pid_file "~/.config/mpd/pid" -# -# This setting sets the location of the file which contains information about -# most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server -# state will be reset on server start up. -# -state_file "~/.config/mpd/state" -# -# The location of the sticker database. This is a database which -# manages dynamic information attached to songs. -# -sticker_file "~/.config/mpd/sticker.sql" -# -############################################################################### - - -# General music daemon options ################################################ -# -# This setting specifies the user that MPD will run as. MPD should never run as -# root and you may use this setting to make MPD change its user ID after -# initialization. This setting is disabled by default and MPD is run as the -# current user. -# -#user "nobody" -# -# This setting specifies the group that MPD will run as. If not specified -# primary group of user specified with "user" setting will be used (if set). -# This is useful if MPD needs to be a member of group such as "audio" to -# have permission to use sound card. -# -#group "nogroup" -# -# This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other then the default, any. -# This setting can deny access to control of the daemon. -# -# For network -#bind_to_address "any" -# -# And for Unix Socket -#bind_to_address "~/.mpd/socket" -# -# This setting is the TCP port that is desired for the daemon to get assigned -# to. -# -#port "6600" -# -# This setting controls the type of information which is logged. Available -# setting arguments are "default", "secure" or "verbose". The "verbose" setting -# argument is recommended for troubleshooting, though can quickly stretch -# available resources on limited hardware storage. -# -#log_level "default" -# -# If you have a problem with your MP3s ending abruptly it is recommended that -# you set this argument to "no" to attempt to fix the problem. If this solves -# the problem, it is highly recommended to fix the MP3 files with vbrfix -# (available from ), at which -# point gapless MP3 playback can be enabled. -# -#gapless_mp3_playback "yes" -# -# Setting "restore_paused" to "yes" puts MPD into pause mode instead -# of starting playback after startup. -# -#restore_paused "no" -# -# This setting enables MPD to create playlists in a format usable by other -# music players. -# -#save_absolute_paths_in_playlists "no" -# -# This setting defines a list of tag types that will be extracted during the -# audio file discovery process. The complete list of possible values can be -# found in the mpd.conf man page. -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" -# -# This setting enables automatic update of MPD's database when files in -# music_directory are changed. -# -#auto_update "yes" -# -# Limit the depth of the directories being watched, 0 means only watch -# the music directory itself. There is no limit by default. -# -#auto_update_depth "3" -# -############################################################################### - - -# Symbolic link behavior ###################################################### -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links outside of the configured music_directory. -# -#follow_outside_symlinks "yes" -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links inside of the configured music_directory. -# -#follow_inside_symlinks "yes" -# -############################################################################### - - -# Zeroconf / Avahi Service Discovery ########################################## -# -# If this setting is set to "yes", service information will be published with -# Zeroconf / Avahi. -# -#zeroconf_enabled "yes" -# -# The argument to this setting will be the Zeroconf / Avahi unique name for -# this MPD server on the network. -# -#zeroconf_name "Music Player" -# -############################################################################### - - -# Permissions ################################################################# -# -# If this setting is set, MPD will require password authorization. The password -# can setting can be specified multiple times for different password profiles. -# -#password "password@read,add,control,admin" -# -# This setting specifies the permissions a user has who has not yet logged in. -# -#default_permissions "read,add,control,admin" -# -############################################################################### - - -# Database ####################################################################### -# - -#database { -# plugin "proxy" -# host "other.mpd.host" -# port "6600" -#} - -# Input ####################################################################### -# - -input { - plugin "curl" -# proxy "proxy.isp.com:8080" -# proxy_user "user" -# proxy_password "password" -} - -# -############################################################################### - -# Audio Output ################################################################ -# -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings -# blocks. Setting this block is optional, though the server will only attempt -# autodetection for one sound card. -# -# An example of an ALSA output: -# -#audio_output { -# type "alsa" -# name "My ALSA Device" -## device "hw:0,0" # optional -## mixer_type "hardware" # optional -## mixer_device "default" # optional -## mixer_control "PCM" # optional -## mixer_index "0" # optional -#} -# -# An example of an OSS output: -# -#audio_output { -# type "oss" -# name "My OSS Device" -## device "/dev/dsp" # optional -## mixer_type "hardware" # optional -## mixer_device "/dev/mixer" # optional -## mixer_control "PCM" # optional -#} -# -# An example of a shout output (for streaming to Icecast): -# -#audio_output { -# type "shout" -# encoding "ogg" # optional -# name "My Shout Stream" -# host "localhost" -# port "8000" -# mount "/mpd.ogg" -# password "hackme" -# quality "5.0" -# bitrate "128" -# format "44100:16:1" -## protocol "icecast2" # optional -## user "source" # optional -## description "My Stream Description" # optional -## url "http://example.com" # optional -## genre "jazz" # optional -## public "no" # optional -## timeout "2" # optional -## mixer_type "software" # optional -#} -# -# An example of a recorder output: -# -#audio_output { -# type "recorder" -# name "My recorder" -# encoder "vorbis" # optional, vorbis or lame -# path "/var/lib/mpd/recorder/mpd.ogg" -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -#} -# -# An example of a httpd output (built-in HTTP streaming server): -# -#audio_output { -# type "httpd" -# name "My HTTP Stream" -# encoder "vorbis" # optional, vorbis or lame -# port "8000" -# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 -## quality "5.0" # do not define if bitrate is defined -# bitrate "128" # do not define if quality is defined -# format "44100:16:1" -# max_clients "0" # optional 0=no limit -#} -# -# An example of a pulseaudio output (streaming to a remote pulseaudio server) -# -audio_output { - type "pulse" - name "pulse audio" -## server "remote_server" # optional -## sink "remote_server_sink" # optional -} -# -# An example of a winmm output (Windows multimedia API). -# -#audio_output { -# type "winmm" -# name "My WinMM output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -# or -## device "0" # optional -## mixer_type "hardware" # optional -#} -# -# An example of an openal output. -# -#audio_output { -# type "openal" -# name "My OpenAL output" -## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional -#} -# -## Example "pipe" output: -# -#audio_output { -# type "pipe" -# name "my pipe" -# command "aplay -f cd 2>/dev/null" -## Or if you're want to use AudioCompress -# command "AudioCompress -m | aplay -f cd 2>/dev/null" -## Or to send raw PCM stream through PCM: -# command "nc example.org 8765" -# format "44100:16:2" -#} -# -## An example of a null output (for no audio output): -# -#audio_output { -# type "null" -# name "My Null Output" -# mixer_type "none" # optional -#} -# -# If MPD has been compiled with libsamplerate support, this setting specifies -# the sample rate converter to use. Possible values can be found in the -# mpd.conf man page or the libsamplerate documentation. By default, this is -# setting is disabled. -# -#samplerate_converter "Fastest Sinc Interpolator" -# -############################################################################### - - -# Normalization automatic volume adjustments ################################## -# -# This setting specifies the type of ReplayGain to use. This setting can have -# the argument "off", "album", "track" or "auto". "auto" is a special mode that -# chooses between "track" and "album" depending on the current state of -# random playback. If random playback is enabled then "track" mode is used. -# See for more details about ReplayGain. -# This setting is off by default. -# -#replaygain "album" -# -# This setting sets the pre-amp used for files that have ReplayGain tags. By -# default this setting is disabled. -# -#replaygain_preamp "0" -# -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. -# By default this setting is disabled. -# -#replaygain_missing_preamp "0" -# -# This setting enables or disables ReplayGain limiting. -# MPD calculates actual amplification based on the ReplayGain tags -# and replaygain_preamp / replaygain_missing_preamp setting. -# If replaygain_limit is enabled MPD will never amplify audio signal -# above its original level. If replaygain_limit is disabled such amplification -# might occur. By default this setting is enabled. -# -#replaygain_limit "yes" -# -# This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has -# equal "loudness". This setting is disabled by default. -# -#volume_normalization "no" -# -############################################################################### - -# Character Encoding ########################################################## -# -# If file or directory names do not display correctly for your locale then you -# may need to modify this setting. -# -#filesystem_charset "UTF-8" -# -# This setting controls the encoding that ID3v1 tags should be converted from. -# -#id3v1_encoding "ISO-8859-1" -# -############################################################################### - - -# SIDPlay decoder ############################################################# -# -# songlength_database: -# Location of your songlengths file, as distributed with the HVSC. -# The sidplay plugin checks this for matching MD5 fingerprints. -# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq -# -# default_songlength: -# This is the default playing time in seconds for songs not in the -# songlength database, or in case you're not using a database. -# A value of 0 means play indefinitely. -# -# filter: -# Turns the SID filter emulation on or off. -# -#decoder { -# plugin "sidplay" -# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt" -# default_songlength "120" -# filter "true" -#} -# -############################################################################### - diff --git a/config/ncmpcpp/config b/config/ncmpcpp/config deleted file mode 100644 index 9e44fa3..0000000 --- a/config/ncmpcpp/config +++ /dev/null @@ -1,3 +0,0 @@ -mpd_connection_timeout = 3000 -system_encoding = utf-8 -mpd_music_dir = /home_hdd/cynerd/music diff --git a/config/offlineimap/config b/config/offlineimap/config deleted file mode 100755 index 53ccda1..0000000 --- a/config/offlineimap/config +++ /dev/null @@ -1,23 +0,0 @@ -# vim: set ft=config: -[general] -accounts = email -maxsyncaccounts = 4 - -[Repository email-remote] -type = IMAP -remotehost = imap.seznam.cz -remoteuser = cynerd@email.cz -ssl = yes -sslcacertfile = /etc/ssl/certs/ca-certificates.crt - -[Repository email-local] -type = Maildir -localfolders = ~/.mail/email - -[Account email] -localrepository = email-local -remoterepository = email-remote -status_backend = sqlite -autorefresh = 5 -postsynchook = ~/.local/sbin/newmail-notify - diff --git a/config/ranger/rc.conf b/config/ranger/rc.conf deleted file mode 100644 index 61bdfd4..0000000 --- a/config/ranger/rc.conf +++ /dev/null @@ -1,582 +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 -# =================================================================== - -# How many columns are there, and what are their relative widths? -set column_ratios 1,3,4 - -# Which files should be hidden? (regular expression) -set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ - -# Show hidden files? You can toggle this by typing 'zh' -set show_hidden false - -# Ask for a confirmation when running the "delete" command? -# Valid values are "always", "never", "multiple" (default) -# With "multiple", ranger will ask only if you delete multiple files at once. -set confirm_on_delete multiple - -# 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 true - -# 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. -set preview_images_method w3m - -# Use a unicode "..." character to mark cut-off filenames? -set unicode_ellipsis true - -# 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 false - -# Save the console history on exit? -set save_console_history true - -# Draw the status bar on top of the browser window (default: bottom) -set status_bar_on_top false - -# Draw a progress bar in the status bar which displays the average state of all -# currently running tasks which support progress bars? -set draw_progress_bar_in_status_bar true - -# Draw borders around columns? -set draw_borders false - -# Display the directory name in tabs? -set dirname_in_tabs true - -# 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 true - -# 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 6 - -# Abbreviate $HOME with ~ in the titlebar (first line) of ranger? -set tilde_in_titlebar true - -# 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? (Noticable 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 - -# =================================================================== -# == Local Options -# =================================================================== -# You can set local options that only affect a single directory. - -setlocal path=~/downloads sort mtime - -# =================================================================== -# == 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 reset -map redraw_window -map abort -map change_mode normal - -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 Mp linemode permissions -map Mt linemode metatitle - -# Tagging / Marking -map t tag_toggle -map ut tag_remove -map " tag_toggle tag=%any -map 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 help -map display_file -map edit -map copy -map cut -map console mkdir%space -map console delete -map exit - -# In case you work on a keyboard with dvorak layout -map move up=1 -map move down=1 -map move left=1 -map move right=1 -map move to=0 -map move to=-1 -map move down=1 pages=True -map move up=1 pages=True -map move right=1 -#map console delete -map console touch%space - -# VIM-like -copymap k -copymap j -copymap h -copymap l -copymap gg -copymap G -copymap -copymap - -map J move down=0.5 pages=True -map K move up=0.5 pages=True -copymap J -copymap K - -# 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) -map I eval fm.open_console('rename ' + fm.thisfile.relative_path, 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 yy copy -map uy uncut -map ya copy mode=add -map yr copy mode=remove - -# 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 tab_new ~ -map tab_close -map tab_move 1 -map tab_move -1 -map tab_move 1 -map 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 tab_open 1 -map tab_open 2 -map tab_open 3 -map tab_open 4 -map tab_open 5 -map tab_open 6 -map tab_open 7 -map tab_open 8 -map tab_open 9 - -# Sorting -map or toggle_option 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 toggle_option collapse_preview -map zd toggle_option sort_directories_first -map zh toggle_option show_hidden -map toggle_option show_hidden -map zi toggle_option flushinput -map zm toggle_option mouse_enabled -map zp toggle_option preview_files -map zP toggle_option preview_directories -map zs toggle_option sort_case_insensitive -map zu toggle_option autoupdate_cumulative_size -map zv toggle_option use_preview_script -map zf console filter%space - -# Bookmarks -map ` enter_bookmark %any -map ' enter_bookmark %any -map m set_bookmark %any -map um unset_bookmark %any - -map m draw_bookmarks -copymap m um ` ' - -# 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 eval fm.ui.console.tab() -cmap eval fm.ui.console.tab(-1) -cmap eval fm.ui.console.close() -cmap eval fm.ui.console.execute() -cmap redraw_window - -copycmap -copycmap - -# Move around -cmap eval fm.ui.console.history_move(-1) -cmap eval fm.ui.console.history_move(1) -cmap eval fm.ui.console.move(left=1) -cmap eval fm.ui.console.move(right=1) -cmap eval fm.ui.console.move(right=0, absolute=True) -cmap eval fm.ui.console.move(right=-1, absolute=True) - -# Line Editing -cmap eval fm.ui.console.delete(-1) -cmap eval fm.ui.console.delete(0) -cmap eval fm.ui.console.delete_word() -cmap eval fm.ui.console.delete_word(backward=False) -cmap eval fm.ui.console.delete_rest(1) -cmap eval fm.ui.console.delete_rest(-1) -cmap eval fm.ui.console.paste() - -# And of course the emacs way -copycmap -copycmap -copycmap -copycmap -copycmap -copycmap -copycmap -copycmap - -# Note: There are multiple ways to express backspaces. (code 263) -# and (code 127). To be sure, use both. -copycmap - -# This special expression allows typing in numerals: -cmap false - -# =================================================================== -# == Pager Keybindings -# =================================================================== - -# Movement -pmap pager_move down=1 -pmap pager_move up=1 -pmap pager_move left=4 -pmap pager_move right=4 -pmap pager_move to=0 -pmap pager_move to=-1 -pmap pager_move down=1.0 pages=True -pmap pager_move up=1.0 pages=True -pmap pager_move down=0.5 pages=True -pmap pager_move up=0.5 pages=True - -copypmap k -copypmap j -copypmap h -copypmap l -copypmap g -copypmap G -copypmap d -copypmap u -copypmap n f -copypmap p b - -# Basic -pmap redraw_window -pmap pager_close -copypmap q Q i -pmap E edit_file - -# =================================================================== -# == Taskview Keybindings -# =================================================================== - -# Movement -tmap taskview_move up=1 -tmap taskview_move down=1 -tmap taskview_move to=0 -tmap taskview_move to=-1 -tmap taskview_move down=1.0 pages=True -tmap taskview_move up=1.0 pages=True -tmap taskview_move down=0.5 pages=True -tmap taskview_move up=0.5 pages=True - -copytmap k -copytmap j -copytmap g -copytmap G -copytmap u -copytmap n f -copytmap p 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 eval -q fm.ui.taskview.task_move(-1) -tmap eval -q fm.ui.taskview.task_move(0) -tmap eval -q fm.ui.taskview.task_remove() - -# Basic -tmap redraw_window -tmap taskview_close -copytmap q Q w diff --git a/config/ranger/rifle.conf b/config/ranger/rifle.conf deleted file mode 100644 index 3e684d8..0000000 --- a/config/ranger/rifle.conf +++ /dev/null @@ -1,123 +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: -# , , ... = 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 | The regexp matches $1 -# ext | The regexp matches the extension of $1 -# mime | The regexp matches the mime type of $1 -# name | The regexp matches the basename of $1 -# path | The regexp matches the absolute path of $1 -# has | The program is installed (i.e. located in $PATH) -# env | The environment variable "variable" is non-empty -# file | $1 is a file -# directory | $1 is a directory -# number | 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 | Change how the program is run. See below. -# label