From 1ff834e2b06761b083df9959d6c3d6bd2a94d2de Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Tue, 1 Dec 2020 20:21:04 +0000 Subject: mah thinkpad --- bin/.bin/bat_check | 14 ++++++++ bin/.bin/dotstow | 21 ++++++++++++ bin/.bin/fixmap | 2 ++ bin/.bin/gitit | 10 ++++++ bin/.bin/lay | 3 ++ bin/.bin/lay_both | 2 ++ bin/.bin/lay_edp | 2 ++ bin/.bin/lay_hdmi | 2 ++ bin/.bin/lemonconf | 74 ++++++++++++++++++++++++++++++++++++++++++ bin/.bin/light | 19 +++++++++++ bin/.bin/pcolor | 3 ++ bin/.bin/pkg | 22 +++++++++++++ bin/.bin/record | 10 ++++++ bin/.bin/shut | 11 +++++++ bin/.bin/statusbar | 45 +++++++++++++++++++++++++ bin/.bin/sysinfo | 20 ++++++++++++ bin/.bin/temp | 2 ++ bin/.bin/unblock | 8 +++++ bin/.bin/update-resolv-conf.sh | 71 ++++++++++++++++++++++++++++++++++++++++ bin/.bin/wpa | 16 +++++++++ bin/.local/bin/bat_check.sh | 14 -------- bin/.local/bin/dotstow | 21 ------------ bin/.local/bin/gitit | 10 ------ bin/.local/bin/light | 19 ----------- bin/.local/bin/lock | 6 ---- bin/.local/bin/record | 10 ------ bin/.local/bin/screenshot | 16 --------- bin/.local/bin/shut | 11 ------- bin/.local/bin/statusbar | 45 ------------------------- bin/.local/bin/temp | 2 -- bin/.local/bin/unblock | 8 ----- bspwm/.config/bspwm/bspwmrc | 4 +-- picom/.config/picom.conf | 4 ++- polybar/.config/polybar/config | 2 +- sxhkd/.config/sxhkd/sxhkdrc | 10 +++--- x/.Xresources | 9 ++--- x/.xinitrc | 4 --- zsh/.zshrc | 4 +-- 38 files changed, 375 insertions(+), 181 deletions(-) create mode 100755 bin/.bin/bat_check create mode 100755 bin/.bin/dotstow create mode 100755 bin/.bin/fixmap create mode 100755 bin/.bin/gitit create mode 100755 bin/.bin/lay create mode 100755 bin/.bin/lay_both create mode 100755 bin/.bin/lay_edp create mode 100755 bin/.bin/lay_hdmi create mode 100755 bin/.bin/lemonconf create mode 100755 bin/.bin/light create mode 100755 bin/.bin/pcolor create mode 100755 bin/.bin/pkg create mode 100755 bin/.bin/record create mode 100755 bin/.bin/shut create mode 100755 bin/.bin/statusbar create mode 100755 bin/.bin/sysinfo create mode 100755 bin/.bin/temp create mode 100755 bin/.bin/unblock create mode 100755 bin/.bin/update-resolv-conf.sh create mode 100755 bin/.bin/wpa delete mode 100755 bin/.local/bin/bat_check.sh delete mode 100755 bin/.local/bin/dotstow delete mode 100755 bin/.local/bin/gitit delete mode 100755 bin/.local/bin/light delete mode 100755 bin/.local/bin/lock delete mode 100755 bin/.local/bin/record delete mode 100755 bin/.local/bin/screenshot delete mode 100755 bin/.local/bin/shut delete mode 100755 bin/.local/bin/statusbar delete mode 100755 bin/.local/bin/temp delete mode 100755 bin/.local/bin/unblock diff --git a/bin/.bin/bat_check b/bin/.bin/bat_check new file mode 100755 index 0000000..547b976 --- /dev/null +++ b/bin/.bin/bat_check @@ -0,0 +1,14 @@ +#!/bin/bash +while true +do + battery_level=$(cat /sys/class/power_supply/BAT0/capacity) + state=$(cat /sys/class/power_supply/BAT0/status) + if [ $battery_level -ge 90 ] && [ $state == "Charging" ]; then + notify-send 'Pull the plug!' $battery_level% + elif [ $battery_level -le 30 -a $battery_level -ge 20 ] && [ $state == "Discharging" ]; then + notify-send 'Plug me!' $battery_level% + elif [ $battery_level -le 20 ] && [ $state == "Discharging" ]; then + notify-send -u critical 'Plug me NOW!' $battery_level% + fi + sleep 300 # 300 seconds or 5 minutes +done diff --git a/bin/.bin/dotstow b/bin/.bin/dotstow new file mode 100755 index 0000000..bcadc5e --- /dev/null +++ b/bin/.bin/dotstow @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script will Stow all the dotfiles located in the ~/dotfiles folder. +# The -R flag is used to force a 'restow' which will remove any existing symlinks before attempting to Stow. + +echo "Stowing Dotfiles..."; + +cd ~/dotfiles +for file in ~/dotfiles/*; do + # Only run Stow on the directories in the dotfiles folder and not the individual files. + # Using 'basename' strips the filepath from the directory name. + if [ -d ${file} ]; then + stow -R $(basename $file) + echo "$(basename $file) stowed."; + fi +done + +# Return back to the your PWD from before you ran the script +cd ~- + +echo 'All stowed'; diff --git a/bin/.bin/fixmap b/bin/.bin/fixmap new file mode 100755 index 0000000..e937e7c --- /dev/null +++ b/bin/.bin/fixmap @@ -0,0 +1,2 @@ +#!/bin/bash +setxkbmap -layout us -option caps:ctrl_modifier diff --git a/bin/.bin/gitit b/bin/.bin/gitit new file mode 100755 index 0000000..5d576c2 --- /dev/null +++ b/bin/.bin/gitit @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +printf "\033[0;32mDeploying updates to server...\033[0m\n" +git add . +msg="changes" +if [ -n "$*" ]; then + msg="$*" +fi +git commit -m "$msg" +git push origin master diff --git a/bin/.bin/lay b/bin/.bin/lay new file mode 100755 index 0000000..b891ab1 --- /dev/null +++ b/bin/.bin/lay @@ -0,0 +1,3 @@ +#!/bin/sh +~/bin/lay_hdmi +xrandr --output HDMI-1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output eDP-1 --mode 1366x768 --pos 1366x0 --rotate normal diff --git a/bin/.bin/lay_both b/bin/.bin/lay_both new file mode 100755 index 0000000..245ff20 --- /dev/null +++ b/bin/.bin/lay_both @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output HDMI-1 --mode 1366x768 --pos 0x0 --rotate normal diff --git a/bin/.bin/lay_edp b/bin/.bin/lay_edp new file mode 100755 index 0000000..e83d882 --- /dev/null +++ b/bin/.bin/lay_edp @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output HDMI-1 --off diff --git a/bin/.bin/lay_hdmi b/bin/.bin/lay_hdmi new file mode 100755 index 0000000..9f84242 --- /dev/null +++ b/bin/.bin/lay_hdmi @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --off --output HDMI-1 --mode 1366x768 --pos 0x0 --rotate normal diff --git a/bin/.bin/lemonconf b/bin/.bin/lemonconf new file mode 100755 index 0000000..cb5e505 --- /dev/null +++ b/bin/.bin/lemonconf @@ -0,0 +1,74 @@ +#!/bin/bash +# Outputs a configuration for lemonbar + +vol(){ + vol=$(pulsemixer --get-volume | awk '{print $1}') + mute=$(pulsemixer --get-mute) + if [ "$mute" == 1 ]; then + echo -e "%{F#787878}vol%{F-} muted " + elif [ "$mute" == 0 ]; then + echo -e "%{F#787878}vol%{F-} $vol% " + fi +} + +bat() { + power=$(cat /sys/class/power_supply/BAT0/capacity) + status=$(cat /sys/class/power_supply/BAT0/status) + if [ "$status" == "Charging" ]; then + echo -e "%{F#787878}bat%{F-} +$power% " + elif [ "$status" == "Discharging" ]; then + echo -e "%{F#787878}bat%{F-} $power% " + fi +} + +dte() { + dte=$(date +"%a, %b %d") + echo -e "%{F#787878}date%{F-} $dte " +} + +tie() { + tme=$(date +"%I:%M %P") + echo -e "%{F#787878}time%{F-} $tme " +} + +groups() { + cur=`xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}'` + tot=`xprop -root _NET_NUMBER_OF_DESKTOPS | awk '{print $3}'` + + for w in `seq 0 $((cur - 1))`; do line="${line}  "; done + line="${line}  " + for w in `seq $((cur + 2)) $tot`; do line="${line}  "; done + echo $line +} + +workspaces() { + all=$(bspc query -D) + occupied=$(bspc query -D -d .occupied) + current=$(bspc query -D -d .focused) + result="" + padding=" " + while IFS= read -r line; do + # Get the name of the current desktop + name="" + if [[ "$occupied" == *"$line"* ]]; + then + name="" + fi + + if [[ "$current" == *"$line"* ]]; + then + name="" + fi + + result="$result$padding" + result="$result$name" + result="$result$padding" + done <<< "$all" + echo -e "$result" +} + +while true; do + echo " $(vol) $(bat) $(tie) $(dte) %{F#787878}%{r}$(workspaces)%{F-} " + xdo above -t $(xdo id -n root) $(xdo id -n lemonbar) + sleep 3 +done diff --git a/bin/.bin/light b/bin/.bin/light new file mode 100755 index 0000000..bba7e82 --- /dev/null +++ b/bin/.bin/light @@ -0,0 +1,19 @@ +#!/bin/bash +# brightness wrapper + +case "$1" in + u*) + for f in /sys/class/backlight/*; do + echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; + done + ;; + d*) + for f in /sys/class/backlight/*; do + echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; + done + ;; + *) + echo "choose u or d" + ;; +esac + diff --git a/bin/.bin/pcolor b/bin/.bin/pcolor new file mode 100755 index 0000000..4cc28a0 --- /dev/null +++ b/bin/.bin/pcolor @@ -0,0 +1,3 @@ +#!/bin/bash +pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m \u2588\u2588 \e[0m"; done; } +printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')" diff --git a/bin/.bin/pkg b/bin/.bin/pkg new file mode 100755 index 0000000..5eea459 --- /dev/null +++ b/bin/.bin/pkg @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + i*) + sudo xbps-install "$@" + ;; + d*) + sudo xbps-remove -R "$@" + ;; + q*) + sudo xbps-query "$@" + ;; + u*) + sudo xbps-install -Syu + ;; + o*) + sudo xbps-remove -Oo + ;; + *) + printf "i - install\nd - delete\nq - query\nu - update\no - remove obs" + ;; +esac diff --git a/bin/.bin/record b/bin/.bin/record new file mode 100755 index 0000000..5c6b499 --- /dev/null +++ b/bin/.bin/record @@ -0,0 +1,10 @@ +#!/bin/bash + +ffmpeg -f x11grab \ +-s 1980x1080 \ +-an -i :0.0 \ +-c:v libvpx \ +-b:v 5M \ +-crf 10 \ +-quality realtime \ +-y ~/record.mkv diff --git a/bin/.bin/shut b/bin/.bin/shut new file mode 100755 index 0000000..1fb1295 --- /dev/null +++ b/bin/.bin/shut @@ -0,0 +1,11 @@ +#!/bin/bash + +RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara" -nb "#000000" -nf "#bfbfbf" -sb "#84a0c6" -sf "#000000" -fn "Hermit:size=10:antialias=true:autohint=true") + +case $RET in + shutdown) doas poweroff ;; + reboot) doas reboot ;; + sleep) xset s activate & doas zzz;; + lock) xset s activate ;; + *) ;; +esac diff --git a/bin/.bin/statusbar b/bin/.bin/statusbar new file mode 100755 index 0000000..c506244 --- /dev/null +++ b/bin/.bin/statusbar @@ -0,0 +1,45 @@ +#!/bin/bash + +# Color definitions. +export BLK="\e[30m" +export RED="\e[31m" +export GRN="\e[32m" +export YLW="\e[33m" +export BLU="\e[34m" +export PUR="\e[35m" +export CYN="\e[36m" +export RST="\e[0m" + +# Other formatting. +export BLD="\e[1m" +export DIM="\e[2m" +export ITA="\e[3m" +export UND="\e[4m" +export FLS="\e[5m" +export REV="\e[7m" +export INV="\e[8m" +export STR="\e[9m" + +vol(){ + vol=$(pulsemixer --get-volume | awk '{print $1}') + echo -e "vol $vol%" +} + +bat() { + power=$(cat /sys/class/power_supply/BAT0/capacity) + echo -e "bat $power%" +} + +dte() { + dte=$(date +"%A, %B %d") + echo -e "date $dte" +} + +tie() { + tme=$(date +"%I:%M %p") + echo -e "time $tme" +} +while :; do + echo "$(vol) $(bat) $(tie) $(dte)" + sleep 2 +done diff --git a/bin/.bin/sysinfo b/bin/.bin/sysinfo new file mode 100755 index 0000000..4f9f456 --- /dev/null +++ b/bin/.bin/sysinfo @@ -0,0 +1,20 @@ +#!/bin/bash +# +# System info + +wm="$(echo $XDG_CURRENT_DESKTOP)" +distro="$(cat /etc/*-release | grep PRETTY_NAME | cut -d '=' -f2 | tr -d '"')" +packages="$(xbps-query -l | wc -l)" +font="jetbrains mono" +colors="pencil" + +printf " \e[0m\n" +printf " \e[1;34m distro \e[0m$distro\n" +printf " \e[1;34m pkgs \e[0m$packages\n" +printf " \e[1;34m wm \e[0m$wm\n" +printf " \e[1;34m font \e[0m$font $fontsize\n" +printf " \e[1;34m colors \e[0m$colors\n" +printf " \e[0m\n" + +pcs() { for i in {0..7}; do echo -en "\e[${1}$((30+$i))m \u2588\u2588 \e[0m"; done; } +printf "\n%s\n%s\n\n" "$(pcs)" "$(pcs '1;')" diff --git a/bin/.bin/temp b/bin/.bin/temp new file mode 100755 index 0000000..fec8439 --- /dev/null +++ b/bin/.bin/temp @@ -0,0 +1,2 @@ +#!/bin/bash +paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t | sed 's/\(.\)..$/.\1°C/' diff --git a/bin/.bin/unblock b/bin/.bin/unblock new file mode 100755 index 0000000..257c4fb --- /dev/null +++ b/bin/.bin/unblock @@ -0,0 +1,8 @@ +#!/bin/sh +#whitelist escape +set -e +printf "\033[0;35mSetting wlo1 down....\033[0m\n" +sudo ip link set wlo1 down +printf "\033[0;36mChanging MAC address....\033[0m\n" +sudo macchanger --mac=FC:77:74:C7:71:71 wlo1 +printf "\033[0;32mEnjoy....\033[0m\n" diff --git a/bin/.bin/update-resolv-conf.sh b/bin/.bin/update-resolv-conf.sh new file mode 100755 index 0000000..16622a1 --- /dev/null +++ b/bin/.bin/update-resolv-conf.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# +# Parses DHCP options from openvpn to update resolv.conf +# To use set as 'up' and 'down' script in your openvpn *.conf: +# up /etc/openvpn/update-resolv-conf +# down /etc/openvpn/update-resolv-conf +# +# Used snippets of resolvconf script by Thomas Hood +# and Chris Hanson +# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL. +# 07/2013 colin@daedrum.net Fixed intet name +# 05/2006 chlauber@bnc.ch +# +# Example envs set from openvpn: +# foreign_option_1='dhcp-option DNS 193.43.27.132' +# foreign_option_2='dhcp-option DNS 193.43.27.133' +# foreign_option_3='dhcp-option DOMAIN be.bnc.ch' +# foreign_option_4='dhcp-option DOMAIN-SEARCH bnc.local' + +## The 'type' builtins will look for file in $PATH variable, so we set the +## PATH below. You might need to directly set the path to 'resolvconf' +## manually if it still doesn't work, i.e. +## RESOLVCONF=/usr/sbin/resolvconf +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin +RESOLVCONF=$(type -p resolvconf) + +case $script_type in + +up) + for optionname in ${!foreign_option_*} ; do + option="${!optionname}" + echo $option + part1=$(echo "$option" | cut -d " " -f 1) + if [ "$part1" == "dhcp-option" ] ; then + part2=$(echo "$option" | cut -d " " -f 2) + part3=$(echo "$option" | cut -d " " -f 3) + if [ "$part2" == "DNS" ] ; then + IF_DNS_NAMESERVERS="$IF_DNS_NAMESERVERS $part3" + fi + if [[ "$part2" == "DOMAIN" || "$part2" == "DOMAIN-SEARCH" ]] ; then + IF_DNS_SEARCH="$IF_DNS_SEARCH $part3" + fi + fi + done + R="" + if [ "$IF_DNS_SEARCH" ]; then + R="search " + for DS in $IF_DNS_SEARCH ; do + R="${R} $DS" + done + R="${R} +" + fi + + for NS in $IF_DNS_NAMESERVERS ; do + R="${R}nameserver $NS +" + done + #echo -n "$R" | $RESOLVCONF -x -p -a "${dev}" + echo -n "$R" | $RESOLVCONF -x -a "${dev}.inet" + ;; +down) + $RESOLVCONF -d "${dev}.inet" + ;; +esac + +# Workaround / jm@epiclabs.io +# force exit with no errors. Due to an apparent conflict with the Network Manager +# $RESOLVCONF sometimes exits with error code 6 even though it has performed the +# action correctly and OpenVPN shuts down. +exit 0 diff --git a/bin/.bin/wpa b/bin/.bin/wpa new file mode 100755 index 0000000..89f0141 --- /dev/null +++ b/bin/.bin/wpa @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +#https://github.com/icyphox/bin/blob/master/wpa +case "$1" in + r*) + sudo pkill wpa_supplicant + sudo wpa_supplicant -i wlp3s0 -B -c /etc/wpa_supplicant/wpa_supplicant.conf + ;; + n*) + sudo wpa_cli -i wlp3s0 select_network "$2" + ;; + l*) + sudo wpa_cli -i wlp3s0 list_networks + ;; + *) + sudo wpa_cli -i wlp3s0 "$*" +esac diff --git a/bin/.local/bin/bat_check.sh b/bin/.local/bin/bat_check.sh deleted file mode 100755 index 547b976..0000000 --- a/bin/.local/bin/bat_check.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -while true -do - battery_level=$(cat /sys/class/power_supply/BAT0/capacity) - state=$(cat /sys/class/power_supply/BAT0/status) - if [ $battery_level -ge 90 ] && [ $state == "Charging" ]; then - notify-send 'Pull the plug!' $battery_level% - elif [ $battery_level -le 30 -a $battery_level -ge 20 ] && [ $state == "Discharging" ]; then - notify-send 'Plug me!' $battery_level% - elif [ $battery_level -le 20 ] && [ $state == "Discharging" ]; then - notify-send -u critical 'Plug me NOW!' $battery_level% - fi - sleep 300 # 300 seconds or 5 minutes -done diff --git a/bin/.local/bin/dotstow b/bin/.local/bin/dotstow deleted file mode 100755 index bcadc5e..0000000 --- a/bin/.local/bin/dotstow +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# This script will Stow all the dotfiles located in the ~/dotfiles folder. -# The -R flag is used to force a 'restow' which will remove any existing symlinks before attempting to Stow. - -echo "Stowing Dotfiles..."; - -cd ~/dotfiles -for file in ~/dotfiles/*; do - # Only run Stow on the directories in the dotfiles folder and not the individual files. - # Using 'basename' strips the filepath from the directory name. - if [ -d ${file} ]; then - stow -R $(basename $file) - echo "$(basename $file) stowed."; - fi -done - -# Return back to the your PWD from before you ran the script -cd ~- - -echo 'All stowed'; diff --git a/bin/.local/bin/gitit b/bin/.local/bin/gitit deleted file mode 100755 index 5d576c2..0000000 --- a/bin/.local/bin/gitit +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -set -e -printf "\033[0;32mDeploying updates to server...\033[0m\n" -git add . -msg="changes" -if [ -n "$*" ]; then - msg="$*" -fi -git commit -m "$msg" -git push origin master diff --git a/bin/.local/bin/light b/bin/.local/bin/light deleted file mode 100755 index b34150f..0000000 --- a/bin/.local/bin/light +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# brightness wrapper - -case "$1" in - u*) - for f in /sys/class/backlight/*; do - echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; - done - ;; - d*) - for f in /sys/class/backlight/*; do - echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; - done - ;; - *) - echo "choose u or d" - ;; -esac - diff --git a/bin/.local/bin/lock b/bin/.local/bin/lock deleted file mode 100755 index d7dc632..0000000 --- a/bin/.local/bin/lock +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -scrot /tmp/screen.png -convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png -[[ -f $1 ]] && convert /tmp/screen.png $1 -gravity center -composite -matte /tmp/screen.png -i3lock -u -i /tmp/screen.png -rm /tmp/screen.png diff --git a/bin/.local/bin/record b/bin/.local/bin/record deleted file mode 100755 index f254e20..0000000 --- a/bin/.local/bin/record +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -ffmpeg -f x11grab \ --s 1366x768 \ --an -i :0.0 \ --c:v libvpx \ --b:v 5M \ --crf 10 \ --quality realtime \ --y ~/record.mkv diff --git a/bin/.local/bin/screenshot b/bin/.local/bin/screenshot deleted file mode 100755 index 56310fc..0000000 --- a/bin/.local/bin/screenshot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -screenshot() { - case $1 in - f*) - scrot -m -e 'mv $f ~/scrots' - ;; - w*) - sleep 1 - scrot -s -e 'mv $f ~/scrots' - ;; - *) - ;; - esac; -} - -screenshot $1 diff --git a/bin/.local/bin/shut b/bin/.local/bin/shut deleted file mode 100755 index 1fb1295..0000000 --- a/bin/.local/bin/shut +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara" -nb "#000000" -nf "#bfbfbf" -sb "#84a0c6" -sf "#000000" -fn "Hermit:size=10:antialias=true:autohint=true") - -case $RET in - shutdown) doas poweroff ;; - reboot) doas reboot ;; - sleep) xset s activate & doas zzz;; - lock) xset s activate ;; - *) ;; -esac diff --git a/bin/.local/bin/statusbar b/bin/.local/bin/statusbar deleted file mode 100755 index c506244..0000000 --- a/bin/.local/bin/statusbar +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -# Color definitions. -export BLK="\e[30m" -export RED="\e[31m" -export GRN="\e[32m" -export YLW="\e[33m" -export BLU="\e[34m" -export PUR="\e[35m" -export CYN="\e[36m" -export RST="\e[0m" - -# Other formatting. -export BLD="\e[1m" -export DIM="\e[2m" -export ITA="\e[3m" -export UND="\e[4m" -export FLS="\e[5m" -export REV="\e[7m" -export INV="\e[8m" -export STR="\e[9m" - -vol(){ - vol=$(pulsemixer --get-volume | awk '{print $1}') - echo -e "vol $vol%" -} - -bat() { - power=$(cat /sys/class/power_supply/BAT0/capacity) - echo -e "bat $power%" -} - -dte() { - dte=$(date +"%A, %B %d") - echo -e "date $dte" -} - -tie() { - tme=$(date +"%I:%M %p") - echo -e "time $tme" -} -while :; do - echo "$(vol) $(bat) $(tie) $(dte)" - sleep 2 -done diff --git a/bin/.local/bin/temp b/bin/.local/bin/temp deleted file mode 100755 index fec8439..0000000 --- a/bin/.local/bin/temp +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t | sed 's/\(.\)..$/.\1°C/' diff --git a/bin/.local/bin/unblock b/bin/.local/bin/unblock deleted file mode 100755 index 257c4fb..0000000 --- a/bin/.local/bin/unblock +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -#whitelist escape -set -e -printf "\033[0;35mSetting wlo1 down....\033[0m\n" -sudo ip link set wlo1 down -printf "\033[0;36mChanging MAC address....\033[0m\n" -sudo macchanger --mac=FC:77:74:C7:71:71 wlo1 -printf "\033[0;32mEnjoy....\033[0m\n" diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index 6b26399..82a96be 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -10,7 +10,7 @@ bspc config borderless_monocle true bspc config gapless_monocle true # rules -bspc rule -a Chromium desktop='^2' +bspc rule -a Firefox desktop='^2' bspc rule -a Steam desktop='^6' bspc rule -a "VirtualBox Manager" desktop='^6' @@ -23,7 +23,7 @@ xset b off & xset s 300 & ~/.fehbg & urxvtd & -~/.local/bin/bat_check.sh & +~/.bin/bat_check & picom & dunst & ~/.config/polybar/launch.sh diff --git a/picom/.config/picom.conf b/picom/.config/picom.conf index a3a9b46..9225735 100755 --- a/picom/.config/picom.conf +++ b/picom/.config/picom.conf @@ -29,7 +29,9 @@ blur-background-exclude = [ "class_g ?= 'Rofi'", "class_g ?= 'zoom'", "window_type = 'dock'", - "window_type = 'desktop'" + "window_type = 'desktop'", + "class_g = 'Firefox' && argb", + "_GTK_FRAME_EXTENTS@:c" ]; opacity-rule = [ "40:class_g = 'Bspwm' && class_i = 'presel_feedback'", diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 3288b6e..37609ef 100755 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -31,7 +31,7 @@ padding-left = 2 padding-right = 2 module-margin-left = 1.5 module-margin-right = 1.5 -font-0 = JetBrains Mono Nerd Font Mono:style=medium:pixelsize=10:antialias=true:autohint=true:lcdfilter=lcddefault:rgba=rgb +font-0 = JetBrains Mono Nerd Font Mono:style=medium:size=11.5:antialias=true:autohint=true:lcdfilter=lcddefault:rgba=rgb modules-left = pulseaudio battery date time cmus modules-center = modules-right = bspwm diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index 0b17f7c..8cdfe6c 100755 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -3,9 +3,9 @@ super + Return super + shift + Return bspc rule -a \* -o state=floating && urxvtc super + @space - dmenu_run -i -fn "JetBrains Mono Nerd Font Mono:style=medium:pixelsize=12.5" -nb "#000000" -nf "#f3f4f5" -sb "#EEFFFF" -sf "#000000" + dmenu_run -i -fn "JetBrains Mono Nerd Font Mono:style=medium:size=9" -nb "#000000" -nf "#f3f4f5" -sb "#EEFFFF" -sf "#000000" super + shift + w - chromium + firefox control + alt + l xset s activate super + shift + f @@ -19,7 +19,7 @@ control + Print control + shift + Print maim -s ~/scrots/$(date +%d-%b-%y-%I:%M%p).png super + shift + p - passmenu -i -fn "JetBrains Mono Nerd Font Mono:style=medium:pixelsize=12.5" -nb "#000000" -nf "#f3f4f5" -sb "#EEFFFF" -sf "#000000" + passmenu -i -fn "JetBrains Mono Nerd Font Mono:style=medium:size=10" -nb "#000000" -nf "#f3f4f5" -sb "#EEFFFF" -sf "#000000" super + Escape pkill -USR1 -x sxhkd @@ -35,9 +35,9 @@ XF86Audio{Play,Next,Prev} # brightness XF86MonBrightnessDown - sudo ~/bin/light d + sudo ~/.bin/light d XF86MonBrightnessUp - sudo ~/bin/light u + sudo ~/.bin/light u # bspwm hotkeys diff --git a/x/.Xresources b/x/.Xresources index 835e93d..98f8dca 100755 --- a/x/.Xresources +++ b/x/.Xresources @@ -47,11 +47,11 @@ *color15: base07 URxvt.cursorBlink : 1 -URxvt.font :xft:JetBrainsMono Nerd Font Mono:pixelsize=13:style=Regular \ +URxvt.font :xft:JetBrainsMono Nerd Font Mono:size=10:style=Regular \ xft:DejaVu Sans Mono:size=13:style=Medium -URxvt.italicFont :xft:JetBrainsMono Nerd Font Mono:pixelsize=13:style=Italic -URxvt.boldFont :xft:JetBrainsMono Nerd Font Mono:pixelsize=13:style=Bold +URxvt.italicFont :xft:JetBrainsMono Nerd Font Mono:size=10:style=Italic +URxvt.boldFont :xft:JetBrainsMono Nerd Font Mono:size=10:style=Bold URxvt.lineSpace : 0 URxvt.letterSpace : 0 @@ -76,5 +76,6 @@ Xft.antialias: 1 Xft.hinting: 1 Xft.autohint: 0 Xft.hintstyle: hintslight -Xft.rgba: rgb +Xft.rgba: rgb +Xft.dpi: 120 Xft.lcdfilter: lcddefault diff --git a/x/.xinitrc b/x/.xinitrc index 7d24b5e..c2969ee 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,9 +1,5 @@ #!/bin/bash -#/usr/bin/prime-offload & xrdb -merge ~/.Xresources & setxkbmap -layout us -option caps:ctrl_modifier & xcape -e 'Caps_Lock=Escape' & -# xrandr --setprovideroutputsource modesetting NVIDIA-0 -# xrandr --auto -# exec dbus-launch --exit-with-session bspwm exec dbus-run-session bspwm diff --git a/zsh/.zshrc b/zsh/.zshrc index 1be15dc..9a89777 100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -8,7 +8,7 @@ setopt appendhistory hist_ignore_all_dups hist_ignore_space export VISUAL=nvim export EDITOR="$VISUAL" export BROWSER=chromium -export PATH=$PATH:$HOME/.local/bin:$HOME/bin +export PATH=$PATH:$HOME/.bin export TERM=rxvt-unicode-256color export XDG_CURRENT_DESKTOP=bspwm @@ -51,7 +51,7 @@ rmdata() { # Enable colors and change prompt: autoload -U colors && colors -fpath+=$HOME/.zsh/pure +fpath+=$HOME/.config/zsh/pure autoload -U promptinit; promptinit prompt pure PURE_PROMPT_SYMBOL=$ -- cgit v1.2.3