i3

A section for Window Manager configurations. If the WM doesn't exist yet, simply start a new thread.
Forum rules
Configurations, tips, questions and answers related to window managers only.
User avatar
Alad
should take a shower
Posts: 447
Joined: Wed May 21, 2014 12:52 am

i3

Unread post by Alad » Sun Jul 06, 2014 12:27 am

My config, stolen from dkeg, wuxmedia and archwiki:

https://github.com/AladW/arch-i3/blob/master/.i3/config

Let's go over a few of the more obscure sections.

Code: Select all

font pango:DejaVu Sans, FontAwesome 10.5
i3(status) supports fancy icons if you use the right icon set (example).

Code: Select all

# focus the child container
bindsym $mod+d focus child
i3 is all about containers, and this keybind makes you cry less while navigating.

Code: Select all

# Workspace variables
set $WS1 1  Web
set $WS2 2  Mail
set $WS3 3  Code
set $WS4 4
set $WS5 5
set $WS6 6
set $WS7 7
set $WS8 8
set $WS9 9  Stuff
set $WS0 0
Workplace names are defined multiple times, variables make you only have to set them once.

Code: Select all

mode "focused" {
    # focus keybindings
    bindsym i [class="^Firefox$"] focus
    bindsym m [class="^Sylpheed$"] focus
    bindsym c [class="^Hexchat$"] focus

    # keybindings for marking and jumping to clients
    bindsym a exec i3-input -F 'mark %s' -P 'Mark name: '
    bindsym g exec i3-input -F '[con_mark=%s] focus' -P 'Go to mark: '

    # Assign marks to keys 1-5
    bindsym Shift+1 mark mark1
    bindsym Shift+2 mark mark2
    bindsym Shift+3 mark mark3
    bindsym Shift+4 mark mark4
    bindsym Shift+5 mark mark5

    # Jump to clients marked 1-5
    bindsym 1 [con_mark="mark1"] focus
    bindsym 2 [con_mark="mark2"] focus
    bindsym 3 [con_mark="mark3"] focus
    bindsym 4 [con_mark="mark4"] focus
    bindsym 5 [con_mark="mark5"] focus

    # Exit to the default mode
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

bindsym $mod+g mode "focused"
vim-like marks for windows, and "contained" shortcuts.

Code: Select all

for_window [window_role="pop-up"] floating enable, move absolute center
for_window [title="Preferences$"] floating enable
i3 doesn't like floating windows, and this setting makes you cry less while handling them.

Code: Select all

bindsym --release Print exec --no-startup-id scrot '%Y-%m-%d--%wx$h_scrot.png' -e 'mv $f ~/shots/'
bindsym --release Shift+Print exec --no-startup-id scrot '%Y-%m-%d--%wx$h_scrot.png' -s -e 'mv $f ~/shots/'
Scrots don't work properly without --release!

Code: Select all

# Return to previous workspace
workspace_auto_back_and_forth yes
bindsym $mod+z workspace back_and_forth
bindsym $mod+Shift+z move container to workspace back_and_forth; workspace back_and_forth
For lazy workspace switching.
It's funny how we used to be able to do real stuff with rudimentary computers, but now we can't. -- ratcheer

User avatar
elixir
Weight Watcher
Posts: 357
Joined: Fri Feb 21, 2014 8:25 am

Re: i3

Unread post by elixir » Sun Jul 06, 2014 11:56 pm

The workspace_auto_back_and_forth yes feature seems pretty nice. Although, I have

Code: Select all

bindsym $mod+1 workspace prev
bindsym $mod+2 workspace next
To switch between workspaces like they are windows. It works nicely for me :)
Out of the corner of your eye you spot him... Shia LaBeouf.

https://www.youtube.com/watch?v=o0u4M6vppCI

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: i3

Unread post by dkeg » Mon Jul 07, 2014 12:04 am

the back and forth is more for say if on WS4, then WS1, right back to WS4, instead of next which is WS2

Work hard; Complain less

User avatar
elixir
Weight Watcher
Posts: 357
Joined: Fri Feb 21, 2014 8:25 am

Re: i3

Unread post by elixir » Mon Jul 07, 2014 12:12 am

Yeah I saw that. I was just sharing how I do it other than using that. :)
Out of the corner of your eye you spot him... Shia LaBeouf.

https://www.youtube.com/watch?v=o0u4M6vppCI

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: i3

Unread post by dkeg » Mon Jul 07, 2014 12:18 am

gotcha. hey, its all about what works for you. the back and forth feature can be quite useful though.

Work hard; Complain less

User avatar
elixir
Weight Watcher
Posts: 357
Joined: Fri Feb 21, 2014 8:25 am

Re: i3

Unread post by elixir » Mon Jul 07, 2014 12:20 am

Yeah it is, I actually just implented it into my config just in case and testing it out. I normally only have about 3 or 4 workspaces open though so I do not mind hitting alt+1 twice to go from WS4 to WS2
Out of the corner of your eye you spot him... Shia LaBeouf.

https://www.youtube.com/watch?v=o0u4M6vppCI

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: i3

Unread post by rhowaldt » Wed Apr 29, 2015 4:55 pm

just referencing the thread about using Lemonbar with i3 here for posterity: http://linuxbbq.org/bbs/viewtopic.php?f ... 4&start=20

in short, if you can't get it to be an overlay in any non-floating mode, and it will instead move your windows up/down, use the -d option because it seems i3 is not "EWMH compliant", whatever that means :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: i3

Unread post by pidsley » Wed Apr 29, 2015 5:38 pm

^ Extended Window Manager Hints.
This spec defines interactions between window managers, compositing managers, applications, and the utilities that form part of a desktop environment. It builds on the Inter-Client Communication Conventions Manual [ICCCM], which defines window manager interactions at a lower level. The ICCCM does not provide ways to implement many features that modern desktop users expect. The GNOME and KDE desktop projects originally developed their own extensions to the ICCCM to support these features; this spec replaces those custom extensions with a standardized set of ICCCM additions that any desktop environment can adopt.
Apparently i3 supports some of ewmh but not all. https://faq.i3wm.org/question/3430/how- ... 3-support/

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: i3

Unread post by rhowaldt » Wed Apr 29, 2015 7:39 pm

^ thanks for that pidsley. and it's nice of you not to tell me "you could have looked that up yourself you lazy bastard", which would've been very much warranted :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: i3

Unread post by machinebacon » Thu Apr 30, 2015 6:34 am

^ you could have looked that up yourself you lazy bastard
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: i3

Unread post by rhowaldt » Thu Apr 30, 2015 9:40 am

^ it's damned true!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: i3

Unread post by wuxmedia » Thu Apr 30, 2015 9:17 pm

^ and where's the scrot eh?, while we're at it? eh?
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: i3

Unread post by machinebacon » Fri May 01, 2015 3:52 am

scrots are bloat. that's what he said.
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: i3

Unread post by rhowaldt » Fri May 01, 2015 9:41 am

work in progress.
2015-05-01-124044_1280x800_scrot.png
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: i3

Unread post by dkeg » Fri May 01, 2015 11:13 am

nice job rho. Glad to have you as an offiicial ricer now. My one suggestion would be to be more consistent font wise. That's just me though.

Work hard; Complain less

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: i3

Unread post by rhowaldt » Fri May 01, 2015 11:28 am

thanks drew :)
well, thank the damn fonts in linux for that inconsistency. currently happily using Jura Light in one thing while dzen only accepts fonts that are in xlsfonts or xfontsel, not fc-list. haven't had much luck with that in lemonbar either - but still have to look at all the suggestions you guys made, so who knows, i might get it to all work.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: i3

Unread post by machinebacon » Fri May 01, 2015 4:04 pm

^ you can be lucky you don't need to use Chinese fonts - they are a real dildo in the sigma. I have been fucking around for 2 hours with different Chinese fonts, infinality, dpi shit, it all just looks like a typewriter written letter on a foggy day. /rantoff
..gnutella..

User avatar
stark
MILF
Posts: 521
Joined: Sat Sep 27, 2014 6:38 pm
Location: Arpanet
Contact:

Re: i3

Unread post by stark » Fri May 01, 2015 4:12 pm

^ The description is better than the experience :D
If you can do it go ahead and do it, if you can't do it then don't even criticize it. - gingerdesu

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: i3

Unread post by rhowaldt » Fri May 01, 2015 4:41 pm

^^ i can imagine that!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

Post Reply