You are not logged in.
The temperature variable is only set in the beginning of the script. The "while"-loop isn't checking it again.
Try something like this:
#!/usr/bin/env bash i3status | while read do # Temperature T="$(acpi -t | awk '{print $4}')" # Battery B="$(acpi -b | awk '{print $4}' | tr -d ',')" [ -z "$B" ] && B="AC" echo "$T °C | $B | $REPLY" || exit 1 done
,,,didn't see that.
Thank you, Isola.
arst
Offline
@teh here is a small (offtopic) suggestion for your script
BATT=$(acpi -b | awk '{print $4}' | tr -d ',')
AC=`cat /sys/class/power_supply/AC/online`
That path should contain 1 or 0 depending on AC status.
Offline
Heya just starting out with i3. I'm trying to make 2 dzen2 bars display at the top of two monitors but can't seem to get it work. I tried these:
exec_always conky -c $HOME/.conkyrctop | dzen2 -y 0 -w 683 -h 18 -x 683 -p -ta r -bg "#101010" -fn "Terminus-8" -dock
exec_always $HOME/bin/mpd-controls.sh
mpd-controls.sh is:
#!/bin/sh
while true; do
POS=`mpc | sed -ne 's/^.*(\([0-9]*\)%).*$/\1/p'`
echo -n " ^fg(#505050)[ ^ca(1,mpc prev)^fg(#b7e234)^i(/path/to/.dzen/xbm8x8/prev.xbm)^ca() ^ca(1,mpc toggle)^i(/path/to/.dzen/xbm8x8/play.xbm)^ca() ^ca(1,mpc pause)^i(/home/path/to/.dzen/xbm8x8/pause.xbm)^ca() ^ca(1,mpc stop)^i(/path/to/.dzen/xbm8x8/stop.xbm)^ca() ^ca(1,mpc next)^i(/home/path/to/.dzen/xbm8x8/next.xbm)^ca() ^fg(#a0a0a0)$POS% ^fg(#505050)]"
echo -n " ^fg(#b7e234)^i(/home/path/to/.dzen/xbm8x8/phones.xbm) ^fg(#a0a0a0)"
echo "`mpc | sed -n '1p'`"
sleep 1;
done | dzen2 -y 0 -p -w 683 -h 18 -ta l -bg "#101010" -fg "#a0a0a0" -fn "Terminus-8" -dock
When I try this, I get this output:
Not exactly sure what the problem is (or perhaps it's dzen?) but this one works fine with xmonad. I was hoping to align those two bars to appear as one. Also, any ideas how I could make it output on both monitors?
Offline
i would like to replace kwin with i3, is there any possibility to run kwallet in the background to provide passwords for chromium or thunderbird?
Offline
hi i am working on i3 and matchbox-desktop. I'd like to lauch an application from the launcher, send it to "main" workspace and automatically go there is this possible ?
I ve used assign '*' main and it works for sending the app to main workspace but I cant figure out how to go to this workspace the same time. Thx in advance.
Offline
@ dimchris
What do you want to say with "main" workspace ? I can not find the word "main" in the whole i3 user guide .
Do you use only one workspace and another only for launching applications? As far as i know matchbox-desktop is made for pda-style devices, on which this setup would make sense.
It is possible to automatically go to a workspace using a shell command:
# i3-msg workspace 3
will send you to workspace 3.
If you have a very special or unusual setup please make your own thread and link to it from here.
Offline
@ dimchris
What do you want to say with "main" workspace ? I can not find the word "main" in the whole i3 user guide .
Do you use only one workspace and another only for launching applications? As far as i know matchbox-desktop is made for pda-style devices, on which this setup would make sense.
It is possible to automatically go to a workspace using a shell command:
# i3-msg workspace 3
will send you to workspace 3.
If you have a very special or unusual setup please make your own thread and link to it from here.
Hi and thanks for your reply. I have several worplaces one of them is named "main" its purpose is for applications which have not been assigned to any other workspaces. This is the story: I want after logging in the system matchbox-launcher to start on "Applications" workspace. From there I want to choose my application and then automatically move the app to the appropriate workspace and switch to that workplace. I've already done this part. Now I want to figure out how to switch back to "Application" workspace, where the launcher is, when the working workspace is completelly empty.
This is my config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. ISO 10646 = Unicode
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and
# chose an xft font, such as:
# font xft:DejaVu Sans Mono 10
## WORKSPACE App Specs (obxprop | grep WM_CLASS)
workspace main
workspace net
#workspace term
workspace mm
workspace im
workspace torr
workspace other
workspace presentation
workspace gimp
workspace Applications
assign "luaki" net
#assign "terminal" term
assign "skype" ~im
assign "ekiga" ~im
assign "gimp" gimp
assign "MPlayer" ~
assign "Desktop" Applications
assign "*" main
# Options
focus_follows_mouse no
workspace_bar no
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec gnome-terminal
# kill focused window
bindsym $mod+q kill;workspace Applications
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindcode $mod+d focus child
# switch to workspace
bindsym $mod+1 workspace main
bindsym $mod+2 workspace net
bindsym $mod+3 workspace term
bindsym $mod+4 workspace mm
bindsym $mod+5 workspace im
bindsym $mod+6 workspace torr
bindsym $mod+7 workspace other
bindsym $mod+8 workspace presentation
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace main;workspace main
bindsym $mod+Shift+2 move container to workspace net;workspace net
bindsym $mod+Shift+3 move container to workspace term;workspace term
bindsym $mod+Shift+4 move container to workspace mm;workspace mm
bindsym $mod+Shift+5 move container to workspace im;workspace im
bindsym $mod+Shift+6 move container to workspace torr;workspace torr
bindsym $mod+Shift+7 move container to workspace other;workspace other
bindsym $mod+Shift+8 move container to workspace presentation;workspace presentation
# next/previous workspace
bindsym Mod1+Tab workspace next_on_output
bindsym $mod+Tab workspace back_and_forth
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.aosd_volume volup
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.aosd_volume voldown
bindsym XF86AudioMute exec ~/.--no-startup-id aosd_volume mute
bindsym XF86WWW exec luakit;workspace net
bindsym XF86Mail exec luakit www.gmail.com
#bindsym XF86Launch1 exec dmenu_run
bindsym XF86Launch1 workspace Applications
bindsym Shift+XF86Launch1 exec --no-startup-id dmenfm
bindsym Shift+XF86PowerOff exec --no-startup-id i3lock -i Pictures/Wallpapers/Arch_linux/1280x800.png
bindsym $mod+r mode "resize"
bindsym XF86PowerOff exec --no-startup-id ~/.powerb
# window rules
for_window [title="^"] workspace main
for_window [title="Options"] floating enable
for_window [title="mplayer2"] floating enable
for_window [class="Skype"] floating enable;workspace im
for_window [class="Ekiga"] floating enable;workspace im
for_window [class="luakit"] workspace net
for_window [class="Gimp"] border none;workspace gimp
for_window [title="TeamViewer"] floating enable
for_window [title="Unlock keyring"] floating enable
for_window [title="feh"] floating enable
#autostart
exec --no-startup-id setxkbmap -layout us,gr -option grp:alt_shift_toggle&
exec --no-startup-id dunst &
exec matchbox-desktop &
#COLORS #border #bkgrnd #text #
#######
client.focused #333333 #000000 #EEEEEE
client.focused_inactive #333333 #5F676A #EEEEEE
client.focused_inactive #333333 #5F676A #EEEEEE
client.unfocused #333333 #222222 #888888 #292d2e
client.urgent #2f343a #900000 #ffffff #900000
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
mode hide
status_command i3status
}
Offline
I don't know if anyone has posted this and it's not mentioned in the manual, but I figured out how to have Emacs-like chained/mode key bindings, e.g. "Mod1+E Mod1+F". I did it by using i3 modes, like the "resize" mode that's in the default config. Here is an example:
mode "folders" {
bindsym d exec thunar /home/user/Downloads, mode "default"
bindsym h exec thunar /home/user, mode "default"
bindsym m exec thunar /home/user/Media, mode "default"
bindsym u exec thunar /home/user/Uni, mode "default"
}
bindsym $mod+y mode "folders"
With this config I can start by pressing mod4+y, release these keys, and press one of d/h/m/u for the folder of my choice. The bound commands also return to the default mode, apart from opening the application.
Last edited by spupy (2012-10-23 10:39:39)
There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.
Offline
Re emacs binding:
Amazing, I asked about it earlier on the I3 FAQ earlier, but the developer said it wasn't available at that time.
Thanks for sharing,
--Rasmus
Arch x64 on Thinkpad X200s/W530
Offline
new to i3 & would like to use existing xfce4-panel with it for the moment.
2 issues:
1. panel will not auto-hide
2. can i get the workspace selector to work?
any ideas?
If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf
Offline
I don't know if anyone has posted this and it's not mentioned in the manual, but I figured out how to have Emacs-like chained/mode key bindings, "Mod1+E Mod1+F". I did it by using i3 modes, like the "resize" mode that's in the default config. Here is an example:
mode "folders" { bindsym d exec thunar /home/user/Downloads, mode "default" bindsym h exec thunar /home/user, mode "default" bindsym m exec thunar /home/user/Media, mode "default" bindsym u exec thunar /home/user/Uni, mode "default" } bindsym $mod+y mode "folders"
With this config I can start by pressing mod4+y, release these keys, and press one of d/h/m/u for the folder of my choice. The bound commands also return to the default mode, apart from opening the application.
Woah, brilliant! Thanks a lot for this tip.
Offline
Hi,
I have just installed i3 and I am trying to get everything to work... So far, so good, but there is one thing annoying me with nm-applet.
nm-applet is running but I have to enter the password for my VPN connections manually. I've tried the following:
-gnome-keyring-dameon is launched at startup
-polkit-gnome-authentication-agent-1 is launched at startup
-I use slim as a DM -> etc/pam.d/slim added pam_gnome_keyring.so there
Is there anything I am missing?
I also run xfce4 and passwords for VPN are correctly stored there in nm-applet
Last edited by geekmiki (2012-11-27 23:13:13)
Offline
Regarding modes, a patch was pushed to i3's "next" branch a bit ago that adds a mode indicator next to your workspaces indicators if you're using i3bar - it, by default, is a solid red box with the mode in white within. It's pretty neat
Offline
Is there a way to remove window border, and window title in i3 ?
Offline
Is there a way to remove window border, and window title in i3 ?
mod F
If I'm curt with you it's because time is a factor. I think fast, I talk fast and I need you guys to act fast if you wanna get out of this. So, pretty please... with sugar on top. Clean the [censored] car. -The Wolf
Offline
Is there a way to remove window border, and window title in i3 ?
Offline
maattd wrote:Is there a way to remove window border, and window title in i3 ?
Thanks, I have achieved it with a combinaison of "new_window none" and 'hide_edge_borders both"
(For mod-F, it makes it fullscreen so one window only, it wasn't what i wanted )
Last edited by maattd (2012-12-02 20:14:28)
Offline
Hi, last week i came up with a decent way to choose the way i3 is configured on startup and on the fly, now i share the idea here. I use two different config files config_desktop and config_laptop, where config_desktop is optimized for big screens. To allow changing the config file i set up a symlink in /tmp like here:
ln -sf ~/.i3/config_desktop /tmp/i3config
Then point i3 to the link in .xinitrc like so:
~/.xinitrc
exec i3 -c /tmp/i3config > /tmp/i3log 2>&1
Whenever i log in to the first tty i get prompted by my .bash_profile to choose Desktop or Laptop mode:
~/.bash_profile
echo "Choose a Window Manager Mode: (d)esktop or (l)aptop."
read I3MODE
if [ "$I3MODE" = "d" ]; then
ln -sf ~/.i3/config_desktop /tmp/i3config
exec startx
elif [ "$I3MODE" = "l" ]; then
ln -sf ~/.i3/config_laptop /tmp/i3config
exec startx
else
echo "Choose a valid Window Manager Mode : (d)esktop or (l)aptop. Run ~/.bash_profile ."
fi
If you want to change from Desktop to Laptop Mode or back just use an alias for this command:
ln -sf ~/.i3/config_laptop /tmp/i3config
Now restart in-place with a keybinding or i3-msg. The new Laptop Mode is loaded conviniently without loosing your windows or session.
Of course the name of the config files / modes and number of modes is up to you.
Offline
I'm using conky to output some JSON code to i3bar. It works but there is a pipe symbol separating the entries...
Here is the conky config:
TEXT
[{"full_text" : "${loadavg 1} ${loadavg 2} " , "color" : "\#60da11" } ,
{ "full_text" : "${battery_short} " , "color" : "\#1161d9" } ,
{ "full_text" : "${time %H:%M %a %d %b} " , "color" : "\#d91161" } ,
]
and it's called like this:
#!/bin/sh
echo '{ "version": 1 }'
echo '['
echo '[],'
exec conky -c $HOME/.i3/i3_conky.conf
The "full_text" items are there with the proper colors, but white pipe symbols "|" are displayed between them. Any idea what does that and how to stop it?
There are two types of people in this world - those who can count to 10 by using their fingers, and those who can count to 1023.
Offline
Hi,
Is this possible in i3:
- create a workspace (er, tag?) with a custom name not just integer as name?
- display client on multiple workspaces?
- call a 'find client' menu with some sort of autocompletion?
Offline
Hi,
Is this possible in i3:
- create a workspace (er, tag?) with a custom name not just integer as name?
Yes. With the keyword 'number'. See 6.5 in the User's Guide.
move [window|container] [to] workspace number <name>
- display client on multiple workspaces?
No.
- call a 'find client' menu with some sort of autocompletion?
Not directly in i3, but there are external scripts that can do that for you. Have a look at the winmenu-example of a Python i3-IPC library.
Offline
Thanks for info!
Offline
Hi, I just switched to i3 from xfce4 a few days ago and am loving it. The only thing I miss is having vsync.
Haven't got much to share, but if anyone else is annoyed by i3 taking all the best keyboard shortcuts without wanting to compromise on the configuration, an empty mode helped me. Thanks to spupy for bringing up fun with modes!
# Disable i3 commands with an empty mode.
mode "insert" {
bindsym Super_L mode "default"
}
bindsym Super_L mode "insert"
Offline
Finally changed my window manager after a long period. Was using dwm for the
past 3yrs or so.
Didn't even change my dwm configuration much for the past year or so. But, I
was missing tray support in dwm. I know that dwm 6 has tray included, but I
was tired of all the patching, so decided to give i3 a try.
Coming from dwm, the keybindings were quite awkward, so I had to change the
defaults. In fact I have changed almost all the keybindings to match my dwm
keybindings.
One thing I don't like much is that the titles can't be disabled for the
tabbed mode.
On a related note, I would like to know if there is a way to display the
titles in i3bar, dwm style, i.e., next to the workspace list.
I spent the better part of the last 2 days reading the documentation and configuring i3.
Anyway, I feel that not enough people have shared their configurations (to
steal ideas from ), so here's mine:
Edit: didn't know there's a separate thread for that ...
Anyway, here's the link:
https://bbs.archlinux.org/viewtopic.php … 2#p1212792
Two more things:
1. A few pages back, I saw trilby asking how to cycle between the layouts,
don't know if it was available back then, but now it can be done like:
bindsym $mod+space layout toggle all
2. Also, to go to an urgent workspace (it wasn't clear from the documentation),
sorted by the latest:
bindsym $mod+u [urgent="latest"] focus
Last edited by x33a (2013-01-02 08:09:16)
Offline
Edit: looks like you need to do a full restart to get the title bars to hide.
Last edited by Hspasta (2013-01-06 03:11:01)
Offline