Skip to content

Commit

Permalink
fix(qtile): fix bug of wallpaper and window rule
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi committed Sep 26, 2024
1 parent ee30e57 commit 34e70c4
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion apps/user/full/services/picom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
inactiveOpacity = 0.75;
opacityRules = [
"100:QTILE_BAR:32c = 1"
"100:class_g = 'Alacritty'"
"100:class_g = 'Blender'"
"100:class_g = 'Looking Glass (client)'"
"100:class_g = 'PenTablet'"
"100:class_g = 'Picture in picture'"
"100:class_g = 'Unity'"
"100:class_g = 'Alacritty'"
"100:class_g = 'kitty'"
"100:class_g = 'Zathura'"
"100:class_g = 'org.wezfurlong.wezterm'"
"100:class_g = 'pentablet'"
"100:name = 'VRChat'"
Expand Down
8 changes: 5 additions & 3 deletions apps/user/full/wm/qtile/conf/my_modules/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,15 @@ def make_bar(under_fhd: bool = False, is_tray: bool = False, pentablet: bool = F
top_widgets += spacer(length=20)
top_widgets += lifeinfo()
top_widgets += spacer()
top_widgets += spacer(length=5)
top_widgets += chord()

if not under_fhd:
if under_fhd:
top_widgets += spacer()
top_widgets += spacer(length=10)
else:
top_widgets += sysinfo()
top_widgets += spacer(length=20)
top_widgets += chord()
top_widgets += spacer(length=10)
top_widgets += sysctrl(is_tray)

top_bar = bar.Bar(
Expand Down
2 changes: 1 addition & 1 deletion apps/user/full/wm/qtile/conf/my_modules/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def set_keys():
Key([GlobalConf.mod, "control", "shift"], "f", lazy.window.toggle_fullscreen()),
# Exit and Reload
Key([GlobalConf.mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
Key([GlobalConf.mod, "control"], "e", lazy.shutdown(), desc="Shutdown Qtile"),
Key([GlobalConf.mod, "control", "shift"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
# Launch rofi
Key(
[GlobalConf.mod],
Expand Down
1 change: 1 addition & 0 deletions apps/user/full/wm/qtile/conf/my_modules/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ def autostart():
@hook.subscribe.startup_complete
def afterstart():
subprocess.run("systemctl --user restart blueman-applet.service", shell=True)
subprocess.run("systemctl --user restart flameshot.service", shell=True)
1 change: 1 addition & 0 deletions apps/user/full/wm/qtile/conf/my_modules/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def __post_init__(self):

def update_monitors(self):
self.monitors = utils.get_n_monitors(self.has_pentablet)
self.monitors_w_pentablet = utils.get_n_monitors(False)


PinPConf = PinPConfig()
Expand Down
6 changes: 4 additions & 2 deletions apps/user/full/wm/qtile/conf/my_modules/wallpaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

MONITORS = {}
cmd = "feh"
for i in range(GlobalConf.monitors):
for i in range(GlobalConf.monitors_w_pentablet):
MONITORS[f"MONITOR{i}"] = 0
cmd += r" --bg-fill {}"

Expand All @@ -29,6 +29,8 @@ def change_wallpaper():
gidx -= n_groups * idx
MONITORS[f"MONITOR{idx}"] = gidx
subprocess.run(
cmd.format(*[GlobalConf.wallpapers[MONITORS[f"MONITOR{i}"]] for i in range(GlobalConf.monitors)]),
cmd.format(
*[GlobalConf.wallpapers[MONITORS[f"MONITOR{i}"]] for i in range(GlobalConf.monitors_w_pentablet)]
),
shell=True,
)

0 comments on commit 34e70c4

Please sign in to comment.