initial commit

This commit is contained in:
2021-03-22 16:02:35 +01:00
commit 16214686c5
137 changed files with 29415 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
count=0
disconnected=""
wireless_connected=""
ethernet_connected=""
ID="$(ip link | awk '/state UP/ {print $2}')"
while true; do
if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
if [[ $ID == e* ]]; then
echo "$ethernet_connected" ; sleep 25
else
echo "$wireless_connected" ; sleep 25
fi
else
echo "$disconnected" ; sleep 0.5
fi
done
+117
View File
@@ -0,0 +1,117 @@
#!/usr/bin/bash
#
# checkupdates: Safely print a list of pending updates.
#
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
declare -r myname='checkupdates'
declare -r myver='1.0.0'
plain() {
(( QUIET )) && return
local mesg=$1; shift
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
msg() {
(( QUIET )) && return
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
msg2() {
(( QUIET )) && return
local mesg=$1; shift
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
ask() {
local mesg=$1; shift
printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
}
warning() {
local mesg=$1; shift
printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
error() {
local mesg=$1; shift
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
# check if messages are to be printed using color
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
# prefer terminal safe colored and bold text when tput is supported
if tput setaf 0 &>/dev/null; then
ALL_OFF="$(tput sgr0)"
BOLD="$(tput bold)"
BLUE="${BOLD}$(tput setaf 4)"
GREEN="${BOLD}$(tput setaf 2)"
RED="${BOLD}$(tput setaf 1)"
YELLOW="${BOLD}$(tput setaf 3)"
else
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
BLUE="${BOLD}\e[1;34m"
GREEN="${BOLD}\e[1;32m"
RED="${BOLD}\e[1;31m"
YELLOW="${BOLD}\e[1;33m"
fi
fi
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
if (( $# > 0 )); then
echo "${myname} v${myver}"
echo
echo "Safely print a list of pending updates"
echo
echo "Usage: ${myname}"
echo
echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.'
exit 0
fi
if ! type -P fakeroot >/dev/null; then
error 'Cannot find the fakeroot binary.'
exit 1
fi
if [[ -z $CHECKUPDATES_DB ]]; then
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
fi
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
DBPath="$(pacman-conf DBPath)"
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
DBPath="/var/lib/pacman/"
fi
mkdir -p "$CHECKUPDATES_DB"
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
error 'Cannot fetch updates'
exit 1
fi
pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]'
exit 0
# vim: set noet:
+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
SDIR="$HOME/.config/polybar/scripts"
MENU="$(rofi -sep "|" -dmenu -i -p 'Select' -location 5 -columns 1 -xoffset -240 -yoffset -52 -width 12 -hide-scrollbar -line-padding 4 -padding 20 -lines 10 <<< " amber| blue| blue-grey| brown| cyan| deep-orange| deep-purple| green| grey| indigo| light-blue| light-green| lime| orange| pink| purple| red| teal| yellow| amber-dark| blue-dark| blue-grey-dark| brown-dark| cyan-dark| deep-orange-dark| deep-purple-dark| green-dark| grey-dark| indigo-dark| light-blue-dark| light-green-dark| lime-dark| orange-dark| pink-dark| purple-dark| red-dark| teal-dark| yellow-dark")"
case "$MENU" in
## Light Colors
*amber) $SDIR/colors-light.sh -amber ;;
*blue) $SDIR/colors-light.sh -blue ;;
*blue-grey) $SDIR/colors-light.sh -blue-grey ;;
*brown) $SDIR/colors-light.sh -brown ;;
*cyan) $SDIR/colors-light.sh -cyan ;;
*deep-orange) $SDIR/colors-light.sh -deep-orange ;;
*deep-purple) $SDIR/colors-light.sh -deep-purple ;;
*green) $SDIR/colors-light.sh -green ;;
*grey) $SDIR/colors-light.sh -grey ;;
*indigo) $SDIR/colors-light.sh -indigo ;;
*light-blue) $SDIR/colors-light.sh -light-blue ;;
*light-green) $SDIR/colors-light.sh -light-green ;;
*lime) $SDIR/colors-light.sh -lime ;;
*orange) $SDIR/colors-light.sh -orange ;;
*pink) $SDIR/colors-light.sh -pink ;;
*purple) $SDIR/colors-light.sh -purple ;;
*red) $SDIR/colors-light.sh -red ;;
*teal) $SDIR/colors-light.sh -teal ;;
*yellow) $SDIR/colors-light.sh -yellow ;;
## Dark Colors
*amber-dark) $SDIR/colors-dark.sh -amber ;;
*blue-dark) $SDIR/colors-dark.sh -blue ;;
*blue-grey-dark) $SDIR/colors-dark.sh -blue-grey ;;
*brown-dark) $SDIR/colors-dark.sh -brown ;;
*cyan-dark) $SDIR/colors-dark.sh -cyan ;;
*deep-orange-dark) $SDIR/colors-dark.sh -deep-orange ;;
*deep-purple-dark) $SDIR/colors-dark.sh -deep-purple ;;
*green-dark) $SDIR/colors-dark.sh -green ;;
*grey-dark) $SDIR/colors-dark.sh -grey ;;
*indigo-dark) $SDIR/colors-dark.sh -indigo ;;
*light-blue-dark) $SDIR/colors-dark.sh -light-blue ;;
*light-green-dark) $SDIR/colors-dark.sh -light-green ;;
*lime-dark) $SDIR/colors-dark.sh -lime ;;
*orange-dark) $SDIR/colors-dark.sh -orange ;;
*pink-dark) $SDIR/colors-dark.sh -pink ;;
*purple-dark) $SDIR/colors-dark.sh -purple ;;
*red-dark) $SDIR/colors-dark.sh -red ;;
*teal-dark) $SDIR/colors-dark.sh -teal ;;
*yellow-dark) $SDIR/colors-dark.sh -yellow
esac
+225
View File
@@ -0,0 +1,225 @@
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
PDIR="$HOME/.config/polybar"
LAUNCH="polybar-msg cmd restart"
if [[ $1 = "-amber" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #ffb300/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #ffb300/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #ffb300/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #1e88e5/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #1e88e5/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #1e88e5/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #546e7a/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #546e7a/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #546e7a/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-brown" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #6d4c41/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #6d4c41/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #6d4c41/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-cyan" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #00acc1/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #00acc1/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #00acc1/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #f4511e/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #f4511e/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #f4511e/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #5e35b1/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #5e35b1/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #5e35b1/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #43a047/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #43a047/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #43a047/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #757575/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #757575/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #757575/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-indigo" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #3949ab/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #3949ab/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #3949ab/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #039be5/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #039be5/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #039be5/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #7cb342/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #7cb342/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #7cb342/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-lime" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #c0ca33/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #c0ca33/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #c0ca33/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #252525/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #fb8c00/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #fb8c00/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #fb8c00/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-pink" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #d81b60/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #d81b60/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #d81b60/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #8e24aa/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #8e24aa/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #8e24aa/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-red" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #e53935/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #e53935/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #e53935/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-teal" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #00897b/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #00897b/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #00897b/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-yellow" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #252525/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #fdd835/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #fdd835/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #fdd835/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #252525/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
else
echo "Available options:
-amber -blue -blue-grey -brown
-cyan -deep-orange -deep-purple -green
-grey -indigo -light-blue -light-green
-lime -orange -pink -purple
-red -teal -yellow"
fi
+225
View File
@@ -0,0 +1,225 @@
#!/bin/bash
## Author : Aditya Shakya
## Github : adi1090x
PDIR="$HOME/.config/polybar"
LAUNCH="polybar-msg cmd restart"
if [[ $1 = "-amber" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #ffb300/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #ffb300/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #ffb300/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #1e88e5/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #1e88e5/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #1e88e5/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-blue-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #546e7a/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #546e7a/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #546e7a/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-brown" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #6d4c41/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #6d4c41/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #6d4c41/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-cyan" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #00acc1/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #00acc1/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #00acc1/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #f4511e/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #f4511e/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #f4511e/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-deep-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #5e35b1/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #5e35b1/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #5e35b1/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #43a047/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #43a047/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #43a047/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-grey" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #757575/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #757575/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #757575/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-indigo" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #3949ab/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #3949ab/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #3949ab/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-blue" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #039be5/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #039be5/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #039be5/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-light-green" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #7cb342/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #7cb342/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #7cb342/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-lime" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #c0ca33/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #c0ca33/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #c0ca33/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #252525/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-orange" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #fb8c00/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #fb8c00/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #fb8c00/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-pink" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #d81b60/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #d81b60/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #d81b60/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-purple" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #8e24aa/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #8e24aa/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #8e24aa/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-red" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #e53935/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #e53935/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #e53935/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-teal" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #00897b/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #00897b/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #00897b/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #f5f5f5/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
elif [[ $1 = "-yellow" ]]; then
# Replacing colors
sed -i -e 's/bg = .*/bg = #f5f5f5/g' $PDIR/colors.ini
sed -i -e 's/fg = .*/fg = #252525/g' $PDIR/colors.ini
sed -i -e 's/ac = .*/ac = #fdd835/g' $PDIR/colors.ini
sed -i -e 's/bi = .*/bi = #fdd835/g' $PDIR/colors.ini
sed -i -e 's/be = .*/be = #fdd835/g' $PDIR/colors.ini
sed -i -e 's/mf = .*/mf = #252525/g' $PDIR/colors.ini
# Restarting polybar
$LAUNCH &
else
echo "Available options:
-amber -blue -blue-grey -brown
-cyan -deep-orange -deep-purple -green
-grey -indigo -light-blue -light-green
-lime -orange -pink -purple
-red -teal -yellow"
fi
+7
View File
@@ -0,0 +1,7 @@
mute=$(pactl list sources | grep -A 10 $(pactl info | grep "Default Source" | cut -f3 -d" ") | grep "Mute: yes" | cut -c1-)
if [[ -z $mute ]]; then
# echo 
echo
else
echo 
fi
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
## Created By Aditya Shakya
rofi -modi run,drun -show drun -location 7 -xoffset 14 -yoffset -52 -line-padding 4 -columns 1 -width 20 -lines 10 -padding 25 -hide-scrollbar -show-icons -drun-icon-theme
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
## Created By Aditya Shakya
rofi -modi run,drun -show drun -line-padding 4 -columns 2 -width 40 -padding 30 -hide-scrollbar -show-icons -drun-icon-theme "Papirus"
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
## Created By Aditya Shakya
rofi -show run -fullscreen True -lines 5 -line-margin 5 -padding 300 -bw 0
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
termite -e "sudo pacman -Syu"
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
## Created By Aditya Shakya
#MENU="$(rofi -sep "|" -dmenu -i -p 'System' -location 5 -xoffset -14 -yoffset -52 -width 10 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 <<< " Lock| Logout| Reboot| Shutdown")"
MENU="$(rofi -sep "|" -dmenu -i -p 'System' -location 5 -xoffset -14 -yoffset -52 -width 10 -hide-scrollbar -line-padding 4 -padding 20 -lines 4 <<< " Lock| Logout| Reboot| Shutdown")"
case "$MENU" in
*Lock) i3lock-fancy ;;
*Logout) openbox --exit;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl -i poweroff
esac
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
## Created By Aditya Shakya
MENU="$(rofi -sep "|" -dmenu -i -p 'System' -width 12 -hide-scrollbar -line-padding 4 -padding 20 -lines 6 <<< " Lock| Logout|Suspend|Hibernate| Reboot| Shutdown")"
case "$MENU" in
*Lock) light-locker-command -l ;;
*Logout) xmonad --exit ;;
*Suspend) systemctl suspend;;
*Hibernate) systemctl hibernate;;
*Shutdown) systemctl -i poweroff ;;
*Reboot) systemctl reboot
esac
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
rofi -no-lazy-grab -show drun -theme $HOME/.config/polybar/scripts/themes/runner.rasi
+101
View File
@@ -0,0 +1,101 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
## Dirs
polybar_path="$HOME/.config/polybar"
rofi_path="$HOME/.config/polybar/scripts/themes"
## Dark Mode #############################################
if [[ $1 = "--Dark" ]]; then
# wallpaper ---------------------------------
nitrogen --save --set-zoom-fill $polybar_path/wallpapers/bg_1.jpg
# polybar ---------------------------------
sed -i -e 's/bg = .*/bg = #212B30/g' $polybar_path/colors.ini
sed -i -e 's/bg-alt = .*/bg-alt = #5C6F7B/g' $polybar_path/colors.ini
sed -i -e 's/fg = .*/fg = #C4C7C5/g' $polybar_path/colors.ini
sed -i -e 's/ac = .*/ac = #4DD0E1/g' $polybar_path/colors.ini
sed -i -e 's/red = .*/red = #EC7875/g' $polybar_path/colors.ini
sed -i -e 's/pink = .*/pink = #EC407A/g' $polybar_path/colors.ini
sed -i -e 's/purple = .*/purple = #BA68C8/g' $polybar_path/colors.ini
sed -i -e 's/blue = .*/blue = #42A5F5/g' $polybar_path/colors.ini
sed -i -e 's/cyan = .*/cyan = #4DD0E1/g' $polybar_path/colors.ini
sed -i -e 's/teal = .*/teal = #00B19F/g' $polybar_path/colors.ini
sed -i -e 's/green = .*/green = #61C766/g' $polybar_path/colors.ini
sed -i -e 's/lime = .*/lime = #B9C244/g' $polybar_path/colors.ini
sed -i -e 's/yellow = .*/yellow = #FDD835/g' $polybar_path/colors.ini
sed -i -e 's/amber = .*/amber = #FBC02D/g' $polybar_path/colors.ini
sed -i -e 's/orange = .*/orange = #E57C46/g' $polybar_path/colors.ini
sed -i -e 's/brown = .*/brown = #AC8476/g' $polybar_path/colors.ini
sed -i -e 's/indigo = .*/indigo = #6C77BB/g' $polybar_path/colors.ini
# relaunch polybar
polybar-msg cmd restart
# rofi ---------------------------------
sed -i -e 's/background: .*/background: #212B30ff;/g' $rofi_path/colors.rasi
sed -i -e 's/background-alt: .*/background-alt: #263238ff;/g' $rofi_path/colors.rasi
sed -i -e 's/foreground: .*/foreground: #C4C7C5ff;/g' $rofi_path/colors.rasi
sed -i -e 's/border: .*/border: #4DD0E1ff;/g' $rofi_path/colors.rasi
sed -i -e 's/selected: .*/selected: #4DD0E1ff;/g' $rofi_path/colors.rasi
sed -i -e 's/urgent: .*/urgent: #EC407Aff;/g' $rofi_path/colors.rasi
sed -i -e 's/logo: .*/logo: #EC407Aff;/g' $rofi_path/colors.rasi
sed -i -e 's/on: .*/on: #61C766ff;/g' $rofi_path/colors.rasi
sed -i -e 's/off: .*/off: #EC7875ff;/g' $rofi_path/colors.rasi
## Light Mode #############################################
elif [[ $1 = "--Light" ]]; then
# wallpaper ---------------------------------
nitrogen --save --set-zoom-fill $polybar_path/wallpapers/bg_2.jpg
# polybar ---------------------------------
sed -i -e 's/bg = .*/bg = #FFFFFF/g' $polybar_path/colors.ini
sed -i -e 's/bg-alt = .*/bg-alt = #CACACA/g' $polybar_path/colors.ini
sed -i -e 's/fg = .*/fg = #555555/g' $polybar_path/colors.ini
sed -i -e 's/ac = .*/ac = #4DA8B9/g' $polybar_path/colors.ini
sed -i -e 's/red = .*/red = #F06A6A/g' $polybar_path/colors.ini
sed -i -e 's/pink = .*/pink = #EC1850/g' $polybar_path/colors.ini
sed -i -e 's/purple = .*/purple = #BA40A0/g' $polybar_path/colors.ini
sed -i -e 's/blue = .*/blue = #427DCD/g' $polybar_path/colors.ini
sed -i -e 's/cyan = .*/cyan = #4DA8B9/g' $polybar_path/colors.ini
sed -i -e 's/teal = .*/teal = #008978/g' $polybar_path/colors.ini
sed -i -e 's/green = .*/green = #5CAC30/g' $polybar_path/colors.ini
sed -i -e 's/lime = .*/lime = #B9A41C/g' $polybar_path/colors.ini
sed -i -e 's/yellow = .*/yellow = #D2A91D/g' $polybar_path/colors.ini
sed -i -e 's/amber = .*/amber = #FD890F/g' $polybar_path/colors.ini
sed -i -e 's/orange = .*/orange = #EA7222/g' $polybar_path/colors.ini
sed -i -e 's/brown = .*/brown = #AC5C4E/g' $polybar_path/colors.ini
sed -i -e 's/indigo = .*/indigo = #4759C6/g' $polybar_path/colors.ini
# relaunch polybar
polybar-msg cmd restart
# rofi ---------------------------------
sed -i -e 's/background: .*/background: #ffffffff;/g' $rofi_path/colors.rasi
sed -i -e 's/background-alt: .*/background-alt: #e1e1e1ff;/g' $rofi_path/colors.rasi
sed -i -e 's/foreground: .*/foreground: #555555ff;/g' $rofi_path/colors.rasi
sed -i -e 's/border: .*/border: #4DA8B9ff;/g' $rofi_path/colors.rasi
sed -i -e 's/selected: .*/selected: #4DA8B9ff;/g' $rofi_path/colors.rasi
sed -i -e 's/urgent: .*/urgent: #EC1850ff;/g' $rofi_path/colors.rasi
sed -i -e 's/logo: .*/logo: #EC1850ff;/g' $rofi_path/colors.rasi
sed -i -e 's/on: .*/on: #F06A6Aff;/g' $rofi_path/colors.rasi
sed -i -e 's/off: .*/off: #5CAC30ff;/g' $rofi_path/colors.rasi
## Help Menu #############################################
else
echo "
Style Switcher
Developed By - Aditya Shakya (@adi1090x)
Available options:
--Dark --Light
"
fi
@@ -0,0 +1,13 @@
/* Color-Scheme For All Themes*/
* {
background: #212B30ff;
background-alt: #263238ff;
foreground: #C4C7C5ff;
border: #4DD0E1ff;
selected: #4DD0E1ff;
urgent: #EC407Aff;
logo: #EC407Aff;
on: #61C766ff;
off: #EC7875ff;
}
@@ -0,0 +1,152 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
configuration {
font: "scientifica 8";
show-icons: false;
icon-theme: "Papirus";
display-drun: "Search :";
drun-display-format: "{name}";
threads: 0;
scroll-method: 0;
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 0px;
height: 33%;
width: 30%;
location: center;
anchor: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 4px 4px 6px 6px;
background-color: @background;
text-color: @foreground;
}
textbox-prompt-colon {
expand: false;
str: "";
background-color: @background;
text-color: @logo;
padding: 4px 0px 0px 8px;
font: "feather 8";
}
inputbar {
children: [ textbox-prompt-colon, prompt, entry ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @border;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
position: center;
}
entry {
background-color: @background;
text-color: @foreground;
placeholder-color: @foreground;
expand: true;
horizontal-align: 0;
placeholder: "Search";
blink: true;
padding: 4px 0px 0px 0px;
}
case-indicator {
background-color: @background;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 1;
spacing: 4px;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px 5px 5px 5px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: horizontal;
border-radius: 4px;
padding: 6px 6px 6px 6px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0;
margin: 2px 0px 2px 2px;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @selected;
text-color: @background;
border: 0px;
border-radius: 0px;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}
@@ -0,0 +1,152 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
configuration {
font: "scientifica 8";
show-icons: false;
icon-theme: "Papirus";
display-drun: ":";
drun-display-format: "{name}";
threads: 0;
scroll-method: 0;
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
location: 3;
anchor: 3;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 0px;
height: 22%;
width: 15%;
x-offset: -0.8%;
y-offset: 5%;
}
prompt {
enabled: true;
padding: 4px 4px 6px 6px;
background-color: @background;
text-color: @foreground;
}
textbox-prompt-colon {
expand: false;
str: "";
background-color: @background;
text-color: @logo;
padding: 4px 0px 0px 8px;
font: "feather 8";
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @border;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
position: center;
}
entry {
background-color: @background;
text-color: @foreground;
placeholder-color: @foreground;
expand: true;
horizontal-align: 0;
placeholder: "Search";
blink: true;
padding: 4px 0px 0px 0px;
}
case-indicator {
background-color: @background;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 1;
spacing: 4px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px 5px 5px 5px;
}
element {
background-color: @background;
text-color: @foreground;
orientation: horizontal;
border-radius: 4px;
padding: 6px 6px 6px 6px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0;
margin: 2px 0px 2px 2px;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 9px;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @selected;
text-color: @background;
border: 0px;
border-radius: 0px;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}
+164
View File
@@ -0,0 +1,164 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
configuration {
font: "scientifica 8";
show-icons: false;
icon-theme: "Papirus";
display-drun: "Search";
drun-display-format: "{name}";
threads: 0;
scroll-method: 0;
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: true;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @background;
text-color: @foreground;
border-radius: 0px;
height: 28px;
width: 100%;
location: north;
anchor: north;
x-offset: 0;
y-offset: 0;
children: [ horibox ];
}
horibox {
background-color: @background;
text-color: @foreground;
orientation: horizontal;
children: [ textbox-prompt-colon, prompt, entry, listview ];
margin: 0px 0px 0px 0px;
padding: 4px 4px 4px 4px;
}
prompt {
enabled: true;
margin: 0px 0px 0px 0px;
padding: 4px 4px 4px 4px;
background-color: @logo;
text-color: @background;
}
textbox-prompt-colon {
expand: false;
str: "";
background-color: @logo;
text-color: @background;
margin: 0px -2px 0px 0px;
padding: 4px 0px 4px 4px;
font: "feather 8";
}
inputbar {
children: [ textbox-prompt-colon, prompt, entry ];
background-color: @background;
text-color: @foreground;
expand: false;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @border;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
position: center;
}
entry {
background-color: @background;
text-color: @foreground;
placeholder-color: @foreground;
expand: false;
width: 15%;
horizontal-align: 0;
placeholder: "Search";
blink: true;
padding: 5px 5px 5px 5px;
}
case-indicator {
background-color: @background;
text-color: @foreground;
spacing: 0;
}
listview {
background-color: @background;
columns: 1;
lines: 15;
spacing: 4px;
cycle: false;
dynamic: true;
layout: horizontal;
}
mainbox {
background-color: @background;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px 5px 5px 5px;
}
element {
background-color: @background-alt;
text-color: @foreground;
orientation: horizontal;
border-radius: 0px;
padding: 5px 5px 4px 5px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0;
margin: 2px 0px 2px 2px;
}
element normal.urgent,
element alternate.urgent {
background-color: @urgent;
text-color: @foreground;
border-radius: 0px;
}
element normal.active,
element alternate.active {
background-color: @background-alt;
text-color: @foreground;
}
element selected {
background-color: @selected;
text-color: @background;
border: 0px;
border-radius: 0px;
border-color: @border;
}
element selected.urgent {
background-color: @urgent;
text-color: @foreground;
}
element selected.active {
background-color: @background-alt;
color: @foreground;
}
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
BAR_ICON=""
NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); }
while true; do
get_total_updates
# notify user of updates
if hash notify-send &>/dev/null; then
if (( UPDATES > 50 )); then
notify-send -u critical -i $NOTIFY_ICON \
"You really need to update!!" "$UPDATES New packages"
elif (( UPDATES > 25 )); then
notify-send -u normal -i $NOTIFY_ICON \
"You should update soon" "$UPDATES New packages"
elif (( UPDATES > 2 )); then
notify-send -u low -i $NOTIFY_ICON \
"$UPDATES New packages"
fi
fi
# when there are updates available
# every 10 seconds another check for updates is done
while (( UPDATES > 0 )); do
if (( UPDATES == 1 )); then
echo "$UPDATES Update"
elif (( UPDATES > 1 )); then
echo "$UPDATES Updates"
else
echo $BAR_ICON
fi
sleep 10
get_total_updates
done
# when no updates are available, use a longer loop, this saves on CPU
# and network uptime, only checking once every 30 min for new updates
while (( UPDATES == 0 )); do
echo $BAR_ICON
sleep 1800
get_total_updates
done
done
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
## Created By Aditya Shakya
rofi -modi window -show window -hide-scrollbar -padding 20 -line-padding 4 -width 40 -lines 6