Compare commits

..

No commits in common. "0c555d95fc738abc4234558806f5ba2ff439c5bf" and "1eb96573ee21100d9cd576729e47eea22e1a5fc3" have entirely different histories.

3 changed files with 5 additions and 11 deletions

1
DOC.md
View File

@ -8,7 +8,6 @@ You can install another programs for your customization. This is for the example
```bash
sudo apt install -y pulseaudio pavucontrol pulseaudio-utils # For volume script
sudo apt install -y brightnessctl # For brightness control
sudo apt install -y nitrogen # For wallpaper
sudo apt install -y lxpolkit # For polkit
sudo apt install -y xcompmgr # For transparent supporting

8
aji.sh
View File

@ -6,7 +6,9 @@ vol=$(awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master))
capacity=$(cat /sys/class/power_supply/BAT1/capacity)
status=$(cat /sys/class/power_supply/BAT1/status)
# Brightness
bright=$(echo $(( 100 * $(brightnessctl get) / $(brightnessctl max) ))%)
conn=$(xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1)
a=$(xrandr --verbose --current | grep ^$conn -A5 | tail -n1)
bright="${a##* }"
if [ "$1" == "rofi" ]; then
rofi -modi drun,power:~/.config/rofi/power-menu -show drun -show-icons -theme Arc-Dark.rasi -columns 2 -lines 10 -window-thumbnail -opacity -width 80 -sidebar-mode -theme-str 'listview {columns: 2; lines: 10;} window {width: 80%; height: 60%;}'
@ -51,8 +53,8 @@ elif [ "$1" == "bright" ] && [ "$2" == "down" ]; then
elif [ "$1" == "bright" ]; then
echo $bright
elif [ "$1" == "info" ]; then
xsetroot -name " Bright: $bright | Vol: $vol | $status $capacity% | $(date +'%a, %F %R') "
sleep 4
xsetroot -name " Bright: $bright | Vol: $vol | $capacity% $status | $(date +'%a, %F %R') "
sleep 2
xsetroot -name " DAP "
else
echo "Invalid argument."

View File

@ -102,18 +102,11 @@ static const char *nmcedit[] = { "nm-connection-editor" , NULL };
static const char *top[] = { "kitty" , "htop" , NULL };
static const char *briup[] = { "brightnessctl", "set", "+10%" };
static const char *bridown[] = { "brightnessctl", "set", "10%-" };
static const char *intip[] = { "bash" , "/home/aji/.dwm/aji.sh", "info"};
#include "aji.c"
#include <X11/XF86keysym.h>
static const Key keys[] = {
/* modifier key function argument */
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = bridown} },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = briup} },
{ MODKEY, XK_i, spawn, {.v = intip} },
{ MODKEY, XK_BackSpace, view, {0} },
{ MODKEY, XK_a, view, {.ui = ~0} }, // Select all tags. Cancel it with `MODKEY + [tag key]`.