diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 36b13f1..0000000 --- a/.gitignore +++ /dev/null @@ -1,176 +0,0 @@ -# ---> Python -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# Ruff stuff: -.ruff_cache/ - -# PyPI configuration file -.pypirc - diff --git a/Assets/1.png b/Assets/1.png new file mode 100644 index 0000000..18f9523 Binary files /dev/null and b/Assets/1.png differ diff --git a/Assets/2.png b/Assets/2.png new file mode 100644 index 0000000..88b7e64 Binary files /dev/null and b/Assets/2.png differ diff --git a/Assets/5.png b/Assets/5.png new file mode 100644 index 0000000..4fae5a4 Binary files /dev/null and b/Assets/5.png differ diff --git a/Assets/6.png b/Assets/6.png new file mode 100644 index 0000000..f9e4a4f Binary files /dev/null and b/Assets/6.png differ diff --git a/Assets/Bar-Icons/calendar.svg b/Assets/Bar-Icons/calendar.svg new file mode 100644 index 0000000..1f22f13 --- /dev/null +++ b/Assets/Bar-Icons/calendar.svg @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assets/Bar-Icons/clock.svg b/Assets/Bar-Icons/clock.svg new file mode 100644 index 0000000..c35add4 --- /dev/null +++ b/Assets/Bar-Icons/clock.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assets/Bar-Icons/volume.svg b/Assets/Bar-Icons/volume.svg new file mode 100644 index 0000000..b761fee --- /dev/null +++ b/Assets/Bar-Icons/volume.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assets/launch_Icon.png b/Assets/launch_Icon.png new file mode 100644 index 0000000..2e73ec1 Binary files /dev/null and b/Assets/launch_Icon.png differ diff --git a/Wallpaper/Skyscraper.png b/Wallpaper/Skyscraper.png new file mode 100644 index 0000000..da96087 Binary files /dev/null and b/Wallpaper/Skyscraper.png differ diff --git a/config.py b/config.py new file mode 100644 index 0000000..4c6a8e1 --- /dev/null +++ b/config.py @@ -0,0 +1,698 @@ +# 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. + +from libqtile import bar, layout, widget, hook, qtile +from libqtile.config import Click, Drag, Group, Key, Match, hook, Screen, KeyChord +from libqtile.lazy import lazy +from libqtile.utils import guess_terminal +from libqtile.dgroups import simple_key_binder + + +mod = "mod4" #aka Windows key +terminal = "alacritty" #This is an example on how flexible Qtile is, you create variables then use them in a keybind for example (see below) +mod1 = "mod1" #alt key +filemanager = "thunar" + +# Sticky windows + +sticky_windows = [] + +@lazy.function +def toggle_sticky_windows(qtile, window=None): + if window is None: + window = qtile.current_screen.group.current_window + if window in sticky_windows: + sticky_windows.remove(window) + else: + sticky_windows.append(window) + return window + +@hook.subscribe.setgroup +def move_sticky_windows(): + for window in sticky_windows: + window.togroup() + return + +@hook.subscribe.client_killed +def remove_sticky_windows(window): + if window in sticky_windows: + sticky_windows.remove(window) + +# Below is an example how to make Firefox Picture-in-Picture windows automatically sticky. +@hook.subscribe.client_managed +def auto_sticky_windows(window): + info = window.info() + if (info['wm_class'] == ['Toolkit', 'firefox'] + and info['name'] == 'Picture-in-Picture'): + sticky_windows.append(window) + +# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █▀ +# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ ▄█ + +keys = [ + # A list of available commands that can be bound to keys can be found + # at https://docs.qtile.org/en/latest/manual/config/lazy.html + # Switch between windows + Key([mod], "Left", lazy.layout.left(), desc="Move focus to left"), + Key([mod], "Right", lazy.layout.right(), desc="Move focus to right"), + Key([mod], "Down", lazy.layout.down(), desc="Move focus down"), + Key([mod], "Up", lazy.layout.up(), desc="Move focus up"), + 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], "space", lazy.layout.next(), desc="Move window focus to other window"), + # Move windows between left/right columns or move up/down in current stack. + # Moving out of range in Columns layout will create new column. + Key([mod, "shift"], "h", lazy.layout.shuffle_left(), desc="Move window to the left"), + Key([mod, "shift"], "l", lazy.layout.shuffle_right(), desc="Move window to the right"), + Key([mod, "shift"], "j", lazy.layout.shuffle_down(), desc="Move window down"), + Key([mod, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"), + # Grow windows. If current window is on the edge of screen and direction + # will be to screen edge - window would shrink. + Key([mod, "control"], "h", lazy.layout.grow_left(), desc="Grow window to the left"), + Key([mod, "control"], "l", lazy.layout.grow_right(), desc="Grow window to the right"), + Key([mod, "control"], "j", lazy.layout.grow_down(), desc="Grow window down"), + Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), + Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), + Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle focused window to fullscreen"), + Key([mod], "v", lazy.window.toggle_floating(), desc="Toggle focused window to floating"), + # Toggle between split and unsplit sides of stack. + # Split = all windows displayed + # Unsplit = 1 window displayed, like Max layout, but still with + # multiple stack panes + Key( + [mod, "shift"], + "Return", + lazy.layout.toggle_split(), + desc="Toggle between split and unsplit sides of stack", + ), + Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), + Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), + Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), + Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), + Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), + Key([mod1], "Space", lazy.spawn("rofi -theme rounded-green-dark -show drun"), desc="Spawn a command using a prompt widget"), + + +##CUSTOM + Key([], "XF86AudioRaiseVolume", lazy.spawn("pactl set-sink-volume 0 +1%"), desc='Volume Up'), + Key([], "XF86AudioLowerVolume", lazy.spawn("pactl set-sink-volume 0 -1%"), desc='volume down'), + Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle"), desc='Volume Mute'), + Key([], "XF86AudioPlay", lazy.spawn("playerctl play-pause"), desc='playerctl'), + Key([], "XF86AudioPrev", lazy.spawn("playerctl previous"), desc='playerctl'), + Key([], "XF86AudioNext", lazy.spawn("playerctl next"), desc='playerctl'), + Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl s 5%+"), desc='brightness UP'), + Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl s 5%-"), desc='brightness Down'), + +##Misc keybinds + Key([], "Print", lazy.spawn("flameshot gui"), desc='Screenshot'), + Key(["control"], "Print", lazy.spawn("flameshot full -c -p ~/Pictures/"), desc='Screenshot'), + Key([mod], "e", lazy.spawn(filemanager), desc="Open file manager"), + Key([mod], "s",toggle_sticky_windows(), desc="Toggle state of sticky for current window"), +] + +# █▀▀ █▀█ █▀█ █░█ █▀█ █▀ +# █▄█ █▀▄ █▄█ █▄█ █▀▀ ▄█ + + +groups = [Group(f"{i+1}", label="⬤") for i in range(9)] #Be careful modifying this, otherwise qtile config will break + +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( + margin = 0, + border_focus = '#00DC6C', + border_normal = '#1F1D2E', + border_width = 3, + ), + + layout.Max( + border_focus = '#00DC6C', + border_normal = '#1F1D2E', + margin = 0, + border_width = 0, + ), + + layout.Floating( + border_focus = '#00DC6C', + border_normal = '#1F1D2E', + margin = 0, + border_width = 3, + ), + # Try more layouts by unleashing below layouts + # layout.Stack(num_stacks=2), + # layout.Bsp(), + layout.Matrix( + border_focus = '#00DC6C', + border_normal = '#1F1D2E', + margin = 0, + border_width = 3, + ), + + layout.MonadWide( + border_focus = '#00DC6C', + border_normal = '#1F1D2E', + margin = 0, + border_width = 3, + ), + layout.Tile( + border_focus = '#00DC6C', + border_normal = '#1F1D2E', + margin = 0, + border_width = 3, + ), + # layout.TreeTab(), + # layout.VerticalTile(), + # layout.Zoomy(), +] + + +widget_defaults = dict( + font = "sans", + fontsize = 12, + padding = 4, +) + +extension_defaults = widget_defaults.copy() + +# Open Defined Functions + +def open_launcher(): + qtile.cmd_spawn("rofi -theme rounded-green-dark -show drun") + +def open_btop(): + qtile.cmd_spawn("alacritty --hold -e btop") + +def open_pavucontrol(): + qtile.cmd_spawn("pavucontrol") + + +# █▄▄ ▄▀█ █▀█ +# █▄█ █▀█ █▀▄ + +screens = [ + Screen( + top = bar.Bar( + [ + widget.Spacer( + length = 18, + background = '#033C4B', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/launch_Icon.png', + background = '#033C4B', + mouse_callbacks = {'Button1': open_launcher}, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/6.png', + ), + + widget.GroupBox( + fontsize = 16, + borderwidth = 0, + highlight_method = 'block', + active = '#56D9C7', #Active workspaces circle color + block_highlight_text_color = "#00F076", #Current workspace circle color + highlight_color = '#4B427E', + inactive = '#052A25', #Empty workspace circle + foreground = '#046F5F', + background = '#046F5F', + this_current_screen_border = '#00361A', #Circle background color + this_screen_border = '#52548D', + other_current_screen_border = '#52548D', + other_screen_border = '#52548D', + urgent_border = '#52548D', + rounded = True, + disable_drag = True, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + ), + + widget.CurrentLayout( + background ='#046F5F', + font = 'IBM Plex Mono Medium', + fontsize = 15, + padding = 0, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + ), + + widget.WindowName( + background = '#046F5F', + format = "{name}", + font = 'IBM Plex Mono Medium', + fontsize = 14, + empty_group_string = 'Desktop', + padding = 0, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/1.png', + background = '#52548D', + ), + + widget.CPU( + font = "IBM Plex Mono Medium", + format='CPU:({load_percent:.1f}%/{freq_current}GHz)', + fontsize = 15, + margin = 0, + padding = 0, + background = '#046F5F', + mouse_callbacks = {'Button1': open_btop}, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + background = '#52548D', + ), + + widget.Systray( + background = '#046F5F', + icon_size = 24, + padding = 3, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + background = '#52548D', + ), + + widget.Spacer( + length = 0, + background = '#046f5f', + ), + + widget.Memory( + format = 'RAM:({MemUsed:.0f}MB/{MemTotal:.0f}MB)', + font = "IBM Plex Mono Medium", + fontsize = 15, + padding = 0, + background = '#046F5F', + mouse_callbacks = {'Button1': open_btop}, + ), + + widget.Spacer( + length = 6, + background = '#046f5f', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/Bar-Icons/volume.svg', + background = '#046F5F', + margin_y = 3, + scale = True, + mouse_callbacks = {'Button1': open_pavucontrol}, + ), + + widget.Spacer( + length = 4, + background = '#046f5f', + ), + + widget.PulseVolume( + font= 'IBM Plex Mono Medium', + fontsize = 15, + padding = 0, + background = '#046F5F', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + + widget.Image( + filename = '~/.config/qtile/Assets/1.png', + background = '#4B427E', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/Bar-Icons/calendar.svg', + background = '#046F5F', + margin_y = 3, + scale = True, + ), + + widget.Spacer( + length = 6, + background = '#046f5f', + ), + + widget.Clock( + format = '%d/%b/%y ', #Here you can change between USA or another timezone + background = '#046f5f', + font = "IBM Plex Mono Medium", + fontsize = 15, + padding = 0, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/Bar-Icons/clock.svg', + background = '#046F5F', + margin_y = 3, + margin_x = 5, + scale = True, + ), + + widget.Clock( + format = '%H:%M', + background = '#046f5f', + font = "IBM Plex Mono Medium", + fontsize = 15, + padding = 0, + ), + + widget.Spacer( + length = 18, + background = '#046f5f', + ), + ], + 30, # Bar size (all axis) + margin = [0,8,6,8] # Bar margin (Top,Right,Bottom,Left) + ), + wallpaper='~/.config/qtile/Wallpaper/Skyscraper.png', + wallpaper_mode="fill", + ), + Screen( + top = bar.Bar( + [ + widget.Spacer( + length = 18, + background = '#033C4B', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/launch_Icon.png', + background = '#033C4B', + mouse_callbacks = {'Button1': open_launcher}, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/6.png', + ), + + widget.GroupBox( + fontsize = 16, + borderwidth = 0, + highlight_method = 'block', + active = '#56D9C7', #Active workspaces circle color + block_highlight_text_color = "#00F076", #Current workspace circle color + highlight_color = '#4B427E', + inactive = '#052A25', #Empty workspace circle + foreground = '#046F5F', + background = '#046F5F', + this_current_screen_border = '#00361A', #Circle background color + this_screen_border = '#52548D', + other_current_screen_border = '#52548D', + other_screen_border = '#52548D', + urgent_border = '#52548D', + rounded = True, + disable_drag = True, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + ), + + widget.CurrentLayout( + background ='#046F5F', + font = 'IBM Plex Mono Medium', + fontsize = 15, + padding = 0, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + ), + + widget.WindowName( + background = '#046F5F', + format = "{name}", + font = 'IBM Plex Mono Medium', + fontsize = 14, + empty_group_string = 'Desktop', + padding = 0, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/1.png', + background = '#52548D', + ), + + widget.CPU( + font = "IBM Plex Mono Medium", + format='CPU:({load_percent:.1f}%/{freq_current}GHz)', + fontsize = 15, + margin = 0, + padding = 0, + background = '#046F5F', + mouse_callbacks = {'Button1': open_btop}, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/2.png', + background = '#52548D', + ), + + widget.Spacer( + length = 0, + background = '#046f5f', + ), + + widget.Memory( + format = 'RAM:({MemUsed:.0f}MB/{MemTotal:.0f}MB)', + font = "IBM Plex Mono Medium", + fontsize = 15, + padding = 0, + background = '#046F5F', + mouse_callbacks = {'Button1': open_btop}, + ), + + widget.Spacer( + length = 6, + background = '#046f5f', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/Bar-Icons/volume.svg', + background = '#046F5F', + margin_y = 3, + scale = True, + mouse_callbacks = {'Button1': open_pavucontrol}, + ), + + widget.Spacer( + length = 4, + background = '#046f5f', + ), + + widget.PulseVolume( + font= 'IBM Plex Mono Medium', + fontsize = 15, + padding = 0, + background = '#046F5F', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/5.png', + ), + + + widget.Image( + filename = '~/.config/qtile/Assets/1.png', + background = '#4B427E', + ), + + widget.Image( + filename = '~/.config/qtile/Assets/Bar-Icons/calendar.svg', + background = '#046F5F', + margin_y = 3, + scale = True, + ), + + widget.Spacer( + length = 6, + background = '#046f5f', + ), + + widget.Clock( + format = '%d/%b/%y ', #Here you can change between USA or another timezone + background = '#046f5f', + font = "IBM Plex Mono Medium", + fontsize = 15, + padding = 0, + ), + + widget.Image( + filename = '~/.config/qtile/Assets/Bar-Icons/clock.svg', + background = '#046F5F', + margin_y = 3, + margin_x = 5, + scale = True, + ), + + widget.Clock( + format = '%H:%M', + background = '#046f5f', + font = "IBM Plex Mono Medium", + fontsize = 15, + padding = 0, + ), + + widget.Spacer( + length = 18, + background = '#046f5f', + ), + ], + 26, # Bar size (all axis) + margin = [0,6,6,6] # Bar margin (Top,Right,Bottom,Left) + ), + wallpaper='~/.config/qtile/Wallpaper/Skyscraper.png', + wallpaper_mode="fill", + ), +] + +# 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 #This basically puts your mouse in the center on the screen after you switch to another workspace +floating_layout = layout.Floating( + border_focus='#00DC6C', + border_normal='#1F1D2E', + border_width=3, + 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 + ] +) + +from libqtile import hook +# some other imports +import os +import subprocess +# stuff +@hook.subscribe.startup_once +def autostart(): + home = os.path.expanduser('~/.config/qtile/scripts/autostart.sh') # path to my script, under my user directory + subprocess.call([home]) + +auto_fullscreen = True +focus_on_window_activation = "smart" #or focus +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 + +# When using the Wayland backend, this can be used to configure input devices. +wl_input_rules = None + +# 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" diff --git a/scripts/autostart.sh b/scripts/autostart.sh new file mode 100755 index 0000000..04be0e2 --- /dev/null +++ b/scripts/autostart.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +sh $HOME/.screenlayout/default.sh +picom --daemon --config $HOME/.config/qtile/scripts/picom.conf & +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +/usr/bin/wired & +eval $(gnome-keyring-daemon --start) +nm-applet & + diff --git a/scripts/picom.conf b/scripts/picom.conf new file mode 100644 index 0000000..12082c4 --- /dev/null +++ b/scripts/picom.conf @@ -0,0 +1,521 @@ +################################# +# Animations # +################################# +# requires https://github.com/jonaburg/picom +# (These are also the default values) +transition-length = 200 +transition-pow-x = 0.1 +transition-pow-y = 0.1 +transition-pow-w = 0.1 +transition-pow-h = 0.1 +size-transition = true + + +################################# +# Corners # +################################# +# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom +corner-radius = 13.0; +rounded-corners-exclude = [ + #"window_type = 'normal'", + "class_g = 'awesome'", + "class_g = 'URxvt'", + "class_g = 'XTerm'", + #"class_g = 'Alacritty'", + "class_g = 'Polybar'", + "class_g = 'code-oss'", + #"class_g = 'TelegramDesktop'" + "class_g = 'Thunderbird'" +]; +round-borders = 1; +round-borders-exclude = [ + #"class_g = 'TelegramDesktop'", +]; + +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = false; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 18; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -15; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -15; + +# Avoid drawing shadows on dock/panel windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dock-shadow = false + +# Don't draw shadows on drag-and-drop windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dnd-shadow = false + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +shadow-color = "#191724" + +# Do not paint shadows on shaped windows. Note shaped windows +# here means windows setting its shape through X Shape extension. +# Those using ARGB background is beyond our control. +# Deprecated, use +# shadow-exclude = 'bounding_shaped' +# or +# shadow-exclude = 'bounding_shaped && !rounded_corners' +# instead. +# +# shadow-ignore-shaped = '' + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + #"window_type = 'popup_menu'", + #"window_type = 'dropdown_menu'", + #"window_type = 'menu'", + "window_type = 'tooltip'", + "class_g * = 'TelegramDesktop'", +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.06; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.06; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) + fade-delta = 10; + +# Specify a list of conditions of windows that should not be faded. +# don't need this, we disable fading for all normal windows with wintypes: {} +fade-exclude = [ + "class_g = 'slop'", + "class_g = 'TelegramDesktop'", + "class_g = 'google-chrome'", # maim +] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 0.8; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 0.7; + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 +# menu-opacity is depreciated use dropdown-menu and popup-menu instead. + +#If using these 2 below change their values in line 510 & 511 aswell +popup_menu = { opacity = 0.8; } +dropdown_menu = { opacity = 0.8; } +menu = { opacity = 0.8;} + + + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +active-opacity = 1.0; + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +# inactive-dim = 0.0 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", # lemonbar + "class_g = 'slop'", # maim +]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] +opacity-rule = [ + "80:class_g = 'Bar'", # lemonbar + "100:class_g = 'slop'", # maim + "100:class_g = 'XTerm'", + "100:class_g = 'URxvt'", + #"100:class_g = 'kitty'", + "100:class_g = 'Alacritty'", + "80:class_g = 'Polybar'", + "100:class_g = 'code-oss'", + "100:class_g = 'Meld'", + "100:class_g = 'TelegramDesktop'", + "90:class_g = 'Joplin'", + "100:class_g = 'firefox'", + "100:class_g = 'Thunderbird'", +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +# blur-size = 12 +# +# blur-deviation = false + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = true; + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false; + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false; + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = '' +# blur-kern = "3x3box"; + +blur: { + # requires: https://github.com/ibhagwan/picom + method = "dual_kawase"; + #method = "kernel"; + strength = 9; + # deviation = 1.0; + # kernel = "11x11gaussian"; + background = true; + background-frame = false; + background-fixed = false; + kern = "3x3box"; +} + +# Exclude conditions for background blur. +blur-background-exclude = [ + #"window_type = 'dock'", + #"window_type = 'desktop'", + #"class_g = 'URxvt'", + # + # prevents picom from blurring the background + # when taking selection screenshot with `main` + # https://github.com/naelstrof/maim/issues/130 + "class_g = 'slop'", + "_GTK_FRAME_EXTENTS@:c", + "class_g = 'Rofi'", +]; + + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +#experimental-backends = true; +backend = "glx"; +#backend = "xrender"; + + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +unredir-if-possible = true + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true; + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +glx-no-stencil = true + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +no-use-damage = true; +# use-damage = true; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "info"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +# wintype: +# { + # normal = { shadow=true; full-shadow = true;}; + # unknown = { full-shadow = true;}; + # desktop = { full-shadow = true;}; + # dock = { full-shadow = true;}; + # toolbar = { full-shadow = true;}; + # tooltip = { full-shadow = true;}; + # popup_menu = { full-shadow = true;}; + # dropdown_menu = { full-shadow = true;}; + # menu = { full-shadow = true;}; + # utility = { full-shadow = true;}; + # splash = { full-shadow = true;}; + # dialog = { full-shadow = true;}; + # notification = { full-shadow = true;}; + # combo = { full-shadow = true;}; + # dnd = { full-shadow = true;}; +# }; +wintypes: +{ +# normal = { fade = true; shadow = true; } +# tooltip = { fade = true; shadow = true; opacity = 1.0; focus = true; full-shadow = false; }; + popup_menu = { opacity = 1.0; } + dropdown_menu = { opacity = 1.0; } + menu = { opacity = 0.7; } #change this for right click menu in Chromium based browsers +}; +#wintypes: +#{ +# toolbar = { shadow = true; full-shadow = false; } +#};