Browse Source

Config file

main
Yigit Colakoglu 4 years ago
parent
commit
0f8b7f20ff
6 changed files with 78 additions and 27 deletions
  1. +8
    -0
      config.env.def
  2. +36
    -1
      install.sh
  3. +27
    -22
      scripts/status-bar/battery
  4. +3
    -1
      scripts/status-bar/cpu-temp
  5. +1
    -2
      scripts/status-bar/network
  6. +3
    -1
      xorg/xinitrc

+ 8
- 0
config.env.def View File

@ -0,0 +1,8 @@
#!/bin/bash
export ETH_IT=enp3s0f0
export WLAN_IT=wlp0s20u7
export TEMP_ZONE=/sys/class/thermal/thermal_zone0/temp
export NO_BAT=true
export NEXTCLOUD=false

+ 36
- 1
install.sh View File

@ -8,6 +8,7 @@ yay -S --needed $(cat ~/.dotfiles/chroot/AUR.txt)
# Initial cleanup
echo "Backing up your previous dotfiles to ~/.dotfiles_backup"
mkdir -p ~/.local/share
mkdir -p ~/.dotfiles_backup
mkdir -p ~/.config
mkdir -p ~/.dotfiles_backup/.config
@ -44,6 +45,34 @@ rsync -avzh --ignore-errors \
~/.config/suckless \
~/.dotfiles_backup/.config
rm -rf \
~/.completions \
~/.aliases \
~/.cmds \
~/.zshrc \
~/.Xresources \
~/.xmodmap \
~/.xinitrc \
~/.tmux.conf \
~/.surf \
~/.scripts \
~/.keyboard \
~/.fzf.zsh \
~/.themes \
~/.vim \
~/.vimrc \
~/.config/htop \
~/.config/.profile \
~/.config/systemd \
~/.config/termite \
~/.config/zathura \
~/.config/dunst \
~/.config/gtk-4.0 \
~/.config/gtk-3.0 \
~/.config/gtk-2.0 \
~/.config/antibody \
~/.config/suckless
# Vim
ln -s ~/.dotfiles/vim/vimrc ~/.vimrc
ln -s ~/.dotfiles/vim/vim ~/.vim
@ -76,7 +105,6 @@ ln -s ~/.dotfiles/suckless ~/.config/suckless
ln -s ~/.dotfiles/suckless/dot_surf ~/.surf
~/.dotfiles/suckless/build.sh
# Tmux
ln -s ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf
@ -93,6 +121,13 @@ ln -s ~/.dotfiles/zsh/cmds ~/.cmds
ln -s ~/.dotfiles/zsh/aliases ~/.aliases
ln -s ~/.dotfiles/zsh/completions ~/.completions
# Root
sudo cp ~/.dotfiles/root/dwm.desktop /usr/share/xsessions
sudo cp ~/.dotfiles/root/nancyj.flf /usr/share/figlet/fonts
# Config
cp ~/.dotfiles/config.env.def ~/.config.env
# Install vim and tmux plugins
mkdir -p ~/.tmux/plugins
vim -c ':PlugInstall'

+ 27
- 22
scripts/status-bar/battery View File

@ -1,7 +1,6 @@
#! /bin/sh
bat=$(cat /sys/class/power_supply/BAT0/capacity)
status=$(cat /sys/class/power_supply/BAT0/status)
source ~/.config.env
ramp10=
ramp20=
@ -14,24 +13,30 @@ ramp80=
ramp90=
ramp100=
if [[ $bat -lt 10 ]]; then
echo "^c#ebcb8b^$ramp10^d^ $bat% "
elif [[ $bat -lt 20 ]]; then
echo "^c#ebcb8b^$ramp20^d^ $bat% "
elif [[ $bat -lt "30" ]]; then
echo "^c#ebcb8b^$ramp30^d^ $bat% "
elif [[ $bat -lt "40" ]]; then
echo "^c#ebcb8b^$ramp40^d^ $bat% "
elif [[ $bat -lt "50" ]]; then
echo "^c#ebcb8b^$ramp50^d^ $bat% "
elif [[ $bat -lt "60" ]]; then
echo "^c#ebcb8b^$ramp60^d^ $bat% "
elif [[ $bat -lt "70" ]]; then
echo "^c#ebcb8b^$ramp70^d^ $bat% "
elif [[ $bat -lt "80" ]]; then
echo "^c#ebcb8b^$ramp80^d^ $bat% "
elif [[ $bat -lt "90" ]]; then
echo "^c#ebcb8b^$ramp90^d^ $bat% "
elif [[ $bat -le "100" ]]; then
echo "^c#ebcb8b^$ramp100^d^ $bat% "
if [ "$NO_BAT" = true ] ; then
echo "^c#ebcb8b^ﮣ^d^ "
else
export bat=$(cat /sys/class/power_supply/BAT0/capacity)
export status=$(cat /sys/class/power_supply/BAT0/status)
if [[ $bat -lt 10 ]]; then
echo "^c#ebcb8b^$ramp10^d^ $bat% "
elif [[ $bat -lt 20 ]]; then
echo "^c#ebcb8b^$ramp20^d^ $bat% "
elif [[ $bat -lt "30" ]]; then
echo "^c#ebcb8b^$ramp30^d^ $bat% "
elif [[ $bat -lt "40" ]]; then
echo "^c#ebcb8b^$ramp40^d^ $bat% "
elif [[ $bat -lt "50" ]]; then
echo "^c#ebcb8b^$ramp50^d^ $bat% "
elif [[ $bat -lt "60" ]]; then
echo "^c#ebcb8b^$ramp60^d^ $bat% "
elif [[ $bat -lt "70" ]]; then
echo "^c#ebcb8b^$ramp70^d^ $bat% "
elif [[ $bat -lt "80" ]]; then
echo "^c#ebcb8b^$ramp80^d^ $bat% "
elif [[ $bat -lt "90" ]]; then
echo "^c#ebcb8b^$ramp90^d^ $bat% "
elif [[ $bat -le "100" ]]; then
echo "^c#ebcb8b^$ramp100^d^ $bat% "
fi
fi

+ 3
- 1
scripts/status-bar/cpu-temp View File

@ -1,6 +1,8 @@
#! /bin/sh
temp=$(sed 's/[0-9][0-9][0-9]$/°C/' /sys/class/thermal/thermal_zone4/temp)
source ~/.config.env
temp=$(sed 's/[0-9][0-9][0-9]$/°C/' $TEMP_ZONE)
icon=
echo "^c#bf616a^$icon^d^ $temp "

+ 1
- 2
scripts/status-bar/network View File

@ -1,7 +1,6 @@
#!/bin/sh
ETH_IT=enp2s0
WLAN_IT=wlp3s0
source ~/.config.env
is_eth_used=$(cat /sys/class/net/${ETH_IT}/carrier)
is_wlan_used=$(cat /sys/class/net/${WLAN_IT}/carrier)


+ 3
- 1
xorg/xinitrc View File

@ -40,7 +40,9 @@ rm -f ~/.surf/tabbed-surf.xid
feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper.jpg #Backgroun
xrdb ~/.Xresources &
dwmblocks > /tmp/dwmblocks.out 2> /tmp/dwmblocks.err &
nextcloud --background &
if [ "$NEXTCLOUD" = true ] ; then
nextcloud --background &
fi
xss-lock -- betterlockscreen -l -t 'Stay the fuck out!' &
# aw-server &
# aw-watcher-window &


Loading…
Cancel
Save