-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'qc/main'
- Loading branch information
Showing
18 changed files
with
612 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
[[ "$(hostname)" =~ 'Sigmachine' ]] \ | ||
&& xrandr --output HDMI-0 --right-of DP-1 --primary | ||
|
||
notify-send "Welcome, $USER!" & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from core import autostart, floating_layout, groups, keys, layouts, mouse, screens | ||
from widgets import widget_defaults | ||
|
||
extension_defaults = widget_defaults.copy() | ||
|
||
dgroups_key_binder = None | ||
dgroups_app_rules = [] | ||
follow_mouse_focus = True | ||
bring_front_click = False | ||
cursor_warp = False | ||
|
||
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 = False | ||
|
||
# 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" | ||
|
||
__all__ = ( | ||
# Hooks | ||
"autostart", | ||
# Keybindings | ||
"keys", | ||
# Mouse | ||
"mouse", | ||
# Workspaces groups | ||
"groups", | ||
# Layouts | ||
"layouts", | ||
"floating_layout", | ||
# Screens | ||
"screens", | ||
# Widgets | ||
"widget_defaults", | ||
"extension_defaults", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from .groups import groups | ||
from .hooks import autostart | ||
from .keys import keys, mod | ||
from .layouts import floating_layout, layouts | ||
from .mouse import mouse | ||
from .screens import screens | ||
|
||
__all__ = ( | ||
# Keybindings | ||
"keys", | ||
"mod", | ||
# Hooks | ||
"autostart", | ||
# Mouse | ||
"mouse", | ||
# Workspaces groups | ||
"groups", | ||
# Layouts | ||
"layouts", | ||
"floating_layout", | ||
# Screens | ||
"screens", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import os | ||
|
||
from libqtile import bar, widget | ||
|
||
from utils import Color | ||
from widgets import ( | ||
Battery, | ||
Clock, | ||
CPUGraph, | ||
GroupBox, | ||
Memory, | ||
Prompt, | ||
QuickExit, | ||
Separator, | ||
TaskList, | ||
Wakatime, | ||
) | ||
|
||
|
||
class Bar(bar.Bar): | ||
instance_count: int = 0 | ||
|
||
widgets_checks = { | ||
Battery: lambda _: os.uname().nodename == "Bacon", | ||
} | ||
|
||
_widgets = [ | ||
GroupBox, | ||
Separator, | ||
TaskList, | ||
Separator, | ||
Prompt, | ||
Wakatime, | ||
Battery, | ||
Memory, | ||
CPUGraph, | ||
Separator, | ||
widget.Volume, | ||
Clock, | ||
Separator, | ||
QuickExit, | ||
] | ||
|
||
def __init__(self, id_): | ||
self.id = id_ | ||
|
||
super().__init__( | ||
widgets=self._build_widgets(), | ||
size=24, | ||
background=Color.BG_DARK.with_alpha(0.7), | ||
margin=[0, 0, 8, 0], | ||
) | ||
|
||
def _build_widgets(self): | ||
return [ | ||
widget_builder() | ||
for widget_builder in self._widgets | ||
if self.widgets_checks.get(widget_builder, bool)(self) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from libqtile.config import DropDown, Group, Key, ScratchPad | ||
from libqtile.lazy import lazy | ||
|
||
from .keys import keys, mod | ||
|
||
groups = [Group(f"{i}") for i in "ζδωχλξπσς"] | ||
group_keys = [ | ||
"ampersand", | ||
"eacute", | ||
"quotedbl", | ||
"apostrophe", | ||
"parenleft", | ||
"minus", | ||
"egrave", | ||
"underscore", | ||
"agrave", | ||
] | ||
|
||
for g, key in zip(groups, group_keys): | ||
keys.extend( | ||
[ | ||
# mod1 + letter of group = switch to group | ||
Key( | ||
[mod], | ||
key, | ||
lazy.group[g.name].toscreen(), | ||
desc="Switch to group {}".format(g.name), | ||
), | ||
Key( | ||
[mod, "shift"], | ||
key, | ||
lazy.window.togroup(g.name, switch_group=True), | ||
desc="Switch to & move focused window to group {}".format( | ||
g.name | ||
), | ||
), | ||
Key( | ||
[mod], | ||
"space", | ||
lazy.group["scratchpad"].dropdown_toggle("term"), | ||
), | ||
] | ||
) | ||
|
||
|
||
groups.append( | ||
ScratchPad( | ||
"scratchpad", | ||
[ | ||
DropDown( | ||
"term", | ||
"kitty", | ||
x=0.05, | ||
y=0.05, | ||
opacity=0.95, | ||
height=0.9, | ||
width=0.9, | ||
on_focus_lost_hide=False, | ||
) | ||
], | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pathlib | ||
import os | ||
import subprocess | ||
|
||
from libqtile import hook | ||
|
||
|
||
@hook.subscribe.startup_once | ||
def autostart(): | ||
cwd = pathlib.Path(os.path.dirname(os.path.realpath(__file__))) | ||
autostart_path = str((cwd / ".." / "autostart.sh").absolute()) | ||
|
||
subprocess.call([autostart_path]) |
Oops, something went wrong.