Add rofi themes, scripts

remotes/origin/ubuntu-i3
Shaun Reed 3 years ago
parent 594d582aa3
commit e7fb3e2dac

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/apps.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_apps.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/backlight.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_backlight.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/battery.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_battery.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/mpd.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_mpd.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/network.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_network.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/powermenu.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_powermenu.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/quicklinks.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_quicklinks.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/screenshot.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_screenshot.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/time.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_time.sh

@ -0,0 +1,53 @@
#!/bin/bash
# Source: http://askubuntu.com/a/450136
# I only slightly modify this script to add an option to show icon, useful for my tint2 executor
# Also useful for polybar custom script, dzen2 feeder, conkybar, lemonbar feeder, dunst notify, etc.
# 'usedcpu -i' = with icon, 'usedcpu' = text only
# Cheers!
# Addy
PREV_TOTAL=0
PREV_IDLE=0
cpuFile="/tmp/.cpu"
if [[ -f "${cpuFile}" ]]; then
fileCont=$(cat "${cpuFile}")
PREV_TOTAL=$(echo "${fileCont}" | head -n 1)
PREV_IDLE=$(echo "${fileCont}" | tail -n 1)
fi
CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
unset CPU[0] # Discard the "cpu" prefix.
IDLE=${CPU[4]} # Get the idle CPU time.
# Calculate the total CPU time.
TOTAL=0
for VALUE in "${CPU[@]:0:4}"; do
let "TOTAL=$TOTAL+$VALUE"
done
if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then
# Calculate the CPU usage since we last checked.
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
if [[ $1 = "-i" ]]; then
echo " ${DIFF_USAGE}%"
else
echo "${DIFF_USAGE}%"
fi
else
if [[ $1 = "-i" ]]; then
echo " ?"
else
echo "?"
fi
fi
# Remember the total and idle CPU times for the next check.
echo "${TOTAL}" > "${cpuFile}"
echo "${IDLE}" >> "${cpuFile}"

@ -0,0 +1,34 @@
#!/bin/bash
# this script is taken from screenfetch
# I only slightly modify this script to add an option to show icon, useful for my tint2 executor
# 'usedram -i' = with icon, 'usedram' = text only
# 'usedram -fi' = full summary with icon, 'usedram' = full summary text only
# Cheers!
# Addy
mem_info=$(</proc/meminfo)
mem_info=$(echo $(echo $(mem_info=${mem_info// /}; echo ${mem_info//kB/})))
for m in $mem_info; do
case ${m//:*} in
"MemTotal") usedmem=$((usedmem+=${m//*:})); totalmem=${m//*:} ;;
"ShMem") usedmem=$((usedmem+=${m//*:})) ;;
"MemFree"|"Buffers"|"Cached"|"SReclaimable") usedmem=$((usedmem-=${m//*:})) ;;
esac
done
usedmem=$((usedmem / 1024))
totalmem=$((totalmem / 1024))
mem="${usedmem}MB / ${totalmem}MB"
## Complete summary
if [[ $1 = "-fi" ]]; then
echo " $mem"
elif [[ $1 = "-f" ]]; then
echo "$mem"
## Only used RAM
elif [[ $1 = "-i" ]]; then
echo " $usedmem MB"
else
echo "$usedmem MB"
fi

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/volume.sh

@ -0,0 +1 @@
/home/aditya/.config/rofi/scripts/menu_volume.sh

@ -0,0 +1,150 @@
/**
* User: simonvic
* Copyright: simonvic
*
*/
configuration {
display-drun: "§";
display-run: "$";
display-window: "缾";
display-ssh: "~#";
show-icons: true;
sidebar-mode: false;
font: "NotoSans Regular 16";
}
* {
text-color: @foreground;
active-background: rgb(100,50,50);
active-foreground: @foreground;
normal-background: @background;
normal-foreground: @foreground;
urgent-background: #9E2A5E;
urgent-foreground: @foreground;
alternate-active-background: @background;
alternate-active-foreground: @foreground;
alternate-normal-background: @background;
alternate-normal-foreground: @foreground;
alternate-urgent-background: @background;
alternate-urgent-foreground: @foreground;
selected-active-background: rgb(200,10,10);
selected-active-foreground: #FFFFFF;
selected-normal-background: rgb(200,50,50);
selected-normal-foreground: #FFFFFF;
selected-urgent-background: #9D596B;
selected-urgent-foreground: @foreground;
background-color: transparent;
background: rgba(33,33,33 ,0.6);
foreground: rgb(200,200,200);
spacing: 0;
}
window {
location: center;
anchor: center;
height: 100%;
width: 100%;
orientation: vertical;
children: [mainbox];
hide-scrollbar: true;
padding: 20% 35% 20% 35%;
background-color: #00000000;
}
mainbox {
children: [inputbar, listview];
}
listview {
spacing: 0.6em;
dynamic: false;
cycle: false;
padding: 5px 5px 5px 5px;
}
inputbar {
border-radius: 50%;
padding: 10px;
border-spacing: 5px 0 0 0;
border: 0px;
spacing: 0px;
margin: 10px;
border-color: rgb(200,50,50);
background-color: @background;
text-color: #FFFFFF;
}
entry{
padding: 5px;
border: 0px 0px 2px 0px;
border-color: rgb(250,50,50);
background-color: rgba(0,0,0,0);
text-color: #FFFFFF;
}
prompt{
padding: 5px;
background-color: #00000000;
text-color: #FFFFFF;
}
element {
padding: 10px;
border-radius: 50%;
}
element normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
border-color: @active-background;
}
element selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element alternate.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element alternate.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element alternate.active {
background-color: @active-background;
text-color: @active-foreground;
}
rofi.theme: /home/kapper/.config/rofi/themes/onedark.rasi

@ -0,0 +1,42 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## browser : @adi1090x
## music : @adi1090x
rofi_command="rofi -theme themes/apps.rasi"
# Links
terminal=""
files="ﱮ"
editor=""
browser=""
music=""
settings="漣"
# Variable passed to rofi
options="$terminal\n$files\n$editor\n$browser\n$music\n$settings"
chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)"
case $chosen in
$terminal)
termite &
;;
$files)
thunar &
;;
$editor)
geany &
;;
$browser)
firefox &
;;
$music)
lxmusic &
;;
$settings)
xfce4-settings-manager &
;;
esac

@ -0,0 +1,44 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/backlight.rasi"
## Get Brightness
VAR="$(xbacklight -get)"
BLIGHT="$(printf "%.0f\n" "$VAR")"
if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then
MSG="Low"
elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then
MSG="Optimal"
elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then
MSG="High"
elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then
MSG="Too Much"
fi
## Icons
ICON_UP=""
ICON_DOWN=""
ICON_OPT=""
options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT%" -dmenu -selected-row 1)"
case $chosen in
$ICON_UP)
xbacklight -inc 10 && notify-send -u low -t 1500 "Brightness Up $ICON_UP"
;;
$ICON_DOWN)
xbacklight -dec 10 && notify-send -u low -t 1500 "Brightness Down $ICON_DOWN"
;;
$ICON_OPT)
xbacklight -set 35 && notify-send -u low -t 1500 "Optimal Brightness $ICON_OPT"
;;
esac

@ -0,0 +1,59 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/battery.rasi"
## Get data
BATTERY="$(acpi | awk -F ' ' '{print $4}' | tr -d \%,)"
CHARGE="$(acpi | awk -F ' ' '{print $3}' | tr -d \,)"
active=""
urgent=""
if [[ $CHARGE = *"Charging"* ]]; then
active="-a 1"
ICON_CHRG=""
MSG=$CHARGE
else
urgent="-u 1"
ICON_CHRG="ﮤ"
MSG="Discharging"
fi
# Discharging
#if [[ $CHARGE -eq 1 ]] && [[ $BATTERY -eq 100 ]]; then
# ICON_DISCHRG=""
if [[ $BATTERY -ge 5 ]] && [[ $BATTERY -le 19 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 20 ]] && [[ $BATTERY -le 39 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 40 ]] && [[ $BATTERY -le 59 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 60 ]] && [[ $BATTERY -le 79 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 80 ]] && [[ $BATTERY -le 100 ]]; then
ICON_DISCHRG=""
fi
## Icons
ICON_PMGR=""
options="$ICON_DISCHRG\n$ICON_CHRG\n$ICON_PMGR"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$BATTERY%" -dmenu $active $urgent -selected-row 0)"
case $chosen in
$ICON_CHRG)
;;
$ICON_DISCHRG)
;;
$ICON_PMGR)
xfce4-power-manager-settings
;;
esac

@ -0,0 +1,42 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## browser : @adi1090x
## music : @adi1090x
rofi_command="rofi -theme themes/menu/apps.rasi"
# Links
terminal=""
files="ﱮ"
editor=""
browser=""
music=""
settings="漣"
# Variable passed to rofi
options="$terminal\n$files\n$editor\n$browser\n$music\n$settings"
chosen="$(echo -e "$options" | $rofi_command -p "Most Used" -dmenu -selected-row 0)"
case $chosen in
$terminal)
termite &
;;
$files)
thunar &
;;
$editor)
geany &
;;
$browser)
firefox &
;;
$music)
lxmusic &
;;
$settings)
xfce4-settings-manager &
;;
esac

@ -0,0 +1,44 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/backlight.rasi"
## Get Brightness
VAR="$(xbacklight -get)"
BLIGHT="$(printf "%.0f\n" "$VAR")"
if [[ $BLIGHT -ge 1 ]] && [[ $BLIGHT -le 29 ]]; then
MSG="Low"
elif [[ $BLIGHT -ge 30 ]] && [[ $BLIGHT -le 49 ]]; then
MSG="Optimal"
elif [[ $BLIGHT -ge 50 ]] && [[ $BLIGHT -le 69 ]]; then
MSG="High"
elif [[ $BLIGHT -ge 70 ]] && [[ $BLIGHT -le 99 ]]; then
MSG="Too Much"
fi
## Icons
ICON_UP=""
ICON_DOWN=""
ICON_OPT=""
options="$ICON_UP\n$ICON_OPT\n$ICON_DOWN"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$BLIGHT% : $MSG" -dmenu -selected-row 1)"
case $chosen in
$ICON_UP)
xbacklight -inc 10 && notify-send -u low -t 1500 "Brightness Up $ICON_UP"
;;
$ICON_DOWN)
xbacklight -dec 10 && notify-send -u low -t 1500 "Brightness Down $ICON_DOWN"
;;
$ICON_OPT)
xbacklight -set 35 && notify-send -u low -t 1500 "Optimal Brightness $ICON_OPT"
;;
esac

@ -0,0 +1,58 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/battery.rasi"
## Get data
BATTERY="$(acpi | awk -F ' ' '{print $4}' | tr -d \%,)"
CHARGE="$(acpi | awk -F ' ' '{print $3}' | tr -d \,)"
active=""
urgent=""
if [[ $CHARGE = *"Charging"* ]]; then
active="-a 1"
ICON_CHRG=""
MSG=$CHARGE
else
urgent="-u 1"
ICON_CHRG="ﮤ"
MSG="Discharging"
fi
# Discharging
#if [[ $CHARGE -eq 1 ]] && [[ $BATTERY -eq 100 ]]; then
# ICON_DISCHRG=""
if [[ $BATTERY -ge 5 ]] && [[ $BATTERY -le 19 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 20 ]] && [[ $BATTERY -le 39 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 40 ]] && [[ $BATTERY -le 59 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 60 ]] && [[ $BATTERY -le 79 ]]; then
ICON_DISCHRG=""
elif [[ $BATTERY -ge 80 ]] && [[ $BATTERY -le 100 ]]; then
ICON_DISCHRG=""
fi
## Icons
ICON_PMGR=""
options="$ICON_DISCHRG\n$ICON_CHRG\n$ICON_PMGR"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$MSG : $BATTERY%" -dmenu $active $urgent -selected-row 0)"
case $chosen in
$ICON_CHRG)
;;
$ICON_DISCHRG)
;;
$ICON_PMGR)
xfce4-power-manager-settings
;;
esac

@ -0,0 +1,70 @@
#!/bin/bash
rofi_command="rofi -theme themes/menu/mpd.rasi"
# Gets the current status of mpd (for us to parse it later on)
status="$(mpc status)"
# Defines the Play / Pause option content
if [[ $status == *"[playing]"* ]]; then
play_pause=""
else
play_pause=""
fi
active=""
urgent=""
# Display if repeat mode is on / off
tog_repeat="凌"
if [[ $status == *"repeat: on"* ]]; then
active="-a 4"
elif [[ $status == *"repeat: off"* ]]; then
urgent="-u 4"
else
tog_repeat=" Parsing error"
fi
# Display if random mode is on / off
tog_random=""
if [[ $status == *"random: on"* ]]; then
[ -n "$active" ] && active+=",5" || active="-a 5"
elif [[ $status == *"random: off"* ]]; then
[ -n "$urgent" ] && urgent+=",5" || urgent="-u 5"
else
tog_random=" Parsing error"
fi
stop=""
next=""
previous=""
# Variable passed to rofi
options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random"
# Get the current playing song
current=$(mpc current)
# If mpd isn't running it will return an empty string, we don't want to display that
if [[ -z "$current" ]]; then
current="-"
fi
# Spawn the mpd menu with the "Play / Pause" entry selected by default
chosen="$(echo -e "$options" | $rofi_command -p "$current" -dmenu $active $urgent -selected-row 1)"
case $chosen in
$previous)
mpc -q prev && notify-send -u low -t 1800 "$(mpc current)"
;;
$play_pause)
mpc -q toggle && notify-send -u low -t 1800 "$(mpc current)"
;;
$stop)
mpc -q stop
;;
$next)
mpc -q next && notify-send -u low -t 1800 "$(mpc current)"
;;
$tog_repeat)
mpc -q repeat
;;
$tog_random)
mpc -q random
;;
esac

@ -0,0 +1,65 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/network.rasi"
## Get info
IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')"
#SSID="$(iwgetid -r)"
#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')"
#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
STATUS="$(nmcli radio wifi)"
active=""
urgent=""
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 [[ $STATUS == *"enable"* ]]; then
if [[ $IFACE == e* ]]; then
connected=""
else
connected="直"
fi
active="-a 0"
SSID="$(iwgetid -r)"
PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
fi
else
urgent="-u 0"
SSID="Disconnected"
PIP="Not Available"
connected="睊"
fi
## Icons
bmon="龍"
launch_cli=""
launch="歷"
options="$connected\n$bmon\n$launch_cli\n$launch"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$SSID : $PIP" -dmenu $active $urgent -selected-row 1)"
case $chosen in
$connected)
if [[ $STATUS == *"enable"* ]]; then
nmcli radio wifi off
else
nmcli radio wifi on
fi
;;
$bmon)
termite -e bmon
;;
$launch_cli)
termite -e nmtui
;;
$launch)
nm-connection-editor
;;
esac

@ -0,0 +1,44 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/powermenu.rasi"
uptime=$(uptime -p | sed -e 's/up //g')
#mem=$( free -h | grep -i mem | awk -F ' ' '{print $3}')
cpu=$(sh ~/.config/rofi/bin/usedcpu)
memory=$(sh ~/.config/rofi/bin/usedram)
# Options
shutdown="襤"
reboot="ﰇ"
lock=""
suspend="鈴"
logout=""
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "$uptime   $cpu   $memory " -dmenu -selected-row 2)"
case $chosen in
$shutdown)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
i3lock
;;
$suspend)
mpc -q pause
amixer set Master mute
systemctl suspend
;;
$logout)
openbox --exit
;;
esac

@ -0,0 +1,42 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/quicklinks.rasi"
# Links
google=""
facebook=""
twitter=""
github=""
reddit=""
youtube=""
# Variable passed to rofi
options="$google\n$facebook\n$twitter\n$github\n$reddit\n$youtube"
chosen="$(echo -e "$options" | $rofi_command -p "Open In : Firefox" -dmenu -selected-row 0)"
case $chosen in
$google)
firefox --new-tab https://www.google.com
;;
$facebook)
firefox --new-tab https://www.facebook.com
;;
$twitter)
firefox --new-tab https://www.twitter.com
;;
$github)
firefox --new-tab https://www.github.com
;;
$reddit)
firefox --new-tab https://www.reddit.com
;;
$youtube)
firefox --new-tab https://www.youtube.com
;;
esac

@ -0,0 +1,30 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/screenshot.rasi"
# Options
screen=""
area=""
window=""
# Variable passed to rofi
options="$screen\n$area\n$window"
chosen="$(echo -e "$options" | $rofi_command -p 'scrot' -dmenu -selected-row 1)"
case $chosen in
$screen)
sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
;;
$area)
scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
;;
$window)
sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
;;
esac

@ -0,0 +1,21 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/time.rasi"
## Get time and date
TIME="$(date +"%I:%M %p")"
DN=$(date +"%A")
MN=$(date +"%B")
DAY="$(date +"%d")"
MONTH="$(date +"%m")"
YEAR="$(date +"%Y")"
options="$DAY\n$MONTH\n$YEAR"
## Main
chosen="$(echo -e "$options" | $rofi_command -p " at $TIME on $DN in $MN" -dmenu -selected-row 1)"

@ -0,0 +1,49 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/menu/volume.rasi"
## Get Volume
#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')
MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%')
active=""
urgent=""
if [[ $MUTE == *"off"* ]]; then
active="-a 1"
else
urgent="-u 1"
fi
if [[ $MUTE == *"on"* ]]; then
VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%"
else
VOLUME="Muted"
fi
## Icons
ICON_UP="ﱛ"
ICON_DOWN="ﱜ"
ICON_MUTED="ﱝ"
options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)"
case $chosen in
$ICON_UP)
amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP"
;;
$ICON_DOWN)
amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN"
;;
$ICON_MUTED)
amixer -q set Master toggle
;;
esac

@ -0,0 +1,70 @@
#!/bin/bash
rofi_command="rofi -theme themes/mpd.rasi"
# Gets the current status of mpd (for us to parse it later on)
status="$(mpc status)"
# Defines the Play / Pause option content
if [[ $status == *"[playing]"* ]]; then
play_pause=""
else
play_pause=""
fi
active=""
urgent=""
# Display if repeat mode is on / off
tog_repeat="凌"
if [[ $status == *"repeat: on"* ]]; then
active="-a 4"
elif [[ $status == *"repeat: off"* ]]; then
urgent="-u 4"
else
tog_repeat=" Parsing error"
fi
# Display if random mode is on / off
tog_random=""
if [[ $status == *"random: on"* ]]; then
[ -n "$active" ] && active+=",5" || active="-a 5"
elif [[ $status == *"random: off"* ]]; then
[ -n "$urgent" ] && urgent+=",5" || urgent="-u 5"
else
tog_random=" Parsing error"
fi
stop=""
next=""
previous=""
# Variable passed to rofi
options="$previous\n$play_pause\n$stop\n$next\n$tog_repeat\n$tog_random"
# Get the current playing song
current=$(mpc -f %title% current)
# If mpd isn't running it will return an empty string, we don't want to display that
if [[ -z "$current" ]]; then
current="-"
fi
# Spawn the mpd menu with the "Play / Pause" entry selected by default
chosen="$(echo -e "$options" | $rofi_command -p "$current" -dmenu $active $urgent -selected-row 1)"
case $chosen in
$previous)
mpc -q prev && notify-send -u low -t 1800 "$(mpc current)"
;;
$play_pause)
mpc -q toggle && notify-send -u low -t 1800 "$(mpc current)"
;;
$stop)
mpc -q stop
;;
$next)
mpc -q next && notify-send -u low -t 1800 "$(mpc current)"
;;
$tog_repeat)
mpc -q repeat
;;
$tog_random)
mpc -q random
;;
esac

@ -0,0 +1,65 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/network.rasi"
## Get info
IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')"
#SSID="$(iwgetid -r)"
#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')"
#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
STATUS="$(nmcli radio wifi)"
active=""
urgent=""
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 [[ $STATUS == *"enable"* ]]; then
if [[ $IFACE == e* ]]; then
connected=""
else
connected="直"
fi
active="-a 0"
MSG="﬉ Online"
PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
fi
else
urgent="-u 0"
MSG="Offline"
PIP="Not Available"
connected="睊"
fi
## Icons
bmon="龍"
launch_cli=""
launch="歷"
options="$connected\n$bmon\n$launch_cli\n$launch"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$MSG" -dmenu $active $urgent -selected-row 1)"
case $chosen in
$connected)
if [[ $STATUS == *"enable"* ]]; then
nmcli radio wifi off
else
nmcli radio wifi on
fi
;;
$bmon)
termite -e bmon
;;
$launch_cli)
termite -e nmtui
;;
$launch)
nm-connection-editor
;;
esac

@ -0,0 +1,41 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/powermenu.rasi"
uptime=$(uptime -p | sed -e 's/up //g')
# Options
shutdown="襤"
reboot="ﰇ"
lock=""
suspend="鈴"
logout=""
# Variable passed to rofi
options="$shutdown\n$reboot\n$lock\n$suspend\n$logout"
chosen="$(echo -e "$options" | $rofi_command -p "UP - $uptime" -dmenu -selected-row 2)"
case $chosen in
$shutdown)
systemctl poweroff
;;
$reboot)
systemctl reboot
;;
$lock)
i3lock
;;
$suspend)
mpc -q pause
amixer set Master mute
systemctl suspend
;;
$logout)
openbox --exit
;;
esac

@ -0,0 +1,42 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/quicklinks.rasi"
# Links
google=""
facebook=""
twitter=""
github=""
reddit=""
youtube=""
# Variable passed to rofi
options="$google\n$facebook\n$twitter\n$github\n$reddit\n$youtube"
chosen="$(echo -e "$options" | $rofi_command -p "Open In : Firefox" -dmenu -selected-row 0)"
case $chosen in
$google)
firefox --new-tab https://www.google.com
;;
$facebook)
firefox --new-tab https://www.facebook.com
;;
$twitter)
firefox --new-tab https://www.twitter.com
;;
$github)
firefox --new-tab https://www.github.com
;;
$reddit)
firefox --new-tab https://www.reddit.com
;;
$youtube)
firefox --new-tab https://www.youtube.com
;;
esac

@ -0,0 +1,30 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/screenshot.rasi"
# Options
screen=""
area=""
window=""
# Variable passed to rofi
options="$screen\n$area\n$window"
chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)"
case $chosen in
$screen)
sleep 1; scrot 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
;;
$area)
scrot -s 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
;;
$window)
sleep 1; scrot -u 'Screenshot_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; viewnior $$(xdg-user-dir PICTURES)/$f'
;;
esac

@ -0,0 +1,19 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/time.rasi"
## Get time and date
TIME="$(date +"%A, %I:%M %p")"
DAY="$(date +"%d")"
MONTH="$(date +"%m")"
YEAR="$(date +"%Y")"
options="$DAY\n$MONTH\n$YEAR"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$TIME" -dmenu -selected-row 1)"

@ -0,0 +1,55 @@
#!/bin/bash
## Author : Aditya Shakya (adi1090x)
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Reddit : @adi1090x
rofi_command="rofi -theme themes/volume.rasi"
## Get Volume
#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')
MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%')
active=""
urgent=""
if [[ $MUTE == *"off"* ]]; then
active="-a 1"
else
urgent="-u 1"
fi
if [[ $MUTE == *"off"* ]]; then
active="-a 1"
else
urgent="-u 1"
fi
if [[ $MUTE == *"on"* ]]; then
VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%"
else
VOLUME="Mu..."
fi
## Icons
ICON_UP="ﱛ"
ICON_DOWN="ﱜ"
ICON_MUTED="ﱝ"
options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN"
## Main
chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)"
case $chosen in
$ICON_UP)
amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP"
;;
$ICON_DOWN)
amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN"
;;
$ICON_MUTED)
amixer -q set Master toggle
;;
esac

@ -0,0 +1,35 @@
#### fancy
![fancy](https://53280.de/rofi/fancy.png)
#### flat-orange
![flat_orange](https://53280.de/rofi/flat_orange.png)
#### oxide
![oxide](https://53280.de/rofi/oxide.png)
#### solarized-darker
![solarized_darker](https://53280.de/rofi/solarized_darker.png)
#### sidetab
![sidetab](https://53280.de/rofi/sidetab.png)
#### material
![material](https://53280.de/rofi/material.png)
#### arc-red-dark
![arc-red-dark](https://53280.de/rofi/arc-red.png)
#### onedark
![onedark](https://53280.de/rofi/onedark.png)
#### ribbon
![ribbon](https://53280.de/rofi/ribbon.png)
#### rezlooks
![rezlooks](https://53280.de/rofi/rezlooks.png)
#### slate
![slate](https://53280.de/rofi/slate.png)
#### flamingo
![flamingo](https://53280.de/rofi/flamingo.png)

@ -0,0 +1,124 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
@import "colors.rasi"
/* ########### */
* {
/* General */
text-font: "Comfortaa 12";
icon-font: "Hurmit Nerd Font Mono 32";
icon-font-small: "Hurmit Nerd Font Mono 24";
option-6-listview-spacing: 10px;
menu-window-padding: 5px 15px;
menu-inputbar-margin: 10px 0px;
menu-prompt-padding: 10px 20px 10px 20px;
menu-prompt-margin: 0px 0px 0px -2px;
menu-element-border: 10px;
menu-element-padding: 3px 8px -1px -40px;
}
/* ########### */
#window {
width: 34.5%;
height: 20%;
}
/* ########### */
* {
background-color: @background;
text-color: @foreground;
font: @icon-font;
}
#horibox {
children: [ listview ];
}
#listview {
layout: horizontal;
}
#element {
padding: @option-element-padding;
background-color: @background-light;
}
#element.selected {
background-color: @accent;
text-color: @background;
}
/* ########### */
* {
font: @text-font;
}
#window {
padding: @menu-window-padding;
children: [ inputbar, horibox ];
}
#inputbar {
children: [ textbox-prompt-colon, prompt ];
margin: @menu-inputbar-margin;
}
prompt,
textbox-prompt-colon {
padding: @menu-prompt-padding;
border: 2px;
border-color: @accent;
}
#prompt {
margin: @menu-prompt-margin;
background-color: @background-light;
text-color: @accent;
}
#textbox-prompt-colon {
expand: false;
str: "Apps";
background-color: @accent;
text-color: @background;
}
#horibox {
padding: 0px;
}
#listview {
spacing: @option-6-listview-spacing;
lines: 6;
}
#element {
font: @icon-font;
border: @menu-element-border;
padding: @menu-element-padding;
border-color: @background-light;
}
#element.selected {
border-color: @accent;
}
element.active,
element.selected.urgent {
background-color: @on;
text-color: @background;
border-color: @on;
}
element.selected.urgent {
border-color: @accent;
}
element.urgent,
element.selected.active {
background-color: @off;
text-color: @background;
border-color: @off;
}
element.selected.active {
border-color: @accent;
}

@ -0,0 +1,137 @@
/*
* ROFI Color theme
* A red variation of Arc-Dark theme by leofa, based on arc-theme-Red (https://github.com/mclmza/arc-theme-Red)
* User: wikwg9
*/
* {
selected-normal-foreground: rgba ( 249, 249, 249, 100 % );
foreground: rgba ( 196, 203, 212, 100 % );
normal-foreground: @foreground;
alternate-normal-background: rgba ( 64, 69, 82, 59 % );
red: rgba ( 220, 50, 47, 100 % );
selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
blue: rgba ( 38, 139, 210, 100 % );
urgent-foreground: rgba ( 204, 102, 102, 100 % );
alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
active-foreground: rgba ( 220, 140, 160, 100 % );
lightbg: rgba ( 238, 232, 213, 100 % );
selected-active-foreground: rgba ( 249, 249, 249, 100 % );
alternate-active-background: rgba ( 75, 81, 96, 89 % );
background: rgba ( 45, 48, 59, 95 % );
alternate-normal-foreground: @foreground;
normal-background: @background;
lightfg: rgba ( 88, 104, 117, 100 % );
selected-normal-background: rgba ( 204, 87, 93, 100 % );
border-color: rgba ( 137, 131, 124, 100 % );
spacing: 2;
separatorcolor: rgba ( 29, 31, 33, 100 % );
urgent-background: rgba ( 29, 31, 33, 17 % );
selected-urgent-background: rgba ( 165, 66, 66, 100 % );
alternate-urgent-foreground: @urgent-foreground;
background-color: rgba ( 0, 0, 0, 0 % );
alternate-active-foreground: @active-foreground;
active-background: rgba ( 29, 31, 33, 17 % );
selected-active-background: rgba ( 204, 87, 93, 100 % );
}
#window {
background-color: @background;
padding: 5;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 2px 0px 0px ;
border-color: @separatorcolor;
padding: 1px ;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 2px 0px 0px ;
border-color: @separatorcolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
#element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
#element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
#mode-switcher {
border: 2px 0px 0px ;
border-color: @separatorcolor;
}
#button {
spacing: 0;
text-color: @normal-foreground;
}
#button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#inputbar {
spacing: 0;
text-color: @normal-foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @normal-foreground;
}
#entry {
spacing: 0;
text-color: @normal-foreground;
}
#prompt {
spacing: 0;
text-color: @normal-foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @normal-foreground;
}

@ -0,0 +1,124 @@
/*
*
* Author : Aditya Shakya (adi1090x)
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Reddit : @adi1090x
*
*/
@import "colors.rasi"
/* ########### */
* {
/* General */
text-font: "Comfortaa 12";
icon-font: "Hurmit Nerd Font Mono 32";
icon-font-small: "Hurmit Nerd Font Mono 24";
option-6-listview-spacing: 10px;
menu-window-padding: 5px 15px;
menu-inputbar-margin: 10px 0px;
menu-prompt-padding: 10px 20px 10px 20px;
menu-prompt-margin: 0px 0px 0px -2px;
menu-element-border: 10px;
menu-element-padding: 3px 8px -1px -40px;
}
/* ########### */
#window {
width: 18%;
height: 20%;
}