diff --git a/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml b/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml
index 183b3c8..a68f0e9 100644
--- a/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml
+++ b/etc/skel/.config/alacritty/theme/catppuccin-macchiato.yml
@@ -1,78 +1,96 @@
+color_set:
+ text: &TEXT "#CAD3F5"
+ subtext0: &SUBTEXT0 "#E3E3F3"
+ subtext1: &SUBTEXT1 "#CED4E0"
+ surface2: &SURFACE2 "#5B6078"
+ surface1: &SURFACE1 "#494D64"
+ index16: &INDEX16 "#F5A97F"
+ index17: &INDEX17 "#F4DBD6"
+ base: &BASE "#24273A"
+ red: &RED "#ED6070"
+ green: &GREEN "#A6DA95"
+ blue: &BLUE "#8AADF4"
+ yellow: &YELLOW "#EED49F"
+ pink: &PINK "#F5BDE6"
+ teal: &TEAL "#8BD5CA"
+ rosewater: &ROSEWATER "#F4DBD6"
+ lavender: &LAVENDER "#B7BDF8"
+
colors:
# Default colors
primary:
- background: "#24273A" # base
- foreground: "#CAD3F5" # text
+ background: *BASE # base
+ foreground: *TEXT # text
# Bright and dim foreground colors
- dim_foreground: "#CAD3F5" # text
- bright_foreground: "#CAD3F5" # text
+ dim_foreground: *TEXT # text
+ bright_foreground: *TEXT # text
# Cursor colors
cursor:
- text: "#24273A" # base
- cursor: "#F4DBD6" # rosewater
+ text: *BASE # base
+ cursor: *ROSEWATER # rosewater
vi_mode_cursor:
- text: "#24273A" # base
- cursor: "#B7BDF8" # lavender
+ text: *BASE # base
+ cursor: *LAVENDER # lavender
# Search colors
search:
matches:
- foreground: "#24273A" # base
- background: "#A5ADCB" # subtext0
+ foreground: *BASE # base
+ background: *SUBTEXT0 # subtext0
focused_match:
- foreground: "#24273A" # base
- background: "#A6DA95" # green
+ foreground: *BASE # base
+ background: *GREEN # green
footer_bar:
- foreground: "#24273A" # base
- background: "#A5ADCB" # subtext0
+ foreground: *BASE # base
+ background: *SUBTEXT0 # subtext0
# Keyboard regex hints
hints:
start:
- foreground: "#24273A" # base
- background: "#EED49F" # yellow
+ foreground: *BASE # base
+ background: *YELLOW # yellow
end:
- foreground: "#24273A" # base
- background: "#A5ADCB" # subtext0
+ foreground: *BASE # base
+ background: *SUBTEXT0 # subtext0
# Selection colors
selection:
- text: "#24273A" # base
- background: "#F4DBD6" # rosewater
+ text: *BASE # base
+ background: *ROSEWATER # rosewater
# Normal colors
normal:
- black: "#494D64" # surface1
- red: "#ED8796" # red
- green: "#A6DA95" # green
- yellow: "#EED49F" # yellow
- blue: "#8AADF4" # blue
- magenta: "#F5BDE6" # pink
- cyan: "#8BD5CA" # teal
- white: "#B8C0E0" # subtext1
+ black: *SURFACE1 # surface1
+ red: *RED # red
+ green: *GREEN # green
+ yellow: *YELLOW # yellow
+ blue: *BLUE # blue
+ magenta: *PINK # pink
+ cyan: *TEAL # teal
+ white: *SUBTEXT1 # subtext1
# Bright colors
bright:
- black: "#5B6078" # surface2
- red: "#ED8796" # red
- green: "#A6DA95" # green
- yellow: "#EED49F" # yellow
- blue: "#8AADF4" # blue
- magenta: "#F5BDE6" # pink
- cyan: "#8BD5CA" # teal
- white: "#A5ADCB" # subtext0
+ black: *SURFACE2 # surface2
+ red: *RED # red
+ green: *GREEN # green
+ yellow: *YELLOW # yellow
+ blue: *BLUE # blue
+ magenta: *PINK # pink
+ cyan: *TEAL # teal
+ white: *SUBTEXT0 # subtext0
# Dim colors
dim:
- black: "#494D64" # surface1
- red: "#ED8796" # red
- green: "#A6DA95" # green
- yellow: "#EED49F" # yellow
- blue: "#8AADF4" # blue
- magenta: "#F5BDE6" # pink
- cyan: "#8BD5CA" # teal
- white: "#B8C0E0" # subtext1
+ black: *SURFACE1 # surface1
+ red: *RED # red
+ green: *GREEN # green
+ yellow: *YELLOW # yellow
+ blue: *BLUE # blue
+ magenta: *PINK # pink
+ cyan: *TEAL # teal
+ white: *SUBTEXT1 # subtext1
indexed_colors:
- { index: 16, color: "#F5A97F" }
diff --git a/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml b/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml
index e2b840e..826a71a 100644
--- a/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml
+++ b/etc/skel/.config/pluma/styles/catppuccin-macchiato.xml
@@ -13,7 +13,7 @@ Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio C
-
+
@@ -24,8 +24,8 @@ Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio C
-
-
+
+
diff --git a/etc/skel/.config/qt6ct/qt6ct.conf b/etc/skel/.config/qt6ct/qt6ct.conf
index 5102cb6..79eb85e 100644
--- a/etc/skel/.config/qt6ct/qt6ct.conf
+++ b/etc/skel/.config/qt6ct/qt6ct.conf
@@ -3,7 +3,7 @@ color_scheme_path=$HOME/.config/qt6ct/colors/Catppuccin-Macchiato.conf
custom_palette=true
icon_theme=ePapirus
standard_dialogs=default
-style=Fusion
+style=kvantum-dark
[Fonts]
fixed="Noto Sans,11,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
diff --git a/etc/skel/.config/qtile/autostart.sh b/etc/skel/.config/qtile/autostart.sh
index 075d06e..c310532 100755
--- a/etc/skel/.config/qtile/autostart.sh
+++ b/etc/skel/.config/qtile/autostart.sh
@@ -6,13 +6,26 @@ export XDG_SESSION_TYPE=wayland
VARIABLES="DESKTOP_SESSION XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE"
VARIABLES="${VARIABLES} DISPLAY WAYLAND_DISPLAY"
-if hash dbus-update-activation-environment 2>/dev/null; then
- # shellcheck disable=SC2086
- dbus-update-activation-environment --systemd ${VARIABLES:- --all}
-fi
+dbus-update-activation-environment --systemd ${VARIABLES:- --all} &
# PolicyKit Agent
/usr/bin/mate-polkit
# Wallpaper script (you can change wallpaper with Azote)
-exec ~/.azotebg
+source ~/.azotebg
+
+# Start nwg-drawer as a daemon
+pkill nwg-drawer
+nwg-drawer -r &
+
+# Start PCmanFM-Qt as a daemon
+pkill pcmanfm-qt
+pcmanfm-qt -d &
+
+# Clipboard daemon
+pkill wl-paste
+wl-paste --watch cliphist store &
+
+# Power daemon
+pkill poweralertd
+poweralertd &
diff --git a/etc/skel/.config/qtile/config.py b/etc/skel/.config/qtile/config.py
index 02bc67c..2c61f3d 100644
--- a/etc/skel/.config/qtile/config.py
+++ b/etc/skel/.config/qtile/config.py
@@ -1,35 +1,11 @@
-# Copyright (c) 2010 Aldo Cortesi
-# Copyright (c) 2010, 2014 dequis
-# Copyright (c) 2012 Randall Ma
-# Copyright (c) 2012-2014 Tycho Andersen
-# Copyright (c) 2012 Craig Barnes
-# Copyright (c) 2013 horsik
-# Copyright (c) 2013 Tao Sauvage
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
+# The primary config for Qtile on TileOS
-from libqtile import bar, hook, layout, qtile
+from libqtile import bar, hook, layout
from libqtile.config import Group, Key, Match, Screen
from libqtile.lazy import lazy
# Make sure 'qtile-extras' is installed or this config will not work.
-from qtile_extras import widget
-from qtile_extras.widget.decorations import BorderDecoration
+from qtile_extras import widget # type: ignore
+from qtile_extras.widget.decorations import BorderDecoration # type: ignore
from libqtile.backend.wayland import InputConfig
from keybindings import mod, keys, terminal
from mouse import mouse
@@ -43,15 +19,19 @@ group_labels = ["1", "2", "3", "4", "5", "6", "7", "8", "9",]
group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall", "monadtall"]
-for i in range(len(group_names)):
+@hook.subscribe.startup
+def autostart():
+ home = os.path.expanduser('~/.config/qtile/autostart.sh')
+ subprocess.Popen([home])
+
+for n in range(len(group_names)):
groups.append(
Group(
- name=group_names[i],
- layout=group_layouts[i].lower(),
- label=group_labels[i],
+ name=group_names[n],
+ layout=group_layouts[n].lower(),
+ label=group_labels[n],
))
-
for i in groups:
keys.extend(
[
@@ -72,13 +52,13 @@ for i in groups:
]
)
-colors = colors.Macchiato
+qtile_colors = colors.Macchiato
# Common settings for all layouts
layout_theme = {"border_width": 2,
"margin": 8,
- "border_focus": colors[11],
- "border_normal": colors[15]
+ "border_focus": qtile_colors[11],
+ "border_normal": qtile_colors[15]
}
layouts = [
@@ -101,7 +81,7 @@ widget_defaults = dict(
font="Noto Sans",
fontsize=14,
padding=0,
- background=colors[22]
+ background=qtile_colors[22]
)
extension_defaults = widget_defaults.copy()
@@ -113,7 +93,7 @@ screens = [
widget.Image(
filename="~/.config/qtile/icons/logo.png",
margin = 3,
- mouse_callbacks={'Button1': lambda: qtile.cmd_spawn('nwg-drawer')}
+ mouse_callbacks={'Button1': lazy.spawn('nwg-drawer')}
),
widget.GroupBox(
fontsize = 14,
@@ -122,49 +102,49 @@ screens = [
padding_y = 2,
padding_x = 3,
borderwidth = 3,
- active = colors[13],
- inactive = colors[13],
+ active = qtile_colors[13],
+ inactive = qtile_colors[13],
rounded = False,
- highlight_color = colors[21],
+ highlight_color = qtile_colors[21],
highlight_method = "line",
- urgent_border = colors[4],
- urgent_text = colors[4],
- this_current_screen_border = colors[10],
+ urgent_border = qtile_colors[4],
+ urgent_text = qtile_colors[4],
+ this_current_screen_border = qtile_colors[10],
),
widget.Sep(
linewidth=1,
padding=10,
- foreground=colors[13],
- background=colors[22]
+ foreground=qtile_colors[13],
+ background=qtile_colors[22]
),
widget.CurrentLayoutIcon(
custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
- foreground=colors[13],
- background=colors[22],
+ foreground=qtile_colors[13],
+ background=qtile_colors[22],
padding=0,
scale=0.7
),
widget.CurrentLayout(
- foreground = colors[13],
+ foreground = qtile_colors[13],
padding = 5
),
widget.Sep(
linewidth=1,
padding=10,
- foreground=colors[13],
- background=colors[22]
+ foreground=qtile_colors[13],
+ background=qtile_colors[22]
),
widget.Spacer(length = 8),
widget.Prompt(),
widget.WindowName(
- foreground = colors[13],
+ foreground = qtile_colors[13],
max_chars = 40,
),
widget.Spacer(length = 8),
widget.StatusNotifier(
decorations=[
BorderDecoration(
- colour = colors[1],
+ colour = qtile_colors[1],
border_width = [0, 0, 2, 0],
)
],
@@ -173,10 +153,10 @@ screens = [
widget.Mpris2(
playing_text = "",
stop_pause_text = "",
- foreground = colors[2],
+ foreground = qtile_colors[2],
decorations=[
BorderDecoration(
- colour = colors[2],
+ colour = qtile_colors[2],
border_width = [0, 0, 2, 0],
)
],
@@ -189,10 +169,10 @@ screens = [
font = "Noto Sans",
fontsize = "14",
fmt = '⌨ {}',
- foreground = colors[3],
+ foreground = qtile_colors[3],
decorations=[
BorderDecoration(
- colour = colors[3],
+ colour = qtile_colors[3],
border_width = [0, 0, 2, 0],
)
],
@@ -201,16 +181,16 @@ screens = [
# Custom clipboard manager widget, based on Cliphist
widget.TextBox(
text="",
- foreground = colors[4],
+ foreground = qtile_colors[4],
decorations=[
BorderDecoration(
- colour = colors[4],
+ colour = qtile_colors[4],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("/usr/share/qtile/scripts/clipboard.sh --list"),
- "Button2": lambda: qtile.cmd_spawn("rm -f ~/.cache/cliphist/db"),
- "Button3": lambda: qtile.cmd_spawn("/usr/share/qtile/scripts/clipboard.sh --del")
+ mouse_callbacks={"Button1": lazy.spawn("/usr/share/qtile/scripts/clipboard.sh --list"),
+ "Button2": lazy.spawn("rm -f ~/.cache/cliphist/db"),
+ "Button3": lazy.spawn("/usr/share/qtile/scripts/clipboard.sh --del")
},
),
widget.Spacer(length = 8),
@@ -218,89 +198,89 @@ screens = [
widget.GenPollText(
update_interval=1,
func=lambda: subprocess.check_output(os.path.expanduser("/usr/share/qtile/scripts/idle-inhibit")).decode(),
- foreground = colors[5],
+ foreground = qtile_colors[5],
decorations=[
BorderDecoration(
- colour = colors[5],
+ colour = qtile_colors[5],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button1': lambda: qtile.spawn(os.path.expanduser("/usr/share/qtile/scripts/idle-inhibit toggle"), shell=True)}
+ mouse_callbacks={'Button1': lazy.spawn(os.path.expanduser("/usr/share/qtile/scripts/idle-inhibit toggle"), shell=True)}
),
widget.Spacer(length = 8),
widget.CPU(
format = ' {load_percent:.1f}%',
- foreground = colors[5],
+ foreground = qtile_colors[5],
decorations=[
BorderDecoration(
- colour = colors[5],
+ colour = qtile_colors[5],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + ' -e btop')}
+ mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e btop')}
),
widget.Spacer(length = 8),
widget.Memory(
format = " {MemUsed:.1f}/{MemTotal:.1f} GiB",
measure_mem='G',
- foreground = colors[6],
+ foreground = qtile_colors[6],
decorations=[
BorderDecoration(
- colour = colors[6],
+ colour = qtile_colors[6],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + ' -e btop')}
+ mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e btop')}
),
widget.Spacer(length = 8),
widget.Net(
prefix="M",
format=' {down:.0f}{down_suffix} ↓↑ {up:.0f}{up_suffix}',
- foreground = colors[7],
+ foreground = qtile_colors[7],
decorations=[
BorderDecoration(
- colour = colors[7],
+ colour = qtile_colors[7],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + ' -e nmtui')}
+ mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e nmtui')}
),
widget.Spacer(length = 8),
widget.Volume(
- foreground = colors[8],
+ foreground = qtile_colors[8],
fmt = 'Vol: {}',
decorations=[
BorderDecoration(
- colour = colors[8],
+ colour = qtile_colors[8],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button3': lambda: qtile.cmd_spawn('pavucontrol')}
+ mouse_callbacks={'Button3': lazy.spawn('pavucontrol')}
),
widget.Spacer(length = 8),
widget.Clock(
format="%d %b %H:%M",
- foreground = colors[9],
+ foreground = qtile_colors[9],
decorations=[
BorderDecoration(
- colour = colors[9],
+ colour = qtile_colors[9],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(terminal + ' -e calcurse')}
+ mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e calcurse')}
),
widget.Spacer(length = 8),
widget.TextBox(
text="",
fontsize = 14,
- foreground = colors[10],
+ foreground = qtile_colors[10],
decorations=[
BorderDecoration(
- colour = colors[10],
+ colour = qtile_colors[10],
border_width = [0, 0, 2, 0],
)
],
- mouse_callbacks={'Button1': lambda: qtile.cmd_spawn('nwg-bar')}
+ mouse_callbacks={'Button1': lazy.spawn('nwg-bar')}
),
widget.Spacer(length = 8),
],
@@ -317,8 +297,8 @@ floats_kept_above = True
cursor_warp = False
floating_layout = layout.Floating(
border_width=2,
- border_focus=colors[11],
- border_normal=colors[15],
+ border_focus=qtile_colors[11],
+ border_normal=qtile_colors[15],
float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client.
*layout.Floating.default_float_rules,
@@ -328,6 +308,15 @@ floating_layout = layout.Floating(
Match(wm_class="ssh-askpass"), # ssh-askpass
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
+ Match(wm_class="qt5ct"), # Qt5 Config
+ Match(wm_class="qt6ct"), # Qt6 config
+ Match(wm_class="calamares"), # Calamares installer
+ Match(wm_class="engrampa"), # Archive manager
+ Match(wm_class="nwg-look"), # GTK settings
+ Match(wm_class="pavucontrol"), # PulseAudio Volume Control
+ Match(wm_class="wdisplays"), # Display configurator
+ Match(title="Picture-in-Picture"),
+ Match(title="Firefox — Sharing Indicator"),
]
)
auto_fullscreen = True
@@ -341,11 +330,6 @@ auto_minimize = True
# When using the Wayland backend, this can be used to configure input devices.
wl_input_rules = None
-@hook.subscribe.startup_once
-def start_once():
- home = os.path.expanduser('~')
- subprocess.call([home + '/.config/qtile/autostart.sh'])
-
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
diff --git a/etc/skel/.config/qtile/icons/layout-bsp.png b/etc/skel/.config/qtile/icons/layout-bsp.png
index 9324acf..8e7c1a0 100644
Binary files a/etc/skel/.config/qtile/icons/layout-bsp.png and b/etc/skel/.config/qtile/icons/layout-bsp.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-floating.png b/etc/skel/.config/qtile/icons/layout-floating.png
index e876b13..6b33862 100644
Binary files a/etc/skel/.config/qtile/icons/layout-floating.png and b/etc/skel/.config/qtile/icons/layout-floating.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-max.png b/etc/skel/.config/qtile/icons/layout-max.png
index 889bc78..0bb7425 100644
Binary files a/etc/skel/.config/qtile/icons/layout-max.png and b/etc/skel/.config/qtile/icons/layout-max.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-monadtall.png b/etc/skel/.config/qtile/icons/layout-monadtall.png
index cf84fb8..826c330 100644
Binary files a/etc/skel/.config/qtile/icons/layout-monadtall.png and b/etc/skel/.config/qtile/icons/layout-monadtall.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-stack.png b/etc/skel/.config/qtile/icons/layout-stack.png
index 8dcec10..29fb04a 100644
Binary files a/etc/skel/.config/qtile/icons/layout-stack.png and b/etc/skel/.config/qtile/icons/layout-stack.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-tile.png b/etc/skel/.config/qtile/icons/layout-tile.png
index 74cd1e7..abb187d 100644
Binary files a/etc/skel/.config/qtile/icons/layout-tile.png and b/etc/skel/.config/qtile/icons/layout-tile.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-treetab.png b/etc/skel/.config/qtile/icons/layout-treetab.png
index bd9c396..8b92fdd 100644
Binary files a/etc/skel/.config/qtile/icons/layout-treetab.png and b/etc/skel/.config/qtile/icons/layout-treetab.png differ
diff --git a/etc/skel/.config/qtile/icons/layout-zoomy.png b/etc/skel/.config/qtile/icons/layout-zoomy.png
index 74e0c03..83f13c1 100644
Binary files a/etc/skel/.config/qtile/icons/layout-zoomy.png and b/etc/skel/.config/qtile/icons/layout-zoomy.png differ
diff --git a/etc/skel/.config/qtile/keybindings.py b/etc/skel/.config/qtile/keybindings.py
index f396648..c8d92e7 100644
--- a/etc/skel/.config/qtile/keybindings.py
+++ b/etc/skel/.config/qtile/keybindings.py
@@ -54,7 +54,7 @@ keys = [
desc="Next keyboard layout."
),
Key([mod], "d",
- lazy.spawn("rofi -show combi -combi-modi 'drun,run' -terminal $term -ssh-command '{terminal} {ssh-client} {host} [-p {port}]' -run-shell-command '{terminal} {cmd}'"),
+ lazy.spawn("rofi -show combi -combi-modi 'drun,run' -terminal terminal -ssh-command '{terminal} {ssh-client} {host} [-p {port}]' -run-shell-command '{terminal} {cmd}'"),
desc="Launch Rofi menu"
),
@@ -171,19 +171,19 @@ keys = [
Key(
[],
"XF86AudioMute",
- lazy.spawn("/usr/share/qtile/scripts/volumecontrol mute"),
+ lazy.spawn("/usr/share/qtile/scripts/volume-control.sh mute"),
desc='Mute audio'
),
Key(
[],
"XF86AudioLowerVolume",
- lazy.spawn("/usr/share/qtile/scripts/volumecontrol down"),
+ lazy.spawn("/usr/share/qtile/scripts/volume-control.sh down"),
desc='Volume down'
),
Key(
[],
"XF86AudioRaiseVolume",
- lazy.spawn("/usr/share/qtile/scripts/volumecontrol up"),
+ lazy.spawn("/usr/share/qtile/scripts/volume-control.sh up"),
desc='Volume up'
),
@@ -191,13 +191,13 @@ keys = [
Key(
[],
"XF86MonBrightnessDown",
- lazy.spawn("/usr/share/qtile/scripts/brightnesscontrol down"),
+ lazy.spawn("/usr/share/qtile/scripts/brightness-control.sh down"),
desc='Brightness down'
),
Key(
[],
"XF86MonBrightnessUp",
- lazy.spawn("/usr/share/qtile/scripts/brightnesscontrol up"),
+ lazy.spawn("/usr/share/qtile/scripts/brightness-control.sh up"),
desc='Brightness up'
),
diff --git a/usr/bin/start-qtile-wayland b/usr/bin/start-qtile-wayland
index 5ae3f17..511bb62 100755
--- a/usr/bin/start-qtile-wayland
+++ b/usr/bin/start-qtile-wayland
@@ -47,4 +47,4 @@ if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d" ]; then
set +o allexport
fi
-exec systemd-cat -- /usr/bin/qtile start -b wayland $@
\ No newline at end of file
+exec systemd-cat -- dbus-run-session /usr/bin/qtile start -b wayland $@
diff --git a/usr/share/qtile/scripts/brightness-control.sh b/usr/share/qtile/scripts/brightness-control.sh
new file mode 100755
index 0000000..e171bf8
--- /dev/null
+++ b/usr/share/qtile/scripts/brightness-control.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+function send_notification {
+local VALUE=$(light -G | cut -d'.' -f1)
+local TEXT="Brightness: ${VALUE}%"
+
+notify-send \
+ --expire-time 800 \
+ --hint string:x-canonical-private-synchronous:brightness \
+ --hint "int:value:$VALUE" \
+ --hint "int:transient:1" \
+ "${TEXT}"
+}
+
+case $1 in
+ up)
+ light -A 5
+ send_notification
+ ;;
+ down)
+ light -U 5
+ send_notification
+ ;;
+esac
diff --git a/usr/share/qtile/scripts/brightnesscontrol b/usr/share/qtile/scripts/brightnesscontrol
deleted file mode 100755
index d87d803..0000000
--- a/usr/share/qtile/scripts/brightnesscontrol
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# You can call this script like this:
-# brightnessControl up
-# brightnessControl down
-
-# Script inspired by these wonderful people:
-# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
-# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
-
-function send_notification {
- icon=/usr/share/icons/Papirus-Dark/16x16/actions/brightnesssettings.svg
- brightness=$(light -G)
- brightness=$(echo "$brightness" | awk '{print ($0-int($0)<0.499)?int($0):int($0)+1}')
- # Make the bar with the special character ─ (it's not dash -)
- # https://en.wikipedia.org/wiki/Box-drawing_character
- bar=$(seq -s "─" 0 $((brightness / 10 )) | sed 's/[0-9]//g')
- # brightness=$((brightness *100 / 255 ))
- #echo $bar
- #echo $test
- # Send the notification
- notify-send -i "$icon" -r 5555 -u normal "$bar $brightness"
-}
-
-case $1 in
- up)
- # increase the backlight by 5%
- light -A 5
- send_notification
- canberra-gtk-play -i audio-volume-change
- ;;
- down)
- # decrease the backlight by 5%
- light -U 5
- send_notification
- canberra-gtk-play -i audio-volume-change
- ;;
- *)
- brightness=$(light -G)
- brightness=$(echo "$brightness" | awk '{print ($0-int($0)<0.499)?int($0):int($0)+1}')
- icon=""
- printf "%s" "$icon $brightness" "%"
- ;;
-esac
-
diff --git a/usr/share/qtile/scripts/idle-inhibit b/usr/share/qtile/scripts/idle-inhibit
index 638401d..2da3e7b 100755
--- a/usr/share/qtile/scripts/idle-inhibit
+++ b/usr/share/qtile/scripts/idle-inhibit
@@ -5,7 +5,7 @@ function toggle {
if pgrep "swayidle" > /dev/null
then
pkill swayidle
- notify-send -r 5556 -u normal " Swayidle Inactive"
+ notify-send -r 5556 -u normal " Screensaver Disabled"
else
cd /tmp
grim screen.png
@@ -17,7 +17,7 @@ function toggle {
timeout 5 'qtile cmd-obj -o core -f hide_cursor' resume 'qtile cmd-obj -o core -f unhide_cursor' \
timeout 300 'swaylock -f -i screen-out.png' \
timeout 600 'wlopm --off \*' resume 'wlopm --on \*' &
- notify-send -r 5556 -u normal " Swayidle Active"
+ notify-send -r 5556 -u normal " Screensaver Enabled"
fi
}
@@ -28,11 +28,11 @@ case $1 in
*)
if pgrep "swayidle" > /dev/null
then
- icon=""
- else
icon=""
+ else
+ icon=""
fi
- printf "%s" "$icon "
+ printf "%s" "$icon"
;;
esac
diff --git a/usr/share/qtile/scripts/volume-control.sh b/usr/share/qtile/scripts/volume-control.sh
new file mode 100755
index 0000000..bf6a046
--- /dev/null
+++ b/usr/share/qtile/scripts/volume-control.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+function send_notification {
+local VOLUME=$(pulsemixer --get-volume)
+# get first percent value
+local VOLUME=${VOLUME%%%*}
+local VOLUME=${VOLUME##* }
+
+local TEXT="Volume: ${VOLUME}%"
+case $(pulsemixer --get-mute) in
+ *1)
+ TEXT="Volume: muted"
+ VOLUME=0
+ ;;
+esac
+
+notify-send \
+ --expire-time 800 \
+ --hint string:x-canonical-private-synchronous:volume \
+ --hint "int:value:$VOLUME" \
+ --hint "int:transient:1" \
+ "${TEXT}"
+}
+
+case $1 in
+ up)
+ pulsemixer --change-volume +5
+ send_notification
+ ;;
+ down)
+ pulsemixer --change-volume -5
+ send_notification
+ ;;
+ mute)
+ pulsemixer --toggle-mute
+ send_notification
+ ;;
+esac
diff --git a/usr/share/qtile/scripts/volumecontrol b/usr/share/qtile/scripts/volumecontrol
deleted file mode 100755
index 057eb24..0000000
--- a/usr/share/qtile/scripts/volumecontrol
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/bin/bash
-
-# You can call this script like this:
-# volumecontrol up
-# volumecontrol down
-# volumecontrol mute
-
-function get_volume {
- amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
-}
-
-function is_mute {
- amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off > /dev/null
-}
-
-function send_notification {
- volume=$(get_volume)
- # Make the bar with the special character ─ (it's not dash -)
- # https://en.wikipedia.org/wiki/Box-drawing_character
-if [ "$volume" = "0" ]; then
- icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-muted.png"
-notify-send -i "$icon_name" -r 5556 -u normal "$volume"
- else
- if [ "$volume" -lt "10" ]; then
- icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-low.png"
-notify-send -i "$icon_name" -r 5556 -u normal "$volume"
- else
- if [ "$volume" -lt "30" ]; then
- icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-low.png"
- else
- if [ "$volume" -lt "70" ]; then
- icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-medium.png"
- else
- icon_name="/usr/share/icons/Adwaita/16x16/legacy/audio-volume-high.png"
- fi
- fi
- fi
-fi
-bar=$(seq -s "─" $(($volume/5)) | sed 's/[0-9]//g')
-# Send the notification
-notify-send -i "$icon_name" -r 5556 -u normal "$bar $volume"
-}
-
-case $1 in
- up)
- # Set the volume on (if it was muted)
- amixer set Master on > /dev/null
- # Up the volume (+ 2%)
- amixer sset Master 2%+ > /dev/null
- send_notification
- canberra-gtk-play -i audio-volume-change
- ;;
- down)
- amixer set Master on > /dev/null
- amixer sset Master 2%- > /dev/null
- send_notification
- canberra-gtk-play -i audio-volume-change
- ;;
- mute)
- # Toggle mute
- amixer set Master 1+ toggle > /dev/null
- if is_mute ; then
- notify-send -i "/usr/share/icons/Adwaita/16x16/legacy/audio-volume-muted.png" -r 5556 -u normal "$bar Audio Muted"
- else
- send_notification
- canberra-gtk-play -i audio-volume-change
- fi
- ;;
- *)
- volume="$(get_volume)"
-
- if [[ $volume == "100" ]]; then
- icon=""
- elif [[ $volume -ge "89" && $volume -le "100" ]]; then
- icon=""
- elif [[ $volume -ge "79" && $volume -le "90" ]]; then
- icon=""
- elif [[ $volume -ge "69" && $volume -le "80" ]]; then
- icon=""
- elif [[ $volume -ge "59" && $volume -le "70" ]]; then
- icon=""
- elif [[ $volume -ge "49" && $volume -le "60" ]]; then
- icon=""
- elif [[ $volume -ge "39" && $volume -le "50" ]]; then
- icon=""
- elif [[ $volume -ge "29" && $volume -le "40" ]]; then
- icon=""
- elif [[ $volume -ge "19" && $volume -le "30" ]]; then
- icon=""
- elif [[ $volume -ge "9" && $volume -le "20" ]]; then
- icon=""
- elif [[ $volume -gt "0" && $volume -le "10" ]]; then
- icon=""
- elif [[ $volume -eq "0" ]]; then
- icon=""
- volume=" M "
- fi
-
-
-if is_mute; then
- icon=""
- volume=" M "
-fi
-
-printf "%s" "$icon $volume%"
- ;;
-esac
-