From 064fb93965974ed826a7e9cdf854e9c5ec935342 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Tue, 24 Mar 2020 17:53:17 +0530 Subject: gentooman --- bin/.local/bin/fetch | 91 ++++++++++++++++++++++++------------------ bin/.local/bin/shut | 11 +++++ bspwm/.config/bspwm/bspwmrc | 11 +++-- polybar/.config/polybar/config | 48 +++++++--------------- sxhkd/.config/sxhkd/sxhkdrc | 15 +++---- x/.Xresources | 2 +- x/.xinitrc | 2 +- zsh/.zshrc | 26 ++---------- 8 files changed, 96 insertions(+), 110 deletions(-) create mode 100755 bin/.local/bin/shut diff --git a/bin/.local/bin/fetch b/bin/.local/bin/fetch index 609850c..93d7fc7 100755 --- a/bin/.local/bin/fetch +++ b/bin/.local/bin/fetch @@ -1,63 +1,76 @@ #!/bin/sh # -# ufetch-arch - tiny system info for arch +# ufetch-gentoo - tiny system info for gentoo ## INFO # user is already defined host="$(hostname)" -os='Arch Linux' +os='Gentoo Linux' kernel="$(uname -sr)" uptime="$(uptime -p | sed 's/up //')" -packages="$(pacman -Q | wc -l)" -shell="$(basename ${SHELL})" - -if [ -z "${WM}" ]; then - if [ "${XDG_CURRENT_DESKTOP}" ]; then - envtype='DE' - WM="${XDG_CURRENT_DESKTOP}" - elif [ "${DESKTOP_SESSION}" ]; then - envtype='DE' - WM="${DESKTOP_SESSION}" - else - envtype='WM' - WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" - fi +packages="$(ls -d /var/db/pkg/*/* | wc -l)" +shell="$(basename "$SHELL")" + +## UI DETECTION + +if [ -n "${DE}" ]; then + ui="${DE}" + uitype='DE' +elif [ -n "${WM}" ]; then + ui="${WM}" + uitype='WM' +elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then + ui="${XDG_CURRENT_DESKTOP}" + uitype='DE' +elif [ -n "${DESKTOP_SESSION}" ]; then + ui="${DESKTOP_SESSION}" + uitype='DE' +elif [ -f "${HOME}/.xinitrc" ]; then + ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" + uitype='WM' +elif [ -f "${HOME}/.xsession" ]; then + ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)" + uitype='WM' else - envtype='WM' + ui='unknown' + uitype='UI' fi ## DEFINE COLORS # probably don't change these -bold="$(tput bold)" -black="$(tput setaf 0)" -red="$(tput setaf 1)" -green="$(tput setaf 2)" -yellow="$(tput setaf 3)" -blue="$(tput setaf 4)" -magenta="$(tput setaf 5)" -cyan="$(tput setaf 6)" -white="$(tput setaf 7)" -reset="$(tput sgr0)" +if [ -x "$(command -v tput)" ]; then + bold="$(tput bold)" + black="$(tput setaf 0)" + red="$(tput setaf 1)" + green="$(tput setaf 2)" + yellow="$(tput setaf 3)" + blue="$(tput setaf 4)" + magenta="$(tput setaf 5)" + cyan="$(tput setaf 6)" + white="$(tput setaf 7)" + reset="$(tput sgr0)" +fi # you can change these -lc="${reset}${bold}${cyan}" # labels -nc="${reset}${bold}${cyan}" # user and hostname -ic="${reset}${bold}${white}" # info -c0="${reset}${bold}${cyan}" # first color -c1="${reset}${cyan}" # second color +lc="${reset}${bold}${magenta}" # labels +nc="${reset}${bold}${magenta}" # user and hostname +ic="${reset}" # info +c0="${reset}${bold}${magenta}" # first color +c1="${reset}${magenta}" # second color ## OUTPUT cat < /sys/power/state" ;; + lock) lock ;; + *) ;; +esac diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index 54f2aa6..8320458 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -3,14 +3,13 @@ sxhkd & dunst & unclutter & +xset b off & mpDris2 & -xss-lock -- /home/fd0e/.local/bin/lock & -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & -compton --config ~/.config/compton.conf & +#xss-lock -- /home/fd0e/.local/bin/lock & +compton & ~/scrypts/bat_check.sh & redshift -l 13.082680:80.270718 & -xbacklight -set 30 & -feh --bg-fill ~/Pictures/bech.jpg & +~/.fehbg & urxvtd & bspc monitor -d term web music files code virt chat game IX X @@ -23,6 +22,6 @@ bspc config borderless_monocle true bspc config gapless_monocle true bspc rule -a firefox desktop='^2' -bspc rule -a Pcmanfm desktop='^4' +bspc rule -a Spacefm desktop='^4' $HOME/.config/polybar/launch.sh & diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 8260bc9..fa869f3 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -31,11 +31,10 @@ padding-left = 2 padding-right = 2 module-margin-left = 1.5 module-margin-right = 1.5 -font-0 = Hermit:style=medium:pixelsize=10;1 -font-1 = FontAwesome:style=Regular:size=10;1 -modules-left = pulseaudio battery date time bspwm +font-0 = Hermit:style=medium:size=9;1 +modules-left = alsa battery date time bspwm modules-center = -modules-right = spotify mpd +;modules-right = spotify mpd tray-position = right cursor-click = pointer cursor-scroll = ns-resize @@ -123,26 +122,18 @@ battery = BAT0 adapter = ADP1 poll-interval = 1 full-at = 98 -label-discharging = %percentage%% -label-charging = %percentage%% -label-full = %percentage%% -format-discharging = -format-full = -format-charging =  -ramp-capacity-0 =  -ramp-capacity-1 =  -ramp-capacity-2 =  -ramp-capacity-3 =  -ramp-capacity-4 =  - -[module/pulseaudio] -type = internal/pulseaudio -format-volume = +label-discharging = -bat %percentage%% +label-charging = +bat %percentage%% +label-full = ^bat %percentage%% +format-discharging = +format-full = +format-charging = + +[module/alsa] +type = internal/alsa +format-volume = vol label-volume = %percentage%% -label-muted = 婢 muted -ramp-volume-0 =  -ramp-volume-1 =  -ramp-volume-2 =  +label-muted = muted [module/spotify] type = custom/script @@ -187,14 +178,3 @@ bar-progress-width = 10 bar-progress-indicator = | bar-progress-fill = ─ bar-progress-empty = ─ - -[module/backlight] -type = internal/backlight -; Use the following command to list available cards: -; $ ls -1 /sys/class/backlight/ -card = intel_backlight -format =