Browse Source

Merge branch 'main' of github.com:theFr1nge/dotfiles

main
Yiğit Çolakoğlu 4 years ago
parent
commit
eabe26e9f8
6 changed files with 78 additions and 26 deletions
  1. +8
    -0
      config.env.def
  2. +36
    -0
      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
- 0
install.sh View File

@ -8,6 +8,7 @@ yay -S --needed $(cat ~/.dotfiles/chroot/AUR.txt)
# Initial cleanup # Initial cleanup
echo "Backing up your previous dotfiles to ~/.dotfiles_backup" echo "Backing up your previous dotfiles to ~/.dotfiles_backup"
mkdir -p ~/.local/share
mkdir -p ~/.dotfiles_backup mkdir -p ~/.dotfiles_backup
mkdir -p ~/.config mkdir -p ~/.config
mkdir -p ~/.dotfiles_backup/.config mkdir -p ~/.dotfiles_backup/.config
@ -44,6 +45,34 @@ rsync --remove-source-files -avzh --ignore-errors \
~/.config/suckless \ ~/.config/suckless \
~/.dotfiles_backup/.config ~/.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 # Vim
ln -s ~/.dotfiles/vim/vimrc ~/.vimrc ln -s ~/.dotfiles/vim/vimrc ~/.vimrc
ln -s ~/.dotfiles/vim/vim ~/.vim ln -s ~/.dotfiles/vim/vim ~/.vim
@ -102,6 +131,13 @@ ln -s ~/.dotfiles/mail/msmtp ~/.config/msmtp
ln -s ~/.dotfiles/mail/mbsyncrc ~/.mbsyncrc ln -s ~/.dotfiles/mail/mbsyncrc ~/.mbsyncrc
echo "*/30 * * * * /home/yigit/.scripts/mailsync" >> /var/spool/cron/yigit echo "*/30 * * * * /home/yigit/.scripts/mailsync" >> /var/spool/cron/yigit
# 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 # Install vim and tmux plugins
mkdir -p ~/.tmux/plugins mkdir -p ~/.tmux/plugins
vim -c ':PlugInstall' vim -c ':PlugInstall'

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

@ -1,7 +1,6 @@
#! /bin/sh #! /bin/sh
bat=$(cat /sys/class/power_supply/BAT0/capacity)
status=$(cat /sys/class/power_supply/BAT0/status)
source ~/.config.env
ramp10= ramp10=
ramp20= ramp20=
@ -14,24 +13,30 @@ ramp80=
ramp90= ramp90=
ramp100= 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 fi

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

@ -1,6 +1,8 @@
#! /bin/sh #! /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= icon=
echo "^c#bf616a^$icon^d^ $temp " echo "^c#bf616a^$icon^d^ $temp "

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

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
ETH_IT=enp2s0
WLAN_IT=wlp3s0
source ~/.config.env
is_eth_used=$(cat /sys/class/net/${ETH_IT}/carrier) is_eth_used=$(cat /sys/class/net/${ETH_IT}/carrier)
is_wlan_used=$(cat /sys/class/net/${WLAN_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 feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper.jpg #Backgroun
xrdb ~/.Xresources & xrdb ~/.Xresources &
dwmblocks > /tmp/dwmblocks.out 2> /tmp/dwmblocks.err & 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!' & xss-lock -- betterlockscreen -l -t 'Stay the fuck out!' &
# aw-server & # aw-server &
# aw-watcher-window & # aw-watcher-window &


Loading…
Cancel
Save