initial commit

This commit is contained in:
Tristan
2017-06-06 18:02:21 +02:00
commit 178bfef951
481 changed files with 43275 additions and 0 deletions

BIN
.i3/boot.mp3 Executable file

Binary file not shown.

215
.i3/config Normal file
View File

@@ -0,0 +1,215 @@
# T's desktop v3
#exec --no-startup-id xrandr --output HDMI-0 --auto --mode 1920x1080 --primary --output DVI-I-1 --right-of HDMI-0 --auto --dpi 96/HDMI-0
exec --no-startup-id mplayer -fs ~/.i3/boot.mp4
exec --no-startup-id i3lock -f "xos4 Terminus" -F 40 -X 200 -Y 100 -i '~/Pictures/backgrounds/6a171c_5499051.jpg'
#DAEMONS
exec --no-startup-id urxvtd -q
exec --no-startup-id udiskie -f "urxranger" -t
exec --no-startup-id nitrogen --restore
#exec --no-startup-id mpd
#exec --no-startup-id megasync
exec --no-startup-id parcellite
exec --no-startup-id dunst
exec --no-startup-id blueman-applet
exec --no-startup-id setxkbmap us altgr-intl
# US brackets on slovene special characters
#exec xmodmap ~/.i3/custom.map
font pango: FontAwesome, xos4 Terminess Powerline 12
#--APPEARANCE--#
#--T-netbook---#
#client.focused #464A55 #464A55 #969AA5 #ffffff
#client.focused_inactive #272B35 #9b9aa6 #ffffff #48504e
#client.urgent #272B35 #900000 #ffffff #900000
#client.placeholder #000000 #0c0c0c #ffffff #000000
#client.background #ffffff
#-----T-i3-----#
#class border backgr. text indicator
client.focused #225396 #15325A #ffffff #2e9ef4
client.focused_inactive #15325A #032048 #ffffff #484e50
client.urgent #2f343a #900000 #ffffff #900000
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #ffffff
new_window pixel 1
new_float normal 3
hide_edge_borders smart
#//APPEARANCE//#
set $mod Mod4
set $alt Mod1
#--WINDOW-SETTINGS--#
floating_modifier $mod
for_window [class=".*"] title_format "-> %title"
for_window [class="Pavucontrol"] floating enable
for_window [class="octopi"] floating enable
for_window [class="lxappearance"] floating enable
for_window [title="Hold On*"] floating enable
for_window [title="florence"] floating enable
for_window [title="Starting Unity...*"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
assign [title="^ranger$"] → $WS4
assign [title="^ncmpcpp$"] → $WS5
assign [class="^URxvt$"] → $WS3
assign [class="^Firefox$"] → $WS2
assign [class="^Steam*"] → $WSW2
assign [class="^Gimp$"] → $WSW4
#//WINDOW-SETTINGS//#
#--CONTAINERS+WINDOWS--#
bindsym $mod+Shift+q kill
bindsym --release button2 kill
bindsym $mod+f fullscreen toggle
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+p focus parent
bindsym $mod+a layout toggle split
bindsym $mod+s layout stacking
bindsym $mod+x split h
bindsym $mod+c split v
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
#//CONTAINERS+WINDOWS//#
#--CUSTOM COMMANDS--#
#KEYBOARD LAYOUT SWITCHING
bindsym $alt+F3 exec --no-startup-id setxkbmap us altgr-intl
bindsym $alt+F2 exec --no-startup-id setxkbmap si
#LAUNCH PROGRAM
bindsym $mod+d exec --no-startup-id rofi -color-enabled -show run -font "Hack 12"
bindsym $mod+Shift+d exec --no-startup-id j4-dmenu-desktop --dmenu='rofi -dmenu -font "Hack 12" -o 85 -p "Run:"'
bindsym $alt+Tab exec --no-startup-id rofi -show window -font "Hack 12"
bindsym $mod+t exec urxvtc
bindsym $mod+w exec firefox
bindsym $mod+Shift+f exec urxvtc -e ranger ~
bindsym $mod+m exec urxvtc -e ncmpcpp
#INTEGRATED-SETTINGS
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioStop exec mpc stop
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc previous
bindsym XF86AudioMute exec ~/.i3/scripts/volume_set.sh mute
bindsym XF86AudioRaiseVolume exec ~/.i3/scripts/volume_set.sh up
bindsym XF86AudioLowerVolume exec ~/.i3/scripts/volume_set.sh down
bindsym XF86MonBrightnessUp exec xbacklight +5
bindsym XF86MonBrightnessDown exec xbacklight -5
bindsym XF86KbdBrightnessUp exec asus-kbd-backlight up
bindsym XF86KbdBrightnessDown exec asus-kbd-backlight down
bindsym XF86Sleep exec ~/.i3/scripts/locker.sh & systemctl suspend
bindsym XF86PowerOff exec ~/.i3/scripts/locker.sh
#SHUTDOWN+RESTART
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+z exec "i3-msg exit"
bindsym $mod+Shift+e exec ~/.i3/scripts/locker.sh
#SHUTDOWN MENU
bindsym $alt+F4 exec --no-startup-id ~/.i3/scripts/shutdown_menu
#//CUSTOM COMMANDS//#
#--WORKSPACES--#
workspace_auto_back_and_forth yes
workspace $WS1 output primary
#Primary workspaces
set $WS1 "1 "
set $WS2 "2 "
set $WS3 "3 "
set $WS4 "4 "
set $WS5 "5 "
bindsym $mod+1 workspace $WS1
bindsym $mod+2 workspace $WS2
bindsym $mod+3 workspace $WS3
bindsym $mod+4 workspace $WS4
bindsym $mod+5 workspace $WS5
bindsym $mod+Shift+1 move container to workspace $WS1
bindsym $mod+Shift+2 move container to workspace $WS2
bindsym $mod+Shift+3 move container to workspace $WS3
bindsym $mod+Shift+4 move container to workspace $WS4
bindsym $mod+Shift+5 move container to workspace $WS5
#Secondary workspaces
set $WSW1 "W1"
set $WSW2 "W2"
set $WSW3 "W3"
set $WSW4 "W4"
bindsym $mod+F1 workspace $WSW1
bindsym $mod+F2 workspace $WSW2
bindsym $mod+F3 workspace $WSW3
bindsym $mod+F4 workspace $WSW4
bindsym $mod+Shift+F1 move container to workspace $WSW1
bindsym $mod+Shift+F2 move container to workspace $WSW2
bindsym $mod+Shift+F3 move container to workspace $WSW3
bindsym $mod+Shift+F4 move container to workspace $WSW4
#Multiple screens
bindsym $mod+Left move container to output left
bindsym $mod+Right move container to output right
bindsym $mod+Shift+Left move workspace to output left
bindsym $mod+Shift+Right move workspace to output right
#//WORKSPACES//#
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
mode "ignore" {
bindsym $alt+Shift+i mode "default"
}
bindsym $alt+i mode "ignore"
#--BAR CONFIGURATION--#
bar {
tray_output primary
#status_command i3blocks -c ~/.i3/i3blocks.conf
status_command i3blocks -c ~/.i3/i3blocks-netbook.conf
mode dock
hidden_state show
position top
# T-i3
colors {
background #15325A
statusline #FFFFFF
separator #666666
focused_workspace #225396 #184791 #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #aa0000 #990000 #ffffff
}
}
# vim:filetype=i3

6
.i3/custom.map Normal file
View File

@@ -0,0 +1,6 @@
keycode 10 = 1 exclam 1 exclam asciitilde dead_tilde
keycode 49 = asciitilde dead_diaeresis
keycode 21 = plus asterisk
keycode 34 = braceleft bracketleft braceleft bracketleft scaron Scaron
keycode 35 = braceright bracketright braceright bracketright dstroke Dstroke

38
.i3/i3blocks-netbook.conf Normal file
View File

@@ -0,0 +1,38 @@
command=/usr/lib/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=pango
[battery]
command=~/build/i3blocks-battery/battery.py
interval=5
[is_online]
command=~/.i3/scripts/wan-or-not.sh   
interval=3
[cpu_usage]
label=
interval=1
[RAM]
label=
command=~/.i3/scripts/RAM.sh
interval=3
[disk]
label=
instance=/
interval=60
[key_layout]
command= ~/.i3/scripts/key_layout
label=
interval=2
[time]
command=date '+%d.%m.%y %H:%M'
interval=5
[shutdown_menu]
full_text= Quit
command=~/.i3/scripts/shutdown_menu -c

50
.i3/i3blocks.conf Normal file
View File

@@ -0,0 +1,50 @@
command=/usr/lib/i3blocks/$BLOCK_NAME
separator_block_width=15
markup=pango
#[mpd_status]
#command=~/.i3/mpd_status.sh
#interval=2
[is_online]
command=~/.i3/scripts/wan-or-not.sh   
interval=5
[cpu_usage]
label=
interval=2
[RAM]
label=
command=~/.i3/scripts/RAM.sh
interval=2
[disk]
color=#6484C7
label=
instance=/home
interval=100
[disk]
label=
instance=/
interval=100
[disk]
label=M:
instance=/media
interval=100
[key_layout]
command= ~/.i3/scripts/key_layout
label=
interval=2
[time]
label=
command=date '+%d.%m.%y %H:%M'
interval=5
[shutdown_menu]
full_text= Quit
command=~/.i3/scripts/shutdown_menu -c

View File

@@ -0,0 +1,73 @@
// vim:ts=4:sw=4:et
{
"border": "normal",
"current_border_width": 5,
"floating": "user_off",
"geometry": {
"height": 820,
"width": 210,
"x": 3599,
"y": 0
},
"name": "Layers - Brushes",
"percent": 0.1078125,
"swallows": [
{
// "class": "^Gimp$",
// "instance": "^gimp$",
// "title": "^Layers\\ \\-\\ Brushes$",
// "transient_for": "^$",
// "window_role": "^gimp\\-dock$"
}
],
"type": "con"
}
{
"border": "pixel",
"current_border_width": 5,
"floating": "user_off",
"geometry": {
"height": 200,
"width": 620,
"x": 410,
"y": 370
},
"name": "*[progress_bar] (imported)-1.0 (RGB color, 1 layer) 192x12 GIMP",
"percent": 0.777083333333333,
"swallows": [
{
// "class": "^Gimp$",
// "instance": "^gimp$",
// "title": "^\\*\\[progress_bar\\]\\ \\(imported\\)\\-1\\.0\\ \\(RGB\\ color\\,\\ 1\\ layer\\)\\ 192x12\\ \\\\ GIMP$",
// "transient_for": "^$",
// "window_role": "^gimp\\-image\\-window$"
}
],
"type": "con"
}
{
"border": "normal",
"current_border_width": 5,
"floating": "user_off",
"geometry": {
"height": 820,
"width": 170,
"x": 0,
"y": 0
},
"name": "Toolbox - Tool Options",
"percent": 0.115104166666667,
"swallows": [
{
// "class": "^Gimp$",
// "instance": "^gimp$",
// "title": "^Toolbox\\ \\-\\ Tool\\ Options$",
// "transient_for": "^$",
// "window_role": "^gimp\\-toolbox$"
}
],
"type": "con"
}

BIN
.i3/mboot.mp3 Normal file

Binary file not shown.

7
.i3/scripts/RAM.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
ram=$(free -m)
arr=($ram)
max=$(awk "BEGIN {printf \"%.2f\",${arr[7]}/1024}")
cur=$(awk "BEGIN {printf \"%.2f\",${arr[8]}/1024}")
echo "${cur}GB/${max}GB"

BIN
.i3/scripts/claw Executable file

Binary file not shown.

23
.i3/scripts/key_layout Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Copyright 2016 Patrick Haun
# Edited: Denis Kadyshev
#
# 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/>.
setxkbmap -query | awk '
BEGIN{layout="";variant=""}
/^layout/{layout=$2}
/^variant/{variant=$2}
END{printf("%s %s",layout,variant)}'

14
.i3/scripts/locker.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
ARGS=(
"--clock" "-s"
"-i${HOME}/Pictures/backgrounds/6164e8_5775038.png"
"--insidevercolor=35d75588"
"--insidewrongcolor=d7355588"
"--insidecolor=50505000"
"--ringvercolor=64c784ff"
"--ringwrongcolor=c76484ff"
"--ringcolor=3555d7ff"
"--separatorcolor=6484c7ff"
"--keyhlcolor=35d755ff"
"--bshlcolor=d73555ff")
i3lock "${ARGS[@]}"

25
.i3/scripts/mpd_status.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
SONG=$(mpc current)
for i in $(mpc --format ""); do
a=$i
break
done
case $BLOCK_BUTTON in
2) mpc toggle ;;
1) mpc prev ;;
3) mpc next ;;
esac
if [ -z "$SONG" ]; then
OUT="<span foreground='#CC0033'></span>"
else
if [ $a = "[playing]" ]; then
OUT="<span foreground='#00CC33'></span>"
else
OUT="<span foreground='#CC0033'></span>"
fi
OUT="$OUT <span foreground='#6484C7'>$SONG</span>"
fi
echo $OUT

40
.i3/scripts/shutdown_menu Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/bash
#LOCKSCRIPT="i3lock-extra -m pixelize"
FG_COLOR="#d7d7d7"
BG_COLOR="#15325A"
SF_COLOR="#3555d7"
SB_COLOR="#6484c7"
color="-bg $BG_COLOR -fg $FG_COLOR -hlfg $SF_COLOR -hlbg $SB_COLOR -bw 0"
# 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]="i3lock --color=${BG_COLOR}"
[Logout]="i3-msg exit"
[Cancel]="Cancel"
)
# Menu entries that may trigger a confirmation message
menu_confirm="Shutdown Reboot Hibernate Suspend Halt Logout"
launcher="rofi -dmenu -hide-scrollbar -width 10"
launcher_opt="-i -yoffset 23 -location 3 $color"
selection=$(printf '%s\n' ${!menu[@]} | sort | eval '$launcher $launcher_opt -font "Hack-Regular 12" -lines 8')
if [ $selection == "Cancel" ] || [ -z $selection ]; then
exit 1
else
if [[ ${menu_confirm[*]} =~ $selection ]]; then
confirm=$(printf 'Yes\nNo\n' | eval '$launcher $launcher_opt -l 2 -font "Hack-Regular 12"')
if [[ $confirm == 'Yes' ]]; then
i3-msg -q "exec ${menu[${selection}]}"
fi
else
i3-msg -q "exec ${menu[${selection}]}"
fi
fi

18
.i3/scripts/volume_set.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
if [ "$1" == "up" ]
then
pulsemixer --change-volume +5
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
elif [ "$1" == "down" ]
then
pulsemixer --change-volume -5
TEXT="Volume: $(pulsemixer --get-volume | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
elif [ "$1" == "mute" ]
then
pulsemixer --toggle-mute
TEXT="Mute: $(pulsemixer --get-mute | cut -d' ' -f 1 | sed 's/\(\[\|\]\)//g')"
else
echo "usage volume_set.sh {up|down|mute}"
fi
dunstify -r 33223 "Volume changed" "$TEXT"

13
.i3/scripts/wan-or-not.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/zsh
#First arg is icon for WAN IP, Second argument is icon for local IP, third for offline
wanip=$(dig +short myip.opendns.com @resolver1.opendns.com);
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
echo "<span foreground='#00CC33'>$1</span>:$wanip"
else
wanip=$(ip addr show dev wlan0 | grep "inet " | awk '{print $2}')
if [[ $wanip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]; then
echo "<span foreground='#3300CC'>$2</span>:$wanip"
else
echo "<span foreground='#CC0033'>$3</span>"
fi
fi