You are not logged in.

#901 2013-05-28 21:16:55

nixpunk
Member
Registered: 2009-11-23
Posts: 267

Re: The i3 thread

msthev, yes I am.  I will try that and let you know what happens.

Offline

#902 2013-05-29 06:38:13

Drumitar
Member
Registered: 2011-04-13
Posts: 73

Re: The i3 thread

okay another quick question i have applications set to specific workspaces, is there a way i can get the workspaces to switch to the newly launched application ? ex) if im on workspace 1 and i launch chromium to workspace 3, can i automatically go from 1 to 3 ?

Offline

#903 2013-05-29 06:57:57

PotatoesMaster
Member
From: France
Registered: 2010-08-26
Posts: 54

Re: The i3 thread

@Drumitar, you can execute i3 commands on application start using 'for_window':

assign [class="^Firefox$"] → 3
for_window [class="^Firefox$"] workspace 3

Offline

#904 2013-05-29 22:06:09

nixpunk
Member
Registered: 2009-11-23
Posts: 267

Re: The i3 thread

Conky is still flickering for me.  I've tried all sorts of things, such as changing my update_interval and double_buffer values.  Here's my .conkyrc:

out_to_x no
own_window no
out_to_console yes
background no
max_text_width 0

# Update interval in seconds
update_interval 2.5

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

# How strict should if_up be when testing an interface for being up?
# The value is one of up, link or address, to check for the interface
# being solely up, being up and having link or being up, having link
# and an assigned IP address. 
if_up_strictness address

# Add spaces to keep things from moving about?  This only affects certain objects.
# use_spacer should have an argument of left, right, or none
use_spacer left


# Force UTF8? note that UTF8 support required XFT
override_utf8_locale no

# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2

max_text_width 0
double_buffer yes

# Colors
# green: #00FF00
# blue: #0F2BFD

TEXT

[
 {     # create leftmost separator 
	"full_text" : " ", 
	"color" : "\#00FF00" 
 },

 {
	"full_text" : "wlan0", 
	"color" : "\#00FF00", 
	"separator" : false 
 },

 {
	"full_text" : "'${wireless_essid wlan0}'", 
	"color" : "\#60A0DC" 
 },

 {
	"full_text" : "Up", 
	"color" : "\#00FF00", 
	"separator" : false 
 },

 {
	"full_text" : "${upspeed wlan0}", 
	"color" : "\#60A0DC" 
 },

 {
	"full_text" : "Down", 
	"color" : "\#00FF00", 
	"separator" : false 
 },

 {
	"full_text" : "${downspeed wlan0}", 
	"color" : "\#60A0DC" 
 },

 {
	"full_text" : "BAT0 ", 
	"color" : "\#00FF00", 
	"separator" : false 
 },

 {
	"full_text" : "${smapi_bat_perc 0}%", 
	"color" : "\#60A0DC", 
	"separator" : false 
 },

 {
	"full_text" : 
		${if_match ${smapi ac_connected}<1}"-"
		${else}"+"
		${endif},  
	"color" :  
		${if_match ${smapi ac_connected}<1}"\#FF0000"
		${else}"\#60A0DC"
		${endif} 
 },

 {
	"full_text" : "HDD", 
	"color" : "\#00FF00", 
	"separator" : false 
 },

 {
	"full_text" : "${hddtemp /dev/sda}°C", 
	"color" : "\#60A0DC"
 },

 {
	"full_text" : "CPU", 
	"color" : "\#00FF00", 
	"separator" : false 
 },

 {
	"full_text" : "${ibm_temps 0}°C", 
	"color" : "\#60A0DC"
 },

 {
	"full_text" : "FAN", 
	"color" : "\#00FF00",
	"separator" : false 
 },

 {
	"full_text" : "${ibm_fan}RPM", 
	"color" : "\#60A0DC" 
 },

# {
#	"full_text" : "W", 
#	"color" : "\#00FF00",
#	"separator" : false 
# },

# {
#	"full_text" : "${execpi 1200 /home/nixpunk/bin/weather.sh 60622}", 
#	"color" : "\#60A0DC"
# },

 {
	"full_text" : "${time %a %m-%d %H:%M}", 
	"color" : "\#00FF00"
 },

 {
	"full_text" : "", 
	"color" : "\#00FF00" 
 }
],

Offline

#905 2013-05-30 00:11:19

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: The i3 thread

I said only about making Conky's output be one (physical) line per one status line, and I don't see it in your config (your Conky outputs about *150 lines* per one statusline).

What I mean by bad config:

[
{"full_text":"something"},
{"full_text":"something else"},
{"full_text":"blablabla"}
],

Conky's output is then literally piped into i3bar, which is bad, because i3bar reads its input line by line, and it gets angry when JSON array is longer than one line (thus the flickering). Just to be clear, here is what i3bar has to read (again, line by line):

[
{"full_text":"something"},
{"full_text":"something else"},
{"full_text":"blablabla"}
],

Now the fix is rather trivial; here is a good version of the above config:

[\
{"full_text":"something"},\
{"full_text":"something else"},\
{"full_text":"blablabla"}\
],

Now for each iteration i3bar will read this:

[{"full_text":"something"},{"full_text":"something else"},{"full_text":"blablabla"}],

And that should do it.

Also, I'd suggest you eliminate unnecessary whitespaces (e.g. indentation) — in this case it doesn't really diminish readability, but it should make life easier for i3bar.

Offline

#906 2013-05-30 01:30:51

nixpunk
Member
Registered: 2009-11-23
Posts: 267

Re: The i3 thread

Weird.  I just changed the first 9 blocks of my Conky config as so, leaving the rest the same:

                                                                               
[                                                                               
 {                                                                              
    "full_text" : " ", "color" : "\#00FF00"                                     
 },                                                                             
 {                                                                              
    "full_text" : "wlan0", "color" : "\#00FF00", "separator" : false            
 },                                                                             
 {                                                                              
    "full_text" : "'${wireless_essid wlan0}'", "color" : "\#60A0DC"             
 },                                                                             
 {                                                                              
    "full_text" : "Up", "color" : "\#00FF00", "separator" : false               
 },                                                                             
 {                                                                              
    "full_text" : "${upspeed wlan0}", "color" : "\#60A0DC"                      
 },                                                                             
 {                                                                              
    "full_text" : "Down", "color" : "\#00FF00", "separator" : false             
 },                                                                             
 {                                                                              
    "full_text" : "${downspeed wlan0}", "color" : "\#60A0DC"                    
 },                                                                             
 {                                                                              
    "full_text" : "BAT0 ", "color" : "\#00FF00", "separator" : false            
 },                                                                             
 {                                                                              
    "full_text" : "${smapi_bat_perc 0}%", "color" : "\#60A0DC", "separator" : false 
 },
# rest of blocks below same as before...

And the blinking stopped.  The Conky / JSON combo is definitely touchy, to say the least.

Now I'm happy big_smile

Offline

#907 2013-05-30 08:03:10

Drumitar
Member
Registered: 2011-04-13
Posts: 73

Re: The i3 thread

PotatoesMaster wrote:

@Drumitar, you can execute i3 commands on application start using 'for_window':

assign [class="^Firefox$"] → 3
for_window [class="^Firefox$"] workspace 3

thanks exactly what i wanted !

Offline

#908 2013-05-31 18:12:42

totolotto
Member
From: Hungary
Registered: 2012-11-13
Posts: 107

Re: The i3 thread

Hi,

Executing a calendar program (gsimplecal) with a keybinding in floating mode makes the calendar appear on the screen exactly where the mouse is.

However executing a calculator (galculator-gtk2) is ALWAYS in the middle of the screen which can be inconvenient many times. Is it possible to make galculator behave as gsimplecal?

Offline

#909 2013-06-04 04:55:25

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: The i3 thread

I have been catching up on i3 in past few hours. How do I find what's mod in

floating_modifier $mod

I have used xorg-xev but it won't trigger with left click. I general what should I look into if I want to find out which key is which for i3 purposes.

Offline

#910 2013-06-04 05:08:07

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: The i3 thread

I don't really understand what you are asking here?  $mod is your modifier key.  This is set by your config file, and should be at the top (so that all other instances of $mod expand to this key.  Is that what you are asking?

Edit: I am confused by your inclusion about something to do with left clicking...

Last edited by WonderWoofy (2013-06-04 05:08:38)

Offline

#911 2013-06-04 05:58:56

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: The i3 thread

@WonderWoofy I figured that out pretty quickly after posting above.

For example mod4 is win-key on my system. Is there a tool or command that could show me what key transforms into just like win-key does into mod4?

I am trying to understand floating_modifier [1]. Following is set as floating_modifier in my config.

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

I can already move floating windows using left-click and drag. Tiling window has no effect of left-click and drag irrespective of if $mod is pressed or not. So, what does floating_modifier do? I was thinking it would be nice to just use left-click and drag to switch a window from tiling to floating and be able to move it around.

[1]http://i3wm.org/docs/userguide.html#floating_modifier

Offline

#912 2013-06-04 10:30:36

derhamster
Member
Registered: 2012-07-08
Posts: 86

Re: The i3 thread

When holding down $floating_modifier, you can drag a floating window everywhere inside, not just the titlebar. In fact, there might not even be a titlebar depending on your configuration and the application.

The same is also true for right-click and resizing windows, even tiled ones.

Offline

#913 2013-06-04 15:43:18

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: The i3 thread

@derhamster Are you saying that with $floating_modifier I should be able to drag any window, both tiling and floating, by clicking anywhere. It does work on floating windows but not on tiling. I think $floating_modifier only works on floating windows.

Offline

#914 2013-06-04 16:11:06

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: The i3 thread

Moving only applies to floating windows. Resizing works both on floating and tiling ones ($floating_modifier + right mouse button).

Offline

#915 2013-06-04 17:29:48

derhamster
Member
Registered: 2012-07-08
Posts: 86

Re: The i3 thread

msthev wrote:

Moving only applies to floating windows. Resizing works both on floating and tiling ones ($floating_modifier + right mouse button).

Exactly.

What I meant: Usually you can only drag floating windows by their title bar. But some windows do not have these bars, and you can even configure them to not show, even when there is supposed to be one. This is where $floating_modifier comes into play. Hold it and you can move floating windows, by dragging everywhere inside the window. Not just the title bar.

Offline

#916 2013-06-04 22:29:45

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: The i3 thread

@msthev Using $floating_modifier + right-click on Google Chrome in tiling mode does nothing but open Chrome's right-click menu. So, both dragging and resizing only work in floating mode in my test.

Thanks.

Last edited by donniezazen (2013-06-04 22:30:10)

Offline

#917 2013-06-05 05:39:49

derhamster
Member
Registered: 2012-07-08
Posts: 86

Re: The i3 thread

$floating_modifier + right-click has slightly different behavior, depending on whether the window is tiled or floating:

Tiled: You have to click somewhere near a border adjacent to another window. Resizing does not work in the 'middle' of a window, or at the screen borders. This allows i3 to know which border you want to use for resizing. This does obviously not work, when there is just one window smile

Floating: You can right-click everywhere inside to resize the window. But i3 will still use the border or corner closest to your cursor.

I don't use chrome, but chromium instead. But I get this behavior with every application, chromium included.

Offline

#918 2013-06-29 16:01:22

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,745

Re: The i3 thread

Is there a way to pipe output to i3bar (i3status?) say from a bash script? Say add in volume level or track name from mpd or ram usage?


Mr Green

Offline

#919 2013-06-29 16:10:26

msthev
Member
Registered: 2012-04-05
Posts: 177

Offline

#920 2013-06-29 16:13:25

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,745

Re: The i3 thread

Got it thanks very much,,, had a feeling it would be there wink


Mr Green

Offline

#921 2013-06-30 17:49:36

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 301

Re: The i3 thread

Hey Archers,

I tried to reduce the flickering of my conky/dzen2 i3 bar but alas it has now stopped showing anything & I just get a black bar !!!!

here is my config:

out_to_x no
own_window no
out_to_console yes
double_buffer no
background no
update_interval 1
total_run_times 0
short_units no
if_up_strictness address
use_spacer right
override_utf8_locale yes
use_xft yes
cpu_avg_samples 2
pad_percents 2
mpd_host 192.168.1.250
mpd_port 6600
TEXT

[
{"full_text": "♪:${scroll 37 5 ${mpd_smart}" }, {"full_text": "/:${fs_free /} :${fs_free /home} :${fs_free /public}"}, {"full_text": ":${downspeed eth0} :${upspeed eth0} T:${totaldown eth0}/${totalup eth0}"}, {"full_text": ":${cpu cpu0}% @${exec sensors | grep 'Core0' | cut -c16-19 | sed '/^$/d' }°C" }, {"full_text": ":${memperc}%  ${mem} / ${memmax}  " , "color" : ${if_match ${memperc}>50}"\#bf3f34"${else}"\#a7d800"${endif} }, {"full_text": "${time %a %d/%m/%y} ${time %H:%M}", "color": "\#CC0000" } 
]

can anyone tell me what is wrong with my config because if I remove everything except my clock part it displays but never updates!!!
so I tried running this in a terminal (to debug possible conky errors) & all works

Last edited by t0m5k1 (2013-06-30 17:50:06)


AMD Athlon 64 X2 4200+ - 8GB - GeForce 970 AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820   Last FM

Offline

#922 2013-06-30 17:53:25

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,745

Re: The i3 thread

How are you running conky? do you use a wrapper script? do you get any out from conky if you run it in a terminal?


Mr Green

Offline

#923 2013-06-30 18:13:00

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: The i3 thread

Your JSON output:

<something at the beginning - may be right, may be wrong>
[<statusline>]
[<statusline>]
[<statusline>]
...

Proper JSON output:

{"version":1}
[
[<statusline>],
[<statusline>],
[<statusline>],
...

Also, you don't deal well with the flickering; a single JSON array output by conky should correspond to a single physical line, but there is no need to put everything in the config file in one line (and in fact your config outputs 3 lines per one status tick). Instead of doing

[
{a}, {b}, {c}
],

do

[\
{a},\
{b},\
{c}\
],

Offline

#924 2013-06-30 18:13:47

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 301

Re: The i3 thread

i3 bar config snippet:

bar {
	status_command $HOME/.i3/conky-i3bar
	position	top
}

conky-i3bar script:

#!/bin/sh

# Send the header so that i3bar knows we want to use JSON:
echo '{"version":1}'

# Begin the endless array.
echo '['

# We send an empty first array of blocks to make the loop simpler:
echo '[],'

# Now send blocks with information forever:
exec conky -c $HOME/.conkyrc-i3

conky output in terminal:

┌─(t0m5k1@b0x)-(1847/pts/0)-(07:51pm:30/06/13)-
└─>(%:~)
└─>> conky -c ~/.conkyrc-i3

[
{"full_text": "/:7.83GiB :11.4GiB :2.87GiB"}, {"full_text": ":0B      :0B      T:136MiB /45.6MiB"}, {"full_text": ":2 %@55.0°C" }, {"full_text": ":12%  741MiB  / 5.83GiB  " , "color" : "#a7d800" }, {"full_text": "Sun 30/06/13 19:51:20", "color": "#CC0000" } 
]

[
{"full_text": "/:7.83GiB :11.4GiB :2.87GiB"}, {"full_text": ":0B      :0B      T:136MiB /45.6MiB"}, {"full_text": ":13%@56.0°C" }, {"full_text": ":12%  742MiB  / 5.83GiB  " , "color" : "#a7d800" }, {"full_text": "Sun 30/06/13 19:51:21", "color": "#CC0000" } 
]

[
{"full_text": "/:7.83GiB :11.4GiB :2.87GiB"}, {"full_text": ":30B     :0B      T:136MiB /45.6MiB"}, {"full_text": ":22%@54.0°C" }, {"full_text": ":12%  742MiB  / 5.83GiB  " , "color" : "#a7d800" }, {"full_text": "Sun 30/06/13 19:51:22", "color": "#CC0000" } 
]

[
{"full_text": "/:7.83GiB :11.4GiB :2.87GiB"}, {"full_text": ":30B     :0B      T:136MiB /45.6MiB"}, {"full_text": ":22%@56.0°C" }, {"full_text": ":12%  742MiB  / 5.83GiB  " , "color" : "#a7d800" }, {"full_text": "Sun 30/06/13 19:51:23", "color": "#CC0000" } 
]

[
{"full_text": "/:7.83GiB :11.4GiB :2.87GiB"}, {"full_text": ":0B      :0B      T:136MiB /45.6MiB"}, {"full_text": ":22%@56.0°C" }, {"full_text": ":12%  742MiB  / 5.83GiB  " , "color" : "#a7d800" }, {"full_text": "Sun 30/06/13 19:51:24", "color": "#CC0000" } 

it all worked up until i tried to put it on one line so I put it back & place a \ at the end of each line & now it's buggered sad


AMD Athlon 64 X2 4200+ - 8GB - GeForce 970 AwesomeWM (occasionally XFCE, i3)

If everything in life was easy, we would learn nothing!
Linux User: 401820   Last FM

Offline

#925 2013-06-30 18:18:07

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,745

Re: The i3 thread

Mine looks like this and it outputs to one line

[ { "full_text" : "≣ ${mem}" , "color" : "\#769ebb" },
  { "full_text" : "❤ ${cpu}%" , "color" : "\#769ebb" },
  { "full_text" : "↑${upspeed eth0}", "color" : "\#769ebb" },
  { "full_text" : "↓${downspeed eth0}", "color" : "\#769ebb" },
  { "full_text" : "root = ${fs_used_perc /}%", "color" : ${if_match ${fs_used_perc /}>75}"\#FF0000"${else}"\#769ebb"${endif} },
  { "full_text" : "home = ${if_mounted /home}${fs_used_perc /home}%", "color" : ${if_match ${fs_used_perc /}>75}"\#FF0000"${else}"\#769ebb"${endif}$endif },
  { "full_text" : "tmp = ${fs_used_perc /tmp}%", "color" : ${if_match ${fs_used_perc /tmp}>75}"\#FF0000"${else}"\#769ebb"${endif} },
  { "full_text" : "♪ ${exec amixer get Master | egrep -o "[0-9]+%" | head -1 | egrep -o "[0-9]*"}%" , "color" : "\#769ebb"},
  { "full_text" : "${time %m/%d} " , "color" : "\#769ebb"},
  { "full_text" : "${time %H:%M} " , "color" : "\#769ebb"}
],

Mr Green

Offline

Board footer

Powered by FluxBB