You are not logged in.
Mr Green wrote:Wondering what the preferred method for autostarting applications is in i3? I use config at the moment but thinking about maybe using .xinitrc to set up wallpaper etc..
I use the exec command as explained in the i3 user guide.
+1.
The nice thing about this, is you can place them on the appropriate work space at the start. Like this:
exec --no-startup-id i3-msg 'workspace 10; exec claws-mail; workspace 1'
exec --no-startup-id exec nitrogen --restore
exec --no-startup-id exec compton
exec --no-startup-id exec conky
exec --no-startup-id exec mpd
exec --no-startup-id i3-msg 'workspace 9; emacs;workspace 1'
Here I end up on workspace 1, with claws on workspace 10, emacs on 9, conky and nitrogen everywhere, and mpd in the background.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
It is a very useful command, I use....
$execi i3-msg 'workspace 3:Web; exec /usr/bin/firefox; layout tabbed'
compton in i3 really!
Mr Green
Offline
compton in i3 really!
Hey, I like transparencies.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Question: Is it possible to have a gap between containers currently? If not, is it possible for there to be transparent borders?
Offline
Question: Is it possible to have a gap between containers currently? If not, is it possible for there to be transparent borders?
No and no.
Offline
I tend to make borders the same colour as bar, so they blend in (if that helps)...
Mr Green
Offline
I have used the script suggested in the i3 Wiki page for shutdown, reboot, lock, logout etc. Everything else works, except shutdown/poweroff. Does it work for anyone else?
Offline
Well, it's not easy to guess when you show nothing, but lets start with the most obvious, did you set the path for i3exit in the 'mode' part in your config?
Edit: I see now, only shutdown/poweroff, so my answer is probably worth nothing.
Last edited by qinohe (2013-12-03 16:43:33)
Offline
Yes I just copy pasted the code from the Wiki. It's strange because everything else -- reboot, lock, logout, hibernate, suspend works -- only shutdown doesn't work.
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Pause mode "$mode_system"
#!/bin/sh
lock() {
i3lock
}
case "$1" in
lock)
lock
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
exit 2
esac
exit 0
Offline
Look at this line, and change the rest to your needs.
bindsym l exec --no-startup-id /home/mark/.i3/scripts/i3exit lock, mode "default"
I don't know if that's it, specially since it only don't find shutdown.
Offline
poweroff and reboot should be linked
ls -la /usr/bin/reboot
lrwxrwxrwx 1 root root 9 Oct 21 14:28 /usr/bin/reboot -> systemctl
[~]$ ls -la /usr/bin/poweroff
lrwxrwxrwx 1 root root 9 Oct 21 14:28 /usr/bin/poweroff -> systemctl
Can you run poweroff in a terminal? does it work as your user?
Mr Green
Offline
qinohe: I have tried pretty much everything possible, but with no luck.
Mr Green: Yes I can poweroff from the terminal just fine.
Last edited by pezzonovante (2013-12-03 17:06:37)
Offline
qinohe: I have tried pretty much everything possible, but with no luck.
You did make the script executable?
Offline
Yep it's executable. Otherwise reboot/hibernate/suspend wouldn't work.
Offline
Not sure if this will help wrap case statement and push output to a log/error file
#!/bin/sh
lock() {
i3lock
}
{
case "$1" in
lock)
lock
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
exit 2
esac
} >> log_file
exit 0
Mr Green
Offline
Hey Mr Green, that I couldn't get to work, so I tweaked a little
#!/bin/sh
lock() {
i3lock
}
{
case "$1" in
lock)
lock
;;
logout)
i3-msg exit
;;
suspend)
lock && systemctl suspend
;;
hibernate)
lock && systemctl hibernate
;;
reboot)
systemctl reboot
;;
shutdown)
systemctl poweroff
;;
*)
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
exit 2
esac
} >> ~/.i3/log-$(date +'%F-%k-%M-%S') 2>&1
exit0
It tels you the following log-year-month-day-time.
Last edited by qinohe (2013-12-04 15:21:59)
Offline
Only had a quick look mine was more for bash yours has much more flair
Mr Green
Offline
Only had a quick look mine was more for bash yours has much more flair
, yeah very, but it didn't work, it only created an empty logfile, now it's actually writing something to it.
And since I still need to learn a lot about scripting, I looked at your script again MrG., It only needed stderr 2 stdout.
Since than yours is cleaner, I changed it again, though both were/are working.
Last edited by qinohe (2013-12-04 15:20:16)
Offline
OK, I have probably found the problem (but not the solution). If I directly use this command in the terminal: i3exit shutdown, then I get the error "Invalid number of arguments.". That doesn't make sense, because if I type "systemctl poweroff", shutdown works fine.
Offline
The script just uses
systemctl poweroff
Offline
Finally solved it! The problem was some extra whitespace after "systemctl poweroff" in the i3exit script.
Offline
Nice , yeah, bash is picky about whitespace..
Offline
I would like to share some goodies I've been developing for the status bar:
* I've packaged ionicons and added a necessary space glyph (0x0020). It's in package ttf-font-ionicons-space in the AUR.
* I've written some tips on using iconic tt font sets with i3bar which should make your like simpler and your screenshots prettier. Read them here: https://wiki.archlinux.org/index.php/I3 … status_bar.
* I've written h2status, a simple (~ 50 LOC) i3status bash wrapper with json, mouse events and asynchronous update support, which is in the AUR as i3status-git and also documented in the wiki: https://wiki.archlinux.org/index.php/H2status.
Hope you like this and help me to test and improve it.
Offline
Does anyone else have problem with the tray bar..?
After I update my i3 to 4.7-1, my tray bar doesn't show up anymore, or there's no tray icon for any app that should have the icon before I update.
Offline
Offline