Choose style:

Author Topic: Run shell script on power state change? (solved)  (Read 5516 times)

0 Members and 1 Guest are viewing this topic.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Run shell script on power state change?
« Reply #15 on: April 27, 2014, 05:53:17 pm »
it's easy enough to check if it's the command or the key combo that's failing.

open
menu > Preferences > Keyboard Shortcuts

select the "autorandr" profile

make sure
Code: [Select]
bash -c /home/jm/autorandr-master/autorandr --change
is in the "Action:" field

and hit click the "Run Action" button

if what you expected to occur happened .. the command is correct, so it must be the key cobo that's failing.

[EDIT]

if the command fails maybe try adding quotation marks:
Code: [Select]
bash -c "/home/jm/autorandr-master/autorandr --change"
« Last Edit: April 27, 2014, 05:58:46 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline jam_27

  • Jr. Member
  • **
  • Posts: 33
  • Karma: 0
  • Panasonic CF-SX1
    • View Profile
  • Peppermint version(s): 10
Re: Run shell script on power state change? (Solved)
« Reply #16 on: April 27, 2014, 06:05:08 pm »
it's easy enough to check if it's the command or the key combo that's failing.

open
menu > Preferences > Keyboard Shortcuts

select the "autorandr" profile

make sure
Code: [Select]
bash -c /home/jm/autorandr-master/autorandr --change
is in the "Action:" field

and hit click the "Run Action" button

if what you expected to occur happened .. the command is correct, so it must be the key cobo that's failing.

[EDIT]

if the command fails maybe try adding quotation marks:
Code: [Select]
bash -c "/home/jm/autorandr-master/autorandr --change"

Yes, its the key-combination which was failing. Also, as you suggested earlier  it should be

Code: [Select]
/home/jm/autorandr-master/autorandr --change

With Mod4 + g | m:0x40 + c:42  its working now. I will see if I can get another key combination working. Marking this thread as solved now. Many thanks.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26466
  • Karma: 65531
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Run shell script on power state change? (solved)
« Reply #17 on: April 27, 2014, 06:07:19 pm »
You're most welcome :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec