8000 include-file paths not expanded · Issue #603 · polybar/polybar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

include-file paths not expanded #603

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

Closed
rosshadden opened this issue Jun 2, 2017 · 4 comments
Closed

include-file paths not expanded #603

rosshadden opened this issue Jun 2, 2017 · 4 comments

Comments

@rosshadden
Copy link

Paths for include-file do not expand the ~ prefix, which would be very helpful because some of us have multiple computers with different usernames. Some of the user-contributed modules use ~ in paths for exec, click-left, etc., so it's strange that it works in some places and not others.

Also variables cannot be used in include paths. Is this a feasible change? I didn't want to open up a separate issue for something so closely-related.

@jaagr
Copy link
Member
jaagr commented Jun 2, 2017

Yeah it's feasable. I even thought I fixed it already but I'll have a look.

edit: The reason it works for exec etc is because it is expanded by the shell.

edit2: What do you mean by variables in the include path? Environment variables or references to local config keys?

@Mange
Copy link
Mange commented Sep 3, 2017

I was trying something like this:

[bar/base]
inherit = bar/core
include-file = ${env:POLYBAR_SCREEN_CONFIG_FILE:~/.config/polybar/default_screen.ini}

but I get this error:

error: Invalid include file "${env:POLYBAR_SCREEN_CONFIG_FILE:~/.config/polybar/default_screen.ini}" defined on line 39

I suspect that is what @rosshadden meant by "variables cannot be used in include paths".


In order to avoid The XY Problem: I was trying to do this because I want a portable set of dotfiles. I need them to work at my workstation at home, my laptop at work, and my laptop at work when plugged into external screen(s).
Some screens are HiDPI and I need to have bigger sizes to be able to read text on the bar on those screens.

I'm gonna extract several env variables to inject instead now, but this looked like a nice way to just have different files for different configurations.

@NBonaparte
Copy link
Member

What I thought he meant was something like include-file = $XDG_CONFIG_HOME/polybar/file, which should be fixed by #724.

@Mange
Copy link
Mange commented Sep 5, 2017

Yes, that makes sense.

patrick96 added a commit that referenced this issue Dec 3, 2017
Breaking Changes:

* Date module no longer supports non-padded specifiers (i.e. `%-d`) and potentially other specifiers, see #792
  - Check http://en.cppreference.com/w/cpp/io/manip/put_time to see supported specifiers
* Setting background color to `background-0` with gradients (refer to https://github.com/jaagr/polybar/wiki/Known-Issues)

Changelog:

Features:
* Feat(mpd): State-specific formats (`format-playing`, `format-paused`, `format-stopped`) (#567), see #524 
* Feat(ipc): Visibility commands (show, hide, toggle, restart, quit) (b6c5563)
* Feat(shell): Bash completion (#588)
* Feat(menu): `expand-right` option (#658), see #655
* Feat(temperature): hwmon sysfs support (#688), see #404 
* Feat(cursor): Change cursors over clickable/scrollable areas (#727), see #721  
* Feat(temperature): Fahrenheit and Celsius tokens (#804)
* Feat(mpd): Use mpd name tag or URI as fallback for title-less tracks (#823), see #815 

Fixes:
* Fix(i3): Clicking workspaces without index (#521), see #520 
* Fix(parser): Prefix options overriding format options (#729), see #544
* Fix(parser): Overline tags (eebf105)
* Fix(process_util): Prefix shell environment variable (`$POLYBAR_SHELL`) (86ff947), see #566 
* Fix(parser): `%{R}` tag (reverse colors) (0bd8f1f), see #585 
* Fix(renderer): Center block position with tray (389bae2 & #673), see #551 & #672 
* Fix(xworkpaces): Active workspace with XMonad (#587), see #411 & #535 
* Fix(config): Expand tilde, environment variable (d3b0670 & #724), see #603 & #719 
* Fix(build): Remove curlbuild.h (#648), see #647 
* Fix(renderer): Off by one error for actions (#663), see #661 
* Fix(gcc): GCC 7.1 ([jaagr/xpp/#6](polybar/xpp#6))
* Fix(fs): Use `bytes_available` for `percentage_used` (138f5fa), see #710
* Fix(fs): Use `f_frsize` for calculations (a682d2a)
* Fix(date): Remove date string length limitation (#745), see #754 
* Fix(renderer): Nested actions (#772), see #760 and #758
* Fix(i3): Check and warn if current workspace not found (#826), see #824 
* Fix(github): Prevent module disappearing with no connection (#811), see #810 
* Fix(renderer): Module gradients (#831), see #759 
* Fix(build): Update deprecated jsoncpp Reader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0