diff --git a/config.env.def b/config.env.def new file mode 100644 index 00000000..be9061d5 --- /dev/null +++ b/config.env.def @@ -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 + diff --git a/install.sh b/install.sh index 2f2e1c01..fd1920f7 100755 --- a/install.sh +++ b/install.sh @@ -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 --remove-source-files -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 @@ -102,6 +131,13 @@ ln -s ~/.dotfiles/mail/msmtp ~/.config/msmtp ln -s ~/.dotfiles/mail/mbsyncrc ~/.mbsyncrc 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 mkdir -p ~/.tmux/plugins vim -c ':PlugInstall' diff --git a/scripts/status-bar/battery b/scripts/status-bar/battery index 11afcf69..ef157ec6 100755 --- a/scripts/status-bar/battery +++ b/scripts/status-bar/battery @@ -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 diff --git a/scripts/status-bar/cpu-temp b/scripts/status-bar/cpu-temp index 7b0878e5..08a0db24 100755 --- a/scripts/status-bar/cpu-temp +++ b/scripts/status-bar/cpu-temp @@ -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 " diff --git a/scripts/status-bar/network b/scripts/status-bar/network index 6e991bec..9a9e06b7 100755 --- a/scripts/status-bar/network +++ b/scripts/status-bar/network @@ -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) diff --git a/xorg/xinitrc b/xorg/xinitrc index d27b9fe6..1b7acdda 100755 --- a/xorg/xinitrc +++ b/xorg/xinitrc @@ -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 &