Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration not loaded after upgrade #84

Open
p3k opened this issue Aug 9, 2019 · 5 comments

Comments

@p3k
Copy link

commented Aug 9, 2019

I used to maintain my window, key and font settings in ~/.config/i3-regolith/config but it seems this file is not loaded anymore after the upgrade I ran yesterday.

There seems to be a new way to define fonts and colors via ~/.Xresources.d and I tried to follow the suggestions from the Configuring page – leading to my config file being gone completely after running the two regolith-config-*.sh scripts…
☹️

Could someone help me out how to get my config applied again? Besides my customized font (colors not so much) I really miss my window settings and key bindings a lot. Where would I have to put such i3 things from now on? (I still have a backup of my config, so at least I know what to restore.)

And I don’t fully understand why some config data are not just taken from the Gnome settings / tweaks? Or are they and I am just doing something wrong?

(And please let me know if I should provide further information to understand the issue.)

@kgilmer

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

@p3k , your configuration files should have been backed up to ~/regolith-config-backup-<timestamp> after running the regolith-config-reset.sh file. Can you check and see if you have directories like this in your home dir?

Regarding getting your settings back, you just need to copy the config lines you need from your backup into the rolling i3 config file. You can determine the rolling i3 file like this:

$ ps aux | grep i3 | grep regolith
kgilmer  24851  0.0  0.0  49684  9000 tty2     S+   Aug06   0:02 i3 -c /home/kgilmer/.config/i3-regolith/config-4.16-1ubuntu18ppa11 -a --restart /run/user/1000/i3/restart-state.24851

In my case the i3 config is /home/kgilmer/.config/i3-regolith/config-4.16-1ubuntu18ppa11. You can diff the two versions of the config file with a tool or manually copy them into the new file. You could also just overwrite /home/kgilmer/.config/i3-regolith/config-4.16-1ubuntu18ppa11 with yours but that may cause problems with the new Xresource theme structure. Future updates to i3 will cause the i3 config file to change again. In essence it is pinned to the version of Regolith i3-gaps.

Several people have expressed a dislike for this rolling config file approach, and I understand their perspective. I have to find the balance between updating Regolith, which sometimes introduces breaking changes, and preserving users existing configurations. The rolling config file was an attempt at this but I have more work to do to get it right.

Regarding your last question about the gnome settings, can you provide specifics?

@p3k

This comment has been minimized.

Copy link
Author

commented Aug 10, 2019

ok, generally got my config loading again by adding it to to the config-4.16-1ubuntu18ppa11 file.

most of it also works except for the following:

assigning workspaces to display outputs

for example:

# original lines from the dist config
set_from_resource $ws1  i3-wm.workspace.01.name "1"
set_from_resource $ws2  i3-wm.workspace.02.name "2"

# my additions
set $display LVDS-1
set $hdmi1 HDMI-1

workspace $ws1 output $display
workspace $ws2 output $hdmi

– which returns the error:

ERROR: CONFIG: Expected one of these tokens: 'output', 'gaps'
ERROR: CONFIG: (in file /home/tobi/.config/i3-regolith/config-4.16-1ubuntu18ppa10)
ERROR: CONFIG: Line 319: set HDMI-1 HDMI-1
ERROR: CONFIG: Line 320:
ERROR: CONFIG: Line 321: workspace 1:<span font_desc="Source Code Pro Medium 13"> 1 </span><span foreground="#268bd2"></span> output LVDS-1
ERROR: CONFIG:                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: CONFIG: Line 322: #workspace 2:<span font_desc="Source Code Pro Medium 13"> 2 </span><span foreground="#2aa198"></span> output LVDS-1
ERROR: CONFIG: Line 323: #workspace 3:<span font_desc="Source Code Pro Medium 13"> 3 </span><span foreground="#859900"></span> output HDMI-1

before the upgrade my additions worked, the original lines in the dist file looked like this, though

set $ws1  "1 <span foreground='#268bd2'></span> "
set $ws2  "2 <span foreground='#2aa198'></span> "

could this be due to using set_from_resource instead of set?

defining custom font (works now)

update: in fact, running regolith-config-init.sh before refreshing i3 is necessary. with this, and a minor change of the font name (UbuntuCondensed instead of Ubuntu Condensed if there is no pango prefix) the fonts are now displayed as i desire.

one downside of changing the font during a session is that the workspaces get lost, i.e. if you see a window in workspace 1 and then want to switch to it by pressing mod+1 you get a new workspace with the updated font settings as well as the old one:

image

my original issue, just for the record:

following the configuring how-to i added a file ~/.Xresources.d/i3-regolith/typeface-ubuntucondensed:

! Typeface: Ubuntu Condensed
#define typeface_bar_glyph  Ubuntu Condensed 10
#define typeface_bar        pango:Ubuntu Condensed 10, FontAwesome 13
#define typeface_rofi       Ubuntu Sans 12
#define typeface_terminal   Ubuntu Mono:pixelsize=12:antialias=true:autohint=true

– then added it to ~/.Xresources-regolith-1.2.15:

#include ".Xresources.d/typeface-ubuntucondensed"
!#include ".Xresources.d/typeface-sourcecodepro"

however, after reloading i3 the font remains the same. furthermore, i get an (non-blocking) error in the i3 output:

ERROR: You did not specify required configuration option "font"

in fact, i don’t see any font directive in the original i3-regolith config file…?

or do i have to run the regolith config shell scripts at any time?

overriding settings

i tried to organize the config file by adding my customizations at the end. but because i am defining some different key bindings i3 complains about this (Duplicate keybinding in config file).

is there a way to do this, anyway? or no way around removing / commenting out the initial key binding?

what is the state of including a file in a i3 config? this way, i could just save my custom settings to another file and reference it from the original regolith config…

rolling config file

well, of course the rolling config file is working – now that i know about it. i understand a project like this is often wip and not always upgrades can run smoothly. nevertheless, the fact that suddenly all my i3 config was gone and the transition is rather some labor complicates things a little bit – especially as i so far did not experience a similar hiccup using manjaro-i3 (with rolling updates!) for quite some time.

i don’t think i am unhappy about a rolling config file. but the introduction was rather confusing and took me by surprise.

inheriting gnome settings

i use to set my fonts in ubuntu with the gnome-tweak-tool package. here is a screenshot of my current font settings:

image

would it be possible to make i3 somehow inherit the font (and maybe other reasonable) settings from here?

@p3k

This comment has been minimized.

Copy link
Author

commented Aug 10, 2019

i updated my previous comment after i found out how to make the font settings work.

@kgilmer

This comment has been minimized.

Copy link
Member

commented Aug 10, 2019

Hi @p3k ,

assigning workspaces to display outputs

Another user has found this as well. It seems to be a quote escaping issue due to the Pango markup which is embedded in the workspace label. You can see the issue here: regolith-linux/regolith-i3#12. I don't have a setup to test the by-index approach, so am unsure of a fix at this time.

overriding settings

I also would like this feature. I mentioned it in a reddit thread with the primary i3-gaps developer and he given the dialog I don't think they are interested in this sort of feature. I find it's pretty hard to convince upstream maintainers to add features. I'm starting to understand why :). (It's more work than it seems to add features and not break users.) I would love it if i3 config files could be modular, it would be a great way of managing breaking changes. I don't think it will happen though. Feel free to request the feature to i3 or i3-gaps though, maybe if they hear from more people they will be more inclined to add this.

rolling config file

Yes, I understand your perspective. Would you prefer a notification or other kind of dialog on the your screen after an i3 (or other UI config file) change has been made by a Regolith update? Is there a better approach?

gnome settings

Interesting idea! I'll look into it. I also dislike the redudancy between "X windows" theme info vs gnome theme info and would like them to be consolidated. I'm also looking into this project though: https://github.com/chriskempson/base16

Thanks again for your detailed information regarding your problems @p3k 😄

@p3k

This comment has been minimized.

Copy link
Author

commented Aug 10, 2019

Another user has found this as well. It seems to be a quote escaping issue due to the Pango markup which is embedded in the workspace label. You can see the issue here: regolith-linux/regolith-i3#12. I don't have a setup to test the by-index approach, so am unsure of a fix at this time.

good to know i am not the only one… 😺

and indeed, index numbers work! maybe they are generally the better choice, anyway? could resolve the issue with the disappearing workspaces after changing the font setting…?

Feel free to request the feature to i3 or i3-gaps though, maybe if they hear from more people they will be more inclined to add this.

ok, i’ll try.

Yes, I understand your perspective. Would you prefer a notification or other kind of dialog on the your screen after an i3 (or other UI config file) change has been made by a Regolith update? Is there a better approach?

ubuntu sometimes displays warnings when backwards-incompatible changes were applied. would that be possible for a regolith upgrade with breaking changes, too?

I'm also looking into this project though: https://github.com/chriskempson/base16

looks like an interesting approach, too. looking forward to the future development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.