Compare commits

...

6 commits
v1.1.0 ... main

Author SHA1 Message Date
20798d65cf Update to 1.1.5 2024-09-04 21:50:12 +04:00
08680646bb Inhibit idle by stop swayidle.service
Qtile had limited support for the wp-idle-inhibit protocol
so wayland-idle-inhibit doesn't work as expected.
We can inhibit idle by stopping swayidle.service
2024-07-23 23:25:29 +04:00
d8fead11b0 Fix swayidle restart path 2024-07-23 18:28:56 +04:00
4a0e71bac9 Update changelog 2024-07-21 14:48:01 +04:00
176ac6d06b Typo 2024-07-21 14:47:23 +04:00
6e2c43726d Change cursor to Bibata, fix idle-inhibit logic, add floating_shell window rule 2024-07-21 13:27:14 +04:00
17 changed files with 137 additions and 174 deletions

32
debian/changelog vendored
View file

@ -1,3 +1,35 @@
tileos-settings-qtile (1.1.5~tileos) unstable; urgency=medium
* Updates from Sway edition
-- Aleksey Samoilov <samoilov.lex@gmail.com> Wed, 04 Sep 2024 21:49:45 +0400
tileos-settings-qtile (1.1.4~tileos) unstable; urgency=medium
* Inhibit idle by stop swayidle.service
-- Aleksey Samoilov <samoilov.lex@gmail.com> Tue, 23 Jul 2024 23:24:39 +0400
tileos-settings-qtile (1.1.3~tileos) unstable; urgency=medium
* Fix swayidle autorestart
-- Aleksey Samoilov <samoilov.lex@gmail.com> Tue, 23 Jul 2024 18:28:24 +0400
tileos-settings-qtile (1.1.2~tileos) unstable; urgency=medium
* Fix typo
-- Aleksey Samoilov <samoilov.lex@gmail.com> Sun, 21 Jul 2024 14:47:34 +0400
tileos-settings-qtile (1.1.1~tileos) unstable; urgency=medium
* Change cursor theme to Bibata
* Fix idle-inhibit logic
* Added floating_shell window rule
-- Aleksey Samoilov <samoilov.lex@gmail.com> Sun, 21 Jul 2024 13:21:06 +0400
tileos-settings-qtile (1.1.0~tileos) unstable; urgency=medium
* First working configuration

View file

@ -1,97 +1,97 @@
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"
text: &TEXT "#cad3f5"
subtext0: &SUBTEXT0 "#e3e3f3"
subtext1: &SUBTEXT1 "#ced4e0"
surface2: &SURFACE2 "#5b6078"
surface1: &SURFACE1 "#494d64"
index16: &INDEX16 "#ed6c13"
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: *BASE # base
foreground: *TEXT # text
background: *BASE
foreground: *TEXT
# Bright and dim foreground colors
dim_foreground: *TEXT # text
bright_foreground: *TEXT # text
dim_foreground: *TEXT
bright_foreground: *TEXT
# Cursor colors
cursor:
text: *BASE # base
cursor: *ROSEWATER # rosewater
text: *BASE
cursor: *ROSEWATER
vi_mode_cursor:
text: *BASE # base
cursor: *LAVENDER # lavender
text: *BASE
cursor: *LAVENDER
# Search colors
search:
matches:
foreground: *BASE # base
background: *SUBTEXT0 # subtext0
foreground: *BASE
background: *SUBTEXT0
focused_match:
foreground: *BASE # base
background: *GREEN # green
foreground: *BASE
background: *GREEN
footer_bar:
foreground: *BASE # base
background: *SUBTEXT0 # subtext0
foreground: *BASE
background: *SUBTEXT0
# Keyboard regex hints
hints:
start:
foreground: *BASE # base
background: *YELLOW # yellow
foreground: *BASE
background: *YELLOW
end:
foreground: *BASE # base
background: *SUBTEXT0 # subtext0
foreground: *BASE
background: *SUBTEXT0
# Selection colors
selection:
text: *BASE # base
background: *ROSEWATER # rosewater
text: *BASE
background: *ROSEWATER
# Normal colors
normal:
black: *SURFACE1 # surface1
red: *RED # red
green: *GREEN # green
yellow: *YELLOW # yellow
blue: *BLUE # blue
magenta: *PINK # pink
cyan: *TEAL # teal
white: *SUBTEXT1 # subtext1
black: *SURFACE1
red: *RED
green: *GREEN
yellow: *YELLOW
blue: *BLUE
magenta: *PINK
cyan: *TEAL
white: *SUBTEXT1
# Bright colors
bright:
black: *SURFACE2 # surface2
red: *RED # red
green: *GREEN # green
yellow: *YELLOW # yellow
blue: *BLUE # blue
magenta: *PINK # pink
cyan: *TEAL # teal
white: *SUBTEXT0 # subtext0
black: *SURFACE2
red: *RED
green: *GREEN
yellow: *YELLOW
blue: *BLUE
magenta: *PINK
cyan: *TEAL
white: *SUBTEXT0
# Dim colors
dim:
black: *SURFACE1 # surface1
red: *RED # red
green: *GREEN # green
yellow: *YELLOW # yellow
blue: *BLUE # blue
magenta: *PINK # pink
cyan: *TEAL # teal
white: *SUBTEXT1 # subtext1
black: *SURFACE1
red: *RED
green: *GREEN
yellow: *YELLOW
blue: *BLUE
magenta: *PINK
cyan: *TEAL
white: *SUBTEXT1
indexed_colors:
- { index: 16, color: "#F5A97F" }
- { index: 17, color: "#F4DBD6" }
- { index: 16, color: *INDEX16 }
- { index: 17, color: *INDEX17 }

View file

@ -0,0 +1,7 @@
[Desktop Entry]
Exec=xdg-user-dirs-update
NoDisplay=true
StartupNotify=false
Terminal=false
TryExec=xdg-user-dirs-update
Type=Application

View file

@ -58,7 +58,7 @@ theme[cached_mid]="#8aadf4"
theme[cached_end]="#b7bdf8"
# Mem/Disk available meter (Peach -> Red)
theme[available_start]="#f5a97f"
theme[available_start]="#ed6c13"
theme[available_mid]="#ee99a0"
theme[available_end]="#ed8796"
@ -68,7 +68,7 @@ theme[used_mid]="#8bd5ca"
theme[used_end]="#91d7e3"
# Download graph colors (Peach -> Red)
theme[download_start]="#f5a97f"
theme[download_start]="#ed6c13"
theme[download_mid]="#ee99a0"
theme[download_end]="#ed8796"

View file

@ -2,7 +2,7 @@
gtk-theme-name=Catppuccin-Macchiato-Standard-Blue-Dark
gtk-icon-theme-name=ePapirus-Dark
gtk-font-name=Noto Sans 11
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-name=Bibata-Modern-Classic
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR

View file

@ -1,7 +1,7 @@
[
{
"label": "Lock",
"exec": "bash -c ~/.config/swaylock/lock.sh",
"exec": "bash -c /usr/share/qtile/scripts/lock.sh",
"icon": "system-lock-screen"
},
{

View file

@ -15,7 +15,7 @@ Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio C
<color name="macchiato_mauve" value="#c6a0f6"/>
<color name="macchiato_red" value="#ed6070"/>
<color name="macchiato_maroon" value="#ee99a0"/>
<color name="macchiato_peach" value="#f5a97f"/>
<color name="macchiato_peach" value="#ed6c13"/>
<color name="macchiato_yellow" value="#eed49f"/>
<color name="macchiato_green" value="#a6da95"/>
<color name="macchiato_teal" value="#8bd5ca"/>

View file

@ -217,7 +217,7 @@ screens = [
border_width = [0, 0, 2, 0],
)
],
mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e btop')}
mouse_callbacks={'Button1': lazy.spawn(terminal + ' --class floating_shell -e btop')}
),
widget.Spacer(length = 8),
widget.Memory(
@ -230,7 +230,7 @@ screens = [
border_width = [0, 0, 2, 0],
)
],
mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e btop')}
mouse_callbacks={'Button1': lazy.spawn(terminal + ' --class floating_shell -e btop')}
),
widget.Spacer(length = 8),
widget.Net(
@ -243,7 +243,7 @@ screens = [
border_width = [0, 0, 2, 0],
)
],
mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e nmtui')}
mouse_callbacks={'Button1': lazy.spawn(terminal + ' --class floating_shell -e nmtui')}
),
widget.Spacer(length = 8),
widget.Volume(
@ -267,7 +267,7 @@ screens = [
border_width = [0, 0, 2, 0],
)
],
mouse_callbacks={'Button1': lazy.spawn(terminal + ' -e calcurse')}
mouse_callbacks={'Button1': lazy.spawn(terminal + ' --class floating_shell -e calcurse')}
),
widget.Spacer(length = 8),
widget.TextBox(
@ -315,6 +315,7 @@ floating_layout = layout.Floating(
Match(wm_class="nwg-look"), # GTK settings
Match(wm_class="pavucontrol"), # PulseAudio Volume Control
Match(wm_class="wdisplays"), # Display configurator
Match(wm_class="floating_shell"), # Start all windows with app_id "floating_shell" in float
Match(title="Picture-in-Picture"),
Match(title="Firefox — Sharing Indicator"),
]

View file

@ -47,18 +47,10 @@ keys = [
lazy.spawncmd(),
desc="Spawn a command using a prompt widget"
),
Key(
[mod],
"x",
lazy.widget["keyboardlayout"].next_keyboard(),
desc="Next keyboard layout."
),
Key([mod], "d",
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"
),
# Switch between windows
Key(
[mod],
@ -84,9 +76,12 @@ keys = [
lazy.layout.up(),
desc="Move focus up"
),
# Switch to next keyboard layout. WARNING: this command is stop working if
# you switch to non-latin layout (e.g. Russian). This is known issue.
# Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
Key(
[mod],
"space",
lazy.layout.next(),
desc="Switch window focus to other pane(s) of stack"),
# Move windows between left/right columns or move up/down in current stack.
# Moving out of range in Columns layout will create new column.
@ -162,8 +157,8 @@ keys = [
desc="Toggle fullscreen on the focused window",
),
Key(
[mod],
"t",
[mod, "shift"],
"space",
lazy.window.toggle_floating(),
desc="Toggle floating on the focused window"),

View file

@ -1,6 +1,6 @@
Net/ThemeName "Catppuccin-Macchiato-Standard-Blue-Dark"
Net/IconThemeName "ePapirus-Dark"
Gtk/CursorThemeName "breeze_cursors"
Gtk/CursorThemeName "Bibata-Modern-Classic"
Net/EnableEventSounds 1
EnableInputFeedbackSounds 0
Xft/Antialias 1

View file

@ -5,7 +5,7 @@ include "/home/sunderland93/.gtkrc-2.0.mine"
gtk-theme-name="Catppuccin-Macchiato-Standard-Blue-Dark"
gtk-icon-theme-name="ePapirus-Dark"
gtk-font-name="Noto Sans 11"
gtk-cursor-theme-name="breeze_cursors"
gtk-cursor-theme-name="Bibata-Modern-Classic"
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR

View file

@ -2,4 +2,4 @@
[Icon Theme]
Name=Default
Comment=Default Cursor Theme
Inherits=Catppuccin-Macchiato-Blue-Cursors
Inherits=Bibata-Modern-Classic

View file

@ -1,81 +0,0 @@
#!/usr/bin/env python3
import sys
from dataclasses import dataclass
from signal import SIGINT, SIGTERM, signal
from threading import Event
from pywayland.client.display import Display
from pywayland.protocol.idle_inhibit_unstable_v1.zwp_idle_inhibit_manager_v1 import (
ZwpIdleInhibitManagerV1,
)
from pywayland.protocol.wayland.wl_compositor import WlCompositor
from pywayland.protocol.wayland.wl_registry import WlRegistryProxy
from pywayland.protocol.wayland.wl_surface import WlSurface
@dataclass
class GlobalRegistry:
surface: WlSurface | None = None
inhibit_manager: ZwpIdleInhibitManagerV1 | None = None
def handle_registry_global(
wl_registry: WlRegistryProxy, id_num: int, iface_name: str, version: int
) -> None:
global_registry: GlobalRegistry = wl_registry.user_data or GlobalRegistry()
if iface_name == "wl_compositor":
compositor = wl_registry.bind(id_num, WlCompositor, version)
global_registry.surface = compositor.create_surface() # type: ignore
elif iface_name == "zwp_idle_inhibit_manager_v1":
global_registry.inhibit_manager = wl_registry.bind(
id_num, ZwpIdleInhibitManagerV1, version
)
def main() -> None:
done = Event()
signal(SIGINT, lambda _, __: done.set())
signal(SIGTERM, lambda _, __: done.set())
global_registry = GlobalRegistry()
display = Display()
display.connect()
registry = display.get_registry() # type: ignore
registry.user_data = global_registry
registry.dispatcher["global"] = handle_registry_global
def shutdown() -> None:
display.dispatch()
display.roundtrip()
display.disconnect()
display.dispatch()
display.roundtrip()
if global_registry.surface is None or global_registry.inhibit_manager is None:
print("Wayland seems not to support idle_inhibit_unstable_v1 protocol.")
shutdown()
sys.exit(1)
inhibitor = global_registry.inhibit_manager.create_inhibitor( # type: ignore
global_registry.surface
)
display.dispatch()
display.roundtrip()
print("Inhibiting idle...")
done.wait()
print("Shutting down...")
inhibitor.destroy()
shutdown()
if __name__ == "__main__":
main()

View file

@ -1,10 +1,9 @@
[Unit]
Description=Automatically restart the swayidle when its configuration changes
PartOf=swayidle.service
After=swayidle.service
[Path]
PathChanged=%h/.config/swayidle/config
[Install]
WantedBy=qtile-session.target
WantedBy=paths.target

View file

@ -2,12 +2,12 @@
# Qtile idle-inhibitor toggle
function toggle {
if pgrep -f "wayland-idle-inhibitor" > /dev/null
if pgrep -f "swayidle" > /dev/null
then
pkill -f wayland-idle-inhibitor
systemctl --user stop swayidle.service
notify-send -r 5556 -u normal " Screensaver Disabled"
else
/usr/bin/wayland-idle-inhibitor.py &
systemctl --user start swayidle.service
notify-send -r 5556 -u normal " Screensaver Enabled"
fi
}
@ -17,7 +17,7 @@ case $1 in
toggle
;;
*)
if pgrep -f "wayland-idle-inhibitor" > /dev/null
if pgrep -f "swayidle" > /dev/null
then
icon=""
else

10
usr/share/qtile/scripts/lock.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
USER_SCRIPT="$HOME/.config/swaylock/lock.sh"
GLOB_SCRIPT="/usr/share/sway/scripts/swaylock.sh"
if [[ -x "$USER_SCRIPT" ]]; then
"$USER_SCRIPT"
else
"$GLOB_SCRIPT"
fi