Compare commits

...

4 Commits

Author SHA1 Message Date
c321a599e4 qtile: update config to match awesome 2024-08-03 17:49:08 +03:00
7a01bda031 herbstluftwm: minor changes in config as i go back to using it :D 2024-08-03 17:48:22 +03:00
d045f8dde4 user dirs update 2024-07-27 15:57:30 +03:00
90e743aceb fzfsample: add midi file support 2024-07-27 15:57:11 +03:00
4 changed files with 62 additions and 52 deletions

View File

@ -32,7 +32,7 @@ scripts="$XDG_CONFIG_HOME/herbstluftwm/scripts"
#
terminal=kitty
browser=firefox
browser=brave
calculator="rofi -show calc"
feed_reader="$terminal -e newsboat"
file_manager=thunar
@ -47,7 +47,7 @@ screen_locker="i3lock -c 000000"
# basics
hc keybind "$M-w" close_and_remove
hc keybind "$M-e" close
hc keybind "$M-t" reload
hc keybind "$M-$C-r" reload
hc keybind "$M-q" spawn exitmenu
# focus
@ -195,7 +195,7 @@ hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
hc rule class=Cadence floating=on
hc rule class=Lxpolkit floating=on
hc rule class=Dragon-drag-and-drop floating=on
hc rule class=Dragon-drop floating=on
#
# settings

View File

@ -2,7 +2,7 @@ import os
import subprocess
from typing import List # noqa: F401
from libqtile import layout
from libqtile.config import Click, Drag, Group, Match
from libqtile.config import Click, Drag, Group, Match, Screen
from libqtile.lazy import lazy
from libqtile.config import EzKey as Keybind
from libqtile import hook
@ -14,62 +14,55 @@ from libqtile import hook
mod = "mod4"
terminal = "kitty"
launcher = "rofi -show run"
file_manager = "thunar"
browser = "firefox"
file_manager = "nemo"
browser = "brave"
calculator = "rofi -show calc"
music_player = f"{terminal} -e ncmpcpp"
screen_locker = "i3lock -c 000000"
scripts = os.path.expanduser('~/.config/qtile/scripts')
scripts = os.path.expanduser("~/.config/qtile/scripts")
#
# keybinds
#
def next_screen(qtile):
qtile.cmd_next_screen()
keys = [
# basics
Keybind("M-w", lazy.window.kill()),
Keybind("M-t", lazy.restart()),
Keybind("M-C-r", lazy.reload_config()),
Keybind("M-q", lazy.spawn(os.path.join(scripts, "exitmenu"))),
# focus
Keybind("M-h", lazy.layout.left()),
Keybind("M-j", lazy.layout.down()),
Keybind("M-k", lazy.layout.up()),
Keybind("M-l", lazy.layout.right()),
# shift
Keybind("M-S-h", lazy.layout.shuffle_left()),
Keybind("M-S-j", lazy.layout.shuffle_down()),
Keybind("M-S-k", lazy.layout.shuffle_up()),
Keybind("M-S-l", lazy.layout.shuffle_right()),
# resize
Keybind("M-C-h", lazy.layout.grow_left()),
Keybind("M-C-j", lazy.layout.grow_down()),
Keybind("M-C-k", lazy.layout.grow_up()),
Keybind("M-C-l", lazy.layout.grow_right()),
# cycle
Keybind("M-n", lazy.group.next_window()),
Keybind("M-m", lazy.function(next_screen)),
# window attributes
Keybind("M-C-q", lazy.window.toggle_floating()),
Keybind("M-C-w", lazy.window.toggle_fullscreen()),
# cycle layouts
Keybind("M-<Tab>", lazy.next_layout()),
# toggles
Keybind("M-S-w", lazy.spawn(os.path.join(scripts, "togglemaster"))),
# # media
# Keybind("XF86AudioMute", lazy.spawn("pulsemixer --toggle-mute")),
# Keybind("XF86AudioLowerVolume", lazy.spawn("pulsemixer --change-volume -5")),
# Keybind("XF86AudioRaiseVolume", lazy.spawn("pulsemixer --change-volume +5")),
# Keybind("XF86MonBrightnessDown", lazy.spawn("light -U 5")),
# Keybind("XF86MonBrightnessUp", lazy.spawn("light -A 5")),
# app launchers
Keybind("M-<Return>", lazy.spawn(terminal)),
Keybind("M-<space>", lazy.spawn(launcher)),
@ -89,10 +82,12 @@ keys = [
groups = [Group(i) for i in "asdfgzxcvb"]
for i in groups:
keys.extend([
Keybind(f"M-{i.name}", lazy.group[i.name].toscreen()),
Keybind(f"M-S-{i.name}", lazy.window.togroup(i.name)),
])
keys.extend(
[
Keybind(f"M-{i.name}", lazy.group[i.name].toscreen()),
Keybind(f"M-S-{i.name}", lazy.window.togroup(i.name)),
]
)
#
# theme
@ -100,11 +95,11 @@ for i in groups:
# load wal colors
colors = []
walpath = os.path.expanduser('~/.cache/wal/colors')
with open(walpath, 'r') as file:
walpath = os.path.expanduser("~/.cache/wal/colors")
with open(walpath, "r") as file:
for _ in range(8):
colors.append(file.readline().strip())
colors.append('#ffffff')
colors.append("#ffffff")
lazy.reload()
layout_theme = {
@ -125,21 +120,18 @@ layouts = [
layout.Max(**layout_theme),
]
#
# bar
#
# 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())
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
@ -147,20 +139,25 @@ 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
])
floating_layout = layout.Floating(
**layout_theme,
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
],
)
screens = [Screen()]
# autostart script
@hook.subscribe.startup_complete
def autostart():
autostart = os.path.expanduser('~/.config/qtile/autostart.sh')
autostart = os.path.expanduser("~/.config/qtile/autostart.sh")
subprocess.call([autostart])

View File

@ -16,7 +16,7 @@ parser.add_argument("-e", "--pattern", action="append", help="search for string"
parser.add_argument("-r", "--random", action="store_true", help="random order for args")
args = parser.parse_args()
files = subprocess.getoutput(r"fd \(wav\|mp3\)$ .", errors="replace").splitlines()
files = subprocess.getoutput(r"fd \(wav\|mp3\|mid\)$ .", errors="replace").splitlines()
if args.random:
random.shuffle(files)

View File

@ -1,2 +1,15 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DOWNLOAD_DIR="/hdd/download"
XDG_MUSIC_DIR="$HOME/docs/music"
XDG_DESKTOP_DIR="$HOME/"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"