Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional functionality #2

Closed
Wehin opened this issue Feb 12, 2020 · 4 comments
Closed

Additional functionality #2

Wehin opened this issue Feb 12, 2020 · 4 comments

Comments

@Wehin
Copy link

Wehin commented Feb 12, 2020

additional flags:
-v result values with description for human
-s silent and result some value for scripting

example:

./msigd -s --osd_language
-> 2

or

 ./msigd -v --contrast
-> Contrast: 50  Min:0 Max:100

Updated 0.4:

#!/bin/sh
#
BR_CURRENT=$(./msigd -f brightness | awk -F' : ' '{print $2}') # Hard way with split
BR_MAX=100
BR_MIN=0

yad --title="Brightness" --window-icon="preferences-desktop-display" \
 --skip-taskbar --fixed --sticky --on-top --undecorated --mouse \
 --borders=5 --width=300 --escape-ok --close-on-unfocus --no-buttons \
 --scale --min-value=$BR_MIN --max-value=$BR_MAX --value=$BR_CURRENT --step=1 --print-partial --hide-value | \
while read BR_NEW
do
if [[ "$BR_CURRENT" != "$BR_NEW" ]]; then
BR_CURRENT=$(./msigd --brightness $BR_NEW) # currently no return
#fix no return, we can't use $(./msigd --brightness $BR_NEW -f brightness | awk -F' : ' '{print $2}') it result previous value
BR_CURRENT=$BR_NEW
fi
done
@Wehin
Copy link
Author

Wehin commented Feb 14, 2020

flags for key_macro e.g.
-m check only key_macro without other stuff, return 1 when pressed
-w 100 loop wait press key_macro, check every 100ms, exit loop with result 1 when pressed.

@couriersud
Copy link
Owner

./msigd  -n -f pip
pip : 0

and

./msigd  --wait macro_key=pressed

should address the issues raised here.
@Wehin Ok to close?

@Wehin
Copy link
Author

Wehin commented Apr 23, 2020

how oneshot set and return current set value?

/msigd --brightness 1001; echo $?
msigd: Unknown value <1001> for option brightness
Try 'msigd --help' for more information.
1

ok, code is 1 with message

./msigd --brightness 100; echo $?
0

code is 0 without message

./msigd --brightness 100 -n -f brightness; echo $?
brightness : 10
0

code is 0 with older settings, broken order ?

couriersud added a commit that referenced this issue Apr 23, 2020
Changed the order of processing. Changes for device settings are now
processed first (issue #2).
Changed quick charge (PS series) to a write only setting (issue #4).
Updated documentation.
Increased version.
Added access mode (R,W,R/W) to help output.
@couriersud
Copy link
Owner

Closing. Order was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants