qtile part 1
This commit is contained in:
parent
74334bb765
commit
f5d6b64489
BIN
img/qtile.png
Normal file
BIN
img/qtile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 210 KiB |
BIN
img/qtilekeyboard.png
Normal file
BIN
img/qtilekeyboard.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
241
qtile.php
Normal file
241
qtile.php
Normal file
@ -0,0 +1,241 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta
|
||||
content="EndeavourOS svobodný operační systém...."
|
||||
name="description"
|
||||
/>
|
||||
<meta content="EndeavourOS, ArchLinux" name="keywords"/>
|
||||
<meta content="Kankys" name="author"/>
|
||||
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<link href="assets/style.css" rel="stylesheet"/>
|
||||
<link href="/img/icons.png" rel="shortcut icon"/>
|
||||
<script
|
||||
crossorigin="anonymous"
|
||||
src="https://kit.fontawesome.com/0a43c6cd1f.js"
|
||||
></script>
|
||||
<!--icons dark, go to up-->
|
||||
<link
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
|
||||
<!--ubuntu fonts-->
|
||||
<style>
|
||||
@import url("https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");
|
||||
</style>
|
||||
|
||||
<title>EndeavourOS - 🔑 Řešení chyb s klíči v Arch Linux a EndeavourOS</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php require "assets/header.php"; ?>
|
||||
<main>
|
||||
<section class="welcome">
|
||||
<h1>Qtile správce oken</h1>
|
||||
<p><a href="https://qtile.org/" target="_blank">Qtile</a> je správce oken pro Linux, který je napsaný v Pythonu a je známý svou flexibilitou a konfigurovatelností.</p>
|
||||
<img src="img/qtile.png" alt="" style="width: 65%;height: auto;">
|
||||
<h3>Instalace</h3>
|
||||
<p>Qtile lze nainstalovat tímto způsobem:</p>
|
||||
<div class="code-box">
|
||||
<pre id="code-content">
|
||||
sudo pacman -S qtile
|
||||
</pre>
|
||||
</div>
|
||||
<h3>Konfigurace</h3>
|
||||
<p>Konfigurační soubor Qtile je napsán v Pythonu, což umožňuje velkou flexibilitu. Soubor se obvykle nachází v <strong>~/.config/qtile/config.py</strong>. Zde je základní struktura konfiguračního souboru:</p>
|
||||
<div class="code-box">
|
||||
<pre id="code-content">
|
||||
from libqtile import bar, layout, widget
|
||||
from libqtile.config import Click, Drag, Group, Key, Match, Screen
|
||||
from libqtile.lazy import lazy
|
||||
from libqtile.utils import guess_terminal
|
||||
|
||||
mod = "mod4" # Mod key (usually the Windows key)
|
||||
terminal = guess_terminal()
|
||||
|
||||
keys = [
|
||||
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
|
||||
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
||||
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
||||
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||
# Add more keybindings here
|
||||
]
|
||||
|
||||
groups = [Group(i) for i in "123456789"]
|
||||
|
||||
for i in groups:
|
||||
keys.extend([
|
||||
Key([mod], i.name, lazy.group[i.name].toscreen(),
|
||||
desc="Switch to group {}".format(i.name)),
|
||||
Key([mod, "shift"], i.name, lazy.window.togroup(i.name, switch_group=True),
|
||||
desc="Switch to & move focused window to group {}".format(i.name)),
|
||||
])
|
||||
|
||||
layouts = [
|
||||
layout.Columns(border_focus_stack=['#d75f5f', '#8f3d3d'], border_width=4),
|
||||
layout.Max(),
|
||||
# Add more layouts here
|
||||
]
|
||||
|
||||
widget_defaults = dict(
|
||||
font='sans',
|
||||
fontsize=12,
|
||||
padding=3,
|
||||
)
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
screens = [
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
[
|
||||
widget.CurrentLayout(),
|
||||
widget.GroupBox(),
|
||||
widget.Prompt(),
|
||||
widget.WindowName(),
|
||||
widget.Chord(
|
||||
chords_colors={
|
||||
'launch': ("#ff0000", "#ffffff"),
|
||||
},
|
||||
name_transform=lambda name: name.upper(),
|
||||
),
|
||||
widget.Systray(),
|
||||
widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
|
||||
widget.QuickExit(),
|
||||
],
|
||||
24,
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
# Drag floating layouts.
|
||||
mouse = [
|
||||
Drag([mod], "Button1", lazy.window.set_position_floating(),
|
||||
start=lazy.window.get_position()),
|
||||
Drag([mod], "Button3", lazy.window.set_size_floating(),
|
||||
start=lazy.window.get_size()),
|
||||
Click([mod], "Button2", lazy.window.bring_to_front())
|
||||
]
|
||||
|
||||
dgroups_key_binder = None
|
||||
dgroups_app_rules = [] # type: List
|
||||
follow_mouse_focus = True
|
||||
bring_front_click = False
|
||||
cursor_warp = False
|
||||
floating_layout = layout.Floating(float_rules=[
|
||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||
*layout.Floating.default_float_rules,
|
||||
Match(wm_class='confirmreset'), # gitk
|
||||
Match(wm_class='makebranch'), # gitk
|
||||
Match(wm_class='maketag'), # gitk
|
||||
Match(wm_class='ssh-askpass'), # ssh-askpass
|
||||
Match(title='branchdialog'), # gitk
|
||||
Match(title='pinentry'), # GPG key password entry
|
||||
])
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
reconfigure_screens = True
|
||||
|
||||
# If things like steam games want to auto-minimize themselves when losing
|
||||
# focus, should we respect this or not?
|
||||
auto_minimize = True
|
||||
|
||||
# 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
|
||||
# mailing lists, GitHub issues, and other WM documentation that suggest setting
|
||||
# this string if your java app doesn't work correctly. We may as well just lie
|
||||
# and say that we're a working one by default.
|
||||
#
|
||||
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
|
||||
# java that happens to be on java's whitelist.
|
||||
wmname = "LG3D"
|
||||
</pre>
|
||||
</div>
|
||||
<p><strong>Další konfigurační soubory jsou:</strong></p>
|
||||
<ul>
|
||||
<li>Main config file: ~/.config/qtile/config.py</li>
|
||||
<li>Keybindings: ~/.config/qtile/modules/keys.py</li>
|
||||
<li>Bar: ~/.config/qtile/modules/screens.py</li>
|
||||
<li>Widgets: ~/.config/qtile/modules/widgets.py</li>
|
||||
<li>Auto-start: ~/.config/qtile/autostart.sh</li>
|
||||
</ul>
|
||||
<h3>KLávesové zkratky</h3>
|
||||
<p>Klávesové zkratky jsou definovány v sekci keys. Například:</p>
|
||||
<div class="code-box">
|
||||
<pre id="code-content">
|
||||
keys = [
|
||||
Key([mod], "h", lazy.layout.left(), desc="Move focus to left"),
|
||||
Key([mod], "l", lazy.layout.right(), desc="Move focus to right"),
|
||||
Key([mod], "j", lazy.layout.down(), desc="Move focus down"),
|
||||
Key([mod], "k", lazy.layout.up(), desc="Move focus up"),
|
||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||
# Add more keybindings here
|
||||
]
|
||||
</pre>
|
||||
</div>
|
||||
</section>
|
||||
<img src="img/qtilekeyboard.png" alt="" style="width: 50%;height: auto;">
|
||||
<h3>Rozvržení</h3>
|
||||
<p>Rozvržení oken lze konfigurovat v sekci layouts. Například:</p>
|
||||
<div class="code-box">
|
||||
<pre id="code-content">
|
||||
layouts = [
|
||||
layout.Columns(border_focus_stack=['#d75f5f', '#8f3d3d'], border_width=4),
|
||||
layout.Max(),
|
||||
# Add more layouts here
|
||||
]
|
||||
</pre>
|
||||
</div>
|
||||
<h3>Widgety</h3>
|
||||
<p>Widgety jsou malé aplikace, které se zobrazují na panelu. Například:</p>
|
||||
<div class="code-box">
|
||||
<pre id="code-content">
|
||||
widget_defaults = dict(
|
||||
font='sans',
|
||||
fontsize=12,
|
||||
padding=3,
|
||||
)
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
screens = [
|
||||
Screen(
|
||||
top=bar.Bar(
|
||||
[
|
||||
widget.CurrentLayout(),
|
||||
widget.GroupBox(),
|
||||
widget.Prompt(),
|
||||
widget.WindowName(),
|
||||
widget.Chord(
|
||||
chords_colors={
|
||||
'launch': ("#ff0000", "#ffffff"),
|
||||
},
|
||||
name_transform=lambda name: name.upper(),
|
||||
),
|
||||
widget.Systray(),
|
||||
widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
|
||||
widget.QuickExit(),
|
||||
],
|
||||
24,
|
||||
),
|
||||
),
|
||||
]
|
||||
</pre>
|
||||
</div>
|
||||
<h3>Spouštění</h3>
|
||||
<p>Po konfiguraci můžete Qtile spustit pomocí příkazu:</p>
|
||||
<div class="code-box">
|
||||
<pre id="code-content">
|
||||
qtile start
|
||||
</pre>
|
||||
</div>
|
||||
<h3>Dokumentace a komunita</h3>
|
||||
<p>Pro další informace a podporu můžete navštívit oficiální dokumentaci <a href="https://docs.qtile.org/en/latest/" target="_blank">Qtile na docs.qtile.org </a> nebo se připojit k komunitě na <a href="https://github.com/qtile/qtile" target="_blank">GitHub</a> a <a href="https://www.reddit.com/r/qtile/" target="_blank">Reddit</a>.</p>
|
||||
<hr>
|
||||
</main>
|
||||
<?php require "assets/returnbutton.php"; ?>
|
||||
<?php require "assets/footer.php"; ?>
|
||||
<script src="assets/script.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user