Moves i3 to LEGACY
This commit is contained in:
		
							parent
							
								
									b811277aca
								
							
						
					
					
						commit
						5095b12c47
					
				
					 20 changed files with 0 additions and 0 deletions
				
			
		
							
								
								
									
										42
									
								
								LEGACY/i3/blocks/apache
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										42
									
								
								LEGACY/i3/blocks/apache
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,42 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
LAMPP='/opt/lampp/lampp'
 | 
			
		||||
STATUS=$($LAMPP status 2> /dev/null)
 | 
			
		||||
 | 
			
		||||
APACHE=$(echo "$STATUS" | grep -i apache | grep -io not > /dev/null && echo "down" || echo "up")
 | 
			
		||||
 | 
			
		||||
COLOUR=""
 | 
			
		||||
 | 
			
		||||
function toggleApache(){
 | 
			
		||||
	if [ $APACHE = "up" ]; then
 | 
			
		||||
		gksudo $LAMPP stopapache > /dev/null
 | 
			
		||||
	else
 | 
			
		||||
		gksudo $LAMPP startapache > /dev/null
 | 
			
		||||
		COLOUR="#FF8000"
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleAll(){
 | 
			
		||||
	if [ $APACHE = "up" ]; then
 | 
			
		||||
		gksudo $LAMPP stop
 | 
			
		||||
	else
 | 
			
		||||
		gksudo $LAMPP start
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
case $BLOCK_BUTTON in
 | 
			
		||||
	1) toggleApache ;;
 | 
			
		||||
	3) toggleAll ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
if [ -z "$COLOUR" ]; then
 | 
			
		||||
	if [ "$APACHE" = "up" ]; then
 | 
			
		||||
		COLOUR="#00FF00"
 | 
			
		||||
	else
 | 
			
		||||
		COLOUR="#FF0000"
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "Apache"
 | 
			
		||||
echo ""
 | 
			
		||||
echo "$COLOUR"
 | 
			
		||||
							
								
								
									
										34
									
								
								LEGACY/i3/blocks/archNews
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										34
									
								
								LEGACY/i3/blocks/archNews
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
# This shows the most recent part news article in the arch news rss feed
 | 
			
		||||
# Left-clicking will open the web page in the browser
 | 
			
		||||
# Right clicking will dismiss the feed by putting the title in the ~/.archNewsDismiss file
 | 
			
		||||
# Deleting / changing this file will un-dismiss the news item
 | 
			
		||||
 | 
			
		||||
title=$(rsstail -u https://www.archlinux.org/feeds/news/ -n 1 -1 | sed -e "s/^Title: //")
 | 
			
		||||
 | 
			
		||||
dismissed=""
 | 
			
		||||
if [ -f ~/.archNewsDismiss ]; then
 | 
			
		||||
	dismissed=$(head -n 1 ~/.archNewsDismiss)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
case $BLOCK_BUTTON in
 | 
			
		||||
	1)
 | 
			
		||||
		url=$(rsstail -u https://www.archlinux.org/feeds/news/ -l -n 1 -1 | tail -n 1 | sed -e "s/^Link: //")
 | 
			
		||||
		case $( uname -s ) in
 | 
			
		||||
		  Darwin)  open=open;;
 | 
			
		||||
		  MINGW*)  open=start;;
 | 
			
		||||
		  CYGWIN*) open=cygstart;;
 | 
			
		||||
		  MSYS*)   open="powershell.exe –NoProfile Start";;
 | 
			
		||||
		  *)       open=${BROWSER:-xdg-open};;
 | 
			
		||||
		esac
 | 
			
		||||
		$open $url > /dev/null
 | 
			
		||||
		;;
 | 
			
		||||
	3)
 | 
			
		||||
		echo $title > ~/.archNewsDismiss
 | 
			
		||||
		dismissed=$title
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
if [ "$dismissed" != "$title" ]; then
 | 
			
		||||
	echo $title
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										107
									
								
								LEGACY/i3/blocks/bandwidth
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										107
									
								
								LEGACY/i3/blocks/bandwidth
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,107 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>
 | 
			
		||||
# Copyright (C) 2014 kaueraal
 | 
			
		||||
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
 | 
			
		||||
 | 
			
		||||
# This program is free software: you can redistribute it and/or modify
 | 
			
		||||
# it under the terms of the GNU General Public License as published by
 | 
			
		||||
# the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
# (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
# This program is distributed in the hope that it will be useful,
 | 
			
		||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
# Get custom IN and OUT labels if provided by command line arguments
 | 
			
		||||
while [[ $# -gt 1 ]]; do
 | 
			
		||||
    key="$1"
 | 
			
		||||
    case "$key" in 
 | 
			
		||||
        -i|--inlabel)
 | 
			
		||||
            INLABEL="$2"
 | 
			
		||||
            shift;;
 | 
			
		||||
        -o|--outlabel)
 | 
			
		||||
            OUTLABEL="$2"
 | 
			
		||||
            shift;;
 | 
			
		||||
    esac
 | 
			
		||||
    shift
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
[[ -z $INLABEL ]] && INLABEL="IN "
 | 
			
		||||
[[ -z $OUTLABEL ]] && OUTLABEL="OUT "
 | 
			
		||||
 | 
			
		||||
# Use the provided interface, otherwise the device used for the default route.
 | 
			
		||||
if [[ -z $INTERFACE ]] && [[ -n $BLOCK_INSTANCE ]]; then
 | 
			
		||||
  INTERFACE=$BLOCK_INSTANCE
 | 
			
		||||
elif [[ -z $INTERFACE ]]; then
 | 
			
		||||
  INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Issue #36 compliant.
 | 
			
		||||
if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ]
 | 
			
		||||
then
 | 
			
		||||
    echo "$INTERFACE down"
 | 
			
		||||
    echo "$INTERFACE down"
 | 
			
		||||
    echo "#FF0000"
 | 
			
		||||
    exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# path to store the old results in
 | 
			
		||||
path="/dev/shm/$(basename $0)-${INTERFACE}"
 | 
			
		||||
 | 
			
		||||
# grabbing data for each adapter.
 | 
			
		||||
read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes"
 | 
			
		||||
read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes"
 | 
			
		||||
 | 
			
		||||
# get time
 | 
			
		||||
time=$(date +%s)
 | 
			
		||||
 | 
			
		||||
# write current data if file does not exist. Do not exit, this will cause
 | 
			
		||||
# problems if this file is sourced instead of executed as another process.
 | 
			
		||||
if ! [[ -f "${path}" ]]; then
 | 
			
		||||
  echo "${time} ${rx} ${tx}" > "${path}"
 | 
			
		||||
  chmod 0666 "${path}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# read previous state and update data storage
 | 
			
		||||
read old < "${path}"
 | 
			
		||||
echo "${time} ${rx} ${tx}" > "${path}"
 | 
			
		||||
 | 
			
		||||
# parse old data and calc time passed
 | 
			
		||||
old=(${old//;/ })
 | 
			
		||||
time_diff=$(( $time - ${old[0]} ))
 | 
			
		||||
 | 
			
		||||
# sanity check: has a positive amount of time passed
 | 
			
		||||
[[ "${time_diff}" -gt 0 ]] || exit
 | 
			
		||||
 | 
			
		||||
# calc bytes transferred, and their rate in byte/s
 | 
			
		||||
rx_diff=$(( $rx - ${old[1]} ))
 | 
			
		||||
tx_diff=$(( $tx - ${old[2]} ))
 | 
			
		||||
rx_rate=$(( $rx_diff / $time_diff ))
 | 
			
		||||
tx_rate=$(( $tx_diff / $time_diff ))
 | 
			
		||||
 | 
			
		||||
# shift by 10 bytes to get KiB/s. If the value is larger than
 | 
			
		||||
# 1024^2 = 1048576, then display MiB/s instead
 | 
			
		||||
 | 
			
		||||
# incoming
 | 
			
		||||
echo -n "$INLABEL"
 | 
			
		||||
rx_kib=$(( $rx_rate >> 10 ))
 | 
			
		||||
if hash bc 2>/dev/null && [[ "$rx_rate" -gt 1048576 ]]; then
 | 
			
		||||
  printf '%sM' "`echo "scale=1; $rx_kib / 1024" | bc`"
 | 
			
		||||
else
 | 
			
		||||
  echo -n "${rx_kib}K"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo -n " "
 | 
			
		||||
 | 
			
		||||
# outgoing
 | 
			
		||||
echo -n "$OUTLABEL"
 | 
			
		||||
tx_kib=$(( $tx_rate >> 10 ))
 | 
			
		||||
if hash bc 2>/dev/null && [[ "$tx_rate" -gt 1048576 ]]; then
 | 
			
		||||
  printf '%sM' "`echo "scale=1; $tx_kib / 1024" | bc`"
 | 
			
		||||
else
 | 
			
		||||
  echo -n "${tx_kib}K"
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										57
									
								
								LEGACY/i3/blocks/brightness
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										57
									
								
								LEGACY/i3/blocks/brightness
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,57 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# One of the following: xrandr, xbacklight, kernel
 | 
			
		||||
METHOD="xbacklight"
 | 
			
		||||
 | 
			
		||||
# Left click
 | 
			
		||||
if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
 | 
			
		||||
  xbacklight -inc 10
 | 
			
		||||
# Right click
 | 
			
		||||
elif [[ "${BLOCK_BUTTON}" -eq 3 ]]; then
 | 
			
		||||
  xbacklight -dec 10
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
URGENT_VALUE=10
 | 
			
		||||
 | 
			
		||||
if [[ "${METHOD}" = "xrandr" ]]; then
 | 
			
		||||
  device="${BLOCK_INSTANCE:-primary}"
 | 
			
		||||
  xrandrOutput=$(xrandr --verbose)
 | 
			
		||||
 | 
			
		||||
  if [[ "${device}" = "primary" ]]; then
 | 
			
		||||
    device=$(echo "${xrandrOutput}" | grep 'primary' | head -n 1 | awk -F ' ' '{print $1}')
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  curBrightness=$(echo "${xrandrOutput}" | grep "${device}" -A 5 | grep -i "Brightness" | awk -F ':' '{print $2}')
 | 
			
		||||
elif [[ "${METHOD}" = "kernel" ]]; then
 | 
			
		||||
  device="${BLOCK_INSTANCE:-intel_backlight}"
 | 
			
		||||
  maxBrightness=$(cat /sys/class/backlight/${device}/max_brightness)
 | 
			
		||||
  curBrightness=$(cat /sys/class/backlight/${device}/brightness)
 | 
			
		||||
elif [[ "${METHOD}" = "xbacklight" ]]; then
 | 
			
		||||
  curBrightness=$(xbacklight -get)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ "${curBrightness}" -le 0 ]]; then
 | 
			
		||||
  exit
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ "${METHOD}" = "xrandr" ]]; then
 | 
			
		||||
  percent=$(echo "scale=0;${curBrightness} * 100" | bc -l)
 | 
			
		||||
elif [[ "${METHOD}" = "kernel" ]]; then
 | 
			
		||||
  percent=$(echo "scale=0;${curBrightness} / ${maxBrightness} * 100" | bc -l)
 | 
			
		||||
elif [[ "${METHOD}" = "xbacklight" ]]; then
 | 
			
		||||
  percent=$(echo "scale=0;${curBrightness}" | bc -l)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
percent=${percent%.*}
 | 
			
		||||
 | 
			
		||||
if [[ "${percent}" -le 0 ]]; then
 | 
			
		||||
  exit
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "${label} ${percent}%"
 | 
			
		||||
echo "${label} ${percent}%"
 | 
			
		||||
echo ""
 | 
			
		||||
 | 
			
		||||
if [[ "${percent}" -le "${URGENT_VALUE}" ]]; then
 | 
			
		||||
  exit 33
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										60
									
								
								LEGACY/i3/blocks/cpu
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										60
									
								
								LEGACY/i3/blocks/cpu
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,60 @@
 | 
			
		|||
#!/usr/bin/perl
 | 
			
		||||
#
 | 
			
		||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
 | 
			
		||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
 | 
			
		||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
# 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 = $ENV{T_WARN} || 50;
 | 
			
		||||
my $t_crit = $ENV{T_CRIT} || 80;
 | 
			
		||||
my $cpu_usage = -1;
 | 
			
		||||
my $decimals = $ENV{DECIMALS} || 2;
 | 
			
		||||
my $label = $ENV{label} || "";
 | 
			
		||||
 | 
			
		||||
sub help {
 | 
			
		||||
    print "Usage: cpu_usage [-w <warning>] [-c <critical>] [-d <decimals>]\n";
 | 
			
		||||
    print "-w <percent>: warning threshold to become yellow\n";
 | 
			
		||||
    print "-c <percent>: critical threshold to become red\n";
 | 
			
		||||
    print "-d <decimals>:  Use <decimals> 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 (<MPSTAT>) {
 | 
			
		||||
    if (/^.*\s+(\d+\.\d+)[\s\x00]?$/) {
 | 
			
		||||
        $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 "${label} %.${decimals}f%%\n", $cpu_usage;
 | 
			
		||||
printf "${label} %.${decimals}f%%\n", $cpu_usage;
 | 
			
		||||
 | 
			
		||||
# Print color, if needed
 | 
			
		||||
if ($cpu_usage >= $t_crit) {
 | 
			
		||||
    print "#FF0000\n";
 | 
			
		||||
    exit 33;
 | 
			
		||||
} elsif ($cpu_usage >= $t_warn) {
 | 
			
		||||
    print "#FFFC00\n";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
exit 0;
 | 
			
		||||
							
								
								
									
										33
									
								
								LEGACY/i3/blocks/dns
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								LEGACY/i3/blocks/dns
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,33 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
case $BLOCK_BUTTON in
 | 
			
		||||
	1)
 | 
			
		||||
		echo "HI"
 | 
			
		||||
		echo "HI"
 | 
			
		||||
		echo ""
 | 
			
		||||
		exit 0
 | 
			
		||||
		;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
LOOKUP="a"
 | 
			
		||||
if [ ! -z "$2" ]; then
 | 
			
		||||
	LOOKUP="$2"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
COLOR=""
 | 
			
		||||
 | 
			
		||||
NAMESERVERS=$(drill "$LOOKUP" "$1" | sed -ne '/ANSWER SECTION/,/AUTHORITY SECTION/ p' | head -n -2 | tail -n +2 | awk '{ print $5" " }' | xargs echo)
 | 
			
		||||
 | 
			
		||||
if [ ! -z "$3" ]; then
 | 
			
		||||
	if [ "$NAMESERVERS" = "$3" ]; then
 | 
			
		||||
		COLOR="#00FF00"
 | 
			
		||||
	else
 | 
			
		||||
		COLOR="#FF8000"
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "$label $NAMESERVERS"
 | 
			
		||||
echo "$NAMESERVERS"
 | 
			
		||||
echo "$COLOR"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										30
									
								
								LEGACY/i3/blocks/freeSpace
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								LEGACY/i3/blocks/freeSpace
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
partition=$1
 | 
			
		||||
 | 
			
		||||
if [ ! -n "$partition" ]; then
 | 
			
		||||
	partition="/"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
line=$(/usr/bin/df -h $partition | sed -n 2p)
 | 
			
		||||
 | 
			
		||||
used=$(echo $line | awk -F ' ' '{print $3}')
 | 
			
		||||
total=$(echo $line | awk -F ' ' '{print $2}')
 | 
			
		||||
percent=$(echo $line | awk -F ' ' '{print $5}' | sed 's/[^0-9]//')
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if [ "$BLOCK_BUTTON" = "1" ]; then
 | 
			
		||||
	echo "$used/$total"
 | 
			
		||||
	echo "$used/$total"
 | 
			
		||||
else
 | 
			
		||||
	echo "$label $percent%"
 | 
			
		||||
	echo "$label $percent%"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if [ "$percent" -gt 80 ]; then
 | 
			
		||||
	echo "#FF8000"
 | 
			
		||||
elif [ "$percent" -gt 90 ]; then
 | 
			
		||||
	echo "#FF0000"
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										14
									
								
								LEGACY/i3/blocks/homeServerUpdates
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								LEGACY/i3/blocks/homeServerUpdates
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
count=$(ssh homeServer -t checkupdates | wc -l)
 | 
			
		||||
if [ "$count" = "0" ]; then
 | 
			
		||||
	echo ""
 | 
			
		||||
else
 | 
			
		||||
	echo "$label $count"
 | 
			
		||||
	echo "$label $count"
 | 
			
		||||
	if [ "$count" -gt "5" ]; then
 | 
			
		||||
		echo "#FFOOOO"
 | 
			
		||||
	else
 | 
			
		||||
		echo "#FF8000"
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										30
									
								
								LEGACY/i3/blocks/mediaplayer
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										30
									
								
								LEGACY/i3/blocks/mediaplayer
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#COMMAND="playerctl --player=$BLOCK_INSTANCE"
 | 
			
		||||
COMMAND="playerctl"
 | 
			
		||||
 | 
			
		||||
case $BLOCK_BUTTON in
 | 
			
		||||
	1) $COMMAND previous ;;
 | 
			
		||||
	3) $COMMAND next ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if [ "$($COMMAND status 2> /dev/null )" = "Playing" ]; then
 | 
			
		||||
	colour="#00FF00"
 | 
			
		||||
else
 | 
			
		||||
	colour="#FF8000"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
title=$($COMMAND metadata title 2> /dev/null | sed "s/\&/\&/g")
 | 
			
		||||
artist=$($COMMAND metadata artist 2> /dev/null | sed "s/\&/\&/g")
 | 
			
		||||
 | 
			
		||||
if [ "$title" != "" ]; then
 | 
			
		||||
	ret="<span foreground='$colour'>$title</span>"
 | 
			
		||||
	if [ -n "$artist" ]; then
 | 
			
		||||
		ret="$ret - $artist"
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	echo "$ret";
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								LEGACY/i3/blocks/mpvmediaplayer
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								LEGACY/i3/blocks/mpvmediaplayer
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
socket="${SOCKET:-/tmp/mpvsocket}"
 | 
			
		||||
 | 
			
		||||
#case $BLOCK_BUTTON in
 | 
			
		||||
#	1) $COMMAND previous ;;
 | 
			
		||||
#	3) $COMMAND next ;;
 | 
			
		||||
#esac
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
echo '{ "command": ["get_property_string", "filtered-metadata"] }' | socat - "${socket}" | jq '.data' | sed 's/"{\\"icy-title\\":\\"//g' | sed 's/\\"}"//g'
 | 
			
		||||
echo ""
 | 
			
		||||
echo "#00FF00"
 | 
			
		||||
							
								
								
									
										48
									
								
								LEGACY/i3/blocks/mysql
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										48
									
								
								LEGACY/i3/blocks/mysql
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,48 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
LAMPP='/opt/lampp/lampp'
 | 
			
		||||
STATUS=$($LAMPP status 2> /dev/null)
 | 
			
		||||
 | 
			
		||||
MYSQL=$(echo "$STATUS" | grep -i mysql | grep -io not > /dev/null && echo "down" || echo "up")
 | 
			
		||||
 | 
			
		||||
COLOUR=""
 | 
			
		||||
 | 
			
		||||
function toggleMysql(){
 | 
			
		||||
	if [ $MYSQL = "up" ]; then
 | 
			
		||||
		gksudo $LAMPP stopmysql
 | 
			
		||||
	else
 | 
			
		||||
		gksudo $LAMPP startmysql
 | 
			
		||||
		COLOUR="#FF8000"
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function toggleAll(){
 | 
			
		||||
	if [ $MYSQL = "up" ]; then
 | 
			
		||||
		gksudo $LAMPP stop
 | 
			
		||||
	else
 | 
			
		||||
		gksudo $LAMPP start
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
case $BLOCK_BUTTON in
 | 
			
		||||
	1) toggleMysql ;;
 | 
			
		||||
	3) toggleAll ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
if [ "$MYSQL" = "up" ]; then
 | 
			
		||||
	COLOUR="#00FF00"
 | 
			
		||||
else
 | 
			
		||||
	COLOUR="#FF0000"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -z "$COLOUR" ]; then
 | 
			
		||||
	if [ "$APACHE" = "up" ]; then
 | 
			
		||||
		COLOUR="#00FF00"
 | 
			
		||||
	else
 | 
			
		||||
		COLOUR="#FF0000"
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "MySQL"
 | 
			
		||||
echo ""
 | 
			
		||||
echo "$COLOUR"
 | 
			
		||||
							
								
								
									
										22
									
								
								LEGACY/i3/blocks/pacmanUpdates
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								LEGACY/i3/blocks/pacmanUpdates
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
#!/usr/bin/sh
 | 
			
		||||
 | 
			
		||||
if ! command -v checkupdates > /dev/null; then
 | 
			
		||||
	echo "You need to install checkupdates";
 | 
			
		||||
	echo "";
 | 
			
		||||
	echo "#FF0000"
 | 
			
		||||
else
 | 
			
		||||
	count=$(checkupdates | wc -l)
 | 
			
		||||
	if [ "$count" = "0" ]; then
 | 
			
		||||
		echo ""
 | 
			
		||||
		echo ""
 | 
			
		||||
		echo ""
 | 
			
		||||
		exit 0
 | 
			
		||||
	fi
 | 
			
		||||
	echo "$label $count"
 | 
			
		||||
	echo "$label $count"
 | 
			
		||||
	if [ "$count" -gt "5" ]; then
 | 
			
		||||
		echo "#FFOOOO"
 | 
			
		||||
	else
 | 
			
		||||
		echo "#FF8000"
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										52
									
								
								LEGACY/i3/blocks/serverStatus
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										52
									
								
								LEGACY/i3/blocks/serverStatus
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,52 @@
 | 
			
		|||
#!/usr/bin/bash
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
 | 
			
		||||
source $SCRIPTPATH/servers.private
 | 
			
		||||
 | 
			
		||||
checkAllSites(){
 | 
			
		||||
	eval server=( \${$1[@]} )
 | 
			
		||||
	for site in ${server[@]}; do
 | 
			
		||||
		printf "%-35s | %s \n" "$site" "$(checkURL $site $1)"
 | 
			
		||||
	done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# This function takes 1 parameter, the name of an array in which to check a random URL
 | 
			
		||||
checkRandomSite(){
 | 
			
		||||
	#The server variable will be equal to whichever server array we are looking at
 | 
			
		||||
	eval server=( \${$1[@]} )
 | 
			
		||||
	random=$(( ( RANDOM % (${#server[@]} - 1) )  + 1 ))
 | 
			
		||||
	urlToCheck=${server[$random]}
 | 
			
		||||
	echo $urlToCheck
 | 
			
		||||
	echo $(checkURL $urlToCheck $1)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
checkURL(){
 | 
			
		||||
	responce=$(curl -s --head -w %{http_code} $1 -L -o /dev/null --connect-timeout 20)
 | 
			
		||||
	if [ "$responce" != 200 ]; then
 | 
			
		||||
		pgrep -x dunst && notify-send -u critical "$1 is down" "<b>Server:</b> $2\n<b>Responce:</b> $responce" & disown
 | 
			
		||||
	fi
 | 
			
		||||
	echo $responce
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if [ ! -z "$1" ]; then
 | 
			
		||||
	if [ -z "$2" ]; then
 | 
			
		||||
		checked=$(eval checkRandomSite $1)
 | 
			
		||||
		checked=(${checked// / })
 | 
			
		||||
		#echo ${checked[0]}
 | 
			
		||||
		#echo ${checked[1]}
 | 
			
		||||
		echo $1
 | 
			
		||||
		echo ""
 | 
			
		||||
		if [ "${checked[1]}" = "200" ]; then
 | 
			
		||||
			echo "#00FF00"
 | 
			
		||||
		else
 | 
			
		||||
			echo "#FF8000"
 | 
			
		||||
 | 
			
		||||
		fi
 | 
			
		||||
	elif [ "$2" = "all" ]; then
 | 
			
		||||
		checkAllSites $1
 | 
			
		||||
	fi
 | 
			
		||||
else
 | 
			
		||||
	echo Please specify a server name
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										10
									
								
								LEGACY/i3/blocks/siteStatus
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								LEGACY/i3/blocks/siteStatus
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,10 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
echo "$1"
 | 
			
		||||
echo "$1"
 | 
			
		||||
curl "$1" 2> /dev/null | grep -q "$2"
 | 
			
		||||
if [ $? -eq 0 ]; then
 | 
			
		||||
	echo "#00FF00"
 | 
			
		||||
else
 | 
			
		||||
	echo "#FF8000"
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										83
									
								
								LEGACY/i3/blocks/volume
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										83
									
								
								LEGACY/i3/blocks/volume
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,83 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
 | 
			
		||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
 | 
			
		||||
 | 
			
		||||
# This program is free software: you can redistribute it and/or modify
 | 
			
		||||
# it under the terms of the GNU General Public License as published by
 | 
			
		||||
# the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
# (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
# This program is distributed in the hope that it will be useful,
 | 
			
		||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
#------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
# The second parameter overrides the mixer selection
 | 
			
		||||
# For PulseAudio users, eventually 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
 | 
			
		||||
if [[ -z "$MIXER" ]] ; then
 | 
			
		||||
    MIXER="default"
 | 
			
		||||
    if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
 | 
			
		||||
        # pulseaudio is running, but not all installations use "pulse"
 | 
			
		||||
        if amixer -D pulse info >/dev/null 2>&1 ; then
 | 
			
		||||
            MIXER="pulse"
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
    [ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
 | 
			
		||||
    MIXER="${2:-$MIXER}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# 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`
 | 
			
		||||
if [[ -z "$SCONTROL" ]] ; then
 | 
			
		||||
    SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
 | 
			
		||||
                      sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
 | 
			
		||||
                      head -n1
 | 
			
		||||
                    )}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# 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)
 | 
			
		||||
if [[ -z "$STEP" ]] ; then
 | 
			
		||||
    STEP="${1:-5%}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
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" ? "MUTE" : "'
 | 
			
		||||
  # If dB was selected, print that instead
 | 
			
		||||
  perl_filter+=$([[ $STEP = *dB ]] && echo "$label "'$3' || echo "$label "'$1')
 | 
			
		||||
  perl_filter+='"; exit}'
 | 
			
		||||
  perl -ne "$perl_filter"
 | 
			
		||||
  #tmp=$(perl -ne "$perl_filter")
 | 
			
		||||
  #echo "$label $tmp"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
							
								
								
									
										367
									
								
								LEGACY/i3/config
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										367
									
								
								LEGACY/i3/config
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,367 @@
 | 
			
		|||
# i3 config file (v4)
 | 
			
		||||
#
 | 
			
		||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
 | 
			
		||||
 | 
			
		||||
set $mod Mod4
 | 
			
		||||
set $alt Mod1
 | 
			
		||||
 | 
			
		||||
set $base00 #101218
 | 
			
		||||
set $base01 #1f222d
 | 
			
		||||
set $base02 #252936
 | 
			
		||||
set $base03 #7780a1
 | 
			
		||||
set $base04 #C0C5CE
 | 
			
		||||
set $base05 #d1d4e0
 | 
			
		||||
set $base06 #C9CCDB
 | 
			
		||||
set $base07 #ffffff
 | 
			
		||||
set $base08 #ee829f
 | 
			
		||||
set $base09 #f99170
 | 
			
		||||
set $base0A #ffefcc
 | 
			
		||||
set $base0B #a5ffe1
 | 
			
		||||
set $base0C #97e0ff
 | 
			
		||||
set $base0D #97bbf7
 | 
			
		||||
set $base0E #c0b7f9
 | 
			
		||||
set $base0F #fcc09e
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Font for window titles. Will also be used by the bar unless a different font
 | 
			
		||||
# is used in the bar {} block below.
 | 
			
		||||
font pango:monospace 8
 | 
			
		||||
 | 
			
		||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
 | 
			
		||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
 | 
			
		||||
font pango:DejaVu Sans Mono 8
 | 
			
		||||
 | 
			
		||||
# Before i3 v4.8, we used to recommend this one as the default:
 | 
			
		||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 | 
			
		||||
# The font above is very space-efficient, that is, it looks good, sharp and
 | 
			
		||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
 | 
			
		||||
# X core fonts rendering does not support right-to-left and this being a bitmap
 | 
			
		||||
# font, it doesn’t scale on retina/hidpi displays.
 | 
			
		||||
 | 
			
		||||
# Use Mouse+$mod to drag floating windows to their wanted position
 | 
			
		||||
floating_modifier $mod
 | 
			
		||||
 | 
			
		||||
# start a terminal
 | 
			
		||||
# bindsym $mod+Return exec xfce4-terminal
 | 
			
		||||
#bindsym $mod+Return exec konsole
 | 
			
		||||
#bindsym $mod+Return exec termite
 | 
			
		||||
#bindsym $mod+Return exec /usr/local/bin/st
 | 
			
		||||
bindsym $mod+Return exec ~/.bin/i3-shell
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# kill focused window
 | 
			
		||||
bindsym $mod+q kill
 | 
			
		||||
 | 
			
		||||
# start dmenu (a program launcher)
 | 
			
		||||
# bindsym $mod+d exec dmenu_run
 | 
			
		||||
#bindsym $mod+d exec albert toggle
 | 
			
		||||
#bindsym $mod+z exec xfce4-appfinder
 | 
			
		||||
 | 
			
		||||
# Start Rofi as program launcher
 | 
			
		||||
bindsym $mod+d exec rofi -show drun
 | 
			
		||||
 | 
			
		||||
# Start Rofi as ssh launcher
 | 
			
		||||
bindsym $mod+Shift+d exec rofi -show ssh
 | 
			
		||||
 | 
			
		||||
#Start Rofi as emoji finder
 | 
			
		||||
bindsym $mod+u exec ~/.dotfiles/rofi/scripts/rofi-emoji
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#kill i3
 | 
			
		||||
bindsym $mod+Shift+x exec killall i3
 | 
			
		||||
 | 
			
		||||
# Man page lookup
 | 
			
		||||
bindsym $mod+m exec man -k . | awk '{ print $1 " " $2 }' | rofi -dmenu -p man -matching regex | awk '{ print $2 " " $1 }' | tr -d '()' | xargs man -t | ps2pdf - - | zathura -
 | 
			
		||||
 | 
			
		||||
# TLDR page lookup
 | 
			
		||||
bindsym $mod+Shift+m exec "/usr/bin/tldr --list-all | sed 's/, /\\n/g' | rofi -dmenu -p ';TLDR' -matching regex | xargs tldr -m | pandoc -f markdown -t ms | groff -ms - -T pdf | zathura -"
 | 
			
		||||
 | 
			
		||||
# WP Lookup
 | 
			
		||||
bindsym $mod+Shift+w exec wpLookup
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Send signals to i3 blocks and zsh to tell them that capslock has been pushed
 | 
			
		||||
# The message to zsh is technically a "window change" which causes zsh to re-draw the prompt
 | 
			
		||||
# https://unix.stackexchange.com/questions/440184/update-zsh-ps1-propt-on-keypress
 | 
			
		||||
bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks && pkill -SIGWINCH zsh
 | 
			
		||||
 | 
			
		||||
#Send a message to i3blocks to say that numlock has been pushed
 | 
			
		||||
bindsym --release Num_Lock  exec pkill -SIGRTMIN+11 i3blocks
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# 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 down 
 | 
			
		||||
bindsym $mod+k focus up
 | 
			
		||||
bindsym $mod+l focus right
 | 
			
		||||
bindsym $mod+h focus left
 | 
			
		||||
 | 
			
		||||
# 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 down
 | 
			
		||||
bindsym $mod+Shift+k move up
 | 
			
		||||
bindsym $mod+Shift+l move right
 | 
			
		||||
bindsym $mod+Shift+h move left
 | 
			
		||||
 | 
			
		||||
# alternatively, you can use the cursor keys:
 | 
			
		||||
bindsym $mod+Shift+Left move left
 | 
			
		||||
bindsym $mod+Shift+Down move down
 | 
			
		||||
bindsym $mod+Shift+Up move up
 | 
			
		||||
bindsym $mod+Shift+Right move right
 | 
			
		||||
 | 
			
		||||
# split in horizontal orientation
 | 
			
		||||
bindsym $mod+g split h
 | 
			
		||||
 | 
			
		||||
# split in vertical orientation
 | 
			
		||||
bindsym $mod+v split v
 | 
			
		||||
 | 
			
		||||
# enter fullscreen mode for the focused container
 | 
			
		||||
bindsym $mod+f fullscreen toggle
 | 
			
		||||
 | 
			
		||||
# 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+z focus child
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#set workspace names
 | 
			
		||||
set $workspace1 "1: Browser "
 | 
			
		||||
set $workspace2 "2: Terminal "
 | 
			
		||||
set $workspace3 "3"
 | 
			
		||||
set $workspace4 "4"
 | 
			
		||||
set $workspace5 "5"
 | 
			
		||||
set $workspace6 "6"
 | 
			
		||||
set $workspace7 "7"
 | 
			
		||||
set $workspace8 "8"
 | 
			
		||||
set $workspace9 "9"
 | 
			
		||||
set $workspace10 "10: Chat "
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
bindsym $mod+0 workspace $workspace10
 | 
			
		||||
 | 
			
		||||
# move focused container to workspace
 | 
			
		||||
bindsym $mod+Shift+1 move container to workspace $workspace1,  workspace $workspace1
 | 
			
		||||
bindsym $mod+Shift+2 move container to workspace $workspace2,  workspace $workspace2
 | 
			
		||||
bindsym $mod+Shift+3 move container to workspace $workspace3,  workspace $workspace3
 | 
			
		||||
bindsym $mod+Shift+4 move container to workspace $workspace4,  workspace $workspace4
 | 
			
		||||
bindsym $mod+Shift+5 move container to workspace $workspace5,  workspace $workspace5
 | 
			
		||||
bindsym $mod+Shift+6 move container to workspace $workspace6,  workspace $workspace6
 | 
			
		||||
bindsym $mod+Shift+7 move container to workspace $workspace7,  workspace $workspace7
 | 
			
		||||
bindsym $mod+Shift+8 move container to workspace $workspace8,  workspace $workspace8
 | 
			
		||||
bindsym $mod+Shift+9 move container to workspace $workspace9,  workspace $workspace9
 | 
			
		||||
bindsym $mod+Shift+0 move container to workspace $workspace10, workspace $workspace10
 | 
			
		||||
 | 
			
		||||
#assign programs to workspaces
 | 
			
		||||
#assign [class="chromium"] $workspace1
 | 
			
		||||
#assign [instance="crx_knipolnnllmklapflnccelgolnpehhpl"] to $workspace10
 | 
			
		||||
 | 
			
		||||
#for_window [window_role="gimp-toolbox"] floating disable; move left; move left;
 | 
			
		||||
#for_window [window_role="gimp-dock"] floating disable; move right; move right;
 | 
			
		||||
 | 
			
		||||
#make applications open in floating mode
 | 
			
		||||
for_window [class="Galculator"] floating enable
 | 
			
		||||
 | 
			
		||||
# 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 h resize shrink width 10 px or 10 ppt
 | 
			
		||||
        bindsym j resize grow height 10 px or 10 ppt
 | 
			
		||||
        bindsym k resize shrink height 10 px or 10 ppt
 | 
			
		||||
        bindsym l resize grow width 10 px or 10 ppt
 | 
			
		||||
        bindsym $mod+h resize shrink width 2 px or 2 ppt
 | 
			
		||||
        bindsym $mod+j resize grow height 2 px or 2 ppt
 | 
			
		||||
        bindsym $mod+k resize shrink height 2 px or 2 ppt
 | 
			
		||||
        bindsym $mod+l resize grow width 2 px or 2 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"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Widow Colours
 | 
			
		||||
#                         border  background text    indicator
 | 
			
		||||
  client.focused          $base01 $base01    $base07 $base0F
 | 
			
		||||
  client.focused_inactive $base02 $base02    $base03 $base0F
 | 
			
		||||
  client.unfocused        $base02 $base02    $base03 $base0F
 | 
			
		||||
  client.urgent           $base02 $base08    $base00 $base0F
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Start i3bar to display a workspace bar (plus the system information i3status
 | 
			
		||||
# finds out, if available)
 | 
			
		||||
bar {
 | 
			
		||||
        #status_command i3status
 | 
			
		||||
		#status_command i3blocks -c $HOME/.dotfiles/i3/i3blocks-secondary.conf
 | 
			
		||||
		status_command i3blocks -c $HOME/.dotfiles/i3/i3blocks.conf
 | 
			
		||||
        #tray_output primary
 | 
			
		||||
        colors {
 | 
			
		||||
              separator $base03
 | 
			
		||||
              background $base01
 | 
			
		||||
              statusline $base05
 | 
			
		||||
        #                        border  background text
 | 
			
		||||
              focused_workspace  $base01 $base01    $base07
 | 
			
		||||
              active_workspace   $base01 $base02    $base03
 | 
			
		||||
              inactive_workspace $base01 $base01    $base03
 | 
			
		||||
              urgent_workspace   $base01 $base01    $base08
 | 
			
		||||
            }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#Use xfce4 panel instead of i3's
 | 
			
		||||
#exec --no-startup-id xfce4-panel --disable-wm-check
 | 
			
		||||
 | 
			
		||||
bindsym $mod+c exec chromium-snapshot-bin, workspace $workspace1
 | 
			
		||||
bindsym $mod+Shift+c exec chromium-snapshot-bin --force-device-scale-factor=2, workspace $workspace1
 | 
			
		||||
bindsym control+mod1+f exec thunar
 | 
			
		||||
bindsym $mod+z exec zeal
 | 
			
		||||
bindsym $mod+Shift+q exec qutebrowser
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Pulse Audio controls
 | 
			
		||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% #increase sound volume
 | 
			
		||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% #decrease sound volume
 | 
			
		||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 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 XF86AudioPause exec playerctl play-pause
 | 
			
		||||
bindsym XF86AudioNext exec playerctl next
 | 
			
		||||
bindsym XF86AudioPrev exec playerctl previous
 | 
			
		||||
 | 
			
		||||
#printscreen
 | 
			
		||||
bindsym Print exec xfce4-screenshooter -f
 | 
			
		||||
bindsym ctrl+Print exec xfce4-screenshooter -w
 | 
			
		||||
bindsym Shift+Print exec xfce4-screenshooter -r
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bindsym $mod+x exec --no-startup-id ~/.dotfiles/i3/i3exit logout
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bindsym ctrl+shift+l exec --no-startup-id ~/.config/rofi/scripts/rofi-shutdown
 | 
			
		||||
 | 
			
		||||
##################################################
 | 
			
		||||
#                                                #
 | 
			
		||||
#                   i3 Gaps                      #
 | 
			
		||||
#                                                #
 | 
			
		||||
##################################################
 | 
			
		||||
 | 
			
		||||
for_window [class="^.*"] border pixel 0
 | 
			
		||||
gaps outer 0
 | 
			
		||||
gaps inner 10
 | 
			
		||||
smart_gaps on
 | 
			
		||||
 | 
			
		||||
set $mode_gaps Gaps: (o) outer, (i) inner, (d) default
 | 
			
		||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
 | 
			
		||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+g mode "$mode_gaps"
 | 
			
		||||
 | 
			
		||||
mode "$mode_gaps" {
 | 
			
		||||
	bindsym o			mode "$mode_gaps_outer"
 | 
			
		||||
	bindsym i			mode "$mode_gaps_inner"
 | 
			
		||||
	bindsym d			gaps inner current set 10; gaps outer current set 0
 | 
			
		||||
	bindsym Shift+d		gaps inner all set 10; gaps outer all set 0
 | 
			
		||||
	bindsym Return mode "default"
 | 
			
		||||
	bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
mode "$mode_gaps_inner" {
 | 
			
		||||
	bindsym plus  gaps inner current plus 5
 | 
			
		||||
	bindsym minus gaps inner current minus 5
 | 
			
		||||
	bindsym 0     gaps inner current set 0
 | 
			
		||||
	bindsym d			gaps inner current set 10
 | 
			
		||||
 | 
			
		||||
	bindsym Shift+plus  gaps inner all plus 5
 | 
			
		||||
	bindsym Shift+minus gaps inner all minus 5
 | 
			
		||||
	bindsym Shift+0     gaps inner all set 0
 | 
			
		||||
	bindsym Shift+d		gaps inner all set 10
 | 
			
		||||
 | 
			
		||||
	bindsym Return mode "default"
 | 
			
		||||
	bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
mode "$mode_gaps_outer" {
 | 
			
		||||
	bindsym plus  gaps outer current plus 5
 | 
			
		||||
	bindsym minus gaps outer current minus 5
 | 
			
		||||
	bindsym 0     gaps outer current set 0
 | 
			
		||||
	bindsym d			gaps outer current set 0
 | 
			
		||||
 | 
			
		||||
	bindsym Shift+plus  gaps outer all plus 5
 | 
			
		||||
	bindsym Shift+minus gaps outer all minus 5
 | 
			
		||||
	bindsym Shift+0     gaps outer all set 0
 | 
			
		||||
	bindsym Shift+d		gaps outer all set 0
 | 
			
		||||
 | 
			
		||||
	bindsym Return mode "default"
 | 
			
		||||
	bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
exec_always --no-startup-id setbackground
 | 
			
		||||
exec --no-startup-id compton -f -i 0.95
 | 
			
		||||
#exec_always --no-startup-id albert
 | 
			
		||||
exec_always --no-startup-id /usr/bin/dunst
 | 
			
		||||
exec --no-startup-id xfce4-clipman
 | 
			
		||||
exec setxkbmap gb
 | 
			
		||||
							
								
								
									
										428
									
								
								LEGACY/i3/configWork
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										428
									
								
								LEGACY/i3/configWork
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,428 @@
 | 
			
		|||
# vim: filetype=i3config
 | 
			
		||||
 | 
			
		||||
# i3 config file (v4)
 | 
			
		||||
#
 | 
			
		||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
 | 
			
		||||
 | 
			
		||||
# Key Shortcuts {{{1
 | 
			
		||||
set $mod Mod4
 | 
			
		||||
set $alt Mod1
 | 
			
		||||
 | 
			
		||||
# Colours {{{1
 | 
			
		||||
set $base00 #101218
 | 
			
		||||
set $base01 #1f222d
 | 
			
		||||
set $base02 #252936
 | 
			
		||||
set $base03 #7780a1
 | 
			
		||||
set $base04 #C0C5CE
 | 
			
		||||
set $base05 #d1d4e0
 | 
			
		||||
set $base06 #C9CCDB
 | 
			
		||||
set $base07 #ffffff
 | 
			
		||||
set $base08 #ee829f
 | 
			
		||||
set $base09 #f99170
 | 
			
		||||
set $base0A #ffefcc
 | 
			
		||||
set $base0B #a5ffe1
 | 
			
		||||
set $base0C #97e0ff
 | 
			
		||||
set $base0D #97bbf7
 | 
			
		||||
set $base0E #c0b7f9
 | 
			
		||||
set $base0F #fcc09e
 | 
			
		||||
 | 
			
		||||
# Widow Colours
 | 
			
		||||
#                         border  background text    indicator
 | 
			
		||||
  client.focused          $base01 $base01    $base07 $base0F
 | 
			
		||||
  client.focused_inactive $base02 $base02    $base03 $base0F
 | 
			
		||||
  client.unfocused        $base02 $base02    $base03 $base0F
 | 
			
		||||
  client.urgent           $base02 $base08    $base00 $base0F
 | 
			
		||||
 | 
			
		||||
# Fonts {{{1
 | 
			
		||||
# Font for window titles. Will also be used by the bar unless a different font
 | 
			
		||||
# is used in the bar {} block below.
 | 
			
		||||
font pango:monospace 8
 | 
			
		||||
 | 
			
		||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
 | 
			
		||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
 | 
			
		||||
font pango:DejaVu Sans Mono 8
 | 
			
		||||
 | 
			
		||||
#restart i3 {{{1
 | 
			
		||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
 | 
			
		||||
bindsym $mod+Shift+r restart
 | 
			
		||||
 | 
			
		||||
# Window Controll {{{1
 | 
			
		||||
 | 
			
		||||
# Floating Mod {{{2
 | 
			
		||||
# Use Mouse+$mod to drag floating windows to their wanted position
 | 
			
		||||
floating_modifier $mod
 | 
			
		||||
 | 
			
		||||
# Killing Windows {{{2
 | 
			
		||||
# kill focused window
 | 
			
		||||
bindsym $mod+q kill
 | 
			
		||||
 | 
			
		||||
# Focus {{{2
 | 
			
		||||
# Make i3 use proper vim keys
 | 
			
		||||
bindsym $mod+h focus left
 | 
			
		||||
bindsym $mod+j focus down
 | 
			
		||||
bindsym $mod+k focus up
 | 
			
		||||
bindsym $mod+l focus right
 | 
			
		||||
 | 
			
		||||
# alternatively, you can use the cursor keys although I can't imagine why
 | 
			
		||||
bindsym $mod+Left focus left
 | 
			
		||||
bindsym $mod+Down focus down
 | 
			
		||||
bindsym $mod+Up focus up
 | 
			
		||||
bindsym $mod+Right focus right
 | 
			
		||||
 | 
			
		||||
# move focused window with vim keys
 | 
			
		||||
bindsym $mod+Shift+h move left
 | 
			
		||||
bindsym $mod+Shift+j move down
 | 
			
		||||
bindsym $mod+Shift+k move up
 | 
			
		||||
bindsym $mod+Shift+l move right
 | 
			
		||||
 | 
			
		||||
# alternatively, you can use the cursor keys:
 | 
			
		||||
bindsym $mod+Shift+Left move left
 | 
			
		||||
bindsym $mod+Shift+Down move down
 | 
			
		||||
bindsym $mod+Shift+Up move up
 | 
			
		||||
bindsym $mod+Shift+Right move right
 | 
			
		||||
 | 
			
		||||
# Layouts / Floats {{{2
 | 
			
		||||
# toggle the split direction
 | 
			
		||||
bindsym $mod+v split toggle
 | 
			
		||||
 | 
			
		||||
# enter fullscreen mode for the focused container
 | 
			
		||||
bindsym $mod+f fullscreen toggle
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
# Workspaces {{{2
 | 
			
		||||
#set workspace names
 | 
			
		||||
set $workspace1 "1: Browser "
 | 
			
		||||
set $workspace2 "2: Terminal "
 | 
			
		||||
set $workspace3 "3"
 | 
			
		||||
set $workspace4 "4"
 | 
			
		||||
set $workspace5 "5"
 | 
			
		||||
set $workspace6 "6"
 | 
			
		||||
set $workspace7 "7"
 | 
			
		||||
set $workspace8 "8"
 | 
			
		||||
set $workspace9 "9"
 | 
			
		||||
set $workspace10 "10 Chat "
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
bindsym $mod+0 workspace $workspace10
 | 
			
		||||
 | 
			
		||||
# move focused container to workspace
 | 
			
		||||
bindsym $mod+Shift+1 move container to workspace $workspace1,  workspace $workspace1
 | 
			
		||||
bindsym $mod+Shift+2 move container to workspace $workspace2,  workspace $workspace2
 | 
			
		||||
bindsym $mod+Shift+3 move container to workspace $workspace3,  workspace $workspace3
 | 
			
		||||
bindsym $mod+Shift+4 move container to workspace $workspace4,  workspace $workspace4
 | 
			
		||||
bindsym $mod+Shift+5 move container to workspace $workspace5,  workspace $workspace5
 | 
			
		||||
bindsym $mod+Shift+6 move container to workspace $workspace6,  workspace $workspace6
 | 
			
		||||
bindsym $mod+Shift+7 move container to workspace $workspace7,  workspace $workspace7
 | 
			
		||||
bindsym $mod+Shift+8 move container to workspace $workspace8,  workspace $workspace8
 | 
			
		||||
bindsym $mod+Shift+9 move container to workspace $workspace9,  workspace $workspace9
 | 
			
		||||
bindsym $mod+Shift+0 move container to workspace $workspace10, workspace $workspace10
 | 
			
		||||
 | 
			
		||||
# move workspace to left/right
 | 
			
		||||
bindsym $mod+control+Left move workspace to output left
 | 
			
		||||
bindsym $mod+control+Right move workspace to output right
 | 
			
		||||
bindsym $mod+control+h move workspace to output left
 | 
			
		||||
bindsym $mod+control+l move workspace to output right
 | 
			
		||||
 | 
			
		||||
# Resizing {{{2
 | 
			
		||||
# resize window (you can also use the mouse for that)
 | 
			
		||||
mode "resize" {
 | 
			
		||||
	# These bindings trigger as soon as you enter the resize mode
 | 
			
		||||
 | 
			
		||||
	# Pressing left will shrink the window’s width.
 | 
			
		||||
	# Pressing right will grow the window’s width.
 | 
			
		||||
	# Pressing up will shrink the window’s height.
 | 
			
		||||
	# Pressing down will grow the window’s height.
 | 
			
		||||
	bindsym h resize shrink width 10 px or 10 ppt
 | 
			
		||||
	bindsym j resize grow height 10 px or 10 ppt
 | 
			
		||||
	bindsym k resize shrink height 10 px or 10 ppt
 | 
			
		||||
	bindsym l resize grow width 10 px or 10 ppt
 | 
			
		||||
	bindsym $mod+h resize shrink width 2 px or 2 ppt
 | 
			
		||||
	bindsym $mod+j resize grow height 2 px or 2 ppt
 | 
			
		||||
	bindsym $mod+k resize shrink height 2 px or 2 ppt
 | 
			
		||||
	bindsym $mod+l resize grow width 2 px or 2 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"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Application Shortcuts {{{1
 | 
			
		||||
 | 
			
		||||
# Special Keyboard buttons {{{2
 | 
			
		||||
bindsym XF86Search exec rofi -show drun
 | 
			
		||||
bindsym XF86Mail exec thunderbird
 | 
			
		||||
 | 
			
		||||
# Pulse Audio controls {{{3
 | 
			
		||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%  && pkill -SIGRTMIN+10 i3blocks #increase sound volume
 | 
			
		||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%  && pkill -SIGRTMIN+10 i3blocks #decrease sound volume
 | 
			
		||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle  && pkill -SIGRTMIN+10 i3blocks # mute sound
 | 
			
		||||
 | 
			
		||||
# Volume using alt+scroll {{{4
 | 
			
		||||
bindsym --whole-window $alt+button4 exec --no-startup-id pactl set-sink-volume 0 -5% && pkill -SIGRTMIN+10 i3blocks #decrease sound volume
 | 
			
		||||
bindsym --whole-window $alt+button5 exec --no-startup-id pactl set-sink-volume 0 +5% && pkill -SIGRTMIN+10 i3blocks #increase sound volume
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Media player controls {{{3
 | 
			
		||||
bindsym XF86AudioPlay exec playerctl play-pause
 | 
			
		||||
bindsym XF86AudioPause exec playerctl pause
 | 
			
		||||
bindsym XF86AudioNext exec playerctl next
 | 
			
		||||
bindsym XF86AudioPrev exec playerctl previous
 | 
			
		||||
 | 
			
		||||
# Screen Brightness {{{3
 | 
			
		||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
 | 
			
		||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
 | 
			
		||||
 | 
			
		||||
#calculator button
 | 
			
		||||
bindsym XF86Calculator exec galculator
 | 
			
		||||
 | 
			
		||||
# Print Screen {{{2
 | 
			
		||||
# printscreen
 | 
			
		||||
bindsym Print exec xfce4-screenshooter -f
 | 
			
		||||
bindsym ctrl+Print exec xfce4-screenshooter -w
 | 
			
		||||
bindsym Shift+Print exec xfce4-screenshooter -r
 | 
			
		||||
 | 
			
		||||
# Return {{{2
 | 
			
		||||
# start a terminal in current working dir
 | 
			
		||||
bindsym $mod+Return exec ~/.dotfiles/bin/folder-shell
 | 
			
		||||
# start Ranger in current working dir
 | 
			
		||||
bindsym $mod+Shift+Return exec ~/.dotfiles/bin/folder-shell "ranger"
 | 
			
		||||
 | 
			
		||||
# Insert {{{2
 | 
			
		||||
bindsym $mod+Shift+Insert exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
 | 
			
		||||
 | 
			
		||||
# A {{{2
 | 
			
		||||
# Opens R in Terminal in Scratchpad
 | 
			
		||||
bindsym $mod+a exec --no-startup-id ddspawn dropdowncalc -f mono:pixelsize=24
 | 
			
		||||
# Opens Vim in Terminal in Scratchpad
 | 
			
		||||
bindsym $mod+shift+a exec --no-startup-id ddspawn dropdownnotepad
 | 
			
		||||
 | 
			
		||||
# B {{{2
 | 
			
		||||
# Opens DBeaver
 | 
			
		||||
bindsym $mod+b exec dbeaver
 | 
			
		||||
# Opens sitee
 | 
			
		||||
bindsym $mod+Shift+b exec siteEnv
 | 
			
		||||
 | 
			
		||||
# C {{{2
 | 
			
		||||
# Opens Chromium
 | 
			
		||||
bindsym $mod+c exec chromium-snapshot-bin
 | 
			
		||||
# Opens Chromium in "Big Mode"
 | 
			
		||||
bindsym $mod+Shift+c exec google-chrome-stable --force-device-scale-factor=2
 | 
			
		||||
 | 
			
		||||
# D {{{2
 | 
			
		||||
# Start Rofi as program launcher
 | 
			
		||||
bindsym $mod+d exec rofi -show drun
 | 
			
		||||
# Start Rofi as ssh launcher
 | 
			
		||||
bindsym $mod+Shift+d exec rofi -show ssh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# E {{{2
 | 
			
		||||
# Generates reverse shells
 | 
			
		||||
bindsym $mod+Shift+e exec ~/.dotfiles/rofi/scripts/rofi-reverse-shells
 | 
			
		||||
 | 
			
		||||
# F {{{2
 | 
			
		||||
bindsym control+mod1+f exec thunar
 | 
			
		||||
 | 
			
		||||
# L {{{2
 | 
			
		||||
# Opens Logout / Lock / Shutdown etc. prompt
 | 
			
		||||
bindsym ctrl+shift+l exec --no-startup-id ~/.config/rofi/scripts/rofi-shutdown
 | 
			
		||||
# M {{{2
 | 
			
		||||
# Man page lookup - Opens man page as PDF - Uses Rofi to chose
 | 
			
		||||
bindsym $mod+m exec man -k . | awk '{ print $1 " " $2 }' | rofi -dmenu -p man -matching regex | awk '{ print $2 " " $1 }' | tr -d '()' | xargs -r man -t | ps2pdf - - | zathura -
 | 
			
		||||
# Same idea as above but uses TLDR pages
 | 
			
		||||
bindsym $mod+Shift+m exec "/usr/bin/tldr --list-all | sed 's/, /\\n/g' | rofi -dmenu -p 'TL;DR' -matching regex | xargs -r tldr -m | pandoc -f markdown -t ms | groff -ms - -T pdf | zathura -"
 | 
			
		||||
 | 
			
		||||
# Q {{{2
 | 
			
		||||
# Starts Qute Browser
 | 
			
		||||
bindsym $mod+Shift+q exec qutebrowser
 | 
			
		||||
 | 
			
		||||
# S {{{2
 | 
			
		||||
# Looks up http status codes
 | 
			
		||||
bindsym $mod+Shift+s exec cat ~/.dotfiles/rofi/scripts/http-status-codes | rofi -i -dmenu -p 'HTTP Status Code' | awk '{ print "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/"$1 }' | xargs -r qutebrowser
 | 
			
		||||
 | 
			
		||||
# U {{{2
 | 
			
		||||
#Start Rofi as emoji finder
 | 
			
		||||
bindsym $mod+u exec ~/.dotfiles/rofi/scripts/rofi-emoji
 | 
			
		||||
 | 
			
		||||
# W {{{2
 | 
			
		||||
# WP Lookup
 | 
			
		||||
bindsym $mod+Shift+w exec wpLookup
 | 
			
		||||
 | 
			
		||||
# Y {{{2
 | 
			
		||||
# Opens Zeal
 | 
			
		||||
bindsym $mod+y exec open-youtube
 | 
			
		||||
 | 
			
		||||
# Z {{{2
 | 
			
		||||
# Opens Zeal
 | 
			
		||||
bindsym $mod+z exec zeal
 | 
			
		||||
 | 
			
		||||
# Blocks {{{1
 | 
			
		||||
 | 
			
		||||
# Send signals to i3 blocks and zsh to tell them that capslock has been pushed
 | 
			
		||||
# The message to zsh is technically a "window change" which causes zsh to re-draw the prompt
 | 
			
		||||
# https://unix.stackexchange.com/questions/440184/update-zsh-ps1-propt-on-keypress
 | 
			
		||||
bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks && pkill -SIGWINCH zsh
 | 
			
		||||
 | 
			
		||||
#Send a message to i3blocks to say that numlock has been pushed
 | 
			
		||||
bindsym --release Num_Lock  exec pkill -SIGRTMIN+11 i3blocks
 | 
			
		||||
 | 
			
		||||
# Start i3bar to display a workspace bar (plus the system information i3status
 | 
			
		||||
# finds out, if available)
 | 
			
		||||
bar {
 | 
			
		||||
	status_command i3blocks -c ~/.dotfiles/i3/i3blocks.conf
 | 
			
		||||
	output eDP1
 | 
			
		||||
	output primary
 | 
			
		||||
	output DP-1
 | 
			
		||||
	tray_output primary
 | 
			
		||||
	tray_output DP-1
 | 
			
		||||
 | 
			
		||||
	position top
 | 
			
		||||
	colors {
 | 
			
		||||
		separator $base03
 | 
			
		||||
		background $base01
 | 
			
		||||
		statusline $base05
 | 
			
		||||
		#                  border  background text
 | 
			
		||||
		focused_workspace  $base01 $base01    $base07
 | 
			
		||||
		active_workspace   $base01 $base02    $base03
 | 
			
		||||
		inactive_workspace $base01 $base01    $base03
 | 
			
		||||
		urgent_workspace   $base01 $base01    $base08
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bar {
 | 
			
		||||
	status_command i3blocks -c ~/.dotfiles/i3/i3blocks-secondary.conf
 | 
			
		||||
	output HDMI-1
 | 
			
		||||
	tray_output none
 | 
			
		||||
	position top
 | 
			
		||||
    colors {
 | 
			
		||||
		separator $base03
 | 
			
		||||
		background $base01
 | 
			
		||||
		statusline $base05
 | 
			
		||||
		#                  border  background text
 | 
			
		||||
		focused_workspace  $base01 $base01    $base07
 | 
			
		||||
		active_workspace   $base01 $base02    $base03
 | 
			
		||||
		inactive_workspace $base01 $base01    $base03
 | 
			
		||||
		urgent_workspace   $base01 $base01    $base08
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Gaps {{{1
 | 
			
		||||
 | 
			
		||||
# Removes the boader on everything
 | 
			
		||||
for_window [class="^.*"] border pixel 0
 | 
			
		||||
 | 
			
		||||
# Sets up some tiny gaps
 | 
			
		||||
gaps outer -2
 | 
			
		||||
gaps inner 5
 | 
			
		||||
smart_gaps on
 | 
			
		||||
 | 
			
		||||
set $mode_gaps Gaps: (o) outer, (i) inner, (d) default
 | 
			
		||||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
 | 
			
		||||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
 | 
			
		||||
 | 
			
		||||
bindsym $mod+Shift+g mode "$mode_gaps"
 | 
			
		||||
mode "$mode_gaps" {
 | 
			
		||||
	bindsym o			mode "$mode_gaps_outer"
 | 
			
		||||
	bindsym i			mode "$mode_gaps_inner"
 | 
			
		||||
	bindsym d			gaps inner current set 10; gaps outer current set 0
 | 
			
		||||
	bindsym Shift+d		gaps inner all set 10; gaps outer all set 0
 | 
			
		||||
	bindsym Return mode "default"
 | 
			
		||||
	bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
mode "$mode_gaps_inner" {
 | 
			
		||||
	bindsym plus  gaps inner current plus 5
 | 
			
		||||
	bindsym minus gaps inner current minus 5
 | 
			
		||||
	bindsym 0     gaps inner current set 0
 | 
			
		||||
	bindsym d			gaps inner current set 10
 | 
			
		||||
 | 
			
		||||
	bindsym Shift+plus  gaps inner all plus 5
 | 
			
		||||
	bindsym Shift+minus gaps inner all minus 5
 | 
			
		||||
	bindsym Shift+0     gaps inner all set 0
 | 
			
		||||
	bindsym Shift+d		gaps inner all set 10
 | 
			
		||||
 | 
			
		||||
	bindsym Return mode "default"
 | 
			
		||||
	bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
mode "$mode_gaps_outer" {
 | 
			
		||||
	bindsym plus  gaps outer current plus 5
 | 
			
		||||
	bindsym minus gaps outer current minus 5
 | 
			
		||||
	bindsym 0     gaps outer current set 0
 | 
			
		||||
	bindsym d			gaps outer current set 0
 | 
			
		||||
 | 
			
		||||
	bindsym Shift+plus  gaps outer all plus 5
 | 
			
		||||
	bindsym Shift+minus gaps outer all minus 5
 | 
			
		||||
	bindsym Shift+0     gaps outer all set 0
 | 
			
		||||
	bindsym Shift+d		gaps outer all set 0
 | 
			
		||||
 | 
			
		||||
	bindsym Return mode "default"
 | 
			
		||||
	bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Scratchpad {{{1
 | 
			
		||||
# General dropdown window traits. The order can matter.
 | 
			
		||||
for_window [instance="dropdown_*"] floating enable
 | 
			
		||||
for_window [instance="dropdown_*"] move scratchpad
 | 
			
		||||
for_window [instance="dropdown_*"] sticky enable
 | 
			
		||||
for_window [instance="dropdown_*"] scratchpad show
 | 
			
		||||
for_window [instance="dropdown_*"] resize set 1200 600
 | 
			
		||||
for_window [instance="dropdown_*"] border pixel 20
 | 
			
		||||
for_window [instance="dropdown_*"] move position center
 | 
			
		||||
 | 
			
		||||
#Startup {{{1
 | 
			
		||||
 | 
			
		||||
# Compositor {{{2
 | 
			
		||||
exec --no-startup-id compton -f -i 0.95
 | 
			
		||||
 | 
			
		||||
# Notifications {{{2
 | 
			
		||||
exec_always --no-startup-id /usr/bin/dunst
 | 
			
		||||
 | 
			
		||||
# KDE Connect {{{2
 | 
			
		||||
exec_always --no-startup-id /usr/lib/kdeconnectd
 | 
			
		||||
exec_always --no-startup-id indicator-kdeconnect
 | 
			
		||||
 | 
			
		||||
# Monitor Setup {{{2 
 | 
			
		||||
# Work {{{3
 | 
			
		||||
exec --no-startup-id xrandr --output DP-1 --primary --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-2 --off
 | 
			
		||||
# Laptop {{{3
 | 
			
		||||
exec --no-startup-id xrandr --output HDMI2 --off --output HDMI1 --off --output DP1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VIRTUAL1 --off
 | 
			
		||||
 | 
			
		||||
# Clipboard manager {{{2
 | 
			
		||||
exec --no-startup-id greenclip daemon
 | 
			
		||||
 | 
			
		||||
# Restore Background {{{2
 | 
			
		||||
exec --no-startup-id nitrogen --restore
 | 
			
		||||
 | 
			
		||||
# Blue light filter {{{2
 | 
			
		||||
exec --no-startup-id redshift
 | 
			
		||||
 | 
			
		||||
# Layout Manager
 | 
			
		||||
exec --no-startup-id i3autolayout
 | 
			
		||||
							
								
								
									
										36
									
								
								LEGACY/i3/fadeLockScreen
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										36
									
								
								LEGACY/i3/fadeLockScreen
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
scrot -z /tmp/screen.png
 | 
			
		||||
convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png
 | 
			
		||||
 | 
			
		||||
if [[ -f $HOME/.config/screen-lock.png ]] 
 | 
			
		||||
then
 | 
			
		||||
    # placement x/y
 | 
			
		||||
    PX=0
 | 
			
		||||
    PY=0
 | 
			
		||||
    # lockscreen image info
 | 
			
		||||
    R=$(file ~/.config/screen-lock.png | grep -o '[0-9]* x [0-9]*')
 | 
			
		||||
    RX=$(echo $R | cut -d' ' -f 1)
 | 
			
		||||
    RY=$(echo $R | cut -d' ' -f 3)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    SR=$(xrandr --query | grep ' connected' | cut -f4 -d' ')
 | 
			
		||||
    echo $SR
 | 
			
		||||
    for RES in $SR
 | 
			
		||||
    do
 | 
			
		||||
    	echo $RES
 | 
			
		||||
        # monitor position/offset
 | 
			
		||||
        SRX=$(echo $RES | cut -d'x' -f 1)                   # x pos
 | 
			
		||||
        SRY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 1)  # y pos
 | 
			
		||||
        SROX=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 2) # x offset
 | 
			
		||||
        SROY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 3) # y offset
 | 
			
		||||
        PX=$(($SROX + $SRX/2 - $RX/2))
 | 
			
		||||
        PY=$(($SROY + $SRY/2 - $RY/2))
 | 
			
		||||
        convert /tmp/screen.png $HOME/.config/screen-lock.png -geometry +$PX+$PY -composite -matte  /tmp/screen.png
 | 
			
		||||
        echo "done"
 | 
			
		||||
    done
 | 
			
		||||
fi 
 | 
			
		||||
# dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
 | 
			
		||||
# i3lock  -I 10 -d -e -u -n -i /tmp/screen.png
 | 
			
		||||
i3lock -e -n -i /tmp/screen.png
 | 
			
		||||
							
								
								
									
										119
									
								
								LEGACY/i3/i3blocks-secondary.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										119
									
								
								LEGACY/i3/i3blocks-secondary.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,119 @@
 | 
			
		|||
# i3blocks config file
 | 
			
		||||
#
 | 
			
		||||
# Please see man i3blocks for a complete reference!
 | 
			
		||||
# The man page is also hosted at http://vivien.github.io/i3blocks
 | 
			
		||||
#
 | 
			
		||||
# List of valid properties:
 | 
			
		||||
#
 | 
			
		||||
# align
 | 
			
		||||
# color
 | 
			
		||||
# command
 | 
			
		||||
# full_text
 | 
			
		||||
# instance
 | 
			
		||||
# interval
 | 
			
		||||
# label
 | 
			
		||||
# min_width
 | 
			
		||||
# name
 | 
			
		||||
# separator
 | 
			
		||||
# separator_block_width
 | 
			
		||||
# short_text
 | 
			
		||||
# signal
 | 
			
		||||
# urgent
 | 
			
		||||
 | 
			
		||||
# Global properties
 | 
			
		||||
#
 | 
			
		||||
# The top properties below are applied to every block, but can be overridden.
 | 
			
		||||
# Each block command defaults to the script name to avoid boilerplate.
 | 
			
		||||
command=/usr/lib/i3blocks/$BLOCK_NAME
 | 
			
		||||
separator_block_width=15
 | 
			
		||||
markup=none
 | 
			
		||||
 | 
			
		||||
# Key indicators
 | 
			
		||||
#
 | 
			
		||||
# Add the following bindings to i3 config file:
 | 
			
		||||
#
 | 
			
		||||
# bindsym --release Caps_Lock exec pkill -S5
 | 
			
		||||
# bindsym --release Num_Lock  exec pkill -SIGRTMIN+11 i3blocks
 | 
			
		||||
 | 
			
		||||
[keyindicator]
 | 
			
		||||
instance=CAPS
 | 
			
		||||
interval=once
 | 
			
		||||
command=xset -q | grep Caps 2> /dev/null | cut -c23 | sed "s/n/CAPS/" | sed "s/f//"
 | 
			
		||||
signal=11
 | 
			
		||||
color=#00FF00
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#[nameservers]
 | 
			
		||||
#interval=5
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/dns forelockandload.com a 83.223.111.133
 | 
			
		||||
#label=Forelock And Load
 | 
			
		||||
#separator=true
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#[siteStatus]
 | 
			
		||||
#interval=5
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/siteStatus https://www.domain.com "Something that should be found on a working request"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[homeServerUpdates]
 | 
			
		||||
interval=300
 | 
			
		||||
command=~/.dotfiles/i3/blocks/homeServerUpdates
 | 
			
		||||
label=Home Server Updates
 | 
			
		||||
 | 
			
		||||
#[vps01status]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus VPS01
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[vps02status]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus VPS02
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[vps03status]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus VPS03
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[vps04status]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus VPS04
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[freightlinerstatus]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus Freightliner
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[wilks]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus Wilks
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[nhsstatus]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus NHS
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[vapourtecstatus]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus Vapourtec
 | 
			
		||||
#interval=10
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
#[checkitstatus]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/serverStatus Checkit
 | 
			
		||||
#interval=10
 | 
			
		||||
#
 | 
			
		||||
[wanip]
 | 
			
		||||
label=🌍
 | 
			
		||||
command=echo "$label $(curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//')"
 | 
			
		||||
interval=600
 | 
			
		||||
color=#00FF00
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Date Time
 | 
			
		||||
#
 | 
			
		||||
[time]
 | 
			
		||||
command=date '+%A %d %B %Y %H:%M:%S'
 | 
			
		||||
interval=1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										220
									
								
								LEGACY/i3/i3blocks.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										220
									
								
								LEGACY/i3/i3blocks.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,220 @@
 | 
			
		|||
# i3blocks config file
 | 
			
		||||
#
 | 
			
		||||
# Please see man i3blocks for a complete reference!
 | 
			
		||||
# The man page is also hosted at http://vivien.github.io/i3blocks
 | 
			
		||||
#
 | 
			
		||||
# List of valid properties:
 | 
			
		||||
#
 | 
			
		||||
# align
 | 
			
		||||
# color
 | 
			
		||||
# command
 | 
			
		||||
# full_text
 | 
			
		||||
# instance
 | 
			
		||||
# interval
 | 
			
		||||
# label
 | 
			
		||||
# min_width
 | 
			
		||||
# name
 | 
			
		||||
# separator
 | 
			
		||||
# separator_block_width
 | 
			
		||||
# short_text
 | 
			
		||||
# signal
 | 
			
		||||
# urgent
 | 
			
		||||
 | 
			
		||||
# Global properties
 | 
			
		||||
#
 | 
			
		||||
# The top properties below are applied to every block, but can be overridden.
 | 
			
		||||
# Each block command defaults to the script name to avoid boilerplate.
 | 
			
		||||
command=/usr/lib/i3blocks/$BLOCK_NAME
 | 
			
		||||
separator_block_width=15
 | 
			
		||||
markup=none
 | 
			
		||||
 | 
			
		||||
# Key indicators
 | 
			
		||||
#
 | 
			
		||||
# Add the following bindings to i3 config file:
 | 
			
		||||
#
 | 
			
		||||
# bindsym --release Caps_Lock exec pkill -S5
 | 
			
		||||
# bindsym --release Num_Lock  exec pkill -SIGRTMIN+11 i3blocks
 | 
			
		||||
[keyindicator]
 | 
			
		||||
instance=CAPS
 | 
			
		||||
interval=once
 | 
			
		||||
command=xset -q | grep Caps 2> /dev/null | cut -c23 | sed "s/n/CAPS/" | sed "s/f//"
 | 
			
		||||
signal=11
 | 
			
		||||
color=#00FF00
 | 
			
		||||
 | 
			
		||||
[speedtest]
 | 
			
		||||
command=echo "$(speedtest --simple | tr '\n' ' ')"
 | 
			
		||||
interval=30
 | 
			
		||||
 | 
			
		||||
[apachestatus]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/apache
 | 
			
		||||
interval=5
 | 
			
		||||
separator=false
 | 
			
		||||
 | 
			
		||||
[mysqlstatus]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/mysql
 | 
			
		||||
interval=5
 | 
			
		||||
#separator=false
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Generic media player support
 | 
			
		||||
#
 | 
			
		||||
# This displays "ARTIST - SONG" if a music is playing.
 | 
			
		||||
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
 | 
			
		||||
[mediaplayer]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/mediaplayer
 | 
			
		||||
interval=2
 | 
			
		||||
signal=10
 | 
			
		||||
markup=pango
 | 
			
		||||
#separator=false
 | 
			
		||||
 | 
			
		||||
# MPV Player
 | 
			
		||||
#
 | 
			
		||||
# This displays "ARTIST - SONG" if a music is playing.
 | 
			
		||||
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
 | 
			
		||||
[mpvmediaplayer]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/mpvmediaplayer
 | 
			
		||||
#SOCKET=/tmp/mpvsocket
 | 
			
		||||
interval=2
 | 
			
		||||
#markup=pango
 | 
			
		||||
 | 
			
		||||
#[proftpstatus]
 | 
			
		||||
#command=~/.dotfiles/i3/blocks/proftp
 | 
			
		||||
#interval=5
 | 
			
		||||
 | 
			
		||||
# Volume indicator
 | 
			
		||||
#
 | 
			
		||||
# The first parameter sets the step (and units to display)
 | 
			
		||||
# The second parameter overrides the mixer selection
 | 
			
		||||
# See the script for details.
 | 
			
		||||
[volume]
 | 
			
		||||
#label=VOL
 | 
			
		||||
label=🔊
 | 
			
		||||
command=~/.dotfiles/i3/blocks/volume
 | 
			
		||||
instance=Master
 | 
			
		||||
#instance=PCM
 | 
			
		||||
interval=once
 | 
			
		||||
signal=10
 | 
			
		||||
 | 
			
		||||
[brightness]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/brightness
 | 
			
		||||
interval=once
 | 
			
		||||
 | 
			
		||||
# Memory usage
 | 
			
		||||
#
 | 
			
		||||
# The type defaults to "mem" if the instance is not specified.
 | 
			
		||||
[memory]
 | 
			
		||||
label=MEM
 | 
			
		||||
interval=30
 | 
			
		||||
 | 
			
		||||
# Disk usage
 | 
			
		||||
#
 | 
			
		||||
# The directory defaults to $HOME if the instance is not specified.
 | 
			
		||||
# The script may be called with a optional argument to set the alert
 | 
			
		||||
# (defaults to 10 for 10%).
 | 
			
		||||
[disk]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/freeSpace
 | 
			
		||||
label=/
 | 
			
		||||
instance=/
 | 
			
		||||
interval=30
 | 
			
		||||
 | 
			
		||||
[disk]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/freeSpace /home
 | 
			
		||||
label=/home
 | 
			
		||||
#instance=/mnt/data
 | 
			
		||||
interval=30
 | 
			
		||||
 | 
			
		||||
# Network interface monitoring
 | 
			
		||||
#
 | 
			
		||||
# If the instance is not specified, use the interface used for default route.
 | 
			
		||||
# The address can be forced to IPv4 or IPv6 with -4 or -6 switches.
 | 
			
		||||
[iface]
 | 
			
		||||
#instance=wlan0
 | 
			
		||||
color=#00FF00
 | 
			
		||||
interval=10
 | 
			
		||||
separator=false
 | 
			
		||||
 | 
			
		||||
[wifi]
 | 
			
		||||
#instance=wlp3s0
 | 
			
		||||
interval=10
 | 
			
		||||
separator=false
 | 
			
		||||
 | 
			
		||||
[bandwidth]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/bandwidth
 | 
			
		||||
#command=/usr/lib/i3blocks/$BLOCK_NAME | sed "s/IN/↓/g" | sed "s/OUT/↑/g"
 | 
			
		||||
#instance=eno1
 | 
			
		||||
#INLABEL=↓
 | 
			
		||||
#OUTLABEL=↑
 | 
			
		||||
interval=2
 | 
			
		||||
 | 
			
		||||
# CPU usage
 | 
			
		||||
#
 | 
			
		||||
# The script may be called with -w and -c switches to specify thresholds,
 | 
			
		||||
# see the script for details.
 | 
			
		||||
[cpu_usage]
 | 
			
		||||
label=CPU
 | 
			
		||||
interval=10
 | 
			
		||||
command=~/.dotfiles/i3/blocks/cpu
 | 
			
		||||
#min_width=CPU: 100.00%
 | 
			
		||||
#separator=false
 | 
			
		||||
 | 
			
		||||
#[load_average]
 | 
			
		||||
#interval=10
 | 
			
		||||
 | 
			
		||||
# Battery indicator
 | 
			
		||||
#
 | 
			
		||||
# The battery instance defaults to 0.
 | 
			
		||||
#[battery]
 | 
			
		||||
#label=BAT
 | 
			
		||||
#label=⚡
 | 
			
		||||
#instance=1
 | 
			
		||||
#interval=30
 | 
			
		||||
 | 
			
		||||
[battery]
 | 
			
		||||
command=acpi | cut -d " " -f3-5 |  sed -e "s/,//g;s/Discharging/🔋/;s/Charging/🔌/;s/Full/⚡/;s/ 0*/ /g;s/ :/ /g"
 | 
			
		||||
interval=5
 | 
			
		||||
 | 
			
		||||
[archNews]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/archNews
 | 
			
		||||
interval=120
 | 
			
		||||
color=#FF0000
 | 
			
		||||
 | 
			
		||||
[updates]
 | 
			
		||||
command=~/.dotfiles/i3/blocks/pacmanUpdates
 | 
			
		||||
label=Updates:
 | 
			
		||||
interval=120
 | 
			
		||||
 | 
			
		||||
# Date Time
 | 
			
		||||
#
 | 
			
		||||
[time]
 | 
			
		||||
command=date '+%A %Y-%m-%d %H:%M:%S'
 | 
			
		||||
interval=1
 | 
			
		||||
 | 
			
		||||
# Generic media player support
 | 
			
		||||
#
 | 
			
		||||
# This displays "ARTIST - SONG" if a music is playing.
 | 
			
		||||
# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others.
 | 
			
		||||
#[mediaplayer]
 | 
			
		||||
#instance=spotify
 | 
			
		||||
#interval=5
 | 
			
		||||
#signal=10
 | 
			
		||||
 | 
			
		||||
# OpenVPN support
 | 
			
		||||
#
 | 
			
		||||
# Support multiple VPN, with colors.
 | 
			
		||||
#[openvpn]
 | 
			
		||||
#interval=20
 | 
			
		||||
 | 
			
		||||
# Temperature
 | 
			
		||||
#
 | 
			
		||||
# Support multiple chips, though lm-sensors.
 | 
			
		||||
# The script may be called with -w and -c switches to specify thresholds,
 | 
			
		||||
# see the script for details.
 | 
			
		||||
#[temperature]
 | 
			
		||||
#label=TEMP
 | 
			
		||||
#interval=10
 | 
			
		||||
 | 
			
		||||
#[keyindicator]
 | 
			
		||||
#instance=NUM
 | 
			
		||||
#interval=once
 | 
			
		||||
#signal=11
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue