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

View File

@@ -1,28 +1,46 @@
# i3status configuration file. # 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 { general {
colors = true colors = true
interval = 1 interval = 1
} }
#order += "ipv6" order += "battery 0"
order += "disk /home" order += "disk /home"
order += "disk /" order += "disk /"
order += "disk /media/Data1"
order += "disk /media/Data2"
order += "run_watch VPN" order += "run_watch VPN"
order += "ethernet eth0" order += "wireless wlp3s0"
#order += "ethernet enp0s25"
order += "cpu_temperature 0" order += "cpu_temperature 0"
order += "volume master" order += "volume master"
order += "tztime local" order += "tztime local"
ethernet eth0 { wireless wlp3s0 {
format_up = "📡 (%quality @ %essid, %bitrate) %ip"
format_down = "📡 down"
}
ethernet enp0s25 {
format_up = "🔌 %ip (%speed)" format_up = "🔌 %ip (%speed)"
format_down = "🔌 down" format_down = "🔌 down"
} }
run_watch DHCP { battery 0 {
pidfile = "/var/run/dhclient*.pid" 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 { run_watch VPN {
@@ -35,24 +53,18 @@ tztime local {
cpu_temperature 0 { cpu_temperature 0 {
format = "🌡 %degrees °C" format = "🌡 %degrees °C"
max_threshold = 65 max_threshold = 70
path = "/sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input" path = "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input"
}
disk "/" {
format = "root: %free"
} }
disk "/home" { disk "/home" {
format = "home: %free" format = "/home %free"
prefix_type = "binary"
} }
disk "/media/Data1" { disk "/" {
format = "data1: %free" format = "root %free"
} prefix_type = "binary"
disk "/media/Data2" {
format = "data2: %free"
} }
volume master { volume master {

View File

@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
BACKGROUND='#402e2e' BACKGROUND="#402e2e"
FOREGOURND='#978965' FOREGOURND="#978965"
SELECTED_BACKGROUND='#808080' SELECTED_BACKGROUND="#808080"
SELECTED_FOREGROUND='#ffff00' SELECTED_FOREGROUND="#ffff00"
i3-dmenu-desktop --dmenu='dmenu -i -nb '#402e2e' -nf '#978965' -sb '#808080' -sf '#ffff00' -l 8' 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 #!/bin/bash
DOTFILES="/home/$USER/.dotfiles" #############################################################
# _____ _ _ _ #
# / ____| | | (_) | | #
# | (___ ___| |_ _ _ _ __ ___ ___ _ __ _ _ __ | |_ #
# \___ \ / _ \ __| | | | '_ \ / __|/ __| '__| | '_ \| __| #
# ____) | __/ |_| |_| | |_) | \__ \ (__| | | | |_) | |_ #
# |_____/ \___|\__|\__,_| .__/ |___/\___|_| |_| .__/ \__| #
# | | | | #
# |_| |_| #
#############################################################
# Clone the repository and setup powerline fonts # Files and folders
git clone https://github.com/id101010/LinuxDotFiles.git $DOTFILES 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 # Uncomment to install powerlinefonts from the arch linux user repository
#yaourt -S powerline-fonts-git #yaourt -S powerline-fonts-git
# setup i3 # ------------------------------------------------ Setup I3wm
if [ ! -e "$HOME/.i3" ]; then ln -sfv $DOTFILES/i3wm/ $HOME/.i3
ln -s $DOTFILES/i3wm/ $HOME/.i3/
fi
# setup tmux # ------------------------------------------------ Setup tmux
if [ ! -e "$HOME/.tmux.conf" ]; then ln -sfv $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
ln -s $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
fi
# setup vim # ------------------------------------------------ Setup vim
if [ ! -e "$HOME/.vimrc" ]; then ln -sfv $DOTFILES/vim/vimrc $HOME/.vimrc
ln -s $DOTFILES/vim/vimrc $HOME/.vimrc
fi
# setup zsh # ------------------------------------------------ Setup zsh
if [ ! -e "$HOME/.zshrc" ]; then ln -sfv $DOTFILES/zsh/zshrc $HOME/.zshrc
ln -s $DOTFILES/zsh/zshrc $HOME/.zshrc
fi
# setup urxvt # ------------------------------------------------ Setup urxvt
ln -s $DOTFILES/urxvt/Xdefaults $HOME/.Xdefaults ln -sfv $DOTFILES/urxvt/Xdefaults $HOME/.Xdefaults