Skip to content

Commit 7d217ed

Browse files
Added exclude list to exclude windows we dont want a border over
1 parent c52a07d commit 7d217ed

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ blur-background-exclude = [
3737
![image](https://user-images.githubusercontent.com/82973108/160370578-3ea7e3e9-723a-4054-b7b0-2b0110d809c0.png)
3838

3939
### Config
40-
Configuration options can be found by passing in the argument `--help` on the command line, or by specifying a config file with the argument `-c`. The config file is just a simple json file with the keys being the same as the command-line arguments (except without the "--" at the beginning).
40+
Configuration options can be found by passing in the argument `--help` on the command line, or by specifying a config file with the argument `-c`. The config file is just a simple json file with the keys being the same as the command-line arguments (except without the "--" at the beginning). To exclude windows, create a config file with "exclude-list" (look at example-config.json) and put the window class names to this list, you can find out the name of a class using `xprop | grep WM_CLASS`
4141

4242
# Updating
4343
cd into the xborders directory and run `git pull origin main`

example_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"border-rgba": "0xFFFFFFFF",
2+
"border-rgba": "#FFFFFFFF",
33
"border-radius": 14,
44
"border-width": 4,
55
"border-mode": "outside",
66
"disable-version-warning": false,
7+
"exclude-list": ["Ulauncher", "firefox"],
78

89
"positive-x-offset": 0,
910
"positive-y-offset": 0,

xborders

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ VERSION = 3.4
2222
INSIDE = 'inside'
2323
OUTSIDE = 'outside'
2424
CENTER = 'center'
25+
EXCLUDE = []
2526
BORDER_MODES = [INSIDE, OUTSIDE, CENTER]
2627
BORDER_MODE = INSIDE
2728
BORDER_RADIUS = 14
@@ -176,6 +177,7 @@ def get_args():
176177
global BORDER_G
177178
global BORDER_B
178179
global BORDER_A
180+
global EXCLUDE
179181
global SMART_HIDE_BORDER
180182
global NO_VERSION_NOTIFY
181183
global OFFSETS
@@ -188,6 +190,7 @@ def get_args():
188190
BORDER_A = args.border_alpha
189191
NO_VERSION_NOTIFY = args.disable_version_warning
190192
SMART_HIDE_BORDER = args.smart_hide_border
193+
EXCLUDE = args.exclude_list
191194
OFFSETS = [
192195
args.positive_x_offset or 0,
193196
args.positive_y_offset or 0,
@@ -429,6 +432,12 @@ class Highlight(Gtk.Window):
429432
self.border_path = [x, y, w, h]
430433

431434
def _draw(self, _wid, ctx):
435+
active_window = _wid.wnck_screen.get_active_window()
436+
if active_window:
437+
class_group_name = active_window.get_class_group_name()
438+
if class_group_name in EXCLUDE:
439+
return
440+
432441
ctx.save()
433442
if self.border_path != [0, 0, 0, 0]:
434443
x, y, w, h = self.border_path

0 commit comments

Comments
 (0)