You are not logged in.

#1 2020-02-16 04:51:34

pond-64
Member
Registered: 2020-02-14
Posts: 2

[SOLVED] executing terminal commands on startx with i3wm

Howdy, newb here

I'm having trouble with persisting an xrandr command to adjust brightness during my bootup of a graphical environment. I'm using i3wm with st and have made a configuration of ~/.config/i3/config as following to:

exec_always st -e "xrandr --output LVDS-1 --brightness 0.7"

It doesn't seem to execute when I reboot the environment, what am I doing wrong?
I also have,

exec_always st -e "feh --bg-scale /home/user/pictures/picture.jpg"

which seems to work so I just assumed I could apply the same for the screen brightness adjustment.

Last edited by pond-64 (2020-02-16 13:07:39)

Offline

#2 2020-02-16 05:02:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] executing terminal commands on startx with i3wm

Why aren't you putting those commands in you ~/.xinitrc?

Obviously without the exec_always thing... Also, you shouldn't be starting a terminal to run xrandr.

Last edited by jasonwryan (2020-02-16 05:03:50)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-02-16 09:34:10

kflak
Member
Registered: 2017-09-23
Posts: 52

Re: [SOLVED] executing terminal commands on startx with i3wm

If, however, you choose to run this stuff in the i3 config, you don't have to run it in a terminal emulator. Just write something like:

exec feh --bg-scale /home/user/pictures/picture.jpg &

Offline

#4 2020-02-16 11:36:27

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] executing terminal commands on startx with i3wm

pond-64 wrote:
exec_always st -e "xrandr --output LVDS-1 --brightness 0.7"

That doesn't adjust the brightness, it just changes the gamma of the display. Does xbacklight not work for you? See also https://wiki.archlinux.org/index.php/Backlight

No idea why the command doesn't run though, you should probably share your desktop startup method (post the full content of any configuration files though, vague descriptions will not suffice).


Jin, Jîyan, Azadî

Offline

#5 2020-02-16 13:02:56

pond-64
Member
Registered: 2020-02-14
Posts: 2

Re: [SOLVED] executing terminal commands on startx with i3wm

jasonwryan wrote:

Why aren't you putting those commands in you ~/.xinitrc?

Obviously without the exec_always thing... Also, you shouldn't be starting a terminal to run xrandr.

Removed them from my i3 config and added them to my xinitrc and no luck.

Head_on_a_Stick wrote:
pond-64 wrote:
exec_always st -e "xrandr --output LVDS-1 --brightness 0.7"

That doesn't adjust the brightness, it just changes the gamma of the display. Does xbacklight not work for you? See also https://wiki.archlinux.org/index.php/Backlight

No idea why the command doesn't run though, you should probably share your desktop startup method (post the full content of any configuration files though, vague descriptions will not suffice).

Ah I see, yeah xbacklight doesn't work, I have an OLED screen. My xinitrc was

exec i3
wal -R
xrandr --output LVDS-1 --brightness 0.7
feh --bg-scale /home/user/pictures/picture.jpg
kflak wrote:

If, however, you choose to run this stuff in the i3 config, you don't have to run it in a terminal emulator. Just write something like:

exec feh --bg-scale /home/user/pictures/picture.jpg &

Done, I've added to my ~/.config/i3/config

exec feh --bg-scale /home/user/pictures/picture.jpg &
xrandr --output LVDS-1 --brightness 0.7 &

and it's persisting now, thanks all :]

Last edited by pond-64 (2020-02-16 13:08:23)

Offline

#6 2020-02-16 13:27:39

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] executing terminal commands on startx with i3wm

Your .xinitrc wasn't working because it's completely broken and doesn't make any sense...

Read...
https://wiki.archlinux.org/index.php/Xinit#xinitrc


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB