You are not logged in.
Thanks a lot teateawhy and Trilby. I was starting to think this functionality would be nice.
Edit: I'd like (to try) a (number)-pixel border, is there an easy way to do this? I haven't been able to find one...
Last edited by D. (2012-08-09 17:51:06)
Offline
Is there a way to make unfocused windows slightly transparent in combination with a composition manager, like xcompmgr and cairo-compmgr?
Check if the compositor itself has an option; compton has -i, for instance.
Offline
Isola wrote:Is there a way to make unfocused windows slightly transparent in combination with a composition manager, like xcompmgr and cairo-compmgr?
Check if the compositor itself has an option; compton has -i, for instance.
I tried compton, and while it works in all WMs I tried, it doesn't work as expected in i3. Thank you anyway
Back to my progress in i3
I also discovered I had "black bars" around some transparent URxvt windows just like another user had in this thread. I "solved" this by using my wallpaper as the background image for URxvt with the following settings in ~/.Xdefaults
URxvt*backgroundPixmap: /home/me/picture/wallpaper.png\;style=root-tiled
Then to simulate the "focused window is 0% transparent, others are 50%" effect I also have these settings:
URxvt*fading: 50
URxvt*fadeColor: #292929
The fadeColor is very similar to the average color of my wallpaper, so it blends in pretty well
I've also put together a ugly little bash script to pull up a dmenu with the title of all the windows. The selected window in dmenu will be focused.
#!/bin/bash
DMENU_OPTS="-fn -*-proggyoptis-*-*-*-*-*-*-*-*-*-*-*-* -nb #292929 -nf #a3a3a3 -sb #383738 -sf #bababa -b -l 18 -p $(basename $0)"
# Present a menu with all windows
TITLE="$(i3-msg -t get_tree | python -mjson.tool | sed -n -e 's/^ \{35\}[ ]\+\"name\": \"\(.*\)\", $/\1/p' | sed '/^#[a-F0-9]\{6\}$/d' | dmenu $DMENU_OPTS)"
if [ -z "$TITLE" ] ; then
exit 1
fi
# Escape some characters to prevent i3 to interpret them as a pattern
# "(" and ")" replaced with "\(" and "\)"
TITLE="$(echo "$TITLE" | sed 's/\([()]\)/\\\1/g')"
# Focus window
i3-msg "[title=\"$TITLE\"] focus"
Someone can probably rewrite this in a language that can parse json easily. I hope someone finds it helpful anyway!
Offline
I also discovered I had "black bars" around some transparent URxvt windows just like another user had in this thread. I "solved" this by using my wallpaper as the background image for URxvt with the following settings in ~/.Xdefaults
I wound up adding the patch from rxvt-unicode-noinc to rxvt-unicode-patched (both in the aur) - now it works great using the usual pixmap
I probably missed it in the 700-odd posts here, but is there any in-i3 method to get a transparent status bar, or should I start looking at alternatives to i3bar? I know it's stupid eye-candy, but I do want just a little bit ;-;
Last edited by ZekeSulastin (2012-08-16 03:43:08)
Offline
I was wondering if it is possible to "overlay" the i3bar with dzen2 but just for the space between workspaceindicators and tray-icons?
Offline
hey guys if anyone is having issues with the rxvt with borders or padding issues i added a package on the AUR url is https://aur.archlinux.org/packages.php?ID=62206
this should fix the issue
Last edited by booglybear (2012-08-22 14:59:44)
Offline
Hello everyone,
After trying to use awesome window manager and failing to get the widgets and what I wanted up and running (probably due to my lack of interest in learning lua), I've decided to switch to i3.
So far, everything is going much better, but I am still having problems with:
1) Is it possible to have a bindsym action that starts, say ALSA in terminal, after you press it? I know you can easily do it with other applications by using exec ..., but I am unsure of how to issue "secondary commands" if you will.
2) I'm confused about how to get several virtual desktops to begin, within which respective programs automatically begin. So 1 could be internet and opens firefox on i3 startup, 2 could be programming and opens up a terminal and gvm, etc.
and
3) Less important, is it possible to make windows slightly transparent so that you can still see the background?
Thanks for reading, and I appreciate any replies to my questions.
- Peter
Offline
3) Less important, is it possible to make windows slightly transparent so that you can still see the background?
Maybe with a composite manager like xcompmgr, compton or Cairo Compmgr
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
3) Less important, is it possible to make windows slightly transparent so that you can still see the background?
Maybe with a composite manager like xcompmgr, compton or Cairo Compmgr
I might look more into this once I get the majority of everything set up then.
Offline
Hello everyone,
h:1) Is it possible to have a bindsym action that starts, say ALSA in terminal, after you press it? I know you can easily do it with other applications by using exec ..., but I am unsure of how to issue "secondary commands" if you will.
I just use scripts, then exec /home/scripts.script.sh [that obviosuly has your secondary commands therein]
Don't know if there is a better way
Offline
PPeter wrote:Hello everyone,
h:1) Is it possible to have a bindsym action that starts, say ALSA in terminal, after you press it? I know you can easily do it with other applications by using exec ..., but I am unsure of how to issue "secondary commands" if you will.
I just use scripts, then exec /home/scripts.script.sh [that obviosuly has your secondary commands therein]
Don't know if there is a better way
If you use uxrvt, you can simply add the -e argument. E.g. to start htop in a new terminal
urxvt -e htop
Not sure whether other terminal emulators have a similar option.
Offline
Ever terminal I've used has an option like that. For quite of a few of them it is "-e".
Note that in some cases, to get the proper environment variables passed you may need something like:
urxvt -e "/bin/bash -i -c vim"
To launch vim in urxvtc.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Online
2) I'm confused about how to get several virtual desktops to begin, within which respective programs automatically begin. So 1 could be internet and opens firefox on i3 startup, 2 could be programming and opens up a terminal and gvm, etc.
Try something like that:
# launch firefox on startup
exec firefox
# open firefox windows on workspace 1
assign [class="^Firefox"] → 1
If you want a new terminal on a specific workspace but do not want to open all terminals on this workspace, here is a way with urxvt:
# start urxvt with a specific instance name
# xprop on that instance will return WM_CLASS(STRING) = "programming", "URxvt"
exec urxvt -name programming
assign [class="^URxvt$" instance="^programming$"] → 2
Offline
PPeter wrote:2) I'm confused about how to get several virtual desktops to begin, within which respective programs automatically begin. So 1 could be internet and opens firefox on i3 startup, 2 could be programming and opens up a terminal and gvm, etc.
Try something like that:
# launch firefox on startup exec firefox # open firefox windows on workspace 1 assign [class="^Firefox"] → 1
If you want a new terminal on a specific workspace but do not want to open all terminals on this workspace, here is a way with urxvt:
# start urxvt with a specific instance name # xprop on that instance will return WM_CLASS(STRING) = "programming", "URxvt" exec urxvt -name programming assign [class="^URxvt$" instance="^programming$"] → 2
I tried this with the following:
exec firefox -name fox1
assign [class="^Firefox$" instance="^fox1$"] → 2: I-Net
exec urxvt -name term1
exec gvim -name gvim1
assign [class="^URxvt$" instance="^term1$"] → 3: Prog
assign [class="^Gvim$" instance="^gvim1$"] → 3: Prog
exec gimp -name gimp1
assign [class="^Gimp$" instance="^gimp1$"] → 4: Gimp
Except, firefox would start on the first desktop, urxvt and gvim would properly start on 3: Prog, and gimp wouldn't even start. Regardless of what I tried, firefox and gimp would not begin how I wanted it to begin.
Offline
@PPeter:
gimp and firefox have no -name option (I didn't know gvim has a such option ).
exec firefox
assign [class="^Firefox$"] → 2: I-Net
exec urxvt -name term1
exec gvim -name gvim1
assign [class="^URxvt$" instance="^term1$"] → 3: Prog
assign [class="^Gvim$" instance="^gvim1$"] → 3: Prog
exec gimp
assign [class="^Gimp$"] → 4: Gimp
Offline
PPeter wrote:2) I'm confused about how to get several virtual desktops to begin, within which respective programs automatically begin. So 1 could be internet and opens firefox on i3 startup, 2 could be programming and opens up a terminal and gvm, etc.
Try something like that:
# launch firefox on startup exec firefox # open firefox windows on workspace 1 assign [class="^Firefox"] → 1
I don't know how i3 exactly works, but this seems to have two problems:
There's a race-condition: firefox is executed first and then the assing-rule is created, so it may happen that firefox is faster. The fix is to swap the exec and the assign line. (Or is there no problem because all assign-settings are applied after the configuration is read entirely?)
It doesn't only assign the first Firefox instance on startup to workspace 1, but *all* firefox windows that are opened. (I don't know how to fix this in i3)
Offline
@PPeter:
gimp and firefox have no -name option (I didn't know gvim has a such option ).
Guess I got lucky with this one
exec firefox assign [class="^Firefox$"] → 2: I-Net exec urxvt -name term1 exec gvim -name gvim1 assign [class="^URxvt$" instance="^term1$"] → 3: Prog assign [class="^Gvim$" instance="^gvim1$"] → 3: Prog exec gimp assign [class="^Gimp$"] → 4: Gimp
Is there someway to "de-assign" a class from a workspace? After it opens the first one, I want to be able to open it at any desktop afterwards (so have the initial firefox on 2: I-Net, and then any other ones on whatever desktop I currently am on).
Is there a faster way to check whether I'd be able to change the instance name? Using gvim and urxvt as examples, when I checked the man page for urxvt, I saw the option -name, but not for the vim man page.
Last edited by PPeter (2012-08-31 00:19:09)
Offline
There's a race-condition: firefox is executed first and then the assing-rule is created, so it may happen that firefox is faster. The fix is to swap the exec and the assign line. (Or is there no problem because all assign-settings are applied after the configuration is read entirely?)
All exec statements are executed after the config file is entirely read (in cfgparse.y, there is a loop over an autostart list at the end of the config load function).
Is there someway to "de-assign" a class from a workspace? After it opens the first one, I want to be able to open it at any desktop afterwards (so have the initial firefox on 2: I-Net, and then any other ones on whatever desktop I currently am on).
There is no "de-assign" command. The behaviour you want can be achieved with an external script.
Here is an example of autostart script: https://github.com/fhaun/config-misc/bl … art-for-i3 (found at i3 FAQ).
You could have a script like that:
#!/bin/bash
# requires xdotool
# Wait for program coming up
wait_for_program () {
n=0
while (( n++ < 20 )) ; do
# PID of last background command
xdotool search --onlyvisible --pid $! && return
sleep 1
done
# timeout
xmessage "Error on executing"
}
firefox &
wait_for_program
i3-msg '[class="^Firefox$"] focus ; move workspace 2: I-Net'
and execute at i3 start with an exec statement (there is no need for assign statement then).
Is there a faster way to check whether I'd be able to change the instance name? Using gvim and urxvt as examples, when I checked the man page for urxvt, I saw the option -name, but not for the vim man page.
The most useful software is sometimes rendered useless by poor or altogether missing documentation.
The faster way is indeed checking the documentation.
EDIT: corrected example script
Last edited by PotatoesMaster (2012-09-02 00:25:29)
Offline
You could have a script like that:
#!/bin/bash # requires xdotool # Wait for program coming up wait_for_program () { n=0 while (( n++ < 20 )) ; do # PID of last background command xdotool search --onlyvisible --pid $! && return done # timeout xmessage "Error on executing" } firefox & wait_for_program i3-msg '[class="^Firefox$"] focus ; move workspace 2: I-Net'
and execute at i3 start with an exec statement (there is no need for assign statement then).
I tried running this script, but it wouldn't work (and yes I installed xdotool before someone asks me if I did )
Offline
Offline
PotatoesMaster, you are a godsend. It's working now. And you've convinced me to learn bash script myself. Thanks for all the help.
Offline
I have a three more questions
The title of some windows become "another container". Is it possible to change this title somehow?
In some situations when I close a window I end up with the most parent window focused. Is there a way to change this behavior to focus "last focused window" or similar?
Is there a way to make the workspaces permanent showing or at least order them in alphanum order?
Offline
A note concerning the startup of terminal applications in urxvt:
If you run mutt on startup and want to move it to workspace mail you need two commands.
exec urxvt -e mutt
assign [title="mutt$"] 10:mail
For urxvt you do not need the -title option, because the title is set to the command name, in this case "mutt" in any way.
Offline
Is there a way to make the workspaces permanent showing or at least order them in alphanum order?
To show them in order, start their names with a number. For example, I have
set $1 1: main
set $2 2: term
set $3 3: www
...
as my workspace names. Workspaces that start with a number are shown in order. Don't know about making them permanent...
Offline
Isola wrote:Is there a way to make the workspaces permanent showing or at least order them in alphanum order?
To show them in order, start their names with a number. For example, I have
set $1 1: main set $2 2: term set $3 3: www ...
as my workspace names. Workspaces that start with a number are shown in order. Don't know about making them permanent...
Thank you, this works! I just saw in the documentation that if a workspace is prefixed with a number it's treated differently
Offline