diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/Trolltech.conf | 2 | ||||
-rw-r--r-- | config/dunst/dunstrc | 76 | ||||
-rw-r--r-- | config/i3/config | 190 | ||||
-rwxr-xr-x | config/i3/scripts/keyboard_layout | 2 | ||||
-rwxr-xr-x | config/i3/scripts/keyboard_switch | 14 | ||||
-rwxr-xr-x | config/i3/scripts/shutdown | 13 | ||||
-rw-r--r-- | config/i3blocks/config | 137 | ||||
-rwxr-xr-x | config/i3blocks/scripts/backup | 51 | ||||
-rwxr-xr-x | config/i3blocks/scripts/bandwidth | 85 | ||||
-rwxr-xr-x | config/i3blocks/scripts/battery | 75 | ||||
-rwxr-xr-x | config/i3blocks/scripts/bbswitch | 9 | ||||
-rwxr-xr-x | config/i3blocks/scripts/email | 6 | ||||
-rwxr-xr-x | config/i3blocks/scripts/iface | 82 | ||||
-rwxr-xr-x | config/i3blocks/scripts/mpd | 67 | ||||
-rwxr-xr-x | config/i3blocks/scripts/wifi | 47 | ||||
-rw-r--r-- | config/mpd/mpd.conf | 416 | ||||
-rw-r--r-- | config/ncmpcpp/config | 3 | ||||
-rwxr-xr-x | config/offlineimap/config | 22 | ||||
-rw-r--r-- | config/user-dirs.dirs | 8 |
19 files changed, 0 insertions, 1305 deletions
diff --git a/config/Trolltech.conf b/config/Trolltech.conf deleted file mode 100644 index e148896..0000000 --- a/config/Trolltech.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Qt] -style=GTK+ 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 = "<b>%s %p</b>\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 7099a68..0000000 --- a/config/i3/config +++ /dev/null @@ -1,190 +0,0 @@ -# i3 config file (v4) - -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:DejaVu Sans Mono 8 - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec urxvt - -# start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --entry-type=name -bindsym $mod+Shift+d exec --no-startup-id surf-menu - -# kill focused window -bindsym $mod+q kill - -# 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 - -# 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 - -# 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 - -# Set Pidgin to scratchpad -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 $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown -mode "$mode_system" { - bindsym l exec --no-startup-id i3lock -c 000000 && sleep 1 && xset dpms force off, mode "default" - bindsym e exec --no-startup-id i3-msg exit, mode "default" - bindsym s exec --no-startup-id sudo pm-suspend, mode "default" - bindsym r exec --no-startup-id sudo reboot, mode "default" - bindsym Shift+s exec --no-startup-id ~/.config/i3/scripts/shutdown, mode "default" - - 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 eDP1, mode "default" - bindsym 2 exec --no-startup-id mxrandr toggle HDMI1, mode "default" - bindsym 3 exec --no-startup-id mxrandr toggle VGA1, mode "default" - - 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 -mode "resize" { - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+r mode "resize" - -# Switch keyboard layout -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 0 +5% && pkill -RTMIN+10 i3blocks -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% && pkill -RTMIN+10 i3blocks -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 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 (asus only) -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 - - -# Start i3blocks to display a workspace bar -bar { - position top - status_command i3blocks - tray_output primary -} - -# Start daemons -exec --no-startup-id dunst - -# Start Pidbargin -exec pidgin 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/i3/scripts/shutdown b/config/i3/scripts/shutdown deleted file mode 100755 index 62f6ae1..0000000 --- a/config/i3/scripts/shutdown +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -export SUDO_ASKPASS=/tmp/shutdown-askpass.sh - - -echo '#!/bin/sh -echo "SETDESC Please enter password to shutdown system -SETPROMPT Password: -SETTITLE Sudo password for system shutdown -GETPIN" | pinentry | grep -E "^D " | sed "s/^D //"' > $SUDO_ASKPASS -chmod +x $SUDO_ASKPASS - -sudo -A shutdown -h now diff --git a/config/i3blocks/config b/config/i3blocks/config deleted file mode 100644 index 1a62f50..0000000 --- a/config/i3blocks/config +++ /dev/null @@ -1,137 +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/libexec/i3blocks/$BLOCK_NAME -separator_block_width=15 -markup=none - -[mpd] -command=~/.config/i3blocks/scripts/mpd -interval=5 -signal=12 - -[mpd-remote] -command=~/.config/i3blocks/scripts/mpd -interval=5 -instance=remote - -[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 <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de> -# Copyright (C) 2014 kaueraal -# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br> - -# 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 <http://www.gnu.org/licenses/>. - -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 <deimos@deimos.fr> -# Copyright 2014 Vivien Didelot <vivien@didelot.org> -# -# 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 = <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 2d26280..0000000 --- a/config/i3blocks/scripts/email +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Note: we cut last character because output ends with new line -OUT="$(email-unread -s | tr "\n" " " | sed 's/ $//')" -echo "$OUT" -echo "$OUT" -echo "#ffff00" diff --git a/config/i3blocks/scripts/iface b/config/i3blocks/scripts/iface deleted file mode 100755 index dc82438..0000000 --- a/config/i3blocks/scripts/iface +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash -# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info> -# Copyright (C) 2014 Alexander Keller <github@nycroth.com> - -# 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 <http://www.gnu.org/licenses/>. - -#------------------------------------------------------------------------ - -# 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 \#FF9000 # 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 914def6..0000000 --- a/config/i3blocks/scripts/mpd +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -HOST_HOME="10.8.2.51" - -HOST="" -# Let's be sneaky and verify that we are on relevant network before we try to ping -if ip a | grep -q 'inet 10.8.2.' && \ - ping -c 1 -w 1 "$HOST_HOME" >/dev/null 2>&1; then - # TODO check that mpd is running? - HOST="-h $HOST_HOME" -fi - -STATUS="$(mpc $HOST status)" - -# Handle remote volume -if [ "$BLOCK_INSTANCE" = "remote" ]; then - [ -n "$HOST" ] || exit 0 - case "$BLOCK_BUTTON" in - 1) - mpc $HOST volume 40 >/dev/null - ;; - 3) - mpc $HOST volume 0 >/dev/null - ;; - 4) - mpc $HOST volume +2 >/dev/null - ;; - 5) - mpc $HOST volume -2 >/dev/null - ;; - esac - - if echo "$STATUS" | grep -qE "(playing|paused)"; then - echo "♫ $(mpc $HOST volume | sed 's/volume: //')" - fi - exit 0 -fi - -# Handle user input -case "$BLOCK_BUTTON" in - 1) - mpc $HOST toggle >/dev/null - ;; - 2) - mpc $HOST stop >/dev/null - ;; - 3) - nohup urxvt -title "Music player daemon client" -e ncmpcpp $HOST 2>&1 >/dev/null & - ;; - 4) - mpc $HOST prev >/dev/null - ;; - 5) - mpc $HOST next >/dev/null - ;; -esac - -if echo "$STATUS" | grep -qE "(playing|paused)"; then - echo `mpc $HOST -f "♫ %artist%, %album%, %title%" status | head -1` - echo - if echo "$STATUS" | grep -q playing; then - echo "#00ff00" - elif echo "$STATUS" | grep -q paused; then - echo "#ffff00" - 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 <github@nycroth.com> - -# 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 <http://www.gnu.org/licenses/>. - -#------------------------------------------------------------------------ - -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 28d387c..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 "~/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 <http://www.willwap.co.uk/Programs/vbrfix.php>), 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 <http://www.replaygain.org> 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 6853963..0000000 --- a/config/offlineimap/config +++ /dev/null @@ -1,22 +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 -autorefresh = 1 -postsynchook = ~/.local/sbin/newmail-notify - diff --git a/config/user-dirs.dirs b/config/user-dirs.dirs deleted file mode 100644 index 0363a56..0000000 --- a/config/user-dirs.dirs +++ /dev/null @@ -1,8 +0,0 @@ -XDG_DESKTOP_DIR="~" -XDG_DOWNLOAD_DIR="~/downloads" -XDG_TEMPLATES_DIR="~/templates" -XDG_PUBLICSHARE_DIR="~/share" -XDG_DOCUMENTS_DIR="~/documents" -XDG_MUSIC_DIR="~/music" -XDG_PICTURES_DIR="~/pictures" -XDG_VIDEOS_DIR="~/movies" |