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

i3 pin-workspaces behaviour for a named monitor output. #2797

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `custom/text`: Loads the `format` setting, which supports the `<label>` tag, if the deprecated `content` is not defined ([`#1331`](https://github.com/polybar/polybar/issues/1331), [`#2673`](https://github.com/polybar/polybar/pull/2673), [`#2676`](https://github.com/polybar/polybar/pull/2676))
- Added experimental support for positioning the tray like a module
- `internal/backlight`: `scroll-interval` option ([`#2696`](https://github.com/polybar/polybar/issues/2696), [`#2700`](https://github.com/polybar/polybar/pull/2700))
- `internal/i3`: `pin-output` option to pin a named monitor instead of the current when `pin-workspace` is active ([`#1625`](https://github.com/polybar/polybar/issues/1625), [`#2797`](https://github.com/polybar/polybar/pull/2797))

### Changed
- `internal/fs`: Use `/` as a fallback if no mountpoints are specified ([`#2572`](https://github.com/polybar/polybar/issues/2572), [`#2705`](https://github.com/polybar/polybar/pull/2705))
Expand Down
1 change: 1 addition & 0 deletions include/modules/i3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ namespace modules {
bool m_show_urgent{false};
bool m_strip_wsnumbers{false};
bool m_fuzzy_match{false};
string m_pin_output;

unique_ptr<i3_util::connection_t> m_ipc;
};
Expand Down
3 changes: 2 additions & 1 deletion src/modules/i3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace modules {
m_wrap = m_conf.get(name(), "wrapping-scroll", m_wrap);
m_indexsort = m_conf.get(name(), "index-sort", m_indexsort);
m_pinworkspaces = m_conf.get(name(), "pin-workspaces", m_pinworkspaces);
m_pin_output = m_conf.get(name(), "pin-output", m_bar.monitor->name);
m_show_urgent = m_conf.get(name(), "show-urgent", m_show_urgent);
m_strip_wsnumbers = m_conf.get(name(), "strip-wsnumbers", m_strip_wsnumbers);
m_fuzzy_match = m_conf.get(name(), "fuzzy-match", m_fuzzy_match);
Expand Down Expand Up @@ -137,7 +138,7 @@ namespace modules {
vector<shared_ptr<i3_util::workspace_t>> workspaces;

if (m_pinworkspaces) {
workspaces = i3_util::workspaces(ipc, m_bar.monitor->name, m_show_urgent);
workspaces = i3_util::workspaces(ipc, m_pin_output, m_show_urgent);
} else {
workspaces = i3_util::workspaces(ipc);
}
Expand Down