Changed rofi launch mode

This commit is contained in:
hellisabove
2021-07-25 04:12:13 +03:00
parent 611cf852c9
commit 978b9dbeca
2 changed files with 27 additions and 1 deletions
Executable
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
# base dir for backlight class
basedir="/sys/class/backlight/"
# get the backlight handler
handler=$basedir$(ls $basedir)"/"
# get current brightness
old_brightness=$(cat $handler"brightness")
# get max brightness
max_brightness=$(cat $handler"max_brightness")
# get current brightness %
old_brightness_p=$(( 100 * $old_brightness / $max_brightness ))
# calculate new brightness %
new_brightness_p=$(($old_brightness_p $1))
# calculate new brightness value
new_brightness=$(( $max_brightness * $new_brightness_p / 100 ))
# set the new brightness value
sudo chmod 666 $handler"brightness"
echo $new_brightness > $handler"brightness"
+1 -1
View File
@@ -63,7 +63,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "rofi", "-show", "drun", NULL};
static const char *dmenucmd[] = { "rofi", "-show", "run", NULL};
//sets st as the default terminal
static const char *termcmd[] = { "st", NULL };
//volume controls