You are not logged in.

#1051 2013-11-12 16:24:54

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,728

Re: The i3 thread

caffeinebasedlifeform wrote:
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

#1052 2013-11-12 16:55:23

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

Re: The i3 thread

It is a very useful command, I use....

$execi i3-msg 'workspace 3:Web; exec /usr/bin/firefox; layout tabbed'

compton in i3 really! wink


Mr Green

Offline

#1053 2013-11-12 17:00:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,728

Re: The i3 thread

Mr Green wrote:

compton in i3 really! wink

Hey, I like transparencies.  big_smile


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

#1054 2013-11-19 01:57:55

Ave6
Member
Registered: 2013-08-27
Posts: 9

Re: The i3 thread

Question: Is it possible to have a gap between containers currently? If not, is it possible for there to be transparent borders?

Offline

#1055 2013-11-19 09:10:50

joepvd
Member
Registered: 2011-10-06
Posts: 31

Re: The i3 thread

Ave6 wrote:

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

#1056 2013-11-19 09:19:44

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

Re: The i3 thread

I tend to make borders the same colour as bar, so they blend in (if that helps)...


Mr Green

Offline

#1057 2013-12-03 16:11:13

pezzonovante
Member
Registered: 2013-10-25
Posts: 40

Re: The i3 thread

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

#1058 2013-12-03 16:41:20

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

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

#1059 2013-12-03 16:45:53

pezzonovante
Member
Registered: 2013-10-25
Posts: 40

Re: The i3 thread

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

#1060 2013-12-03 16:51:40

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

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

#1061 2013-12-03 17:02:54

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

Re: The i3 thread

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

#1062 2013-12-03 17:04:08

pezzonovante
Member
Registered: 2013-10-25
Posts: 40

Re: The i3 thread

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

#1063 2013-12-03 17:09:41

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

pezzonovante wrote:

qinohe: I have tried pretty much everything possible, but with no luck.

You did make the script executable?

Offline

#1064 2013-12-03 17:13:44

pezzonovante
Member
Registered: 2013-10-25
Posts: 40

Re: The i3 thread

Yep it's executable. Otherwise reboot/hibernate/suspend wouldn't work.

Offline

#1065 2013-12-03 19:06:47

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

Re: The i3 thread

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

#1066 2013-12-03 19:49:24

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

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

#1067 2013-12-03 20:03:01

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

Re: The i3 thread

Only had a quick look mine was more for bash yours has much more flair wink


Mr Green

Offline

#1068 2013-12-04 14:34:17

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

Mr Green wrote:

Only had a quick look mine was more for bash yours has much more flair wink

big_smile , 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

#1069 2013-12-04 14:49:19

pezzonovante
Member
Registered: 2013-10-25
Posts: 40

Re: The i3 thread

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

#1070 2013-12-04 14:53:03

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

The script just uses

systemctl poweroff

Offline

#1071 2013-12-04 14:56:06

pezzonovante
Member
Registered: 2013-10-25
Posts: 40

Re: The i3 thread

Finally solved it! The problem was some extra whitespace after "systemctl poweroff" in the i3exit script.

Offline

#1072 2013-12-04 15:03:34

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: The i3 thread

Nice wink, yeah, bash is picky about whitespace..

Offline

#1073 2013-12-25 14:27:17

memeplex
Member
Registered: 2008-11-10
Posts: 33

Re: The i3 thread

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

#1074 2013-12-27 16:23:52

znki
Member
From: Malay 'Arch'ipelago
Registered: 2011-04-17
Posts: 8

Re: The i3 thread

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

#1075 2013-12-27 16:36:09

memeplex
Member
Registered: 2008-11-10
Posts: 33

Re: The i3 thread

Offline

Board footer

Powered by FluxBB