From faf5196ff14186f1312398f7d99603db7abc9ad7 Mon Sep 17 00:00:00 2001 From: bauer Date: Tue, 24 Oct 2017 15:53:59 +0200 Subject: [PATCH] updated --- .i3/config | 215 ++ .i3/i3blocks.conf | 78 + .i3/i3log | 6 + .i3/scripts/cpu_usage | 60 + .i3/scripts/current_track | 4 + .i3/scripts/disk | 42 + .i3/scripts/exit_menu | 12 + .i3/scripts/gpu | 21 + .i3/scripts/keyboard_layout | 1 + .i3/scripts/load_average | 35 + .i3/scripts/memory | 67 + .i3/scripts/openvpn | 151 ++ .i3/scripts/shutdown_menu | 186 ++ .i3/scripts/song.awk | 22 + .i3/scripts/spotify.py | 12 + .i3/scripts/spotify_control | 40 + .i3/scripts/spotify_control.bck | 40 + .i3/scripts/ssd | 41 + .i3/scripts/tmux | 4 + .i3/scripts/volume | 46 + .i3/scripts/volume-pulseaudio | 162 ++ .i3/scripts/volume_1 | 71 + .i3/session | 3429 +++++++++++++++++++++++++++++++ .zshrc | 26 + matplotlibrc | 594 ++++++ 25 files changed, 5365 insertions(+) create mode 100644 .i3/config create mode 100644 .i3/i3blocks.conf create mode 100644 .i3/i3log create mode 100755 .i3/scripts/cpu_usage create mode 100755 .i3/scripts/current_track create mode 100755 .i3/scripts/disk create mode 100755 .i3/scripts/exit_menu create mode 100755 .i3/scripts/gpu create mode 100755 .i3/scripts/keyboard_layout create mode 100755 .i3/scripts/load_average create mode 100755 .i3/scripts/memory create mode 100755 .i3/scripts/openvpn create mode 100755 .i3/scripts/shutdown_menu create mode 100755 .i3/scripts/song.awk create mode 100755 .i3/scripts/spotify.py create mode 100755 .i3/scripts/spotify_control create mode 100755 .i3/scripts/spotify_control.bck create mode 100755 .i3/scripts/ssd create mode 100755 .i3/scripts/tmux create mode 100755 .i3/scripts/volume create mode 100755 .i3/scripts/volume-pulseaudio create mode 100755 .i3/scripts/volume_1 create mode 100644 .i3/session create mode 100644 matplotlibrc diff --git a/.i3/config b/.i3/config new file mode 100644 index 0000000..35a456f --- /dev/null +++ b/.i3/config @@ -0,0 +1,215 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout somewhen, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! +exec xrandr --auto --output DVI-D-0 --left-of HDMI-0 --primary + +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. ISO 10646 = Unicode +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, if you need a lot of unicode glyphs or +# right-to-left text rendering, you should instead use pango for rendering and +# chose a FreeType font, such as: +font pango:Source Code Pro for Powerline, FontAwesome Regular, Icons 12.5 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +#bindsym $mod+d exec dmenu_run + +# rofi +bindsym $mod+Tab exec rofi -show window +bindsym $mod+d exec "rofi -show combi -combi-modi window,drun" + + +# 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 + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon 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+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+colon 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+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen + +# 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+d focus child + +set $workspace1 1 +set $workspace2 2 +set $workspace3 3 +set $workspace4 4 +set $workspace5 5 +set $workspace6 6 +set $workspace7  +set $workspace8  +set $workspace9  + +# switch to workspace +bindsym $mod+1 workspace $workspace1 +bindsym $mod+2 workspace $workspace2 +bindsym $mod+3 workspace $workspace3 +bindsym $mod+4 workspace $workspace4 +bindsym $mod+5 workspace $workspace5 +bindsym $mod+6 workspace $workspace6 +bindsym $mod+7 workspace $workspace7 +bindsym $mod+8 workspace $workspace8 +bindsym $mod+9 workspace $workspace9 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $workspace1 +bindsym $mod+Shift+2 move container to workspace $workspace2 +bindsym $mod+Shift+3 move container to workspace $workspace3 +bindsym $mod+Shift+4 move container to workspace $workspace4 +bindsym $mod+Shift+5 move container to workspace $workspace5 +bindsym $mod+Shift+6 move container to workspace $workspace6 +bindsym $mod+Shift+7 move container to workspace $workspace7 +bindsym $mod+Shift+8 move container to workspace $workspace8 +bindsym $mod+Shift+9 move container to workspace $workspace9 + +# 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 +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# 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 j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon 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" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { + position top + status_command i3blocks -c ~/.i3/i3blocks.conf +} + +#$workspace1 output DVI-D-0 +#$workspace7 output HDMI-0 +#$workspace8 output HDMI-0 +#$workspace9 output HDMI-0 + +for_window [window_role="pop-up"] floating enable +for_window [class="Tk"] floating enable +for_window [title="PyMOL Viewer"] floating enable +for_window [class="Toplevel"] floating enable +for_window [title="VMD*"] floating enable +for_window [title="Area per Lipid*"] floating enable +for_window [title="MEMBPLUGIN"] floating enable +for_window [title="Figure*"] floating enable +for_window [window_role="conversation" class="Pidgin"] floating enable +for_window [class="Spotify"] move to workspace $workspace8 +assign [class="Thunderbird"] → $workspace9 +assign [class="Mendeley"] → $workspace7 +#assign [class="Spotify"] → $workspace8 +assign [title="Buddy List"] → $workspace9 +exec --no-startup-id thunderbird +exec --no-startup-id mendeleydesktop +exec --no-startup-id spotify +exec --no-startup-id pidgin + + + +exec feh --bg-scale ~/wallpaper.jpg +exec volumeicon +exec thunar --daemon +exec --no-startup-id xautolock -time 5 -locker 'i3lock -i ~/.lockscreen/`ls ~/lockscreens | shuf -n 1` -t -f' + +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ #increase sound volume +bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- #decrease sound volume +bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle # mute sound + +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness +bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness + +# Touchpad controls +bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad + +# Media player controls +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous +bindsym XF86HomePage exec "i3lock -i ~/lockscreens/`ls ~/lockscreens | shuf -n 1` -t -f" diff --git a/.i3/i3blocks.conf b/.i3/i3blocks.conf new file mode 100644 index 0000000..7ea64b8 --- /dev/null +++ b/.i3/i3blocks.conf @@ -0,0 +1,78 @@ +command=$SCRIPT_DIR/$BLOCK_NAME +full_text=| +color=#BFFF00 +align=center +separator=false +separator_block_width=8 +markup=pango + +[spotify] +command=python /home/bauer/.i3/scripts/spotify.py +interval=5 +label= + +[separator] +color=#a89984 + +[cpu_usage] +command=/home/bauer/.i3/scripts/cpu_usage +interval=1 +label= + +[separator] +color=#a89984 + +[gpu] +command=/home/bauer/.i3/scripts/gpu +interval=1 +label= + +[separator] +color=#a89984 + +[memory] +command=/home/bauer/.i3/scripts/memory +interval=1 +label= + +[separator] +color=#a89984 + +[disk] +command=/home/bauer/.i3/scripts/disk +interval=1 +label= HDD + +[separator] +color=#a89984 + +[disk] +command=/home/bauer/.i3/scripts/ssd +interval=1 +label= SSD + + +[separator] +color=#a89984 + +[date] +command=date '+%a %d %B' +interval=5 + +[time] +command=date '+%R' +interval=5 + +[separator] +color=#a89984 + +#if you prefer automatic updating +[volume-pulseaudio] +command=/home/bauer/.i3/scripts/volume-pulseaudio -SF 3 +interval=persist + + +[shutdown_menu] +full_text=V +command=/home/bauer/.i3/scripts/shutdown_menu -c + diff --git a/.i3/i3log b/.i3/i3log new file mode 100644 index 0000000..4836d24 --- /dev/null +++ b/.i3/i3log @@ -0,0 +1,6 @@ +11.11.2016 10:11:58 - ERROR: Using Xinerama instead of RandR. This option should be avoided at all cost because it does not refresh the list of screens, so you cannot configure displays at runtime. Please check if your driver really does not support RandR and disable this option as soon as you can. +11.11.2016 10:11:58 - i3 4.7.2 (2014-01-23, branch "tags/4.7.2") starting +11.11.2016 10:11:58 - Parsing configfile /home/bauer/.i3/config +deciding for version 4 due to this line: # i3 config file (v4) +11.11.2016 10:11:58 - [libi3] libi3/font.c Using X font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +ERROR: Another window manager seems to be running (X error 10) diff --git a/.i3/scripts/cpu_usage b/.i3/scripts/cpu_usage new file mode 100755 index 0000000..c445c58 --- /dev/null +++ b/.i3/scripts/cpu_usage @@ -0,0 +1,60 @@ +#!/usr/bin/perl +# +# Copyright 2014 Pierre Mavro +# Copyright 2014 Vivien Didelot +# Copyright 2014 Andreas Guldstrand +# +# Licensed under the terms of the GNU GPL v3, or any later version. + +use strict; +use warnings; +use utf8; +use Getopt::Long; + +# default values +my $t_warn = 50; +my $t_crit = 80; +my $cpu_usage = -1; +my $decimals = 0; + +sub help { + print "Usage: cpu_usage [-w ] [-c ] [-d ]\n"; + print "-w : warning threshold to become yellow\n"; + print "-c : critical threshold to become red\n"; + print "-d : Use decimals for percentage (default is $decimals) \n"; + exit 0; +} + +GetOptions("help|h" => \&help, +"w=i" => \$t_warn, +"c=i" => \$t_crit, +"d=i" => \$decimals, +); + +# Get CPU usage +$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is +open (MPSTAT, 'mpstat 1 1 |') or die; +while () { +if (/^.*\s+(\d+\.\d+)\s+$/) { +$cpu_usage = 100 - $1; # 100% - %idle +last; +} +} +close(MPSTAT); + +$cpu_usage eq -1 and die 'Can\'t find CPU information'; + +# Print short_text, full_text +printf "%.${decimals}f%%\n", $cpu_usage; +printf "%.${decimals}f%%\n", $cpu_usage; + +# Print color, if needed +if ($cpu_usage >= $t_crit) { +print "#fb4934\n"; +exit 33; +} elsif ($cpu_usage >= $t_warn) { +print "#fabd2f\n"; +} + +exit 0; + diff --git a/.i3/scripts/current_track b/.i3/scripts/current_track new file mode 100755 index 0000000..0eca7de --- /dev/null +++ b/.i3/scripts/current_track @@ -0,0 +1,4 @@ +#!/bin/bash + +eval $($(dirname $0)/sp eval) +echo ${SPOTIFY_ARTIST} - ${SPOTIFY_TITLE} diff --git a/.i3/scripts/disk b/.i3/scripts/disk new file mode 100755 index 0000000..07dd093 --- /dev/null +++ b/.i3/scripts/disk @@ -0,0 +1,42 @@ +#!/bin/sh +# Copyright (C) 2014 Julien Bonjean + +# 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 . + +DIR="/scratch" +ALERT_LOW="${1:-10}" # color will turn red under this value (default: 10%) + +df -h -P "$DIR" | awk -v alert_low=$ALERT_LOW ' +/\/.*/ { +# full text +print $4" ("$5")" + +# short text +print $4 + +use=$5 + +# no need to continue parsing +exit 0 +} + +END { +gsub(/%$/,"",use) +if (100 - use < alert_low) { + # color + print "#FF0000" +} +} +' + diff --git a/.i3/scripts/exit_menu b/.i3/scripts/exit_menu new file mode 100755 index 0000000..ca02b26 --- /dev/null +++ b/.i3/scripts/exit_menu @@ -0,0 +1,12 @@ +#!/bin/bash +while [ "$select" != "NO" -a "$select" != "YES" ]; do + select=$(echo -e 'NO\nYES' | dmenu -nb '#2f343f' + -nf '#f3f4f5' + -sb '#9575cd' + -sf '#f3f4f5' + -fn '-*-*-medium-r-normal-*-*-*-*-*-*-100-*-*' - + i -p "Are you sure you want to logout?") + [ -z "$select" ] && exit 0 +done +[ "$select" = "NO" ] && exit 0 +i3-msg exit diff --git a/.i3/scripts/gpu b/.i3/scripts/gpu new file mode 100755 index 0000000..3cfcf84 --- /dev/null +++ b/.i3/scripts/gpu @@ -0,0 +1,21 @@ +#!/bin/bash + +t_warn=50 +t_crit=70 + +GPU=$(nvidia-smi -q | grep Gpu | awk '{print $3}') + +if [ $GPU -gt $t_crit ] +then + printf " %d%%" "$GPU" + printf "\n %d%%" "$GPU" + printf "\n#fb4934\n" +elif [ $GPU -gt $t_warn ] +then + printf " %d%%" "$GPU" + printf "\n %d%%" "$GPU" + printf "\n#fabd2f\n" +else + printf " %d%%" "$GPU" + printf "\n %d%%" "$GPU" +fi diff --git a/.i3/scripts/keyboard_layout b/.i3/scripts/keyboard_layout new file mode 100755 index 0000000..8d71903 --- /dev/null +++ b/.i3/scripts/keyboard_layout @@ -0,0 +1 @@ +xkb-switch diff --git a/.i3/scripts/load_average b/.i3/scripts/load_average new file mode 100755 index 0000000..67e48f1 --- /dev/null +++ b/.i3/scripts/load_average @@ -0,0 +1,35 @@ +#!/bin/sh +# Copyright (C) 2014 Julien Bonjean + +# 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 . + +load="$(cut -d ' ' -f1 /proc/loadavg)" +cpus="$(nproc)" + +# full text +echo "$load" + +# short text +echo "$load" + +# color if load is too high +awk -v cpus=$cpus -v cpuload=$load ' + BEGIN { + if (cpus <= cpuload) { + print "#FF0000"; + exit 33; + } + } +' + diff --git a/.i3/scripts/memory b/.i3/scripts/memory new file mode 100755 index 0000000..1f94123 --- /dev/null +++ b/.i3/scripts/memory @@ -0,0 +1,67 @@ +#!/bin/sh +# Copyright (C) 2014 Julien Bonjean + +# 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 . + +TYPE="${BLOCK_INSTANCE:-mem}" + +awk -v type=$TYPE ' +/^MemTotal:/ { + mem_total=$2 +} +/^MemFree:/ { + mem_free=$2 +} +/^Buffers:/ { + mem_free+=$2 +} +/^Cached:/ { + mem_free+=$2 +} +/^SwapTotal:/ { + swap_total=$2 +} +/^SwapFree:/ { + swap_free=$2 +} +END { +if (type == "swap") { + free=swap_free/1024/102 + used=(swap_total-swap_free)/1024/1024 + total=swap_total/1024/1024 +} else { +free=mem_free/1024/1024 +used=(mem_total-mem_free)/1024/1024 +total=mem_total/1024/1024 +} +pct=used/total*100 + +# full text +printf("%.1fG / %.1fG ( %.f%% )\n", used, total, pct) + +# short text +printf("%.f%%\n", pct) + +# color +if (pct > 90) { + print("#E53935\n") + +} else if (pct > 80) { +print("#FFAE00\n") +} else if (pct > 70) { +print("#FFF600\n") +} +} +' /proc/meminfo + diff --git a/.i3/scripts/openvpn b/.i3/scripts/openvpn new file mode 100755 index 0000000..a4a357f --- /dev/null +++ b/.i3/scripts/openvpn @@ -0,0 +1,151 @@ +#!/usr/bin/perl +# Made by Pierre Mavro/Deimosfr +# Minor contribution by Thor K. H. +# Licensed under the terms of the GNU GPL v3, or any later version. +# Version: 0.3 + +# Usage: +# 1. The configuration name of OpenVPN should be familiar for you (home,work...) +# 2. The device name in your configuration file should be fully named (tun0,tap1...not only tun or tap) +# 3. When you launch one or multiple OpenVPN connexion, be sure the PID file is written in the correct folder (ex: --writepid /run/openvpn/home.pid) + +use strict; +use warnings; +use utf8; +use Getopt::Long; + +my $openvpn_enabled='/dev/shm/openvpn_i3blocks_enabled'; +my $openvpn_disabled='/dev/shm/openvpn_i3blocks_disabled'; + +# Print output +sub print_output { + my $ref_pid_files = shift; + my @pid_files = @$ref_pid_files; + my $change=0; + + # Total pid files + my $total_pid = @pid_files; + if ($total_pid == 0) { + print "down\n"x2; + # Delete OpenVPN i3blocks temp files + if (-f $openvpn_enabled) { + unlink $openvpn_enabled or die "Can't delete $openvpn_enabled\n"; + # Colorize if VPN has just went down + print '#FF0000\n'; + } + unless (-f $openvpn_disabled) { + open(my $shm, '>', $openvpn_disabled) or die "Can't write $openvpn_disabled\n"; + } + exit(0); + } + + # Check if interface device is present + my $vpn_found=0; + my $pid; + my $cmd_line; + my @config_name; + my @config_path; + my $interface; + my $current_config_path; + my $current_config_name; + foreach (@pid_files) { + # Get current PID + $pid=0; + open(PID, '<', $_); + while() { + chomp $_; + $pid = $_; + } + close(PID); + # Check if PID has been found + if ($pid ==0) { + print "Can't get PID $_: $!\n"; + } + + # Check if PID is still alive + $cmd_line='/proc/'.$pid.'/cmdline'; + if (-f $cmd_line) { + # Get config name + open(CMD_LINE, '<', $cmd_line); + while() { + chomp $_; + if ($_ =~ /--config\s*(.*\.conf)/) { + # Get interface from config file + $current_config_path = $1; + # Remove unwanted escape chars + $current_config_path =~ s/\x{00}//g; + $interface = 'null'; + # Get configuration name + if ($current_config_path =~ /(\w+).conf/) { + $current_config_name=$1; + } else { + $current_config_name='unknow'; + } + # Get OpenVPN interface device name + open(CONFIG, '<', $current_config_path) or die "Can't read config file '$current_config_path': $!\n"; + while() { + chomp $_; + if ($_ =~ /dev\s+(\w+)/) { + $interface=$1; + last; + } + } + close(CONFIG); + # check if interface exist + unless ($interface eq 'null') { + if (-d "/sys/class/net/$interface") { + push @config_name, $current_config_name; + $vpn_found=1; + # Write enabled file + unless (-f $openvpn_enabled) { + open(my $shm, '>', $openvpn_enabled) or die "Can't write $openvpn_enabled\n"; + $change=1; + } + } + } + } + } + close(CMD_LINE); + } + } + + # Check if PID found + my $names; + my $short_status; + if ($vpn_found == 1) { + $names = join('/', @config_name); + $short_status='up'; + } else { + $short_status='down'; + $names = $short_status; + } + + print "$names\n"; + print "$short_status\n"; + + # Print color if there were changes + print "#00FF00\n" if ($change == 1); + + exit(0); +} + +sub check_opts { + # Vars + my @pid_file=glob '/run/openvpn/*.pid'; + + # Set options + GetOptions( "help|h" => \&help, + "p=s" => \@pid_file); + + print_output(\@pid_file); +} + +sub help { + print "Usage: openvpn [-d pid folder files]\n"; + print "-d : pid folder files (default /run/openvpn/*.pid)\n"; + print "Note: devices in configuration file should be named with their number (ex: tun0, tap1)\n"; + exit(1); +} + +&check_opts; + diff --git a/.i3/scripts/shutdown_menu b/.i3/scripts/shutdown_menu new file mode 100755 index 0000000..75a9641 --- /dev/null +++ b/.i3/scripts/shutdown_menu @@ -0,0 +1,186 @@ +#!/usr/bin/env bash +# +# Use rofi/zenity to change system runstate thanks to systemd. +# +# Note: this currently relies on associative array support in the shell. +# +# Inspired from i3pystatus wiki: +# https://github.com/enkore/i3pystatus/wiki/Shutdown-Menu +# +# Copyright 2015 Benjamin Chrétien +# +# 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 . + +####################################################################### +# BEGIN CONFIG # +####################################################################### + +# Use a custom lock script +#LOCKSCRIPT="i3lock-extra -m pixelize" + +# Colors: FG (foreground), BG (background), HL (highlighted) +FG_COLOR="#bbbbbb" +BG_COLOR="#111111" +HLFG_COLOR="#111111" +HLBG_COLOR="#bbbbbb" +BORDER_COLOR="#222222" + +# Options not related to colors +ROFI_TEXT="Menu:" +ROFI_OPTIONS="-width -11 -location 3 -hide-scrollbar -bw 2" + +# Zenity options +ZENITY_TITLE="Menu" +ZENITY_TEXT="Action:" +ZENITY_OPTIONS="--column= --hide-header" + +####################################################################### +# END CONFIG # +####################################################################### + +# Whether to ask for user's confirmation +enable_confirmation=false + +# Preferred launcher if both are available +preferred_launcher="rofi" + +usage="$(basename "$0") [-h] [-c] [-p name] -- display a menu for shutdown, reboot, lock etc. + +where: +-h show this help text +-c ask for user confirmation +-p preferred launcher (rofi or zenity) + +This script depends on: +- systemd, +- i3, +- rofi or zenity." + +# Check whether the user-defined launcher is valid +launcher_list=(rofi zenity) +function check_launcher() { + if [[ ! "${launcher_list[@]}" =~ (^|[[:space:]])"$1"($|[[:space:]]) ]]; then + echo "Supported launchers: ${launcher_list[*]}" + exit 1 + else + # Get array with unique elements and preferred launcher first + # Note: uniq expects a sorted list, so we cannot use it + i=1 + launcher_list=($(for l in "$1" "${launcher_list[@]}"; do printf "%i %s\n" "$i" "$l"; let i+=1; done \ + | sort -uk2 | sort -nk1 | cut -d' ' -f2- | tr '\n' ' ')) + fi +} + +# Parse CLI arguments +while getopts "hcp:" option; do + case "${option}" in + h) echo "${usage}" + exit 0 + ;; + c) enable_confirmation=true + ;; + p) preferred_launcher="${OPTARG}" + check_launcher "${preferred_launcher}" + ;; + *) exit 1 + ;; + esac +done + +# Check whether a command exists +function command_exists() { + command -v "$1" &> /dev/null 2>&1 +} + +# systemctl required +if ! command_exists systemctl ; then + exit 1 +fi + +# menu defined as an associative array +typeset -A menu + +# Menu with keys/commands +menu=( +[Shutdown]="systemctl poweroff" +[Reboot]="systemctl reboot" +[Hibernate]="systemctl hibernate" +[Suspend]="systemctl suspend" +[Halt]="systemctl halt" +[Lock]="${LOCKSCRIPT:-i3lock --color=${BG_COLOR#"#"}}" +[Logout]="i3-msg exit" +[Cancel]="" +) +menu_nrows=${#menu[@]} + +# Menu entries that may trigger a confirmation message +menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout" + +launcher_exe="" +launcher_options="" +rofi_colors="" + +function prepare_launcher() { + if [[ "$1" == "rofi" ]]; then + rofi_colors="-bc ${BORDER_COLOR} -bg ${BG_COLOR} -fg ${FG_COLOR} \ + -hlfg ${HLFG_COLOR} -hlbg ${HLBG_COLOR}" + launcher_exe="rofi" + launcher_options="-dmenu -i -lines ${menu_nrows} -p ${ROFI_TEXT} \ + ${rofi_colors} ${ROFI_OPTIONS}" + elif [[ "$1" == "zenity" ]]; then + launcher_exe="zenity" + launcher_options="--list --title=${ZENITY_TITLE} --text=${ZENITY_TEXT} \ + ${ZENITY_OPTIONS}" + fi +} + +for l in "${launcher_list[@]}"; do + if command_exists "${l}" ; then + prepare_launcher "${l}" + break + fi +done + +# No launcher available +if [[ -z "${launcher_exe}" ]]; then + exit 1 +fi + +launcher="${launcher_exe} ${launcher_options}" +selection="$(printf '%s\n' "${!menu[@]}" | sort | ${launcher})" + +function ask_confirmation() { + if [ "${launcher_exe}" == "rofi" ]; then + confirmed=$(echo -e "Yes\nNo" | rofi -dmenu -i -lines 2 -p "${selection}?" \ + ${rofi_colors} ${ROFI_OPTIONS}) + [ "${confirmed}" == "Yes" ] && confirmed=0 + elif [ "${launcher_exe}" == "zenity" ]; then + zenity --question --text "Are you sure you want to ${selection,,}?" + confirmed=$? + fi + + if [ "${confirmed}" == 0 ]; then + i3-msg -q "exec ${menu[${selection}]}" + fi +} + +if [[ $? -eq 0 && ! -z ${selection} ]]; then + if [[ "${enable_confirmation}" = true && \ + ${menu_confirm} =~ (^|[[:space:]])"${selection}"($|[[:space:]]) ]]; then + ask_confirmation +else + i3-msg -q "exec ${menu[${selection}]}" +fi + fi + diff --git a/.i3/scripts/song.awk b/.i3/scripts/song.awk new file mode 100755 index 0000000..2ebbcb0 --- /dev/null +++ b/.i3/scripts/song.awk @@ -0,0 +1,22 @@ +/string *"xesam:artist/{ + while (1) { + getline line + if (line ~ /string "/) { + sub(/.*string "/, "artist:", line) + sub(/".*$/, "", line) + print line + break + } + } +} +/string *"xesam:title/{ + while(1) { + getline line + if (line ~ /string "/) { + sub(/.*string "/, "title:", line) + sub(/".*$/, "", line) + print line + break + } + } +} diff --git a/.i3/scripts/spotify.py b/.i3/scripts/spotify.py new file mode 100755 index 0000000..1e437ce --- /dev/null +++ b/.i3/scripts/spotify.py @@ -0,0 +1,12 @@ +#!/usr/bin/python + +import dbus +try: + bus = dbus.SessionBus() + spotify = bus.get_object("org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2") + spotify_iface = dbus.Interface(spotify, 'org.freedesktop.DBus.Properties') + props = spotify_iface.Get('org.mpris.MediaPlayer2.Player', 'Metadata') + print(str(props['xesam:artist'][0]) + " - " + str(props['xesam:title'])) + exit +except dbus.exceptions.DBusException: + exit diff --git a/.i3/scripts/spotify_control b/.i3/scripts/spotify_control new file mode 100755 index 0000000..f04462a --- /dev/null +++ b/.i3/scripts/spotify_control @@ -0,0 +1,40 @@ +#!/bin/bash + +if [ $# -lt 1 ] +then + echo "No command?" + exit +fi + +if [ "$(pidof spotify)" = "" ] +then + echo "Spotify is not running" + exit +fi + +case $1 in + "play") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause + ;; + "next") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next + ;; + "prev") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous + ;; + "getTitle") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ + ;; + "getArtist") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$ + ;; + "getAlbum") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "album"|egrep -v "album"|egrep -v "array"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ + ;; + "getStatus") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|grep 'string "[^"]*"'|sed 's/.*"\(.*\)"[^"]*$/\1/' + ;; + *) + echo "Unknown command: " $1 + ;; +esac diff --git a/.i3/scripts/spotify_control.bck b/.i3/scripts/spotify_control.bck new file mode 100755 index 0000000..f04462a --- /dev/null +++ b/.i3/scripts/spotify_control.bck @@ -0,0 +1,40 @@ +#!/bin/bash + +if [ $# -lt 1 ] +then + echo "No command?" + exit +fi + +if [ "$(pidof spotify)" = "" ] +then + echo "Spotify is not running" + exit +fi + +case $1 in + "play") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause + ;; + "next") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next + ;; + "prev") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous + ;; + "getTitle") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ + ;; + "getArtist") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$ + ;; + "getAlbum") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "album"|egrep -v "album"|egrep -v "array"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$ + ;; + "getStatus") + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|grep 'string "[^"]*"'|sed 's/.*"\(.*\)"[^"]*$/\1/' + ;; + *) + echo "Unknown command: " $1 + ;; +esac diff --git a/.i3/scripts/ssd b/.i3/scripts/ssd new file mode 100755 index 0000000..ea4f715 --- /dev/null +++ b/.i3/scripts/ssd @@ -0,0 +1,41 @@ +#!/bin/sh +# Copyright (C) 2014 Julien Bonjean + +# 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 . + +DIR="/" +ALERT_LOW="${1:-10}" # color will turn red under this value (default: 10%) + +df -h -P "$DIR" | awk -v alert_low=$ALERT_LOW ' +/\/.*/ { + # full text + print $4" ("$5")" + + # short text + print $4 + use=$5 + + # no need to continue parsing + exit 0 +} + +END { + gsub(/%$/,"",use) + if (100 - use < alert_low) { + # color + print "#FF0000" + } +} +' + diff --git a/.i3/scripts/tmux b/.i3/scripts/tmux new file mode 100755 index 0000000..acfea91 --- /dev/null +++ b/.i3/scripts/tmux @@ -0,0 +1,4 @@ +#!/bin/bash + +tmux list-sessions | wc -l + diff --git a/.i3/scripts/volume b/.i3/scripts/volume new file mode 100755 index 0000000..1cca821 --- /dev/null +++ b/.i3/scripts/volume @@ -0,0 +1,46 @@ +#!/usr/bin/env perl + +## The sink we are interested in should be given as the +## 1st argument to the script. +my $sink=$ARGV[0] || die("Need a sink number as the first argument\n"); + +## If the script has been run with a second argument, +## that argument will be the volume threshold we are checking +my $volume_limit=$ARGV[1]||undef; + +## Run the pactl command and save the output in +## ther filehandle $fh +open(my $fh, '-|', 'pactl list sinks'); + +## Set the record separator to consecutive newlines (same as -000) +## this means we read the info for each sink as a single "line". +$/="\n\n"; + +## Go through the pactl output +while (<$fh>) { + ## If this is the sink we are interested in + if (/#$sink/) { + ## Extract the current colume of this sink + /Volume:.*?(\d+)%/; + my $volume=$1; + ## If the script has been run with a second argument, + ## check whether the volume is above or below that + if ($volume_limit) { + ## If the volume os greater than or equal to the + ## value passed, print "y" + if ($volume >= $volume_limit) { + print "y\n"; + exit 0; + } + else { + print "n\n"; + exit 1; + } + } + ## Else, if the script has been run with just one argument, + ## print the current volume. + else { + print "$volume%\n"; + } + }# +} diff --git a/.i3/scripts/volume-pulseaudio b/.i3/scripts/volume-pulseaudio new file mode 100755 index 0000000..2aba24f --- /dev/null +++ b/.i3/scripts/volume-pulseaudio @@ -0,0 +1,162 @@ +#!/bin/bash +# Displays the default device, volume, and mute status for i3blocks + +AUDIO_HIGH_SYMBOL=' ' + +AUDIO_MED_THRESH=50 +AUDIO_MED_SYMBOL=' ' + +AUDIO_LOW_THRESH=0 +AUDIO_LOW_SYMBOL=' ' + +AUDIO_MUTED_SYMBOL=' ' + +AUDIO_INTERVAL=5 + +DEFAULT_COLOR="#ffffff" +MUTED_COLOR="#a0a0a0" + +LONG_FORMAT=0 +SHORT_FORMAT=2 +USE_PERCENT=1 +USE_ALSA_NAME=0 +USE_DESCRIPTION=0 + +SUBSCRIBE=0 + +while getopts F:Sf:padH:M:L:X:T:t:C:c:i:h opt; do + case "$opt" in + S) SUBSCRIBE=1 ;; + F) LONG_FORMAT="$OPTARG" ;; + f) SHORT_FORMAT="$OPTARG" ;; + p) USE_PERCENT=0 ;; + a) USE_ALSA_NAME=1 ;; + d) USE_DESCRIPTION=1 ;; + H) AUDIO_HIGH_SYMBOL="$OPTARG" ;; + M) AUDIO_MED_SYMBOL="$OPTARG" ;; + L) AUDIO_LOW_SYMBOL="$OPTARG" ;; + X) AUDIO_MUTED_SYMBOL="$OPTARG" ;; + T) AUDIO_MED_THRESH="$OPTARG" ;; + t) AUDIO_LOW_THRESH="$OPTARG" ;; + C) DEFAULT_COLOR="$OPTARG" ;; + c) MUTED_COLOR="$OPTARG" ;; + i) AUDIO_INTERVAL="$OPTARG" ;; + h) printf \ +"Usage: volume-pulseaudio [-S] [-F format] [-f format] [-p] [-a|-d] [-H symb] [-M symb] + [-L symb] [-X symb] [-T thresh] [-t thresh] [-C color] [-c color] [-i inter] [-h] +Options: +-F, -f\tOutput format (-F long format, -f short format) to use, amonst: +\t0\t symb vol [index:name]\t (default long) +\t1\t symb vol [name] +\t2\t symb vol [index]\t (default short) +\t3\t symb vol +-S\tSubscribe to volume events (requires persistent block, always uses long format) +-p\tOmit the percent sign (%%) in volume +-a\tUse ALSA name if possible +-d\tUse device description instead of name if possible +-H\tSymbol to use when audio level is high. Default: '$AUDIO_HIGH_SYMBOL' +-M\tSymbol to use when audio level is medium. Default: '$AUDIO_MED_SYMBOL' +-L\tSymbol to use when audio level is low. Default: '$AUDIO_LOW_SYMBOL' +-X\tSymbol to use when audio is muted. Default: '$AUDIO_MUTED_SYMBOL' +-T\tThreshold for medium audio level. Default: $AUDIO_MED_THRESH +-t\tThreshold for low audio level. Default: $AUDIO_LOW_THRESH +-C\tColor for non-muted audio. Default: $DEFAULT_COLOR +-c\tColor for muted audio. Default: $MUTED_COLOR +-i\tInterval size of volume increase/decrease. Default: $AUDIO_INTERVAL +-h\tShow this help text +" && exit 0;; + esac +done + +function move_sinks_to_new_default { + DEFAULT_SINK=$1 + pacmd list-sink-inputs | grep index: | grep -o '[0-9]\+' | while read SINK + do + pacmd move-sink-input $SINK $DEFAULT_SINK + done +} + +function set_default_playback_device_next { + inc=${1:-1} + num_devices=$(pacmd list-sinks | grep -c index:) + sink_arr=($(pacmd list-sinks | grep index: | grep -o '[0-9]\+')) + default_sink_index=$(( $(pacmd list-sinks | grep index: | grep -no '*' | grep -o '^[0-9]\+') - 1 )) + default_sink_index=$(( ($default_sink_index + $num_devices + $inc) % $num_devices )) + default_sink=${sink_arr[$default_sink_index]} + pacmd set-default-sink $default_sink + move_sinks_to_new_default $default_sink +} + +case "$BLOCK_BUTTON" in + 1) set_default_playback_device_next ;; + 2) amixer -q -D pulse sset Master toggle ;; + 3) set_default_playback_device_next -1 ;; + 4) amixer -q -D pulse sset Master $AUDIO_INTERVAL%+ ;; + 5) amixer -q -D pulse sset Master $AUDIO_INTERVAL%- ;; +esac + +function print_format { + PERCENT="%" + [[ $USE_PERCENT == 0 ]] && PERCENT="" + case "$1" in + 1) echo "$SYMBOL$VOL$PERCENT [$NAME]" ;; + 2) echo "$SYMBOL$VOL$PERCENT [$INDEX]";; + 3) echo "$SYMBOL$VOL$PERCENT" ;; + *) echo "$SYMBOL$VOL$PERCENT [$INDEX:$NAME]" ;; + esac +} + +function print_block { + for name in INDEX NAME VOL MUTED; do + read $name + done < <(pacmd list-sinks | grep "index:\|name:\|volume: front\|muted:" | grep -A3 '*') + INDEX=$(echo "$INDEX" | grep -o '[0-9]\+') + VOL=$(echo "$VOL" | grep -o "[0-9]*%" | head -1 ) + VOL="${VOL%?}" + + NAME=$(echo "$NAME" | sed \ +'s/.*<.*\.\(.*\)>.*/\1/; t;'\ +'s/.*<\(.*\)>.*/\1/; t;'\ +'s/.*/unknown/') + + if [[ $USE_ALSA_NAME == 1 ]] ; then + ALSA_NAME=$(pacmd list-sinks |\ +awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\ +grep "alsa.name\|alsa.mixer_name" |\ +head -n1 |\ +sed 's/.*= "\(.*\)".*/\1/') + NAME=${ALSA_NAME:-$NAME} + elif [[ $USE_DESCRIPTION == 1 ]] ; then + DESCRIPTION=$(pacmd list-sinks |\ +awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\ +grep "device.description" |\ +head -n1 |\ +sed 's/.*= "\(.*\)".*/\1/') + NAME=${DESCRIPTION:-$NAME} + fi + + if [[ $MUTED =~ "no" ]] ; then + SYMBOL=$AUDIO_HIGH_SYMBOL + [[ $VOL -le $AUDIO_MED_THRESH ]] && SYMBOL=$AUDIO_MED_SYMBOL + [[ $VOL -le $AUDIO_LOW_THRESH ]] && SYMBOL=$AUDIO_LOW_SYMBOL + COLOR=$DEFAULT_COLOR + else + SYMBOL=$AUDIO_MUTED_SYMBOL + COLOR=$MUTED_COLOR + fi + + if [[ $SUBSCRIBE == 1 ]] ; then + print_format "$LONG_FORMAT" + else + print_format "$LONG_FORMAT" + print_format "$SHORT_FORMAT" + echo "$COLOR" + fi +} + +print_block +if [[ $SUBSCRIBE == 1 ]] ; then + while read -r EVENT; do + print_block + done < <(pactl subscribe | stdbuf -oL grep change) +fi diff --git a/.i3/scripts/volume_1 b/.i3/scripts/volume_1 new file mode 100755 index 0000000..9e2ac0b --- /dev/null +++ b/.i3/scripts/volume_1 @@ -0,0 +1,71 @@ +#!/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 . + +#------------------------------------------------------------------------ + +# The second parameter overrides the mixer selection +# For PulseAudio users, use "pulse" +# For Jack/Jack2 users, use "jackplug" +# For ALSA users, you may use "default" for your primary card +# or you may use hw:# where # is the number of the card desired +MIXER="default" +[ -n "$(lsmod | grep pulse)" ] && MIXER="pulse" +[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug" +MIXER="${2:-$MIXER}" + +# The instance option sets the control to report and configure +# This defaults to the first control of your selected mixer +# For a list of the available, use `amixer -D $Your_Mixer scontrols` +SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols | +sed -n "s/Simple mixer control '\([A-Za-z ]*\)',0/\1/p" | +head -n1 +)}" + +# The first parameter sets the step to change the volume by (and units to display) +# This may be in in % or dB (eg. 5% or 3dB) +STEP="${1:-5%}" + +#------------------------------------------------------------------------ + +capability() { # Return "Capture" if the device is a capture device + amixer -D $MIXER get $SCONTROL | + sed -n "s/ Capabilities:.*cvolume.*/Capture/p" +} + +volume() { + amixer -D $MIXER get $SCONTROL $(capability) +} + +format() { + perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)' + perl_filter+='{CORE::say $4 eq "off" ? "0%" : "' + # If dB was selected, print that instead + perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1') + perl_filter+='"; exit}' + perl -ne "$perl_filter" +} + +#------------------------------------------------------------------------ + +case $BLOCK_BUTTON in + 3) amixer -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute + 4) amixer -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase + 5) amixer -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease +esac + +volume | format + diff --git a/.i3/session b/.i3/session new file mode 100644 index 0000000..6f172c4 --- /dev/null +++ b/.i3/session @@ -0,0 +1,3429 @@ +(dp0 +Vfullscreen_mode +p1 +I0 +sVorientation +p2 +Vhorizontal +p3 +sVfocus +p4 +(lp5 +I19560416 +aI21632144 +aI19506208 +asVsticky +p6 +I00 +sVurgent +p7 +I00 +sVlast_split_layout +p8 +Vsplith +p9 +sVfloating +p10 +Vauto_off +p11 +sVborder +p12 +Vnormal +p13 +sVid +p14 +I19503680 +sVcurrent_border_width +p15 +I-1 +sVlayout +p16 +Vsplith +p17 +sVpercent +p18 +F1.0 +sVworkspace_layout +p19 +Vdefault +p20 +sVwindow +p21 +NsVnodes +p22 +(lp23 +(dp24 +Vfullscreen_mode +p25 +I0 +sVorientation +p26 +Vnone +p27 +sVfocus +p28 +(lp29 +I19506672 +asVsticky +p30 +I00 +sVurgent +p31 +I00 +sVlast_split_layout +p32 +Vsplith +p33 +sVfloating +p34 +Vauto_off +p35 +sVborder +p36 +Vnormal +p37 +sVid +p38 +I19506208 +sVcurrent_border_width +p39 +I-1 +sVlayout +p40 +Voutput +p41 +sVpercent +p42 +F0.3333333333333333 +sVworkspace_layout +p43 +Vdefault +p44 +sVwindow +p45 +NsVnodes +p46 +(lp47 +(dp48 +Vfullscreen_mode +p49 +I0 +sVorientation +p50 +Vhorizontal +p51 +sVfocus +p52 +(lp53 +I19507136 +asVsticky +p54 +I00 +sVurgent +p55 +I00 +sVlast_split_layout +p56 +Vsplith +p57 +sVfloating +p58 +Vauto_off +p59 +sVborder +p60 +Vnormal +p61 +sVid +p62 +I19506672 +sVcurrent_border_width +p63 +I-1 +sVlayout +p64 +Vsplith +p65 +sVpercent +p66 +F1.0 +sVworkspace_layout +p67 +Vdefault +p68 +sVwindow +p69 +NsVnodes +p70 +(lp71 +(dp72 +Vfullscreen_mode +p73 +I1 +sVorientation +p74 +Vnone +p75 +sVfocus +p76 +(lp77 +sVsticky +p78 +I00 +sVurgent +p79 +I00 +sVnum +p80 +I-1 +sVlast_split_layout +p81 +Vsplith +p82 +sVfloating +p83 +Vauto_off +p84 +sVborder +p85 +Vnormal +p86 +sVid +p87 +I19507136 +sVcurrent_border_width +p88 +I-1 +sVlayout +p89 +Vsplith +p90 +sVpercent +p91 +F1.0 +sVworkspace_layout +p92 +Vdefault +p93 +sVwindow +p94 +NsVnodes +p95 +(lp96 +sVtype +p97 +Vworkspace +p98 +sVdeco_rect +p99 +(dp100 +Vy +p101 +I0 +sVx +p102 +I0 +sVheight +p103 +I0 +sVwidth +p104 +I0 +ssVswallows +p105 +(lp106 +sVfocused +p107 +I00 +sVscratchpad_state +p108 +Vnone +p109 +sVrect +p110 +(dp111 +g101 +I0 +sg102 +I0 +sVheight +p112 +I0 +sVwidth +p113 +I0 +ssVwindow_rect +p114 +(dp115 +g101 +I0 +sg102 +I0 +sVheight +p116 +I0 +sVwidth +p117 +I0 +ssVname +p118 +V__i3_scratch +p119 +sVgeometry +p120 +(dp121 +g101 +I0 +sg102 +I0 +sVheight +p122 +I0 +sVwidth +p123 +I0 +ssVfloating_nodes +p124 +(lp125 +sVoutput +p126 +V__i3 +p127 +sasVtype +p128 +Vcon +p129 +sVdeco_rect +p130 +(dp131 +g101 +I0 +sg102 +I0 +sVheight +p132 +I0 +sVwidth +p133 +I0 +ssVswallows +p134 +(lp135 +sVfocused +p136 +I00 +sVscratchpad_state +p137 +Vnone +p138 +sVrect +p139 +(dp140 +g101 +I0 +sg102 +I0 +sVheight +p141 +I0 +sVwidth +p142 +I0 +ssVwindow_rect +p143 +(dp144 +g101 +I0 +sg102 +I0 +sVheight +p145 +I0 +sVwidth +p146 +I0 +ssVname +p147 +Vcontent +p148 +sVgeometry +p149 +(dp150 +g101 +I0 +sg102 +I0 +sVheight +p151 +I0 +sVwidth +p152 +I0 +ssVfloating_nodes +p153 +(lp154 +sVoutput +p155 +V__i3 +p156 +sasVtype +p157 +Voutput +p158 +sVdeco_rect +p159 +(dp160 +g101 +I0 +sg102 +I0 +sVheight +p161 +I0 +sVwidth +p162 +I0 +ssVswallows +p163 +(lp164 +sVfocused +p165 +I00 +sVscratchpad_state +p166 +Vnone +p167 +sVrect +p168 +(dp169 +g101 +I0 +sg102 +I0 +sVheight +p170 +I1080 +sVwidth +p171 +I1920 +ssVwindow_rect +p172 +(dp173 +g101 +I0 +sg102 +I0 +sVheight +p174 +I0 +sVwidth +p175 +I0 +ssVname +p176 +V__i3 +p177 +sVgeometry +p178 +(dp179 +g101 +I0 +sg102 +I0 +sVheight +p180 +I0 +sVwidth +p181 +I0 +ssVfloating_nodes +p182 +(lp183 +sa(dp184 +Vfullscreen_mode +p185 +I0 +sVorientation +p186 +Vnone +p187 +sVfocus +p188 +(lp189 +I19564144 +aI19560880 +aI19605904 +asVsticky +p190 +I00 +sVurgent +p191 +I00 +sVlast_split_layout +p192 +Vsplith +p193 +sVfloating +p194 +Vauto_off +p195 +sVborder +p196 +Vnormal +p197 +sVid +p198 +I19560416 +sVcurrent_border_width +p199 +I-1 +sVlayout +p200 +Voutput +p201 +sVpercent +p202 +F0.3333333333333333 +sVworkspace_layout +p203 +Vdefault +p204 +sVwindow +p205 +NsVnodes +p206 +(lp207 +(dp208 +Vfullscreen_mode +p209 +I0 +sVorientation +p210 +Vnone +p211 +sVfocus +p212 +(lp213 +I19857344 +asVsticky +p214 +I00 +sVurgent +p215 +I00 +sVlast_split_layout +p216 +Vsplith +p217 +sVfloating +p218 +Vauto_off +p219 +sVborder +p220 +Vnormal +p221 +sVid +p222 +I19560880 +sVcurrent_border_width +p223 +I-1 +sVlayout +p224 +Vdockarea +p225 +sVpercent +p226 +F0.3333333333333333 +sVworkspace_layout +p227 +Vdefault +p228 +sVwindow +p229 +NsVnodes +p230 +(lp231 +(dp232 +Vwindow_properties +p233 +(dp234 +Vinstance +p235 +Vi3bar +p236 +sVtransient_for +p237 +NsVclass +p238 +Vi3bar +p239 +sVtitle +p240 +Vi3bar for output DVI-D-0 +p241 +ssVfullscreen_mode +p242 +I0 +sVorientation +p243 +Vnone +p244 +sVprocess +p245 +S'i3bar' +p246 +sVfocus +p247 +(lp248 +sVsticky +p249 +I00 +sVurgent +p250 +I00 +sVlast_split_layout +p251 +Vsplith +p252 +sVfloating +p253 +Vauto_off +p254 +sVborder +p255 +Vnormal +p256 +sVid +p257 +I19857344 +sVcurrent_border_width +p258 +I2 +sVlayout +p259 +Vsplith +p260 +sVpercent +p261 +F1.0 +sVworkspace_layout +p262 +Vdefault +p263 +sVwindow +p264 +I8388622 +sVnodes +p265 +(lp266 +sVtype +p267 +Vcon +p268 +sVdeco_rect +p269 +(dp270 +g101 +I0 +sg102 +I0 +sVheight +p271 +I0 +sVwidth +p272 +I0 +ssVswallows +p273 +(lp274 +sVfocused +p275 +I00 +sVscratchpad_state +p276 +Vnone +p277 +sVrect +p278 +(dp279 +g101 +I0 +sg102 +I0 +sVheight +p280 +I19 +sVwidth +p281 +I1920 +ssVwindow_rect +p282 +(dp283 +g101 +I0 +sg102 +I0 +sVheight +p284 +I19 +sVwidth +p285 +I1920 +ssVname +p286 +Vi3bar for output DVI-D-0 +p287 +sVgeometry +p288 +(dp289 +g101 +I1061 +sg102 +I0 +sVheight +p290 +I19 +sVwidth +p291 +I1920 +ssVfloating_nodes +p292 +(lp293 +sVoutput +p294 +VDVI-D-0 +p295 +sasVtype +p296 +Vdockarea +p297 +sVdeco_rect +p298 +(dp299 +g101 +I0 +sg102 +I0 +sVheight +p300 +I0 +sVwidth +p301 +I0 +ssVswallows +p302 +(lp303 +(dp304 +Vdock +p305 +I2 +sVinsert_where +p306 +I2 +sasVfocused +p307 +I00 +sVscratchpad_state +p308 +Vnone +p309 +sVrect +p310 +(dp311 +g101 +I0 +sg102 +I0 +sVheight +p312 +I19 +sVwidth +p313 +I1920 +ssVwindow_rect +p314 +(dp315 +g101 +I0 +sg102 +I0 +sVheight +p316 +I0 +sVwidth +p317 +I0 +ssVname +p318 +Vtopdock +p319 +sVgeometry +p320 +(dp321 +g101 +I0 +sg102 +I0 +sVheight +p322 +I0 +sVwidth +p323 +I0 +ssVfloating_nodes +p324 +(lp325 +sVoutput +p326 +VDVI-D-0 +p327 +sa(dp328 +Vfullscreen_mode +p329 +I0 +sVorientation +p330 +Vhorizontal +p331 +sVfocus +p332 +(lp333 +I19762768 +aI19597344 +asVsticky +p334 +I00 +sVurgent +p335 +I00 +sVlast_split_layout +p336 +Vsplith +p337 +sVfloating +p338 +Vauto_off +p339 +sVborder +p340 +Vnormal +p341 +sVid +p342 +I19564144 +sVcurrent_border_width +p343 +I-1 +sVlayout +p344 +Vsplith +p345 +sVpercent +p346 +F0.3333333333333333 +sVworkspace_layout +p347 +Vdefault +p348 +sVwindow +p349 +NsVnodes +p350 +(lp351 +(dp352 +Vfullscreen_mode +p353 +I0 +sVorientation +p354 +Vhorizontal +p355 +sVfocus +p356 +(lp357 +I19583856 +asVsticky +p358 +I00 +sVurgent +p359 +I00 +sVnum +p360 +I1 +sVlast_split_layout +p361 +Vsplith +p362 +sVfloating +p363 +Vauto_off +p364 +sVborder +p365 +Vnormal +p366 +sVid +p367 +I19597344 +sVcurrent_border_width +p368 +I-1 +sVlayout +p369 +Vsplith +p370 +sVpercent +p371 +F1.0 +sVworkspace_layout +p372 +Vstacked +p373 +sVwindow +p374 +NsVnodes +p375 +(lp376 +(dp377 +Vfullscreen_mode +p378 +I0 +sVorientation +p379 +Vhorizontal +p380 +sVfocus +p381 +(lp382 +I19537920 +asVsticky +p383 +I00 +sVurgent +p384 +I00 +sVlast_split_layout +p385 +Vsplith +p386 +sVfloating +p387 +Vauto_off +p388 +sVborder +p389 +Vnormal +p390 +sVid +p391 +I19583856 +sVcurrent_border_width +p392 +I-1 +sVlayout +p393 +Vsplith +p394 +sVpercent +p395 +F1.0 +sVworkspace_layout +p396 +Vdefault +p397 +sVwindow +p398 +NsVnodes +p399 +(lp400 +(dp401 +Vwindow_properties +p402 +(dp403 +Vinstance +p404 +Vterminator +p405 +sVtransient_for +p406 +NsVclass +p407 +VTerminator +p408 +sVtitle +p409 +Vbauer@bioinfo4: ~/Lehre/ModulBioinformatik/Praktikum/Solutions +p410 +ssVfullscreen_mode +p411 +I0 +sVorientation +p412 +Vnone +p413 +sg245 +S'terminator' +p414 +sVfocus +p415 +(lp416 +sVsticky +p417 +I00 +sVurgent +p418 +I00 +sVlast_split_layout +p419 +Vsplith +p420 +sVfloating +p421 +Vauto_off +p422 +sVborder +p423 +Vnormal +p424 +sVid +p425 +I19537920 +sVcurrent_border_width +p426 +I2 +sVlayout +p427 +Vsplith +p428 +sVpercent +p429 +F1.0 +sVworkspace_layout +p430 +Vdefault +p431 +sVwindow +p432 +I10485767 +sVnodes +p433 +(lp434 +sVtype +p435 +Vcon +p436 +sVdeco_rect +p437 +(dp438 +g101 +I0 +sg102 +I0 +sVheight +p439 +I18 +sVwidth +p440 +I1920 +ssVswallows +p441 +(lp442 +sVfocused +p443 +I00 +sVscratchpad_state +p444 +Vnone +p445 +sVrect +p446 +(dp447 +g101 +I37 +sg102 +I0 +sVheight +p448 +I1043 +sVwidth +p449 +I1920 +ssVwindow_rect +p450 +(dp451 +g101 +I0 +sg102 +I2 +sVheight +p452 +I1041 +sVwidth +p453 +I1916 +ssVname +p454 +Vbauer@bioinfo4: ~/Lehre/ModulBioinformatik/Praktikum/Solutions +p455 +sVgeometry +p456 +(dp457 +g101 +I0 +sg102 +I0 +sVheight +p458 +I478 +sVwidth +p459 +I734 +ssVfloating_nodes +p460 +(lp461 +sVoutput +p462 +VDVI-D-0 +p463 +sasVtype +p464 +Vcon +p465 +sVdeco_rect +p466 +(dp467 +g101 +I0 +sg102 +I0 +sVheight +p468 +I0 +sVwidth +p469 +I0 +ssVswallows +p470 +(lp471 +sVfocused +p472 +I00 +sVscratchpad_state +p473 +Vnone +p474 +sVrect +p475 +(dp476 +g101 +I19 +sg102 +I0 +sVheight +p477 +I1061 +sVwidth +p478 +I1920 +ssVwindow_rect +p479 +(dp480 +g101 +I0 +sg102 +I0 +sVheight +p481 +I0 +sVwidth +p482 +I0 +ssVname +p483 +NsVgeometry +p484 +(dp485 +g101 +I0 +sg102 +I0 +sVheight +p486 +I0 +sVwidth +p487 +I0 +ssVfloating_nodes +p488 +(lp489 +sVoutput +p490 +VDVI-D-0 +p491 +sasVtype +p492 +Vworkspace +p493 +sVdeco_rect +p494 +(dp495 +g101 +I0 +sg102 +I0 +sVheight +p496 +I0 +sVwidth +p497 +I0 +ssVswallows +p498 +(lp499 +sVfocused +p500 +I00 +sVscratchpad_state +p501 +Vnone +p502 +sVrect +p503 +(dp504 +g101 +I19 +sg102 +I0 +sVheight +p505 +I1061 +sVwidth +p506 +I1920 +ssVwindow_rect +p507 +(dp508 +g101 +I0 +sg102 +I0 +sVheight +p509 +I0 +sVwidth +p510 +I0 +ssVname +p511 +V1 +p512 +sVgeometry +p513 +(dp514 +g101 +I0 +sg102 +I0 +sVheight +p515 +I0 +sVwidth +p516 +I0 +ssVfloating_nodes +p517 +(lp518 +sVoutput +p519 +VDVI-D-0 +p520 +sa(dp521 +Vfullscreen_mode +p522 +I1 +sVorientation +p523 +Vhorizontal +p524 +sVfocus +p525 +(lp526 +I19862336 +aI19850144 +asVsticky +p527 +I00 +sVurgent +p528 +I00 +sVnum +p529 +I2 +sVlast_split_layout +p530 +Vsplith +p531 +sVfloating +p532 +Vauto_off +p533 +sVborder +p534 +Vnormal +p535 +sVid +p536 +I19762768 +sVcurrent_border_width +p537 +I-1 +sVlayout +p538 +Vsplith +p539 +sVpercent +p540 +NsVworkspace_layout +p541 +Vdefault +p542 +sVwindow +p543 +NsVnodes +p544 +(lp545 +(dp546 +Vwindow_properties +p547 +(dp548 +Vinstance +p549 +VNavigator +p550 +sVtransient_for +p551 +NsVwindow_role +p552 +Vbrowser +p553 +sVclass +p554 +VFirefox +p555 +sVtitle +p556 +VGitHub - joepestro/i3session: The missing session manager for i3-wm - Mozilla Firefox +p557 +ssVfullscreen_mode +p558 +I0 +sVorientation +p559 +Vnone +p560 +sg245 +S'firefox' +p561 +sVfocus +p562 +(lp563 +sVsticky +p564 +I00 +sVurgent +p565 +I00 +sVlast_split_layout +p566 +Vsplith +p567 +sVfloating +p568 +Vauto_off +p569 +sVborder +p570 +Vnormal +p571 +sVid +p572 +I19850144 +sVcurrent_border_width +p573 +I2 +sVlayout +p574 +Vsplith +p575 +sVpercent +p576 +F0.5 +sVworkspace_layout +p577 +Vdefault +p578 +sVwindow +p579 +I44040208 +sVnodes +p580 +(lp581 +sVtype +p582 +Vcon +p583 +sVdeco_rect +p584 +(dp585 +g101 +I0 +sg102 +I0 +sVheight +p586 +I18 +sVwidth +p587 +I960 +ssVswallows +p588 +(lp589 +sVfocused +p590 +I00 +sVscratchpad_state +p591 +Vnone +p592 +sVrect +p593 +(dp594 +g101 +I37 +sg102 +I0 +sVheight +p595 +I1043 +sVwidth +p596 +I960 +ssVwindow_rect +p597 +(dp598 +g101 +I0 +sg102 +I2 +sVheight +p599 +I1041 +sVwidth +p600 +I956 +ssVname +p601 +VGitHub - joepestro/i3session: The missing session manager for i3-wm - Mozilla Firefox +p602 +sVgeometry +p603 +(dp604 +g101 +I0 +sg102 +I0 +sVheight +p605 +I1041 +sVwidth +p606 +I1916 +ssVfloating_nodes +p607 +(lp608 +sVoutput +p609 +VDVI-D-0 +p610 +sa(dp611 +Vwindow_properties +p612 +(dp613 +Vinstance +p614 +Vterminator +p615 +sVtransient_for +p616 +NsVclass +p617 +VTerminator +p618 +sVtitle +p619 +Vbauer: i3session save +p620 +ssVfullscreen_mode +p621 +I0 +sVorientation +p622 +Vnone +p623 +sg245 +S'terminator' +p624 +sVfocus +p625 +(lp626 +sVsticky +p627 +I00 +sVurgent +p628 +I00 +sVlast_split_layout +p629 +Vsplith +p630 +sVfloating +p631 +Vauto_off +p632 +sVborder +p633 +Vnormal +p634 +sVid +p635 +I19862336 +sVcurrent_border_width +p636 +I2 +sVlayout +p637 +Vsplith +p638 +sVpercent +p639 +F0.5 +sVworkspace_layout +p640 +Vdefault +p641 +sVwindow +p642 +I46137351 +sVnodes +p643 +(lp644 +sVtype +p645 +Vcon +p646 +sVdeco_rect +p647 +(dp648 +g101 +I0 +sg102 +I960 +sVheight +p649 +I18 +sVwidth +p650 +I960 +ssVswallows +p651 +(lp652 +sVfocused +p653 +I01 +sVscratchpad_state +p654 +Vnone +p655 +sVrect +p656 +(dp657 +g101 +I37 +sg102 +I960 +sVheight +p658 +I1043 +sVwidth +p659 +I960 +ssVwindow_rect +p660 +(dp661 +g101 +I0 +sg102 +I2 +sVheight +p662 +I1041 +sVwidth +p663 +I956 +ssVname +p664 +Vbauer: i3session save +p665 +sVgeometry +p666 +(dp667 +g101 +I0 +sg102 +I0 +sVheight +p668 +I478 +sVwidth +p669 +I734 +ssVfloating_nodes +p670 +(lp671 +sVoutput +p672 +VDVI-D-0 +p673 +sasVtype +p674 +Vworkspace +p675 +sVdeco_rect +p676 +(dp677 +g101 +I0 +sg102 +I0 +sVheight +p678 +I0 +sVwidth +p679 +I0 +ssVswallows +p680 +(lp681 +sVfocused +p682 +I00 +sVscratchpad_state +p683 +Vnone +p684 +sVrect +p685 +(dp686 +g101 +I19 +sg102 +I0 +sVheight +p687 +I1061 +sVwidth +p688 +I1920 +ssVwindow_rect +p689 +(dp690 +g101 +I0 +sg102 +I0 +sVheight +p691 +I0 +sVwidth +p692 +I0 +ssVname +p693 +V2 +p694 +sVgeometry +p695 +(dp696 +g101 +I0 +sg102 +I0 +sVheight +p697 +I0 +sVwidth +p698 +I0 +ssVfloating_nodes +p699 +(lp700 +sVoutput +p701 +VDVI-D-0 +p702 +sasVtype +p703 +Vcon +p704 +sVdeco_rect +p705 +(dp706 +g101 +I0 +sg102 +I0 +sVheight +p707 +I0 +sVwidth +p708 +I0 +ssVswallows +p709 +(lp710 +sVfocused +p711 +I00 +sVscratchpad_state +p712 +Vnone +p713 +sVrect +p714 +(dp715 +g101 +I19 +sg102 +I0 +sVheight +p716 +I1061 +sVwidth +p717 +I1920 +ssVwindow_rect +p718 +(dp719 +g101 +I0 +sg102 +I0 +sVheight +p720 +I0 +sVwidth +p721 +I0 +ssVname +p722 +Vcontent +p723 +sVgeometry +p724 +(dp725 +g101 +I0 +sg102 +I0 +sVheight +p726 +I0 +sVwidth +p727 +I0 +ssVfloating_nodes +p728 +(lp729 +sVoutput +p730 +VDVI-D-0 +p731 +sa(dp732 +Vfullscreen_mode +p733 +I0 +sVorientation +p734 +Vnone +p735 +sVfocus +p736 +(lp737 +sVsticky +p738 +I00 +sVurgent +p739 +I00 +sVlast_split_layout +p740 +Vsplith +p741 +sVfloating +p742 +Vauto_off +p743 +sVborder +p744 +Vnormal +p745 +sVid +p746 +I19605904 +sVcurrent_border_width +p747 +I-1 +sVlayout +p748 +Vdockarea +p749 +sVpercent +p750 +F0.3333333333333333 +sVworkspace_layout +p751 +Vdefault +p752 +sVwindow +p753 +NsVnodes +p754 +(lp755 +sVtype +p756 +Vdockarea +p757 +sVdeco_rect +p758 +(dp759 +g101 +I0 +sg102 +I0 +sVheight +p760 +I0 +sVwidth +p761 +I0 +ssVswallows +p762 +(lp763 +(dp764 +Vdock +p765 +I3 +sVinsert_where +p766 +I2 +sasVfocused +p767 +I00 +sVscratchpad_state +p768 +Vnone +p769 +sVrect +p770 +(dp771 +g101 +I1080 +sg102 +I0 +sVheight +p772 +I0 +sVwidth +p773 +I1920 +ssVwindow_rect +p774 +(dp775 +g101 +I0 +sg102 +I0 +sVheight +p776 +I0 +sVwidth +p777 +I0 +ssVname +p778 +Vbottomdock +p779 +sVgeometry +p780 +(dp781 +g101 +I0 +sg102 +I0 +sVheight +p782 +I0 +sVwidth +p783 +I0 +ssVfloating_nodes +p784 +(lp785 +sVoutput +p786 +VDVI-D-0 +p787 +sasVtype +p788 +Voutput +p789 +sVdeco_rect +p790 +(dp791 +g101 +I0 +sg102 +I0 +sVheight +p792 +I0 +sVwidth +p793 +I0 +ssVswallows +p794 +(lp795 +sVfocused +p796 +I00 +sVscratchpad_state +p797 +Vnone +p798 +sVrect +p799 +(dp800 +g101 +I0 +sg102 +I0 +sVheight +p801 +I1080 +sVwidth +p802 +I1920 +ssVwindow_rect +p803 +(dp804 +g101 +I0 +sg102 +I0 +sVheight +p805 +I0 +sVwidth +p806 +I0 +ssVname +p807 +VDVI-D-0 +p808 +sVgeometry +p809 +(dp810 +g101 +I0 +sg102 +I0 +sVheight +p811 +I0 +sVwidth +p812 +I0 +ssVfloating_nodes +p813 +(lp814 +sa(dp815 +Vfullscreen_mode +p816 +I0 +sVorientation +p817 +Vnone +p818 +sVfocus +p819 +(lp820 +I19787744 +aI19861872 +aI21631456 +asVsticky +p821 +I00 +sVurgent +p822 +I00 +sVlast_split_layout +p823 +Vsplith +p824 +sVfloating +p825 +Vauto_off +p826 +sVborder +p827 +Vnormal +p828 +sVid +p829 +I21632144 +sVcurrent_border_width +p830 +I-1 +sVlayout +p831 +Voutput +p832 +sVpercent +p833 +F0.3333333333333333 +sVworkspace_layout +p834 +Vdefault +p835 +sVwindow +p836 +NsVnodes +p837 +(lp838 +(dp839 +Vfullscreen_mode +p840 +I0 +sVorientation +p841 +Vnone +p842 +sVfocus +p843 +(lp844 +I19542880 +asVsticky +p845 +I00 +sVurgent +p846 +I00 +sVlast_split_layout +p847 +Vsplith +p848 +sVfloating +p849 +Vauto_off +p850 +sVborder +p851 +Vnormal +p852 +sVid +p853 +I19861872 +sVcurrent_border_width +p854 +I-1 +sVlayout +p855 +Vdockarea +p856 +sVpercent +p857 +NsVworkspace_layout +p858 +Vdefault +p859 +sVwindow +p860 +NsVnodes +p861 +(lp862 +(dp863 +Vwindow_properties +p864 +(dp865 +Vinstance +p866 +Vi3bar +p867 +sVtransient_for +p868 +NsVclass +p869 +Vi3bar +p870 +sVtitle +p871 +Vi3bar for output HDMI-0 +p872 +ssVfullscreen_mode +p873 +I0 +sVorientation +p874 +Vnone +p875 +sg245 +S'i3bar' +p876 +sVfocus +p877 +(lp878 +sVsticky +p879 +I00 +sVurgent +p880 +I00 +sVlast_split_layout +p881 +Vsplith +p882 +sVfloating +p883 +Vauto_off +p884 +sVborder +p885 +Vnormal +p886 +sVid +p887 +I19542880 +sVcurrent_border_width +p888 +I2 +sVlayout +p889 +Vsplith +p890 +sVpercent +p891 +F1.0 +sVworkspace_layout +p892 +Vdefault +p893 +sVwindow +p894 +I8388652 +sVnodes +p895 +(lp896 +sVtype +p897 +Vcon +p898 +sVdeco_rect +p899 +(dp900 +g101 +I0 +sg102 +I0 +sVheight +p901 +I0 +sVwidth +p902 +I0 +ssVswallows +p903 +(lp904 +sVfocused +p905 +I00 +sVscratchpad_state +p906 +Vnone +p907 +sVrect +p908 +(dp909 +g101 +I0 +sg102 +I1920 +sVheight +p910 +I19 +sVwidth +p911 +I1920 +ssVwindow_rect +p912 +(dp913 +g101 +I0 +sg102 +I0 +sVheight +p914 +I19 +sVwidth +p915 +I1920 +ssVname +p916 +Vi3bar for output HDMI-0 +p917 +sVgeometry +p918 +(dp919 +g101 +I1061 +sg102 +I1920 +sVheight +p920 +I19 +sVwidth +p921 +I1920 +ssVfloating_nodes +p922 +(lp923 +sVoutput +p924 +VHDMI-0 +p925 +sasVtype +p926 +Vdockarea +p927 +sVdeco_rect +p928 +(dp929 +g101 +I0 +sg102 +I0 +sVheight +p930 +I0 +sVwidth +p931 +I0 +ssVswallows +p932 +(lp933 +(dp934 +Vdock +p935 +I2 +sVinsert_where +p936 +I2 +sasVfocused +p937 +I00 +sVscratchpad_state +p938 +Vnone +p939 +sVrect +p940 +(dp941 +g101 +I0 +sg102 +I1920 +sVheight +p942 +I19 +sVwidth +p943 +I1920 +ssVwindow_rect +p944 +(dp945 +g101 +I0 +sg102 +I0 +sVheight +p946 +I0 +sVwidth +p947 +I0 +ssVname +p948 +Vtopdock +p949 +sVgeometry +p950 +(dp951 +g101 +I0 +sg102 +I0 +sVheight +p952 +I0 +sVwidth +p953 +I0 +ssVfloating_nodes +p954 +(lp955 +sVoutput +p956 +VHDMI-0 +p957 +sa(dp958 +Vfullscreen_mode +p959 +I0 +sVorientation +p960 +Vhorizontal +p961 +sVfocus +p962 +(lp963 +I19535856 +aI19526224 +asVsticky +p964 +I00 +sVurgent +p965 +I00 +sVlast_split_layout +p966 +Vsplith +p967 +sVfloating +p968 +Vauto_off +p969 +sVborder +p970 +Vnormal +p971 +sVid +p972 +I19787744 +sVcurrent_border_width +p973 +I-1 +sVlayout +p974 +Vsplith +p975 +sVpercent +p976 +NsVworkspace_layout +p977 +Vdefault +p978 +sVwindow +p979 +NsVnodes +p980 +(lp981 +(dp982 +Vfullscreen_mode +p983 +I0 +sVorientation +p984 +Vhorizontal +p985 +sVfocus +p986 +(lp987 +I19526688 +asVsticky +p988 +I00 +sVurgent +p989 +I00 +sVnum +p990 +I7 +sVlast_split_layout +p991 +Vsplith +p992 +sVfloating +p993 +Vauto_off +p994 +sVborder +p995 +Vnormal +p996 +sVid +p997 +I19526224 +sVcurrent_border_width +p998 +I-1 +sVlayout +p999 +Vsplith +p1000 +sVpercent +p1001 +F0.5 +sVworkspace_layout +p1002 +Vdefault +p1003 +sVwindow +p1004 +NsVnodes +p1005 +(lp1006 +(dp1007 +Vwindow_properties +p1008 +(dp1009 +Vinstance +p1010 +Vspotify +p1011 +sVtransient_for +p1012 +NsVclass +p1013 +VSpotify +p1014 +sVtitle +p1015 +VRage Against The Machine - Take the Power Back +p1016 +ssVfullscreen_mode +p1017 +I0 +sVorientation +p1018 +Vnone +p1019 +sg245 +S'spotify' +p1020 +sVfocus +p1021 +(lp1022 +sVsticky +p1023 +I00 +sVurgent +p1024 +I00 +sVlast_split_layout +p1025 +Vsplith +p1026 +sVfloating +p1027 +Vauto_off +p1028 +sVborder +p1029 +Vnormal +p1030 +sVid +p1031 +I19526688 +sVcurrent_border_width +p1032 +I2 +sVlayout +p1033 +Vsplith +p1034 +sVpercent +p1035 +F1.0 +sVworkspace_layout +p1036 +Vdefault +p1037 +sVwindow +p1038 +I27262977 +sVnodes +p1039 +(lp1040 +sVtype +p1041 +Vcon +p1042 +sVdeco_rect +p1043 +(dp1044 +g101 +I0 +sg102 +I0 +sVheight +p1045 +I18 +sVwidth +p1046 +I1920 +ssVswallows +p1047 +(lp1048 +sVfocused +p1049 +I00 +sVscratchpad_state +p1050 +Vnone +p1051 +sVrect +p1052 +(dp1053 +g101 +I37 +sg102 +I1920 +sVheight +p1054 +I1043 +sVwidth +p1055 +I1920 +ssVwindow_rect +p1056 +(dp1057 +g101 +I0 +sg102 +I2 +sVheight +p1058 +I1041 +sVwidth +p1059 +I1916 +ssVname +p1060 +VRage Against The Machine - Take the Power Back +p1061 +sVgeometry +p1062 +(dp1063 +g101 +I0 +sg102 +I0 +sVheight +p1064 +I600 +sVwidth +p1065 +I800 +ssVfloating_nodes +p1066 +(lp1067 +sVoutput +p1068 +VHDMI-0 +p1069 +sasVtype +p1070 +Vworkspace +p1071 +sVdeco_rect +p1072 +(dp1073 +g101 +I0 +sg102 +I0 +sVheight +p1074 +I0 +sVwidth +p1075 +I0 +ssVswallows +p1076 +(lp1077 +sVfocused +p1078 +I00 +sVscratchpad_state +p1079 +Vnone +p1080 +sVrect +p1081 +(dp1082 +g101 +I19 +sg102 +I1920 +sVheight +p1083 +I1061 +sVwidth +p1084 +I1920 +ssVwindow_rect +p1085 +(dp1086 +g101 +I0 +sg102 +I0 +sVheight +p1087 +I0 +sVwidth +p1088 +I0 +ssVname +p1089 +V7 +p1090 +sVgeometry +p1091 +(dp1092 +g101 +I0 +sg102 +I0 +sVheight +p1093 +I0 +sVwidth +p1094 +I0 +ssVfloating_nodes +p1095 +(lp1096 +sVoutput +p1097 +VHDMI-0 +p1098 +sa(dp1099 +Vfullscreen_mode +p1100 +I1 +sVorientation +p1101 +Vhorizontal +p1102 +sVfocus +p1103 +(lp1104 +I19539648 +aI19856272 +asVsticky +p1105 +I00 +sVurgent +p1106 +I00 +sVnum +p1107 +I9 +sVlast_split_layout +p1108 +Vsplith +p1109 +sVfloating +p1110 +Vauto_off +p1111 +sVborder +p1112 +Vnormal +p1113 +sVid +p1114 +I19535856 +sVcurrent_border_width +p1115 +I-1 +sVlayout +p1116 +Vsplith +p1117 +sVpercent +p1118 +F0.5 +sVworkspace_layout +p1119 +Vdefault +p1120 +sVwindow +p1121 +NsVnodes +p1122 +(lp1123 +(dp1124 +Vwindow_properties +p1125 +(dp1126 +Vinstance +p1127 +VPidgin +p1128 +sVtransient_for +p1129 +NsVwindow_role +p1130 +Vbuddy_list +p1131 +sVclass +p1132 +VPidgin +p1133 +sVtitle +p1134 +VBuddy List +p1135 +ssVfullscreen_mode +p1136 +I0 +sVorientation +p1137 +Vnone +p1138 +sg245 +S'pidgin' +p1139 +sVfocus +p1140 +(lp1141 +sVsticky +p1142 +I00 +sVurgent +p1143 +I00 +sVlast_split_layout +p1144 +Vsplith +p1145 +sVfloating +p1146 +Vauto_off +p1147 +sVborder +p1148 +Vnormal +p1149 +sVid +p1150 +I19539648 +sVcurrent_border_width +p1151 +I2 +sVlayout +p1152 +Vsplith +p1153 +sVpercent +p1154 +F0.23529411764705876 +sVworkspace_layout +p1155 +Vdefault +p1156 +sVwindow +p1157 +I16777305 +sVnodes +p1158 +(lp1159 +sVtype +p1160 +Vcon +p1161 +sVdeco_rect +p1162 +(dp1163 +g101 +I0 +sg102 +I0 +sVheight +p1164 +I18 +sVwidth +p1165 +I452 +ssVswallows +p1166 +(lp1167 +sVfocused +p1168 +I00 +sVscratchpad_state +p1169 +Vnone +p1170 +sVrect +p1171 +(dp1172 +g101 +I37 +sg102 +I1920 +sVheight +p1173 +I1043 +sVwidth +p1174 +I452 +ssVwindow_rect +p1175 +(dp1176 +g101 +I0 +sg102 +I2 +sVheight +p1177 +I1041 +sVwidth +p1178 +I448 +ssVname +p1179 +VBuddy List +p1180 +sVgeometry +p1181 +(dp1182 +g101 +I37 +sg102 +I1920 +sVheight +p1183 +I1041 +sVwidth +p1184 +I956 +ssVfloating_nodes +p1185 +(lp1186 +sVoutput +p1187 +VHDMI-0 +p1188 +sa(dp1189 +Vwindow_properties +p1190 +(dp1191 +Vinstance +p1192 +VMail +p1193 +sVtransient_for +p1194 +NsVwindow_role +p1195 +V3pane +p1196 +sVclass +p1197 +VThunderbird +p1198 +sVtitle +p1199 +VInbox - bauer@cbs.tu-darmstadt.de - Mozilla Thunderbird +p1200 +ssVfullscreen_mode +p1201 +I0 +sVorientation +p1202 +Vnone +p1203 +sg245 +S'thunderbird' +p1204 +sVfocus +p1205 +(lp1206 +sVsticky +p1207 +I00 +sVurgent +p1208 +I00 +sVlast_split_layout +p1209 +Vsplith +p1210 +sVfloating +p1211 +Vauto_off +p1212 +sVborder +p1213 +Vnormal +p1214 +sVid +p1215 +I19856272 +sVcurrent_border_width +p1216 +I2 +sVlayout +p1217 +Vsplith +p1218 +sVpercent +p1219 +F0.7647058823529412 +sVworkspace_layout +p1220 +Vdefault +p1221 +sVwindow +p1222 +I35651600 +sVnodes +p1223 +(lp1224 +sVtype +p1225 +Vcon +p1226 +sVdeco_rect +p1227 +(dp1228 +g101 +I0 +sg102 +I452 +sVheight +p1229 +I18 +sVwidth +p1230 +I1468 +ssVswallows +p1231 +(lp1232 +sVfocused +p1233 +I00 +sVscratchpad_state +p1234 +Vnone +p1235 +sVrect +p1236 +(dp1237 +g101 +I37 +sg102 +I2372 +sVheight +p1238 +I1043 +sVwidth +p1239 +I1468 +ssVwindow_rect +p1240 +(dp1241 +g101 +I0 +sg102 +I2 +sVheight +p1242 +I1041 +sVwidth +p1243 +I1464 +ssVname +p1244 +VInbox - bauer@cbs.tu-darmstadt.de - Mozilla Thunderbird +p1245 +sVgeometry +p1246 +(dp1247 +g101 +I0 +sg102 +I0 +sVheight +p1248 +I1041 +sVwidth +p1249 +I956 +ssVfloating_nodes +p1250 +(lp1251 +sVoutput +p1252 +VHDMI-0 +p1253 +sasVtype +p1254 +Vworkspace +p1255 +sVdeco_rect +p1256 +(dp1257 +g101 +I0 +sg102 +I0 +sVheight +p1258 +I0 +sVwidth +p1259 +I0 +ssVswallows +p1260 +(lp1261 +sVfocused +p1262 +I00 +sVscratchpad_state +p1263 +Vnone +p1264 +sVrect +p1265 +(dp1266 +g101 +I19 +sg102 +I1920 +sVheight +p1267 +I1061 +sVwidth +p1268 +I1920 +ssVwindow_rect +p1269 +(dp1270 +g101 +I0 +sg102 +I0 +sVheight +p1271 +I0 +sVwidth +p1272 +I0 +ssVname +p1273 +V9 +p1274 +sVgeometry +p1275 +(dp1276 +g101 +I0 +sg102 +I0 +sVheight +p1277 +I0 +sVwidth +p1278 +I0 +ssVfloating_nodes +p1279 +(lp1280 +sVoutput +p1281 +VHDMI-0 +p1282 +sasVtype +p1283 +Vcon +p1284 +sVdeco_rect +p1285 +(dp1286 +g101 +I0 +sg102 +I0 +sVheight +p1287 +I0 +sVwidth +p1288 +I0 +ssVswallows +p1289 +(lp1290 +sVfocused +p1291 +I00 +sVscratchpad_state +p1292 +Vnone +p1293 +sVrect +p1294 +(dp1295 +g101 +I19 +sg102 +I1920 +sVheight +p1296 +I1061 +sVwidth +p1297 +I1920 +ssVwindow_rect +p1298 +(dp1299 +g101 +I0 +sg102 +I0 +sVheight +p1300 +I0 +sVwidth +p1301 +I0 +ssVname +p1302 +Vcontent +p1303 +sVgeometry +p1304 +(dp1305 +g101 +I0 +sg102 +I0 +sVheight +p1306 +I0 +sVwidth +p1307 +I0 +ssVfloating_nodes +p1308 +(lp1309 +sVoutput +p1310 +VHDMI-0 +p1311 +sa(dp1312 +Vfullscreen_mode +p1313 +I0 +sVorientation +p1314 +Vnone +p1315 +sVfocus +p1316 +(lp1317 +sVsticky +p1318 +I00 +sVurgent +p1319 +I00 +sVlast_split_layout +p1320 +Vsplith +p1321 +sVfloating +p1322 +Vauto_off +p1323 +sVborder +p1324 +Vnormal +p1325 +sVid +p1326 +I21631456 +sVcurrent_border_width +p1327 +I-1 +sVlayout +p1328 +Vdockarea +p1329 +sVpercent +p1330 +NsVworkspace_layout +p1331 +Vdefault +p1332 +sVwindow +p1333 +NsVnodes +p1334 +(lp1335 +sVtype +p1336 +Vdockarea +p1337 +sVdeco_rect +p1338 +(dp1339 +g101 +I0 +sg102 +I0 +sVheight +p1340 +I0 +sVwidth +p1341 +I0 +ssVswallows +p1342 +(lp1343 +(dp1344 +Vdock +p1345 +I3 +sVinsert_where +p1346 +I2 +sasVfocused +p1347 +I00 +sVscratchpad_state +p1348 +Vnone +p1349 +sVrect +p1350 +(dp1351 +g101 +I1080 +sg102 +I1920 +sVheight +p1352 +I0 +sVwidth +p1353 +I1920 +ssVwindow_rect +p1354 +(dp1355 +g101 +I0 +sg102 +I0 +sVheight +p1356 +I0 +sVwidth +p1357 +I0 +ssVname +p1358 +Vbottomdock +p1359 +sVgeometry +p1360 +(dp1361 +g101 +I0 +sg102 +I0 +sVheight +p1362 +I0 +sVwidth +p1363 +I0 +ssVfloating_nodes +p1364 +(lp1365 +sVoutput +p1366 +VHDMI-0 +p1367 +sasVtype +p1368 +Voutput +p1369 +sVdeco_rect +p1370 +(dp1371 +g101 +I0 +sg102 +I0 +sVheight +p1372 +I0 +sVwidth +p1373 +I0 +ssVswallows +p1374 +(lp1375 +sVfocused +p1376 +I00 +sVscratchpad_state +p1377 +Vnone +p1378 +sVrect +p1379 +(dp1380 +g101 +I0 +sg102 +I1920 +sVheight +p1381 +I1080 +sVwidth +p1382 +I1920 +ssVwindow_rect +p1383 +(dp1384 +g101 +I0 +sg102 +I0 +sVheight +p1385 +I0 +sVwidth +p1386 +I0 +ssVname +p1387 +VHDMI-0 +p1388 +sVgeometry +p1389 +(dp1390 +g101 +I0 +sg102 +I0 +sVheight +p1391 +I0 +sVwidth +p1392 +I0 +ssVfloating_nodes +p1393 +(lp1394 +sasVtype +p1395 +Vroot +p1396 +sVdeco_rect +p1397 +(dp1398 +g101 +I0 +sg102 +I0 +sVheight +p1399 +I0 +sVwidth +p1400 +I0 +ssVswallows +p1401 +(lp1402 +sVfocused +p1403 +I00 +sVscratchpad_state +p1404 +Vnone +p1405 +sVrect +p1406 +(dp1407 +g101 +I0 +sg102 +I0 +sVheight +p1408 +I1080 +sVwidth +p1409 +I3840 +ssVwindow_rect +p1410 +(dp1411 +g101 +I0 +sg102 +I0 +sVheight +p1412 +I0 +sVwidth +p1413 +I0 +ssVname +p1414 +Vroot +p1415 +sVgeometry +p1416 +(dp1417 +g101 +I0 +sg102 +I0 +sVheight +p1418 +I0 +sVwidth +p1419 +I0 +ssVfloating_nodes +p1420 +(lp1421 +s. \ No newline at end of file diff --git a/.zshrc b/.zshrc index 5b9c7ab..0b256e7 100644 --- a/.zshrc +++ b/.zshrc @@ -64,9 +64,35 @@ source $GMXRC # ============================================= +# ======= utility functions + +# supply id as +pdb() { + URL=http://www.rcsb.org/pdb/files/$1.pdb.gz + if [ -z "$2" ]; then + 2="./" + fi + + wget $URL -P $2 + gunzip $2/$1.pdb.gz +} + +# ========================= + # perl PATH="/home/bauer/perl5/bin${PATH:+:${PATH}}"; export PATH; PERL5LIB="/home/bauer/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; PERL_LOCAL_LIB_ROOT="/home/bauer/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; PERL_MB_OPT="--install_base \"/home/bauer/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE=/home/bauer/perl5"; export PERL_MM_OPT; + +# copernicus +export CPC_HOME=/opt/copernicus +export PATH=$PATH:$CPC_HOME + +# cuda +export CUDA_HOME=/opt/cuda; + +PYTHONPATH="$HOME/scripts" +PYTHONPATH="$PYTHONPATH:/opt/modeller9.19/modlib:/opt/modeller9.19/lib/x86_64-intel8/python3.3" +export PYTHONPATH diff --git a/matplotlibrc b/matplotlibrc new file mode 100644 index 0000000..60d8c04 --- /dev/null +++ b/matplotlibrc @@ -0,0 +1,594 @@ +#### CONFIGURATION BEGINS HERE + +# The default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo +# MacOSX Qt4Agg Qt5Agg TkAgg WX WXAgg Agg Cairo GDK PS PDF SVG +# Template. +# You can also deploy your own backend outside of matplotlib by +# referring to the module name (which must be in the PYTHONPATH) as +# 'module://my_backend'. +backend : TkAgg + +# If you are using the Qt4Agg backend, you can choose here +# to use the PyQt4 bindings or the newer PySide bindings to +# the underlying Qt4 toolkit. +#backend.qt4 : PyQt4 # PyQt4 | PySide + +# Note that this can be overridden by the environment variable +# QT_API used by Enthought Tool Suite (ETS); valid values are +# "pyqt" and "pyside". The "pyqt" setting has the side effect of +# forcing the use of Version 2 API for QString and QVariant. + +# The port to use for the web server in the WebAgg backend. +# webagg.port : 8888 + +# If webagg.port is unavailable, a number of other random ports will +# be tried until one that is available is found. +# webagg.port_retries : 50 + +# When True, open the webbrowser to the plot that is shown +# webagg.open_in_browser : True + +# When True, the figures rendered in the nbagg backend are created with +# a transparent background. +# nbagg.transparent : False + +# if you are running pyplot inside a GUI and your backend choice +# conflicts, we will automatically try to find a compatible one for +# you if backend_fallback is True +#backend_fallback: True + +#interactive : False +#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated) +#timezone : UTC # a pytz timezone string, e.g., US/Central or Europe/Paris + +# Where your matplotlib data lives if you installed to a non-default +# location. This is where the matplotlib fonts, bitmaps, etc reside +#datapath : /home/jdhunter/mpldata + + +### LINES +# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more +# information on line properties. +#lines.linewidth : 1 # line width in points +#lines.linestyle : - # solid line +#lines.color : C0 # has no affect on plot(); see axes.prop_cycle +#lines.marker : None # the default marker +#lines.markeredgewidth : 1.0 # the line width around the marker symbol +#lines.markersize : 6 # markersize, in points +#lines.dash_joinstyle : miter # miter|round|bevel +#lines.dash_capstyle : butt # butt|round|projecting +#lines.solid_joinstyle : miter # miter|round|bevel +#lines.solid_capstyle : projecting # butt|round|projecting +#lines.antialiased : True # render lines in antialiased (no jaggies) + +# The three standard dash patterns. These are scaled by the linewidth. +#lines.dashed_pattern : 2.8, 1.2 +#lines.dashdot_pattern : 4.8, 1.2, 0.8, 1.2 +#lines.dotted_pattern : 1.1, 1.1 +#lines.scale_dashes : True + +#markers.fillstyle: full # full|left|right|bottom|top|none + +### PATCHES +# Patches are graphical objects that fill 2D space, like polygons or +# circles. See +# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches +# information on patch properties +#patch.linewidth : 1 # edge width in points. +#patch.facecolor : C0 +#patch.edgecolor : black # if forced, or patch is not filled +#patch.force_edgecolor : False # True to always use edgecolor +#patch.antialiased : True # render patches in antialiased (no jaggies) + +### HATCHES +#hatch.color : k +#hatch.linewidth : 1.0 + +### Boxplot +#boxplot.notch : False +#boxplot.vertical : True +#boxplot.whiskers : 1.5 +#boxplot.bootstrap : None +#boxplot.patchartist : False +#boxplot.showmeans : False +#boxplot.showcaps : True +#boxplot.showbox : True +#boxplot.showfliers : True +#boxplot.meanline : False + +#boxplot.flierprops.color : 'k' +#boxplot.flierprops.marker : 'o' +#boxplot.flierprops.markerfacecolor : 'none' +#boxplot.flierprops.markeredgecolor : 'k' +#boxplot.flierprops.markersize : 6 +#boxplot.flierprops.linestyle : 'none' +#boxplot.flierprops.linewidth : 1.0 + +#boxplot.boxprops.color : 'k' +#boxplot.boxprops.linewidth : 1.0 +#boxplot.boxprops.linestyle : '-' + +#boxplot.whiskerprops.color : 'k' +#boxplot.whiskerprops.linewidth : 1.0 +#boxplot.whiskerprops.linestyle : '-' + +#boxplot.capprops.color : 'k' +#boxplot.capprops.linewidth : 1.0 +#boxplot.capprops.linestyle : '-' + +#boxplot.medianprops.color : 'C1' +#boxplot.medianprops.linewidth : 1.0 +#boxplot.medianprops.linestyle : '-' + +#boxplot.meanprops.color : 'C2' +#boxplot.meanprops.marker : '^' +#boxplot.meanprops.markerfacecolor : 'C2' +#boxplot.meanprops.markeredgecolor : 'C2' +#boxplot.meanprops.markersize : 6 +#boxplot.meanprops.linestyle : 'none' +#boxplot.meanprops.linewidth : 1.0 + +### FONT +# +# font properties used by text.Text. See +# http://matplotlib.org/api/font_manager_api.html for more +# information on font properties. The 6 font properties used for font +# matching are given below with their default values. +# +# The font.family property has five values: 'serif' (e.g., Times), +# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery), +# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of +# these font families has a default list of font names in decreasing +# order of priority associated with them. When text.usetex is False, +# font.family may also be one or more concrete font names. +# +# The font.style property has three values: normal (or roman), italic +# or oblique. The oblique style will be used for italic, if it is not +# present. +# +# The font.variant property has two values: normal or small-caps. For +# TrueType fonts, which are scalable fonts, small-caps is equivalent +# to using a font size of 'smaller', or about 83%% of the current font +# size. +# +# The font.weight property has effectively 13 values: normal, bold, +# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as +# 400, and bold is 700. bolder and lighter are relative values with +# respect to the current weight. +# +# The font.stretch property has 11 values: ultra-condensed, +# extra-condensed, condensed, semi-condensed, normal, semi-expanded, +# expanded, extra-expanded, ultra-expanded, wider, and narrower. This +# property is not currently implemented. +# +# The font.size property is the default font size for text, given in pts. +# 10 pt is the standard value. +# +#font.family : sans-serif +#font.style : normal +#font.variant : normal +#font.weight : medium +#font.stretch : normal +# note that font.size controls default text sizes. To configure +# special text sizes tick labels, axes, labels, title, etc, see the rc +# settings for axes and ticks. Special text sizes can be defined +# relative to font.size, using the following values: xx-small, x-small, +# small, medium, large, x-large, xx-large, larger, or smaller +#font.size : 10.0 +#font.serif : DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif +#font.sans-serif : DejaVu Sans, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif +#font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive +#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, Humor Sans, xkcd, fantasy +#font.monospace : DejaVu Sans Mono, Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace + +### TEXT +# text properties used by text.Text. See +# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more +# information on text properties + +#text.color : black + +### LaTeX customizations. See http://wiki.scipy.org/Cookbook/Matplotlib/UsingTex +#text.usetex : False # use latex for all text handling. The following fonts + # are supported through the usual rc parameter settings: + # new century schoolbook, bookman, times, palatino, + # zapf chancery, charter, serif, sans-serif, helvetica, + # avant garde, courier, monospace, computer modern roman, + # computer modern sans serif, computer modern typewriter + # If another font is desired which can loaded using the + # LaTeX \usepackage command, please inquire at the + # matplotlib mailing list +#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling + # unicode strings. +#text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES + # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP + # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. + # preamble is a comma separated list of LaTeX statements + # that are included in the LaTeX document preamble. + # An example: + # text.latex.preamble : \usepackage{bm},\usepackage{euler} + # The following packages are always loaded with usetex, so + # beware of package collisions: color, geometry, graphicx, + # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages + # may also be loaded, depending on your font settings + +#text.dvipnghack : None # some versions of dvipng don't handle alpha + # channel properly. Use True to correct + # and flush ~/.matplotlib/tex.cache + # before testing and False to force + # correction off. None will try and + # guess based on your dvipng version + +#text.hinting : auto # May be one of the following: + # 'none': Perform no hinting + # 'auto': Use FreeType's autohinter + # 'native': Use the hinting information in the + # font file, if available, and if your + # FreeType library supports it + # 'either': Use the native hinting information, + # or the autohinter if none is available. + # For backward compatibility, this value may also be + # True === 'auto' or False === 'none'. +#text.hinting_factor : 8 # Specifies the amount of softness for hinting in the + # horizontal direction. A value of 1 will hint to full + # pixels. A value of 2 will hint to half pixels etc. + +#text.antialiased : True # If True (default), the text will be antialiased. + # This only affects the Agg backend. + +# The following settings allow you to select the fonts in math mode. +# They map from a TeX font name to a fontconfig font pattern. +# These settings are only used if mathtext.fontset is 'custom'. +# Note that this "custom" mode is unsupported and may go away in the +# future. +#mathtext.cal : cursive +#mathtext.rm : serif +#mathtext.tt : monospace +#mathtext.it : serif:italic +#mathtext.bf : serif:bold +#mathtext.sf : sans +#mathtext.fontset : dejavusans # Should be 'dejavusans' (default), + # 'dejavuserif', 'cm' (Computer Modern), 'stix', + # 'stixsans' or 'custom' +#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern + # fonts when a symbol can not be found in one of + # the custom math fonts. + +#mathtext.default : it # The default font to use for math. + # Can be any of the LaTeX font names, including + # the special name "regular" for the same font + # used in regular text. + +### AXES +# default face and edge color, default tick sizes, +# default fontsizes for ticklabels, and so on. See +# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes +#axes.facecolor : white # axes background color +#axes.edgecolor : black # axes edge color +#axes.linewidth : 0.8 # edge linewidth +#axes.grid : False # display grid or not +#axes.titlesize : large # fontsize of the axes title +#axes.titlepad : 6.0 # pad between axes and title in points +#axes.labelsize : medium # fontsize of the x any y labels +#axes.labelpad : 4.0 # space between label and axis +#axes.labelweight : normal # weight of the x and y labels +#axes.labelcolor : black +#axes.axisbelow : 'line' # draw axis gridlines and ticks below + # patches (True); above patches but below + # lines ('line'); or above all (False) + +#axes.formatter.limits : -7, 7 # use scientific notation if log10 + # of the axis range is smaller than the + # first or larger than the second +#axes.formatter.use_locale : False # When True, format tick labels + # according to the user's locale. + # For example, use ',' as a decimal + # separator in the fr_FR locale. +#axes.formatter.use_mathtext : False # When True, use mathtext for scientific + # notation. +#axes.formatter.useoffset : True # If True, the tick label formatter + # will default to labeling ticks relative + # to an offset when the data range is + # small compared to the minimum absolute + # value of the data. +#axes.formatter.offset_threshold : 4 # When useoffset is True, the offset + # will be used when it can remove + # at least this number of significant + # digits from tick labels. + +# axes.spines.left : True # display axis spines +# axes.spines.bottom : True +# axes.spines.top : True +# axes.spines.right : True + + +#axes.unicode_minus : True # use unicode for the minus symbol + # rather than hyphen. See + # http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes +#axes.prop_cycle: cycler('color', ['0072B2', '009E73', 'D55E00', 'CC79A7', 'F0E442', '56B4E9']) +patch.facecolor: 0072B2 +#axes.autolimit_mode : data # How to scale axes limits to the data. + # Use "data" to use data limits, plus some margin + # Use "round_number" move to the nearest "round" number +#axes.xmargin : .05 # x margin. See `axes.Axes.margins` +#axes.ymargin : .05 # y margin See `axes.Axes.margins` + +#polaraxes.grid : True # display grid on polar axes +#axes3d.grid : True # display grid on 3d axes + +### DATES +# These control the default format strings used in AutoDateFormatter. +# Any valid format datetime format string can be used (see the python +# `datetime` for details). For example using '%%x' will use the locale date representation +# '%%X' will use the locale time representation and '%%c' will use the full locale datetime +# representation. +# These values map to the scales: +# {'year': 365, 'month': 30, 'day': 1, 'hour': 1/24, 'minute': 1 / (24 * 60)} + +# date.autoformatter.year : %Y +# date.autoformatter.month : %Y-%m +# date.autoformatter.day : %Y-%m-%d +# date.autoformatter.hour : %m-%d %H +# date.autoformatter.minute : %d %H:%M +# date.autoformatter.second : %H:%M:%S +# date.autoformatter.microsecond : %M:%S.%f + +### TICKS +# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick +#xtick.top : False # draw ticks on the top side +#xtick.bottom : True # draw ticks on the bottom side +#xtick.major.size : 3.5 # major tick size in points +#xtick.minor.size : 2 # minor tick size in points +#xtick.major.width : 0.8 # major tick width in points +#xtick.minor.width : 0.6 # minor tick width in points +#xtick.major.pad : 3.5 # distance to major tick label in points +#xtick.minor.pad : 3.4 # distance to the minor tick label in points +#xtick.color : k # color of the tick labels +#xtick.labelsize : medium # fontsize of the tick labels +#xtick.direction : out # direction: in, out, or inout +#xtick.minor.visible : False # visibility of minor ticks on x-axis +#xtick.major.top : True # draw x axis top major ticks +#xtick.major.bottom : True # draw x axis bottom major ticks +#xtick.minor.top : True # draw x axis top minor ticks +#xtick.minor.bottom : True # draw x axis bottom minor ticks + +#ytick.left : True # draw ticks on the left side +#ytick.right : False # draw ticks on the right side +#ytick.major.size : 3.5 # major tick size in points +#ytick.minor.size : 2 # minor tick size in points +#ytick.major.width : 0.8 # major tick width in points +#ytick.minor.width : 0.6 # minor tick width in points +#ytick.major.pad : 3.5 # distance to major tick label in points +#ytick.minor.pad : 3.4 # distance to the minor tick label in points +#ytick.color : k # color of the tick labels +#ytick.labelsize : medium # fontsize of the tick labels +#ytick.direction : out # direction: in, out, or inout +#ytick.minor.visible : False # visibility of minor ticks on y-axis +#ytick.major.left : True # draw y axis left major ticks +#ytick.major.right : True # draw y axis right major ticks +#ytick.minor.left : True # draw y axis left minor ticks +#ytick.minor.right : True # draw y axis right minor ticks + + +### GRIDS +#grid.color : b0b0b0 # grid color +#grid.linestyle : - # solid +#grid.linewidth : 0.8 # in points +#grid.alpha : 1.0 # transparency, between 0.0 and 1.0 + +### Legend +#legend.loc : best +#legend.frameon : True # if True, draw the legend on a background patch +#legend.framealpha : 0.8 # legend patch transparency +#legend.facecolor : inherit # inherit from axes.facecolor; or color spec +#legend.edgecolor : 0.8 # background patch boundary color +#legend.fancybox : True # if True, use a rounded box for the + # legend background, else a rectangle +#legend.shadow : False # if True, give background a shadow effect +#legend.numpoints : 1 # the number of marker points in the legend line +#legend.scatterpoints : 1 # number of scatter points +#legend.markerscale : 1.0 # the relative size of legend markers vs. original +#legend.fontsize : medium +# Dimensions as fraction of fontsize: +#legend.borderpad : 0.4 # border whitespace +#legend.labelspacing : 0.5 # the vertical space between the legend entries +#legend.handlelength : 2.0 # the length of the legend lines +#legend.handleheight : 0.7 # the height of the legend handle +#legend.handletextpad : 0.8 # the space between the legend line and legend text +#legend.borderaxespad : 0.5 # the border between the axes and legend edge +#legend.columnspacing : 2.0 # column separation + +### FIGURE +# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure +#figure.titlesize : large # size of the figure title (Figure.suptitle()) +#figure.titleweight : normal # weight of the figure title +figure.figsize : 11.69 8.27 # figure size in inches +figure.dpi : 100 # figure dots per inch +#figure.facecolor : white # figure facecolor; 0.75 is scalar gray +#figure.edgecolor : white # figure edgecolor +figure.autolayout : True # When True, automatically adjust subplot + # parameters to make the plot fit the figure +#figure.max_open_warning : 20 # The maximum number of figures to open through + # the pyplot interface before emitting a warning. + # If less than one this feature is disabled. + +# The figure subplot parameters. All dimensions are a fraction of the +#figure.subplot.left : 0.125 # the left side of the subplots of the figure +#figure.subplot.right : 0.9 # the right side of the subplots of the figure +#figure.subplot.bottom : 0.11 # the bottom of the subplots of the figure +#figure.subplot.top : 0.88 # the top of the subplots of the figure +#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots, + # expressed as a fraction of the average axis width +#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots, + # expressed as a fraction of the average axis height + + +### IMAGES +#image.aspect : equal # equal | auto | a number +#image.interpolation : nearest # see help(imshow) for options +#image.cmap : viridis # A colormap name, gray etc... +#image.lut : 256 # the size of the colormap lookup table +#image.origin : upper # lower | upper +#image.resample : True +#image.composite_image : True # When True, all the images on a set of axes are + # combined into a single composite image before + # saving a figure as a vector graphics file, + # such as a PDF. + +### CONTOUR PLOTS +#contour.negative_linestyle : dashed # dashed | solid +#contour.corner_mask : True # True | False | legacy + +### ERRORBAR PLOTS +#errorbar.capsize : 0 # length of end cap on error bars in pixels + +### HISTOGRAM PLOTS +#hist.bins : 10 # The default number of histogram bins. + # If Numpy 1.11 or later is + # installed, may also be `auto` + +### SCATTER PLOTS +#scatter.marker : o # The default marker type for scatter plots. + +### Agg rendering +### Warning: experimental, 2008/10/10 +#agg.path.chunksize : 0 # 0 to disable; values in the range + # 10000 to 100000 can improve speed slightly + # and prevent an Agg rendering failure + # when plotting very large data sets, + # especially if they are very gappy. + # It may cause minor artifacts, though. + # A value of 20000 is probably a good + # starting point. +### SAVING FIGURES +#path.simplify : True # When True, simplify paths by removing "invisible" + # points to reduce file size and increase rendering + # speed +#path.simplify_threshold : 0.1 # The threshold of similarity below which + # vertices will be removed in the simplification + # process +#path.snap : True # When True, rectilinear axis-aligned paths will be snapped to + # the nearest pixel when certain criteria are met. When False, + # paths will never be snapped. +#path.sketch : None # May be none, or a 3-tuple of the form (scale, length, + # randomness). + # *scale* is the amplitude of the wiggle + # perpendicular to the line (in pixels). *length* + # is the length of the wiggle along the line (in + # pixels). *randomness* is the factor by which + # the length is randomly scaled. + +# the default savefig params can be different from the display params +# e.g., you may want a higher resolution, or to make the figure +# background white +#savefig.dpi : figure # figure dots per inch or 'figure' +#savefig.facecolor : white # figure facecolor when saving +#savefig.edgecolor : white # figure edgecolor when saving +#savefig.format : png # png, ps, pdf, svg +#savefig.bbox : standard # 'tight' or 'standard'. + # 'tight' is incompatible with pipe-based animation + # backends but will workd with temporary file based ones: + # e.g. setting animation.writer to ffmpeg will not work, + # use ffmpeg_file instead +#savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight' +#savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter. +#savefig.directory : ~ # default directory in savefig dialog box, + # leave empty to always use current working directory +#savefig.transparent : False # setting that controls whether figures are saved with a + # transparent background by default + +# tk backend params +#tk.window_focus : False # Maintain shell focus for TkAgg + +# ps backend params +#ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10 +#ps.useafm : False # use of afm fonts, results in small files +#ps.usedistiller : False # can be: None, ghostscript or xpdf + # Experimental: may produce smaller files. + # xpdf intended for production of publication quality files, + # but requires ghostscript, xpdf and ps2eps +#ps.distiller.res : 6000 # dpi +#ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) + +# pdf backend params +#pdf.compression : 6 # integer from 0 to 9 + # 0 disables compression (good for debugging) +#pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) + +# svg backend params +#svg.image_inline : True # write raster image data directly into the svg file +#svg.fonttype : 'path' # How to handle SVG fonts: +# 'none': Assume fonts are installed on the machine where the SVG will be viewed. +# 'path': Embed characters as paths -- supported by most SVG renderers +# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome, +# Opera and Safari +#svg.hashsalt : None # if not None, use this string as hash salt + # instead of uuid4 + +# docstring params +#docstring.hardcopy = False # set this when you want to generate hardcopy docstring + +# Set the verbose flags. This controls how much information +# matplotlib gives you at runtime and where it goes. The verbosity +# levels are: silent, helpful, debug, debug-annoying. Any level is +# inclusive of all the levels below it. If your setting is "debug", +# you'll get all the debug and helpful messages. When submitting +# problems to the mailing-list, please set verbose to "helpful" or "debug" +# and paste the output into your report. +# +# The "fileo" gives the destination for any calls to verbose.report. +# These objects can a filename, or a filehandle like sys.stdout. +# +# You can override the rc default verbosity from the command line by +# giving the flags --verbose-LEVEL where LEVEL is one of the legal +# levels, e.g., --verbose-helpful. +# +# You can access the verbose instance in your code +# from matplotlib import verbose. +#verbose.level : silent # one of silent, helpful, debug, debug-annoying +#verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr + +# Event keys to interact with figures/plots via keyboard. +# Customize these settings according to your needs. +# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '') + +#keymap.fullscreen : f, ctrl+f # toggling +#keymap.home : h, r, home # home or reset mnemonic +#keymap.back : left, c, backspace # forward / backward keys to enable +#keymap.forward : right, v # left handed quick navigation +#keymap.pan : p # pan mnemonic +#keymap.zoom : o # zoom mnemonic +#keymap.save : s # saving current figure +#keymap.quit : ctrl+w, cmd+w # close the current figure +#keymap.grid : g # switching on/off a grid in current axes +#keymap.yscale : l # toggle scaling of y-axes ('log'/'linear') +#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear') +#keymap.all_axes : a # enable all axes + +# Control location of examples data files +#examples.directory : '' # directory to look in for custom installation + +###ANIMATION settings +#animation.html : 'none' # How to display the animation as HTML in + # the IPython notebook. 'html5' uses + # HTML5 video tag. +#animation.writer : ffmpeg # MovieWriter 'backend' to use +#animation.codec : h264 # Codec to use for writing movie +#animation.bitrate: -1 # Controls size/quality tradeoff for movie. + # -1 implies let utility auto-determine +#animation.frame_format: 'png' # Controls frame format used by temp files +#animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path + # $PATH is searched +#animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg +#animation.avconv_path: 'avconv' # Path to avconv binary. Without full path + # $PATH is searched +#animation.avconv_args: '' # Additional arguments to pass to avconv +#animation.mencoder_path: 'mencoder' + # Path to mencoder binary. Without full path + # $PATH is searched +#animation.mencoder_args: '' # Additional arguments to pass to mencoder +#animation.convert_path: 'convert' # Path to ImageMagick's convert binary. + # On Windows use the full path since convert + # is also the name of a system tool. + +