MX-Fluxbox

Help for MX Fluxbox
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
tequila
Posts: 34
Joined: Thu Dec 31, 2020 6:42 am

Re: MX-Fluxbox

#231 Post by tequila »

sorry, it works for me, here is the original:

Code: Select all

#!/usr/bin/env bash
YELLOW="\033[1;33m"
ENDCOLOR="\033[0m"

icon=cs-desktop

jas=$(xbacklight -get)

yad --mouse \
   --undecorated \
   --title "fenyerö"  \
   --image="$icon" \
   --window-icon="$icon" \
   --text="Valassz!     Aktualis=$jas%" \
   --button="10%":2 \
   --button="40%":3 \
   --button="60%":4 \
   --button="80%":5 \
   --button="100%":6 \
   --button=gtk-cancel:1 \
   --on-top
ret=$?

case $ret in
2) adj=10
   ;;
3) adj=40
   ;;
4) adj=60
   ;;
5) adj=80
   ;;
6) adj=100
   ;;
*) adj=$jas
  ;;
esac

if test $jas != $adj; then
   xbacklight -set $adj 
fi

echo -e $YELLOW"fenyerö bealitva!"$ENDCOLOR
exit 0
Original from link:https://linuxos.sk/blog/zaphod/detail/r ... -z-linuxu/


I found a better one:

Code: Select all

#!/bin/bash

# detect monitor
MON=$(xrandr -q | grep " connected" | cut -f1 -d ' ')
# find current xrandr brightness value
XR=$(xrandr --verbose | grep -i brightness | cut -f2 -d ' ' | head -n1)
BrCur=`awk "BEGIN {print $XR*100}"` # calculate, so e.g. 0.5 gets 50
BrMax="100"
BrMin="10"
yad --undecorated --on-top --geometry=450x70+550+650 --scale --value $BrCur --print-partial --min-value $BrMin --max-value $BrMax --button="Done":1 | while read BrNew; do
# division using awk, so xrandr value gets e.g. 0.5 rather than 50
xrandr --output $MON --brightness $(awk "BEGIN {print $BrNew/100}")
done
You do not have the required permissions to view the files attached to this post.
Last edited by tequila on Tue Jul 12, 2022 8:09 am, edited 2 times in total.

User avatar
dolphin_oracle
Developer
Posts: 22798
Joined: Sun Dec 16, 2007 12:17 pm

Re: MX-Fluxbox

#232 Post by dolphin_oracle »

not all backlights provide an interface that is operable with xbacklight.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

Huckleberry Finn

Re: MX-Fluxbox

#233 Post by Huckleberry Finn »

Afaik Xbacklight works (only) with Intel cards and also with Intel driver (not with modesetting). Therefore this may be required (even when the card is already Intel):

/etc/X11/xorg.conf.d/20-intel.conf

Code: Select all

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"     "true"
#  Option      "Backlight"  "intel_backlight"   # ( If the backlight directory is intel_backlight in /sys/class/backlight )
#  Option      "AccelMethod" "uxa"  #could also use the default "sna"
EndSection
And for non-Intel devices / drivers Acpilight might work (just maybe)

tequila
Posts: 34
Joined: Thu Dec 31, 2020 6:42 am

Re: MX-Fluxbox

#234 Post by tequila »

Original script with ddcutil didn't work for me on notebook so i wrote at xbacklight,it would be nice to combine the two.
2.sript,maybe someone is interested in the alarm,works on mx:https://oldforum.puppylinux.com/viewtop ... 2#p1045692
on Antix to be rewritten >kill $! to>pkill -P,at the end of the script> yad --fixed --center --button=gtk-cancel:1
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “MX Fluxbox Official Release”