fixed bug in i3config, fixed symlinks, added backupfunction for old configs

This commit is contained in:
id101010
2016-10-16 15:31:31 +02:00
parent 5427876096
commit 8532117b9e
5 changed files with 124 additions and 63 deletions

View File

@@ -13,7 +13,7 @@
#############################################
# font
set $font "pango:RobotoMono 12"
set $font "pango:RobotoMono 10"
font $font
# floating modifier
@@ -37,22 +37,25 @@ focus_follows_mouse yes
# "xev" and "showkeys" can be usefull to determine the keycodes.
#
# Sound softkeys management
bindsym Print exec ~/.i3/util/volnotid.sh down
bindsym Scroll_Lock exec ~/.i3/util/volnotid.sh up
bindsym Pause exec ~/.i3/util/volnotid.sh mute
# sound softkeys management
bindsym XF86AudioRaiseVolume exec ~/.i3/util/volnotid.sh up
bindsym XF86AudioLowerVolume exec ~/.i3/util/volnotid.sh down
bindsym XF86AudioMute exec ~/.i3/util/volnotid.sh mute
# Display brightness management
# display brightness management
bindsym XF86MonBrightnessUp exec "xbacklight +10"
bindsym XF86MonBrightnessDown exec "xbacklight -10"
# Lenovo Key wifi-menu
# webcam
bindym XF86WebCam exec /bin/cheese
# lenovo Key wifi-menu
bindsym XF86Launch1 exec urxvt -e sh -c "sudo wifi-menu wlp3s0"
# jauth two factor authenticator
bindsym $mod+F1 exec ~/.i3/util/Authenticator.sh google
bindsym $mod+F2 exec ~/.i3/util/Authenticator.sh facebook
bindsym $mod+F3 exec ~/.i3/util/Authenticator.sh dropbox
bindsym $mod+F1 exec /opt/JAuth/Authenticator.sh google
bindsym $mod+F2 exec /opt/JAuth/Authenticator.sh facebook
bindsym $mod+F3 exec /opt/JAuth/Authenticator.sh dropbox
# start dmenu-launcher
bindsym $mod+d exec ~/.i3/util/i3dmenu-wrapper.sh
@@ -233,6 +236,7 @@ for_window [class="teamspeak3"] floating enable
for_window [class="rhythmbox"] floating enable
for_window [class="LibreOffice"] floating enable
for_window [class="JAuth"] floating enable
for_window [class="plecs"] floating enable
# 0px Border
for_window [class="chrome"] border none
@@ -245,33 +249,36 @@ for_window [class="URxvt" ] border 1pixel
# auto start with i3 #
#############################################
# terminal daemon
exec --no-startup-id urxvtd -f
# less eye pain
exec --no-startup-id redshift-gtk
exec --no-startup-id compton -cCGb
# fucking no beep!
# no beep!
exec --no-startup-id xset b off
# set dpi for my monitor
exec --no-startup-id xrandr --dpi 81
#exec --no-startup-id xrandr --dpi 81
# set mouse accel
exec --no-startup-id xset m 1/4 1
#exec --no-startup-id xset m 1/4 1
# volnoti volume changer
exec --no-startup-id volnoti
# numlock on by default
exec --no-startup-id numlockx on
#exec --no-startup-id numlockx on
# wallpapers
exec --no-startup-id nitrogen --restore
exec --no-startup-id ~/.i3/util/wallpapers.sh
# archlinux update notifier
exec --no-startup-id aarchup
# telegram
exec telegram-desktop
# dropbox daemon
exec dropbox start
# telegram
#exec -no-startup-id telegram-desktop

View File

@@ -1,28 +1,46 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 1
}
#order += "ipv6"
order += "battery 0"
order += "disk /home"
order += "disk /"
order += "disk /media/Data1"
order += "disk /media/Data2"
order += "run_watch VPN"
order += "ethernet eth0"
order += "wireless wlp3s0"
#order += "ethernet enp0s25"
order += "cpu_temperature 0"
order += "volume master"
order += "tztime local"
ethernet eth0 {
wireless wlp3s0 {
format_up = "📡 (%quality @ %essid, %bitrate) %ip"
format_down = "📡 down"
}
ethernet enp0s25 {
format_up = "🔌 %ip (%speed)"
format_down = "🔌 down"
}
run_watch DHCP {
pidfile = "/var/run/dhclient*.pid"
battery 0 {
format = "%status %percentage (%remaining @ %consumption)"
format_down = "No battery"
last_full_capacity = false # true: relative capaciy, false: true capacity left
status_chr = "⚇ CHR"
status_bat = "⚡ BAT"
status_full = "☻ FULL"
path = "/sys/class/power_supply/BAT%d/uevent"
threshold_type = time
low_threshold = 10
}
run_watch VPN {
@@ -35,24 +53,18 @@ tztime local {
cpu_temperature 0 {
format = "🌡 %degrees °C"
max_threshold = 65
path = "/sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input"
}
disk "/" {
format = "root: %free"
max_threshold = 70
path = "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input"
}
disk "/home" {
format = "home: %free"
format = "/home %free"
prefix_type = "binary"
}
disk "/media/Data1" {
format = "data1: %free"
}
disk "/media/Data2" {
format = "data2: %free"
disk "/" {
format = "root %free"
prefix_type = "binary"
}
volume master {

View File

@@ -1,8 +1,8 @@
#!/bin/bash
BACKGROUND='#402e2e'
FOREGOURND='#978965'
SELECTED_BACKGROUND='#808080'
SELECTED_FOREGROUND='#ffff00'
BACKGROUND="#402e2e"
FOREGOURND="#978965"
SELECTED_BACKGROUND="#808080"
SELECTED_FOREGROUND="#ffff00"
i3-dmenu-desktop --dmenu='dmenu -i -nb '#402e2e' -nf '#978965' -sb '#808080' -sf '#ffff00' -l 8'

10
i3wm/util/wallpapers.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
PICTURES="$HOME/.wallpapers/"
SHOWTIME="10m"
while true; do
find $PICTURES -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z | xargs -0 feh --bg-scale
sleep $SHOWTIME
done

View File

@@ -1,32 +1,64 @@
#!/bin/bash
DOTFILES="/home/$USER/.dotfiles"
#############################################################
# _____ _ _ _ #
# / ____| | | (_) | | #
# | (___ ___| |_ _ _ _ __ ___ ___ _ __ _ _ __ | |_ #
# \___ \ / _ \ __| | | | '_ \ / __|/ __| '__| | '_ \| __| #
# ____) | __/ |_| |_| | |_) | \__ \ (__| | | | |_) | |_ #
# |_____/ \___|\__|\__,_| .__/ |___/\___|_| |_| .__/ \__| #
# | | | | #
# |_| |_| #
#############################################################
# Clone the repository and setup powerline fonts
git clone https://github.com/id101010/LinuxDotFiles.git $DOTFILES
# Files and folders
DOTFILES="$HOME/.dotfiles"
BAKFILES=".zshrc
.tmux.conf
.vimrc
.Xdefaults"
BAKFOLD="$HOME/.dotfilebackup"
# Clean environment
if [ "$1" == "clean" ]; then
echo "[*] Backing up dotfiles to $BAKFOLD"
# Create backup folder if it doesn't exist
if [ ! -d $BAKFOLD ]; then
mkdir $BAKFOLD
fi
# Backup each config file specified by $BAKFILES
for file in $BAKFILES
do
cp -v $HOME/$file $BAKFOLD/$file
rm -rf $HOME/$file
done
exit
fi
# Clone the repository if it doesn't exist
if [ ! -e "$HOME/.dotfiles/" ]; then
git clone https://github.com/id101010/LinuxDotFiles.git $DOTFILES
fi
# Uncomment to install powerlinefonts from the arch linux user repository
#yaourt -S powerline-fonts-git
# setup i3
if [ ! -e "$HOME/.i3" ]; then
ln -s $DOTFILES/i3wm/ $HOME/.i3/
fi
# ------------------------------------------------ Setup I3wm
ln -sfv $DOTFILES/i3wm/ $HOME/.i3
# setup tmux
if [ ! -e "$HOME/.tmux.conf" ]; then
ln -s $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
fi
# ------------------------------------------------ Setup tmux
ln -sfv $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
# setup vim
if [ ! -e "$HOME/.vimrc" ]; then
ln -s $DOTFILES/vim/vimrc $HOME/.vimrc
fi
# ------------------------------------------------ Setup vim
ln -sfv $DOTFILES/vim/vimrc $HOME/.vimrc
# setup zsh
if [ ! -e "$HOME/.zshrc" ]; then
ln -s $DOTFILES/zsh/zshrc $HOME/.zshrc
fi
# ------------------------------------------------ Setup zsh
ln -sfv $DOTFILES/zsh/zshrc $HOME/.zshrc
# setup urxvt
ln -s $DOTFILES/urxvt/Xdefaults $HOME/.Xdefaults
# ------------------------------------------------ Setup urxvt
ln -sfv $DOTFILES/urxvt/Xdefaults $HOME/.Xdefaults