Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ blur-background-exclude = [
![image](https://user-images.githubusercontent.com/82973108/160370578-3ea7e3e9-723a-4054-b7b0-2b0110d809c0.png)

### Config
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).
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`

# Updating
cd into the xborders directory and run `git pull origin main`
3 changes: 2 additions & 1 deletion example_config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"border-rgba": "0xFFFFFFFF",
"border-rgba": "#FFFFFFFF",
"border-radius": 14,
"border-width": 4,
"border-mode": "outside",
"disable-version-warning": false,
"exclude-list": ["Ulauncher", "firefox"],

"positive-x-offset": 0,
"positive-y-offset": 0,
Expand Down
11 changes: 11 additions & 0 deletions xborders
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ VERSION = 3.4
INSIDE = 'inside'
OUTSIDE = 'outside'
CENTER = 'center'
EXCLUDE = []
BORDER_MODES = [INSIDE, OUTSIDE, CENTER]
BORDER_MODE = INSIDE
BORDER_RADIUS = 14
Expand Down Expand Up @@ -168,6 +169,8 @@ def get_args():
args.__dict__[ident] = dat[
ident
] # Idea gotten from here: https://stackoverflow.com/a/1325798
else:
args.exclude_list = []

global BORDER_RADIUS
global BORDER_WIDTH
Expand All @@ -176,6 +179,7 @@ def get_args():
global BORDER_G
global BORDER_B
global BORDER_A
global EXCLUDE
global SMART_HIDE_BORDER
global NO_VERSION_NOTIFY
global OFFSETS
Expand All @@ -188,6 +192,7 @@ def get_args():
BORDER_A = args.border_alpha
NO_VERSION_NOTIFY = args.disable_version_warning
SMART_HIDE_BORDER = args.smart_hide_border
EXCLUDE = args.exclude_list
OFFSETS = [
args.positive_x_offset or 0,
args.positive_y_offset or 0,
Expand Down Expand Up @@ -429,6 +434,12 @@ class Highlight(Gtk.Window):
self.border_path = [x, y, w, h]

def _draw(self, _wid, ctx):
active_window = _wid.wnck_screen.get_active_window()
if active_window:
class_group_name = active_window.get_class_group_name()
if class_group_name in EXCLUDE:
return

ctx.save()
if self.border_path != [0, 0, 0, 0]:
x, y, w, h = self.border_path
Expand Down