Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
20798d65cf | |||
08680646bb | |||
d8fead11b0 | |||
4a0e71bac9 | |||
176ac6d06b | |||
6e2c43726d |
17 changed files with 137 additions and 174 deletions
32
debian/changelog
vendored
32
debian/changelog
vendored
|
@ -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
|
tileos-settings-qtile (1.1.0~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
* First working configuration
|
* First working configuration
|
||||||
|
|
|
@ -1,97 +1,97 @@
|
||||||
color_set:
|
color_set:
|
||||||
text: &TEXT "#CAD3F5"
|
text: &TEXT "#cad3f5"
|
||||||
subtext0: &SUBTEXT0 "#E3E3F3"
|
subtext0: &SUBTEXT0 "#e3e3f3"
|
||||||
subtext1: &SUBTEXT1 "#CED4E0"
|
subtext1: &SUBTEXT1 "#ced4e0"
|
||||||
surface2: &SURFACE2 "#5B6078"
|
surface2: &SURFACE2 "#5b6078"
|
||||||
surface1: &SURFACE1 "#494D64"
|
surface1: &SURFACE1 "#494d64"
|
||||||
index16: &INDEX16 "#F5A97F"
|
index16: &INDEX16 "#ed6c13"
|
||||||
index17: &INDEX17 "#F4DBD6"
|
index17: &INDEX17 "#f4dbd6"
|
||||||
base: &BASE "#24273A"
|
base: &BASE "#24273a"
|
||||||
red: &RED "#ED6070"
|
red: &RED "#ed6070"
|
||||||
green: &GREEN "#A6DA95"
|
green: &GREEN "#a6da95"
|
||||||
blue: &BLUE "#8AADF4"
|
blue: &BLUE "#8aadf4"
|
||||||
yellow: &YELLOW "#EED49F"
|
yellow: &YELLOW "#eed49f"
|
||||||
pink: &PINK "#F5BDE6"
|
pink: &PINK "#f5bde6"
|
||||||
teal: &TEAL "#8BD5CA"
|
teal: &TEAL "#8bd5ca"
|
||||||
rosewater: &ROSEWATER "#F4DBD6"
|
rosewater: &ROSEWATER "#f4dbd6"
|
||||||
lavender: &LAVENDER "#B7BDF8"
|
lavender: &LAVENDER "#b7bdf8"
|
||||||
|
|
||||||
colors:
|
colors:
|
||||||
# Default colors
|
# Default colors
|
||||||
primary:
|
primary:
|
||||||
background: *BASE # base
|
background: *BASE
|
||||||
foreground: *TEXT # text
|
foreground: *TEXT
|
||||||
# Bright and dim foreground colors
|
# Bright and dim foreground colors
|
||||||
dim_foreground: *TEXT # text
|
dim_foreground: *TEXT
|
||||||
bright_foreground: *TEXT # text
|
bright_foreground: *TEXT
|
||||||
|
|
||||||
# Cursor colors
|
# Cursor colors
|
||||||
cursor:
|
cursor:
|
||||||
text: *BASE # base
|
text: *BASE
|
||||||
cursor: *ROSEWATER # rosewater
|
cursor: *ROSEWATER
|
||||||
vi_mode_cursor:
|
vi_mode_cursor:
|
||||||
text: *BASE # base
|
text: *BASE
|
||||||
cursor: *LAVENDER # lavender
|
cursor: *LAVENDER
|
||||||
|
|
||||||
# Search colors
|
# Search colors
|
||||||
search:
|
search:
|
||||||
matches:
|
matches:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *SUBTEXT0 # subtext0
|
background: *SUBTEXT0
|
||||||
focused_match:
|
focused_match:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *GREEN # green
|
background: *GREEN
|
||||||
footer_bar:
|
footer_bar:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *SUBTEXT0 # subtext0
|
background: *SUBTEXT0
|
||||||
|
|
||||||
# Keyboard regex hints
|
# Keyboard regex hints
|
||||||
hints:
|
hints:
|
||||||
start:
|
start:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *YELLOW # yellow
|
background: *YELLOW
|
||||||
end:
|
end:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *SUBTEXT0 # subtext0
|
background: *SUBTEXT0
|
||||||
|
|
||||||
# Selection colors
|
# Selection colors
|
||||||
selection:
|
selection:
|
||||||
text: *BASE # base
|
text: *BASE
|
||||||
background: *ROSEWATER # rosewater
|
background: *ROSEWATER
|
||||||
|
|
||||||
# Normal colors
|
# Normal colors
|
||||||
normal:
|
normal:
|
||||||
black: *SURFACE1 # surface1
|
black: *SURFACE1
|
||||||
red: *RED # red
|
red: *RED
|
||||||
green: *GREEN # green
|
green: *GREEN
|
||||||
yellow: *YELLOW # yellow
|
yellow: *YELLOW
|
||||||
blue: *BLUE # blue
|
blue: *BLUE
|
||||||
magenta: *PINK # pink
|
magenta: *PINK
|
||||||
cyan: *TEAL # teal
|
cyan: *TEAL
|
||||||
white: *SUBTEXT1 # subtext1
|
white: *SUBTEXT1
|
||||||
|
|
||||||
# Bright colors
|
# Bright colors
|
||||||
bright:
|
bright:
|
||||||
black: *SURFACE2 # surface2
|
black: *SURFACE2
|
||||||
red: *RED # red
|
red: *RED
|
||||||
green: *GREEN # green
|
green: *GREEN
|
||||||
yellow: *YELLOW # yellow
|
yellow: *YELLOW
|
||||||
blue: *BLUE # blue
|
blue: *BLUE
|
||||||
magenta: *PINK # pink
|
magenta: *PINK
|
||||||
cyan: *TEAL # teal
|
cyan: *TEAL
|
||||||
white: *SUBTEXT0 # subtext0
|
white: *SUBTEXT0
|
||||||
|
|
||||||
# Dim colors
|
# Dim colors
|
||||||
dim:
|
dim:
|
||||||
black: *SURFACE1 # surface1
|
black: *SURFACE1
|
||||||
red: *RED # red
|
red: *RED
|
||||||
green: *GREEN # green
|
green: *GREEN
|
||||||
yellow: *YELLOW # yellow
|
yellow: *YELLOW
|
||||||
blue: *BLUE # blue
|
blue: *BLUE
|
||||||
magenta: *PINK # pink
|
magenta: *PINK
|
||||||
cyan: *TEAL # teal
|
cyan: *TEAL
|
||||||
white: *SUBTEXT1 # subtext1
|
white: *SUBTEXT1
|
||||||
|
|
||||||
indexed_colors:
|
indexed_colors:
|
||||||
- { index: 16, color: "#F5A97F" }
|
- { index: 16, color: *INDEX16 }
|
||||||
- { index: 17, color: "#F4DBD6" }
|
- { index: 17, color: *INDEX17 }
|
||||||
|
|
7
etc/skel/.config/autostart/xdg-user-dirs.desktop
Executable file
7
etc/skel/.config/autostart/xdg-user-dirs.desktop
Executable 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
|
|
@ -58,7 +58,7 @@ theme[cached_mid]="#8aadf4"
|
||||||
theme[cached_end]="#b7bdf8"
|
theme[cached_end]="#b7bdf8"
|
||||||
|
|
||||||
# Mem/Disk available meter (Peach -> Red)
|
# Mem/Disk available meter (Peach -> Red)
|
||||||
theme[available_start]="#f5a97f"
|
theme[available_start]="#ed6c13"
|
||||||
theme[available_mid]="#ee99a0"
|
theme[available_mid]="#ee99a0"
|
||||||
theme[available_end]="#ed8796"
|
theme[available_end]="#ed8796"
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ theme[used_mid]="#8bd5ca"
|
||||||
theme[used_end]="#91d7e3"
|
theme[used_end]="#91d7e3"
|
||||||
|
|
||||||
# Download graph colors (Peach -> Red)
|
# Download graph colors (Peach -> Red)
|
||||||
theme[download_start]="#f5a97f"
|
theme[download_start]="#ed6c13"
|
||||||
theme[download_mid]="#ee99a0"
|
theme[download_mid]="#ee99a0"
|
||||||
theme[download_end]="#ed8796"
|
theme[download_end]="#ed8796"
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
gtk-theme-name=Catppuccin-Macchiato-Standard-Blue-Dark
|
gtk-theme-name=Catppuccin-Macchiato-Standard-Blue-Dark
|
||||||
gtk-icon-theme-name=ePapirus-Dark
|
gtk-icon-theme-name=ePapirus-Dark
|
||||||
gtk-font-name=Noto Sans 11
|
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-cursor-theme-size=24
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"label": "Lock",
|
"label": "Lock",
|
||||||
"exec": "bash -c ~/.config/swaylock/lock.sh",
|
"exec": "bash -c /usr/share/qtile/scripts/lock.sh",
|
||||||
"icon": "system-lock-screen"
|
"icon": "system-lock-screen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -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_mauve" value="#c6a0f6"/>
|
||||||
<color name="macchiato_red" value="#ed6070"/>
|
<color name="macchiato_red" value="#ed6070"/>
|
||||||
<color name="macchiato_maroon" value="#ee99a0"/>
|
<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_yellow" value="#eed49f"/>
|
||||||
<color name="macchiato_green" value="#a6da95"/>
|
<color name="macchiato_green" value="#a6da95"/>
|
||||||
<color name="macchiato_teal" value="#8bd5ca"/>
|
<color name="macchiato_teal" value="#8bd5ca"/>
|
||||||
|
|
|
@ -217,7 +217,7 @@ screens = [
|
||||||
border_width = [0, 0, 2, 0],
|
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.Spacer(length = 8),
|
||||||
widget.Memory(
|
widget.Memory(
|
||||||
|
@ -230,7 +230,7 @@ screens = [
|
||||||
border_width = [0, 0, 2, 0],
|
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.Spacer(length = 8),
|
||||||
widget.Net(
|
widget.Net(
|
||||||
|
@ -243,7 +243,7 @@ screens = [
|
||||||
border_width = [0, 0, 2, 0],
|
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.Spacer(length = 8),
|
||||||
widget.Volume(
|
widget.Volume(
|
||||||
|
@ -267,7 +267,7 @@ screens = [
|
||||||
border_width = [0, 0, 2, 0],
|
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.Spacer(length = 8),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
|
@ -315,6 +315,7 @@ floating_layout = layout.Floating(
|
||||||
Match(wm_class="nwg-look"), # GTK settings
|
Match(wm_class="nwg-look"), # GTK settings
|
||||||
Match(wm_class="pavucontrol"), # PulseAudio Volume Control
|
Match(wm_class="pavucontrol"), # PulseAudio Volume Control
|
||||||
Match(wm_class="wdisplays"), # Display configurator
|
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="Picture-in-Picture"),
|
||||||
Match(title="Firefox — Sharing Indicator"),
|
Match(title="Firefox — Sharing Indicator"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -47,18 +47,10 @@ keys = [
|
||||||
lazy.spawncmd(),
|
lazy.spawncmd(),
|
||||||
desc="Spawn a command using a prompt widget"
|
desc="Spawn a command using a prompt widget"
|
||||||
),
|
),
|
||||||
Key(
|
|
||||||
[mod],
|
|
||||||
"x",
|
|
||||||
lazy.widget["keyboardlayout"].next_keyboard(),
|
|
||||||
desc="Next keyboard layout."
|
|
||||||
),
|
|
||||||
Key([mod], "d",
|
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}'"),
|
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"
|
desc="Launch Rofi menu"
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
# Switch between windows
|
# Switch between windows
|
||||||
Key(
|
Key(
|
||||||
[mod],
|
[mod],
|
||||||
|
@ -84,9 +76,12 @@ keys = [
|
||||||
lazy.layout.up(),
|
lazy.layout.up(),
|
||||||
desc="Move focus 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(
|
||||||
# Key([mod], "space", lazy.layout.next(), desc="Move window focus to other window"),
|
[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.
|
# Move windows between left/right columns or move up/down in current stack.
|
||||||
# Moving out of range in Columns layout will create new column.
|
# Moving out of range in Columns layout will create new column.
|
||||||
|
@ -162,8 +157,8 @@ keys = [
|
||||||
desc="Toggle fullscreen on the focused window",
|
desc="Toggle fullscreen on the focused window",
|
||||||
),
|
),
|
||||||
Key(
|
Key(
|
||||||
[mod],
|
[mod, "shift"],
|
||||||
"t",
|
"space",
|
||||||
lazy.window.toggle_floating(),
|
lazy.window.toggle_floating(),
|
||||||
desc="Toggle floating on the focused window"),
|
desc="Toggle floating on the focused window"),
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Net/ThemeName "Catppuccin-Macchiato-Standard-Blue-Dark"
|
Net/ThemeName "Catppuccin-Macchiato-Standard-Blue-Dark"
|
||||||
Net/IconThemeName "ePapirus-Dark"
|
Net/IconThemeName "ePapirus-Dark"
|
||||||
Gtk/CursorThemeName "breeze_cursors"
|
Gtk/CursorThemeName "Bibata-Modern-Classic"
|
||||||
Net/EnableEventSounds 1
|
Net/EnableEventSounds 1
|
||||||
EnableInputFeedbackSounds 0
|
EnableInputFeedbackSounds 0
|
||||||
Xft/Antialias 1
|
Xft/Antialias 1
|
||||||
|
|
|
@ -5,7 +5,7 @@ include "/home/sunderland93/.gtkrc-2.0.mine"
|
||||||
gtk-theme-name="Catppuccin-Macchiato-Standard-Blue-Dark"
|
gtk-theme-name="Catppuccin-Macchiato-Standard-Blue-Dark"
|
||||||
gtk-icon-theme-name="ePapirus-Dark"
|
gtk-icon-theme-name="ePapirus-Dark"
|
||||||
gtk-font-name="Noto Sans 11"
|
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-cursor-theme-size=24
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
[Icon Theme]
|
[Icon Theme]
|
||||||
Name=Default
|
Name=Default
|
||||||
Comment=Default Cursor Theme
|
Comment=Default Cursor Theme
|
||||||
Inherits=Catppuccin-Macchiato-Blue-Cursors
|
Inherits=Bibata-Modern-Classic
|
||||||
|
|
|
@ -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()
|
|
|
@ -1,10 +1,9 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Automatically restart the swayidle when its configuration changes
|
Description=Automatically restart the swayidle when its configuration changes
|
||||||
PartOf=swayidle.service
|
PartOf=swayidle.service
|
||||||
After=swayidle.service
|
|
||||||
|
|
||||||
[Path]
|
[Path]
|
||||||
PathChanged=%h/.config/swayidle/config
|
PathChanged=%h/.config/swayidle/config
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=qtile-session.target
|
WantedBy=paths.target
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
# Qtile idle-inhibitor toggle
|
# Qtile idle-inhibitor toggle
|
||||||
function toggle {
|
function toggle {
|
||||||
if pgrep -f "wayland-idle-inhibitor" > /dev/null
|
if pgrep -f "swayidle" > /dev/null
|
||||||
then
|
then
|
||||||
pkill -f wayland-idle-inhibitor
|
systemctl --user stop swayidle.service
|
||||||
notify-send -r 5556 -u normal " Screensaver Disabled"
|
notify-send -r 5556 -u normal " Screensaver Disabled"
|
||||||
else
|
else
|
||||||
/usr/bin/wayland-idle-inhibitor.py &
|
systemctl --user start swayidle.service
|
||||||
notify-send -r 5556 -u normal " Screensaver Enabled"
|
notify-send -r 5556 -u normal " Screensaver Enabled"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ case $1 in
|
||||||
toggle
|
toggle
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if pgrep -f "wayland-idle-inhibitor" > /dev/null
|
if pgrep -f "swayidle" > /dev/null
|
||||||
then
|
then
|
||||||
icon=""
|
icon=""
|
||||||
else
|
else
|
||||||
|
|
10
usr/share/qtile/scripts/lock.sh
Executable file
10
usr/share/qtile/scripts/lock.sh
Executable 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
|
Loading…
Add table
Reference in a new issue