Skip to content

Commit

Permalink
fix(qtile): fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi committed Oct 4, 2024
1 parent 26e1f3b commit 4d58f26
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 31 deletions.
4 changes: 4 additions & 0 deletions apps/system/wm/qtile/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
imports = [ ../../xserver ];
services.displayManager.defaultSession = "none+xsession";
environment.pathsToLink = [
"/share/xdg-desktop-portal"
"/share/applications"
];
}
3 changes: 2 additions & 1 deletion apps/user/full/pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
home = {
shellAliases = {
actpd = "DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock act";
pdfpc = "WEBKIT_DISABLE_DMABUF_RENDERER=1 pdfpc"; # Workaround for speaker notes not displaying properly
};
packages = with pkgs; [
# android-tools
Expand Down Expand Up @@ -34,7 +35,7 @@
mesa-demos # OpenGL utility
nomacs # Image Viewer
obsidian # A powerful knowledge base that works on top of a local folder of plain text Markdown files
pympress # PDF reader for presentations
pdfpc # Presenter console with multi-monitor support for PDF files
remmina # Remote desktop client
simple-scan # Scaner
slack # chat
Expand Down
26 changes: 13 additions & 13 deletions apps/user/full/services/picom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,40 @@
"100:class_g = 'Alacritty'"
"100:class_g = 'Blender'"
"100:class_g = 'PenTablet'"
"100:class_g = 'Picture in picture'"
"100:class_g = 'Unity'"
"100:class_g = 'kitty'"
"100:class_g = 'Zathura'"
"100:class_g = 'org.wezfurlong.wezterm'"
"100:class_g = 'kitty'"
"100:class_g = 'krita'"
"100:class_g = 'looking-glass-client'"
"100:class_g = 'org.wezfurlong.wezterm'"
"100:class_g = 'pentablet'"
"100:name = 'VRChat'"
"100:name = 'i3lock'"
"100:name = 'masterduel'"
"100:name *?= 'WaveSurer'"
"100:class_g = 'pdfpc'"
"100:name *?= '.jpg'"
"100:name *?= '.pdf'"
"100:name *?= '.png'"
"100:name *?= 'Prime Video'"
"100:name *?= 'WaveSurer'"
"100:name *?= 'Youtube'"
"100:name *?= 'ニコニコ動画'"
"100:name *?= '.pdf'"
"100:name *?= '.jpg'"
"100:name *?= '.png'"
"100:name = 'Picture in picture'"
"100:name = 'VRChat'"
"100:name = 'i3lock'"
"100:name = 'masterduel'"
];

shadow = true;
shadowExclude = [
"QTILE_BAR:32c = 1"
"_GTK_FRAME_EXTENTS@:c"
"class_g = 'Cairo-clock'"
"class_g = 'Cairo-clock'"
"class_g = 'Conky'"
"class_g = 'Conky'"
"class_g = 'dunst'"
"class_g = 'kdeconnect-handler'"
"class_g = 'kdeconnect-indicator'"
"class_g = 'kdeconnect-sms'"
"class_g = 'kdeconnect-sms-handler'"
"class_g = 'kdeconnectd'"
"class_g = 'rofi'"
"class_g = 'pdfpc'"
"class_g = 'rofi'"
"class_g ?= 'Notify-osd'"
"name = 'Notification'"
Expand Down
20 changes: 15 additions & 5 deletions apps/user/full/wm/qtile/conf/my_modules/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,31 +101,41 @@ def sysctrl(is_tray=False):
widget.TextBox(padding=0, background=ColorSet.transparent, **right_corner),
]
if GlobalConf.laptop:
base += [
widget.UPowerWidget(**left_corner),
]
backlight = list(Path("/sys/class/backlight/").glob("*"))
if not len(backlight) == 0:
base += [
widget.Backlight(
fmt=" {}",
backlight_name=backlight[0],
foreground=ColorSet.background,
background=ColorSet.accent,
**fc,
**left_corner,
),
]
vol_colors = {
"foreground": ColorSet.background,
"background": ColorSet.accent,
}
else:
vol_colors = {}
base += [
widget.Volume(
fmt=" {}",
get_volume_command="if [ -z $(pactl get-sink-mute $(pactl get-default-sink) | sed -e 's/Mute: no//g') ]; then echo \[$(pactl get-sink-volume $(pactl get-default-sink) | awk -F'/' '{print $2}' | sed -e 's/\s//g')\]; else echo M; fi",
mute_command=["pactl set-source-mute @DEFAULT_SOURCE@ toggle"],
volume_up_command=["pactl set-sink-volume @DEFAULT_SINK@ +5%"],
volume_down_command=["pactl set-sink-volume @DEFAULT_SINK@ -5%"],
**vol_colors,
**fc,
**left_corner,
),
]
if GlobalConf.laptop:
base += [
widget.UPowerWidget(
**left_corner,
),
]
base += [
widget.CurrentLayoutIcon(
foreground=ColorSet.background,
background=ColorSet.accent,
Expand Down
27 changes: 16 additions & 11 deletions apps/user/full/wm/qtile/conf/my_modules/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,47 @@
{"wm_class": GlobalConf.terminal_class if GlobalConf.terminal_class is not None else GlobalConf.terminal},
]

_rule_browse = [{"wm_class": "vivaldi-stable"}, {"wm_class": "firefox"}]
_rule_browse = [
{"wm_class": "firefox"},
{"wm_class": "vivaldi-stable"},
]

_rule_analyze = [
{"title": "WaveSurfer 1.8.8p5"},
]

_rule_full = [
{"title": "Steam"},
{"wm_class": "lutris"},
{"wm_class": "resolve"},
{"wm_class": "krita"},
{"wm_class": "Gimp"},
{"wm_class": "Blender"},
{"wm_class": "unityhub"},
{"wm_class": "Gimp"},
{"wm_class": "Looking Glass (client)"},
{"wm_class": "Unity"},
{"wm_class": "obs"},
{"wm_class": ".obs-wrapped_"},
{"wm_class": "audacity"},
{"wm_class": "Looking Glass (client)"},
{"wm_class": "krita"},
{"wm_class": "lutris"},
{"wm_class": "obs"},
{"wm_class": "pdfpc"},
{"wm_class": "resolve"},
{"wm_class": "unityhub"},
]

_rule_sns = [
{"wm_class": "slack"},
{"wm_class": "discord"},
{"wm_class": "element"},
{"wm_class": "ferdium"},
{"wm_class": "slack"},
{"wm_class": "zoom"},
{"wm_class": "spotify"},
]

_rule_music = [{"wm_class": "spotify"}]

group_and_rule = {
"code": ("", (layout2,), _rule_code),
"browse": ("", (layout1,), _rule_browse),
"analyze": ("󰉕", (layout1,), _rule_analyze),
"full": ("󰓓", (layout3,), _rule_full),
"sns": ("", (layout1,), _rule_sns),
"music": ("", (layout1,), _rule_music),
}


Expand Down
3 changes: 2 additions & 1 deletion apps/user/full/wm/qtile/conf/my_modules/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def set_keys():
desc="show power-menu",
),
Key([GlobalConf.mod], "equal", lazy.spawn("rofi -show calc -modi calc -no-show-match -no-sort")),
Key([GlobalConf.mod], "e", lazy.spawn("rofimoji"), desc="show rofimoji"),
Key([GlobalConf.mod], "e", lazy.spawn("rofimoji"), desc="show rofimoji by default config"),
Key([GlobalConf.mod, "control"], "e", lazy.spawn("rofimoji -f nerd"), desc="show rofimoji for searting nerd"),
# Toggle application
Key([GlobalConf.mod], "b", lazy.group["scratchpad"].dropdown_toggle("bluetooth")),
Key([GlobalConf.mod], "m", lazy.group["scratchpad"].dropdown_toggle("volume")),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/user/full/wm/wallpapers/unfixed/05_love.png
Binary file not shown.

0 comments on commit 4d58f26

Please sign in to comment.