diff --git a/.local/bin/scripts/fehbg b/.local/bin/scripts/fehbg new file mode 100755 index 0000000..3e465a9 --- /dev/null +++ b/.local/bin/scripts/fehbg @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +feh --no-fehbg --bg-fill "$HOME/.local/wallpaper/wallpaper.png" diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery new file mode 100755 index 0000000..93cbe08 --- /dev/null +++ b/.local/bin/statusbar/sb-battery @@ -0,0 +1,37 @@ +#!/bin/sh + +# Prints all batteries, their percentage remaining and an emoji corresponding +# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.). + +case $BLOCK_BUTTON in + 3) notify-send "🔋 Battery module" "🔋: discharging +🛑: not charging +♻: stagnant charge +🔌: charging +⚡: charged +❗: battery very low! +- Scroll to change adjust xbacklight." ;; + 4) xbacklight -inc 10 ;; + 5) xbacklight -dec 10 ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +# Loop through all attached batteries and format the info +for battery in /sys/class/power_supply/BAT?*; do + # If non-first battery, print a space separator. + [ -n "${capacity+x}" ] && printf " " + # Sets up the status and capacity + case "$(cat "$battery/status" 2>&1)" in + "Full") status="⚡" ;; + "Discharging") status="🔋" ;; + "Charging") status="🔌" ;; + "Not charging") status="🛑" ;; + "Unknown") status="♻️" ;; + *) exit 1 ;; + esac + capacity="$(cat "$battery/capacity" 2>&1)" + # Will make a warn variable if discharging and low + [ "$status" = "🔋" ] && [ "$capacity" -le 25 ] && warn="❗" + # Prints the info + printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn +done && printf "\\n" diff --git a/.local/wallpaper/wallpaper.png b/.local/wallpaper/wallpaper.png new file mode 100644 index 0000000..4e4645d Binary files /dev/null and b/.local/wallpaper/wallpaper.png differ diff --git a/.xinitrc b/.xinitrc index 565d1a4..b521568 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,5 @@ # source .xprofile . $HOME/.xprofile -exec ssh-agent "$HOME/.local/src/dwm/dwm" +exec ssh-agent dwm +# xterm diff --git a/.xprofile b/.xprofile index d8fda5d..89c53f7 100644 --- a/.xprofile +++ b/.xprofile @@ -1,5 +1,10 @@ setxkbmap -layout us,ru -option grp:win_space_toggle -xset r rate 200 30 -picom -b -"$HOME/.local/share/scripts/fehbg" -"$HOME/.local/src/dwmblocks/dwmblocks" & +xset r rate 300 40 +fehbg +systemctl --user import-environment DISPLAY + +picom --config="$HOME/.config/picom.conf" & +copyq & +dunst & +flameshot & +dwmblocks & diff --git a/.zprofile b/.zprofile index 2927baf..d055e02 100644 --- a/.zprofile +++ b/.zprofile @@ -1 +1,6 @@ -export PATH="$PATH:$HOME/.local/bin" +export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" + +# default apps +export EDITOR="nvim" +export TERMINAL="st" +export BROWSER="firefox"