Compare commits
3 Commits
1eb96573ee
...
0c555d95fc
Author | SHA1 | Date | |
---|---|---|---|
0c555d95fc | |||
c5e09a0c7f | |||
e5ffa98b80 |
1
DOC.md
1
DOC.md
@ -8,6 +8,7 @@ You can install another programs for your customization. This is for the example
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt install -y pulseaudio pavucontrol pulseaudio-utils # For volume script
|
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 nitrogen # For wallpaper
|
||||||
sudo apt install -y lxpolkit # For polkit
|
sudo apt install -y lxpolkit # For polkit
|
||||||
sudo apt install -y xcompmgr # For transparent supporting
|
sudo apt install -y xcompmgr # For transparent supporting
|
||||||
|
8
aji.sh
8
aji.sh
@ -6,9 +6,7 @@ vol=$(awk -F"[][]" '/Left:/ { print $2 }' <(amixer sget Master))
|
|||||||
capacity=$(cat /sys/class/power_supply/BAT1/capacity)
|
capacity=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||||
status=$(cat /sys/class/power_supply/BAT1/status)
|
status=$(cat /sys/class/power_supply/BAT1/status)
|
||||||
# Brightness
|
# Brightness
|
||||||
conn=$(xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1)
|
bright=$(echo $(( 100 * $(brightnessctl get) / $(brightnessctl max) ))%)
|
||||||
a=$(xrandr --verbose --current | grep ^$conn -A5 | tail -n1)
|
|
||||||
bright="${a##* }"
|
|
||||||
|
|
||||||
if [ "$1" == "rofi" ]; then
|
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%;}'
|
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%;}'
|
||||||
@ -53,8 +51,8 @@ elif [ "$1" == "bright" ] && [ "$2" == "down" ]; then
|
|||||||
elif [ "$1" == "bright" ]; then
|
elif [ "$1" == "bright" ]; then
|
||||||
echo $bright
|
echo $bright
|
||||||
elif [ "$1" == "info" ]; then
|
elif [ "$1" == "info" ]; then
|
||||||
xsetroot -name " Bright: $bright | Vol: $vol | $capacity% $status | $(date +'%a, %F %R') "
|
xsetroot -name " Bright: $bright | Vol: $vol | $status $capacity% | $(date +'%a, %F %R') "
|
||||||
sleep 2
|
sleep 4
|
||||||
xsetroot -name " DAP "
|
xsetroot -name " DAP "
|
||||||
else
|
else
|
||||||
echo "Invalid argument."
|
echo "Invalid argument."
|
||||||
|
7
config.h
7
config.h
@ -102,11 +102,18 @@ static const char *nmcedit[] = { "nm-connection-editor" , NULL };
|
|||||||
|
|
||||||
static const char *top[] = { "kitty" , "htop" , 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"};
|
static const char *intip[] = { "bash" , "/home/aji/.dwm/aji.sh", "info"};
|
||||||
|
|
||||||
#include "aji.c"
|
#include "aji.c"
|
||||||
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
|
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = bridown} },
|
||||||
|
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = briup} },
|
||||||
{ MODKEY, XK_i, spawn, {.v = intip} },
|
{ MODKEY, XK_i, spawn, {.v = intip} },
|
||||||
{ MODKEY, XK_BackSpace, view, {0} },
|
{ MODKEY, XK_BackSpace, view, {0} },
|
||||||
{ MODKEY, XK_a, view, {.ui = ~0} }, // Select all tags. Cancel it with `MODKEY + [tag key]`.
|
{ MODKEY, XK_a, view, {.ui = ~0} }, // Select all tags. Cancel it with `MODKEY + [tag key]`.
|
||||||
|
Loading…
Reference in New Issue
Block a user