sh & .xinitrc

sk8harddiefast

Daemon

Reaction score: 205
Messages: 2,157

Hi.how to exec an sh script on .xinitrc?
My conky horizontal bar is full of data and i want to send some scripts to dwm bar
 

graudeejs

Son of Beastie

Reaction score: 707
Messages: 4,617

.xinitrc itself it a sh script, so you either specify full path to script you want to exec, or simply add line with name of script (depending if script is in one of $PATH directories).... before you exec your window manager.
 

nekoexmachina

Well-Known Member

Reaction score: 32
Messages: 341

you could just put your needed lines into .xinitrc, e.g. like my .xinitrc is
Code:
setxkbmap -layout us,ru -option grp:rctrl_toggle,grp_led:caps
for path in /usr/local/lib/X11/fonts/* ~/.fonts/*; do xset +fp $path; xset fp rehash
ion3 &
firefox3 &
gajim
disclaimer: i do now that i can edit all fonts and layouts things via xorg.conf; i just don't like editing system config files if i can live without doing it.
 

nekoexmachina

Well-Known Member

Reaction score: 32
Messages: 341

Yup. But I do not use hal, just because i dont see any features that are good enough to write that giant scary xml files :)
 

Beastie

Daemon

Reaction score: 548
Messages: 2,275

One can always compile Xorg without HAL support.

But xorg.conf is not deprecated at all when you need to customize your setup, e.g. have a very specific set of display modes, set DPMS options, set keyboard/mouse options, configure 2D/3D acceleration and the dozens of available options, etc.
Many of these cannot be passed to Xserver from command-line. Removing support for xorg.conf completely would be THE most stupid decision ever made by the X.Org foundation.
 

Beastie

Daemon

Reaction score: 548
Messages: 2,275

It isn't. But some people consider it to be useless because xinit/startx can run the Xserver successfully without one or because they are happy with the defaults.
In some cases, none of these conditions are met, so the file should never be deprecated.
 
OP
sk8harddiefast

sk8harddiefast

Daemon

Reaction score: 205
Messages: 2,157

if i have this file: gputemp.sh
Inside this file i have this line:
Code:
#!/bin/sh

nvidia-settings -q gpucoretemp |grep '):' | cut -d ' ' -f 6,6 | sed -e 's/.\{1\}$//'
what i suppose to write on .xinitrc?
 

Beastie

Daemon

Reaction score: 548
Messages: 2,275

The third line?

Anyway what does nvidia-settings do? It seems to be a monitoring command (that reports the GPU temperature?) or something. What's the point of having that in .xinitrc?
 
OP
sk8harddiefast

sk8harddiefast

Daemon

Reaction score: 205
Messages: 2,157

Yeap :) My conky horizontal bar is full of data and i want to send some scripts to dwm bar.So i was wondering if i can put gpu temp there.Now my dwm bar has only date & time
 

paean

Active Member

Reaction score: 10
Messages: 111

@sk8harddiefast: It might be more useful to run conky in your .xinitrc and put the nvidia-settings command in your conkyrc.
 
OP
sk8harddiefast

sk8harddiefast

Daemon

Reaction score: 205
Messages: 2,157

the problem is that conky is moving :(
so if is completely full my conky bar,when i am doing something and my cpu going from 1% to 100 % all conky is moving and some data that they are on the end of my screen,then are out of my screen :(
An alternative is to make conky stop moving.But how?
 

paean

Active Member

Reaction score: 10
Messages: 111

When you say "end of my screen" do you mean the right edge or bottom edge? I had a similar problem with things moving left and right when the # of characters increased and decreased ("1%" being 2 chars and "100%" being 4 chars).

What I ended up doing was keeping all numbers on the far right of each line, and keeping all numbers that could change on separate lines. If that isn't clear enough, I can post a screetshot of the script.
 
OP
sk8harddiefast

sk8harddiefast

Daemon

Reaction score: 205
Messages: 2,157

i mean that if i had dual monitor i could see the rest of the line :)
or if my screen was not 1920x1200 but 1950x1200!
the last is the temparure of my nvidia.But sows like that:
Nvidia:GForce 8800GTX,Tem| and here is the end of my screen!
Tem is the half temprature!The other is gone for holidays somewhere on space out of the planet of 1920x1200 of my screen :p
 

paean

Active Member

Reaction score: 10
Messages: 111

First thing I would do is play with the gap_x and gap_y numbers in your conkyrc for positioning.

There are different border parameters. Change them one at a time to see which one makes the difference.
 
OP
sk8harddiefast

sk8harddiefast

Daemon

Reaction score: 205
Messages: 2,157

I have tried already that.
for my 1920x1200 resolution:
Code:
gap_x 0
gap_y 4
minimum_size 1920 5
maximum_width 1920
 
Top