#49 Create a new config package with custom i3 config and other thematic tweaks
Opened 3 years ago by jflory7. Modified 2 years ago

Summary

Create a new Fedora package (e.g. fedora-i3-config) with a custom i3 config and other tweaks to create a themed version of i3 to the Fedora Project and Fedora Community.

Background

We get asked a lot: what i3 config will we ship, and can we make any custom changes? The answer is complicated.

The situation today is that we use the i3 config file that is in the i3 Fedora package itself, maintained by @defolos. This file comes directly upstream from i3wm git repo. We do not make changes; we basically copy+paste the upstream defaults into Fedora. In the spirit of reusable Open Source, this is actually a good thing, and we do not want to make changes to the default i3 config for everyone in Fedora.

One way to get around this is to create a new package with a custom i3 config file, or other simple window manager tweaks, to theme and style the i3 Spin. We could have backgrounds with the Fedora wallpapers, use color theming based on the official Fedora color schemes, and other thematic tweaks that are specifically for Fedora!

Details

The Design Goals are useful to guide this discussion.

The new package, as I understand it, would install new system defaults that override/obsolete what is already in the i3 package. We will need to coordinate carefully with @defolos when we create the new config package, just to make sure we do not break things if someone makes a fresh install from the Spin, OR installs the package in-place on an existing install.

Outcome

Fedora i3 Spin is cool, "swag", pretty, Fedora Blue, and clearly and obviously FEDORA.


The main question here is how should we customize this new config? We could include some common keybindings maybe or add custom colors?

My personal proposal:

Colors based on design#741 :

~/.config/i3/config

# class                 border  bground text    indicator child_border
client.focused          #83CAFA #51A2DA #FFFFFF #83CAFA   #51A2DA
client.focused_inactive #8C8C8C #4C4C4C #FFFFFF #4C4C4C   #8C8C8C
client.unfocused        #4C4C4C #222222 #888888 #292D2E   #222222
client.urgent           #EC69A0 #DB3279 #FFFFFF #DB3279   #DB3279
client.placeholder      #000000 #0C0C0C #FFFFFF #000000   #0C0C0C

client.background       #FFFFFF

bar {
  colors {
    background #000000
    statusline #FFFFFF
    separator  #666666

    focused_workspace  #83CAFA #51A2DA #FFFFFF
    active_workspace   #3C6EB4 #294172 #FFFFFF
    inactive_workspace #8C8C8C #4C4C4C #888888
    urgent_workspace   #EC69A0 #DB3279 #FFFFFF
    binding_mode       #b691d3 #A07CBC #FFFFFF
  }
}

bindsym $mod+d exec "dmenu_run -nf '#BBBBBB' -nb '#222222' -sb '#005577' -sf '#EEEEEE' -fn 'monospace-10' -p 'dmenu prompt >'"

~/.config/i3status/config

general {
  output_format = "i3bar"
  colors = true
  color_good = "#79DB32"
  color_degraded = "#E59728"
  color_bad = "#DB3279"
}

keybindings

I think we should only add keybings for the apps we are shipping, so my recommendations are:

$mod+Shift+F firefox
$mod+Shift+A azote
$mod+Shift+T thunar

Something that I find useful, and do with all my i3 installs is change the behaviour of the default logout keybinding to the following:

set $mode_system System (l) lock, (e) logout, (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 r exec --no-startup-id i3exit reboot, mode "deafult"
    bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"

    bindsym Return mode "default"
    bindsym Escape mode "default"

}
bindsym $mod+Shift+e mode "$mode_system"

the "i3exit" script is a python script and resides in ~/.local/bin and contains the following:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/python

import sys
import os

arg = sys.argv[1]
session = os.getenv("XDG_SESSION_ID")

def exit_arg(arg):
    options = {
            "lock": lambda: os.system("i3lock"),
        "logout": lambda: os.system("loginctl terminate-session {}".format(session)),
        "reboot": lambda: os.system("systemctl reboot"),
        "shutdown": lambda: os.system("systemctl poweroff"),
        "suspend": lambda: os.system("systemctl suspend")}

    if arg in options:
        return options.get(arg)
    else:
        return lambda: print("error: unknown option")


exitcmd = exit_arg(arg)
exitcmd()

This allows the user to easily logout, reboot, shutdown or lock.

See discussion in #46 about default tools for modifying display brightness. We need a config with configured brightness modifier keys to use the display brightness tool we ship.

Metadata Update from @jflory7:
- Issue unmarked as depending on: #46

3 years ago

Metadata Update from @jflory7:
- Issue marked as depending on: #46

3 years ago

If we decide to add keybindings for brightness control then they should rea=
lly be bound to XF86MonBrightnessUp/Down and not something else=2E Thereby,=
laptop users can map their laptop brightness keys to the xf86 ones (if not=
already auto configured) and desktop users needn't care=2E

On April 20, 2021 4:56:23 PM UTC, "Justin W=2E Flory" pagure@pagure=2Eio=
wrote:

jflory7 added a new comment to an issue you are following:
See discussion in #46 about default tools for modifying display brightnes= s=2E We need a config with configured brightness modifier keys to use the d= isplay brightness tool we ship=2E

To reply, visit the link below or just reply to this email
https://pagure=2Eio/i3-sig/Fedora-i3-Spin/issue/49

I'm in favor of adding the system_mode part as suggested by @sebastiaan76 and the color branding that @duffy created for us. Also, I'd throw in a keybinding to adjust the brightness of the screen using brightnessctl bound to XF86MonBrightnessUp and XF86MonBrightnessDown

Something like this + what about binding Arandr to the XF86Display key?

# Use brightnessctl to adjust screen brightness
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl -s 10%+
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl -s 10%-

# Use Display key to call Arandr
bindsym XF86Display exec --no-startup-id arandr

We don't include arandr in the package set, but it's part of the "i3-extended", so I'm not sure if we should include this one. About the brightness I'm ok with the suggested bindings, but want to ask if it's ok 10%, in my config I move by 5%. I'm ok with 10%, but I'd like everyone to be ok with it.

5% would probably be better actually! Totally fine with that.

Hi, there. I made a config for i3wm. But I was using i3-gaps and installed i3 by myself, not from i3 spin. And very excited when Fedora came with i3 spin. I will install i3 spin soon and make a configuration with Fedora color and style.

Here's my screenshot from my last i3 config, it's blue but I will adjust this with new Fedora color scheme.

Screenshot.png

You can pick the config snippets from @x3mboy's comment up top to get the c=
olor scheme=2E

You can pick the config snippets from @x3mboy's comment up top to get the c=
olor scheme=2E

Thanks.. I'll try..

I have tried to create the promised split into a fedora themed and upstream config. You can grab it from my copr: https://copr.fedorainfracloud.org/coprs/defolos/devel/, upgrade i3 and install i3-config-fedora.

I have tried to create the promised split into a fedora themed and upstream config. You can grab it from my copr: https://copr.fedorainfracloud.org/coprs/defolos/devel/, upgrade i3 and install i3-config-fedora.

Cool. Thanks, Dan.

Hi, @defolos ..

I've just install my Fedora i3-spin and tried to grab from your copr. Update i3, install i3-config-fedora, and reboot. Actually what should happen once it is installed? I don't see any change. Sorry if I misunderstood.

Thanks.

The package only ships the default configuration, so if you have a
custom config in your ~/.config/ folder, it will not take any effect.

Noted, @defolos . Thanks.

And some suggestions about the package groups https://docs.fedoraproject.org/en-US/i3/package-groups/

I think we need xarchiver on i3 minimal package. And also we need an app for ScreenShot/PrintScreen, like scrot, it could be on minimal or extended package.

It would be nice if we also put a text on the bar that can link to a i3-config file and a short document containing basic function (or shortcut) for new user that not too familiar with WM. So they can click on the text and a document will open and explain about some basic function, like how to run some apps, or how to exit from i3wm. From my experience, new user will have trouble with "exit" on they first.

Or maybe we can configure rofi for extended package to show the system session, like shutdown, logout, or restart. Just my thoughts.

Thanks.

Thanks for your feedback @armanwu!

We already have an open issue for a welcome app here:
https://pagure.io/i3-sig/Fedora-i3-Spin/issue/32, would you mind adding
the appropriate comments there?

Concerning the package group suggestions: could you create a new issue please?

Hi, @defolos . I've just added a comment there.

And create a new issue related to the package group suggestion https://pagure.io/i3-sig/Fedora-i3-Spin/issue/60

I'm trying to make a configuration that might be useful, like the appearance of urxvt. But it needs installed xrdb.

By the way, may I be added to the i3-sig group? https://accounts.fedoraproject.org/group/i3-sig/

Thanks.

I just tried to configure the i3 based on Fedora i3 spin. Just had time for i3, i3status, and urxvt. I post the urxvt on https://pagure.io/i3-sig/Fedora-i3-Spin/issue/61.

By the way, where can I get the new Fedora color scheme? I found this https://fedoraproject.org/wiki/Logo/UsageGuidelines , but it looks like the old color scheme.

2021-06-29_20-27.png

Your configuration looks great! We can discuss this on meeting.

@armanwu in regards of the color scheme, you need to ask the design team.

Thanks, @x3mboy . I've just got this link from @duffy https://pagure.io/design/issue/741. I'll try to adjust my configuration with those colors, especially for the urxvt. And also I haven't configured rofi.

Hi. I've just adjusted the color scheme according to this link https://pagure.io/design/issue/741. But I modified the black #000000 and white #FFFFFF. I choose #1E2C39 for background and #DEDEDE for foreground. I have also configured `rofi` for launcher. (edited: the images not shown)

Login to comment on this ticket.

Attachments 8
Attached 2 years ago View Comment
Attached 2 years ago View Comment
Attached 2 years ago View Comment
Attached 2 years ago View Comment
Attached 2 years ago View Comment
Attached 2 years ago View Comment
Attached 2 years ago View Comment
Attached 2 years ago View Comment