Remove configs related to qtile

This commit is contained in:
Andreas Zweili 2023-02-14 21:33:13 +01:00
parent 6b5e654002
commit cb72272095
18 changed files with 1 additions and 458 deletions

View File

@ -7,13 +7,5 @@
powerOnBoot = false;
};
# Blueman applet
services.blueman.enable = true;
systemd.user.services.blueman-applet = {
partOf = [ "graphical-session.target" ];
wantedBy = [ "graphical-session.target" ];
};
}

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
systemctl --user import-environment PATH
systemctl --user restart xdg-desktop-portal.service

View File

@ -1,8 +0,0 @@
#!/usr/bin/env bash
scripts=$(ls -1 ~/.config/qtile/autostart.d/*.sh)
for i in $scripts
do
source $i
done
echo "Finished qtile autostart"

View File

@ -1,288 +0,0 @@
import os
import subprocess
from typing import List # noqa: F401
from libqtile import bar
from libqtile import hook
from libqtile import layout
from libqtile import qtile
from libqtile import widget
from libqtile.config import Click, Drag, Group, Key, Match, Screen
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
mod = "mod4"
terminal = guess_terminal()
@lazy.layout.function
def add_treetab_section(layout):
prompt = qtile.widgets_map["section_prompt"]
prompt.start_input("Section name", layout.cmd_add_section)
keys = [
# Switch between windows in current stack pane
Key([mod], "j", lazy.layout.down()),
Key([mod], "k", lazy.layout.up()),
Key([mod], "h", lazy.layout.left()),
Key([mod], "l", lazy.layout.right()),
Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"),
# Move windows around
Key([mod, "shift"], "j", lazy.layout.shuffle_down(), lazy.layout.move_down()),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(), lazy.layout.move_up()),
Key([mod, "shift"], "h", lazy.layout.shuffle_left()),
Key([mod, "shift"], "l", lazy.layout.shuffle_right()),
Key([mod, "shift"], "q", lazy.window.kill()),
Key([mod, "shift"], "space", add_treetab_section),
Key(
[mod, "shift"],
"Return",
lazy.layout.toggle_split(),
desc="Toggle between split and unsplit sides of stack",
),
# Resize windows
Key([mod, "control"], "j", lazy.layout.grow_down()),
Key([mod, "control"], "k", lazy.layout.grow_up()),
Key([mod, "control"], "h", lazy.layout.grow_left()),
Key([mod, "control"], "l", lazy.layout.grow_right()),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown qtile"),
Key([mod, "control"], "r", lazy.restart(), desc="Restart qtile"),
# Move windows between sections
Key([mod, "control", "shift"], "j", lazy.layout.section_down()),
Key([mod, "control", "shift"], "k", lazy.layout.section_up()),
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
Key([mod], "c", lazy.spawn("i3lock -c 000000")),
Key([mod], "d", lazy.spawn("rofi -show drun")),
Key([mod], "e", lazy.spawn("nautilus")),
Key([mod], "p", lazy.spawn("xrandr --auto")),
Key([mod], "r", lazy.spawn("rofi -matching-negate-char \\0 -show run")),
Key([mod], "w", lazy.spawn("firefox")),
Key([mod], "Tab", lazy.spawn("rofi -show window")),
# Toggle between different layouts as defined below
Key([mod], "F1", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
Key([mod], "F2", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ -5%")),
Key([mod], "F3", lazy.spawn("pactl set-sink-volume @DEFAULT_SINK@ +5%")),
Key([mod], "F5", lazy.spawn("toggle_touchpad.sh")),
Key([], "XF86AudioPlay", lazy.spawn("playerctl play")),
Key([], "XF86AudioPause", lazy.spawn("playerctl pause")),
Key([], "XF86AudioNext", lazy.spawn("playerctl next")),
Key([], "XF86AudioPrev", lazy.spawn("playerctl previous")),
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 10%-")),
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +10%")),
]
group_matches = [
None, # 0
None, # 1
None, # 2
None, # 3
None, # 4
None, # 5
[
Match(wm_class="KeeWeb"),
Match(wm_class="JDownloader"),
Match(wm_class="Plexamp"),
], # 6
None, # 7
[
Match(wm_class="linphone"),
], # 8
[
Match(wm_class="Steam"),
], # 9
]
def toscreen(qtile, group_name):
if group_name == qtile.current_screen.group.name:
qtile.current_screen.set_group(qtile.current_screen.previous_group)
return
for i, group in enumerate(qtile.groups):
if group_name == group.name:
qtile.current_screen.set_group(qtile.groups[i])
return
groups = [Group(name=i, matches=group_matches[int(i)]) for i in "1234567890"]
for i in groups:
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod],
i.name,
lazy.function(toscreen, i.name),
desc="Switch to group {}".format(i.name),
),
# mod1 + shift + letter of group = switch to & move focused window to
# group Key([mod, "shift"], i.name, lazy.window.togroup(i.name,
# switch_group=True), desc="Switch to & move focused window to group
# {}".format(i.name)), Or, use below if you prefer not to switch to
# that group. # mod1 + shift + letter of group = move focused window to
# group
Key(
[mod, "shift"],
i.name,
lazy.window.togroup(i.name),
desc="move focused window to group {}".format(i.name),
),
]
)
border = dict(border_width=1, border_focus="#000000")
layouts = [
layout.Columns(**border),
layout.TreeTab(**border),
]
widget_defaults = dict(
font="Source Code Pro",
fontsize=12,
padding=3,
)
extension_defaults = widget_defaults.copy()
def top_bar_widgets():
widgets = [
widget.GroupBox(),
widget.Sep(padding=5),
widget.Prompt(name="section_prompt"),
widget.WindowName(),
widget.Sep(padding=5),
widget.CurrentLayout(),
widget.Sep(padding=5),
widget.DF(visible_on_warn=False),
widget.Sep(padding=5),
widget.Volume(),
widget.Sep(padding=5),
]
widgets_end = [
widget.Battery(
charge_char="",
discharge_char="",
full_char="",
show_short_text=False,
),
widget.Sep(padding=5),
widget.Systray(),
widget.Sep(padding=5),
widget.Clock(format="%Y-%m-%d %a %H:%M"),
]
backlight_widget = [
widget.Backlight(backlight_name="intel_backlight", fmt="{}"),
widget.Sep(padding=5),
]
if os.path.exists("/sys/class/backlight/intel_backlight"):
widgets.extend(backlight_widget)
widgets.extend(widgets_end)
return widgets
screens = [
Screen(
top=bar.Bar(
top_bar_widgets(),
24,
),
),
Screen(
top=bar.Bar(
[
widget.GroupBox(),
widget.Sep(padding=5),
widget.WindowName(),
widget.Sep(padding=5),
widget.CurrentLayout(),
widget.Sep(padding=5),
widget.Volume(),
widget.Sep(padding=5),
widget.Clock(format="%Y-%m-%d %a %H:%M"),
],
24,
),
),
Screen(
top=bar.Bar(
[
widget.GroupBox(),
widget.Sep(padding=5),
widget.WindowName(),
widget.Sep(padding=5),
widget.CurrentLayout(),
widget.Sep(padding=5),
widget.Volume(),
widget.Sep(padding=5),
widget.Clock(format="%Y-%m-%d %a %H:%M"),
],
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.toggle_floating()),
]
dgroups_key_binder = None
dgroups_app_rules = [] # type: List
main = None
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
auto_fullscreen = True
focus_on_window_activation = "smart"
@hook.subscribe.startup_once
def autostart():
home = os.path.expanduser("~/.config/qtile/autostart.sh")
subprocess.run([home])
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="confirm"),
Match(wm_class="dialog"),
Match(wm_class="download"),
Match(wm_class="error"),
Match(wm_class="file_progress"),
Match(wm_class="notification"),
Match(wm_class="splash"),
Match(wm_class="toolbar"),
Match(wm_class="confirmreset"), # gitk
Match(wm_class="makebranch"), # gitk
Match(wm_class="maketag"), # gitk
Match(title="branchdialog"), # gitk
Match(title="pinentry"), # GPG key password entry
Match(wm_class="ssh-askpass"), # ssh-askpass
]
)
# 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"

View File

@ -5,16 +5,13 @@
"${custom.inputs.self}/home-manager/software/alacritty"
"${custom.inputs.self}/home-manager/software/calibre"
"${custom.inputs.self}/home-manager/software/czkawka"
"${custom.inputs.self}/home-manager/software/dunst"
"${custom.inputs.self}/home-manager/software/emacs"
"${custom.inputs.self}/home-manager/software/evince"
"${custom.inputs.self}/home-manager/software/fzf"
"${custom.inputs.self}/home-manager/software/git"
"${custom.inputs.self}/home-manager/software/grobi"
"${custom.inputs.self}/home-manager/software/keeweb"
"${custom.inputs.self}/home-manager/software/mime-apps"
"${custom.inputs.self}/home-manager/software/mpv"
"${custom.inputs.self}/home-manager/software/nitrogen"
"${custom.inputs.self}/home-manager/software/obsidian"
(import "${custom.inputs.self}/home-manager/software/rapid-photo-downloader" { inherit custom; })
"${custom.inputs.self}/home-manager/software/signal"
@ -33,7 +30,6 @@
libreoffice-fresh
makemkv
meld
pulseaudio # required for volume controls in qtile
plexamp
remmina
shotwell
@ -42,11 +38,6 @@
];
programs.git.userEmail = "andreas@zweili.ch";
# raw config files
home.file.".config/qtile/config.py".source = "${custom.inputs.self}/home-manager/configs/qtile/config.py";
home.file.".config/qtile/autostart.sh".source = "${custom.inputs.self}/home-manager/configs/qtile/autostart.sh";
home.file.".config/qtile/autostart.d/xdg-portal-add-path.sh".source = "${custom.inputs.self}/home-manager/configs/flatpak/xdg-portal-add-path.sh";
programs.bash = {
enable = true;
bashrcExtra = ''
@ -78,6 +69,5 @@
xsession = {
numlock.enable = true;
};
services.network-manager-applet.enable = true;
}

View File

@ -1,56 +0,0 @@
{ ... }:
{
services.dunst = {
enable = true;
settings = {
global = {
font = "Source Code Pro 11";
markup = "yes";
format = "<b>%s</b>\\n%b";
sort = "no";
indicate_hidden = "yes";
alignment = "center";
show_age_threshold = -1;
word_wrap = "yes";
ignore_newline = "no";
stack_duplicates = "yes";
shrink = "no";
transparency = 5;
idle_threshold = 0;
monitor = 0;
follow = "none";
sticky_history = "yes";
history_length = 15;
show_indicators = "no";
line_height = 3;
separator_height = 2;
padding = 6;
horizontal_padding = 6;
separator_color = "frame";
browser = "firefox - new-tab";
icon_position = "off";
max_icon_size = 80;
frame_width = 3;
frame_color = "#8EC07C";
};
urgency_low = {
frame_color = "#3B7C87";
foreground = "#3B7C87";
background = "#191311";
timeout = 4;
};
urgency_normal = {
frame_color = "#5B8234";
foreground = "#5B8234";
background = "#191311";
timeout = 6;
};
urgency_critical = {
frame_color = "#B7472A";
foreground = "#B7472A";
background = "#191311";
timeout = 8;
};
};
};
}

View File

@ -1,47 +0,0 @@
{ pkgs, ... }:
{
services.grobi = {
enable = true;
rules = [
{
name = "docked";
outputs_connected = [ "DP-1-1" "DP-1-2" ];
atomic = true;
configure_row = [ "DP-1-2" "DP-1-1" ];
primary = "DP-1-1";
execute_after = [
"${pkgs.nitrogen}/bin/nitrogen --restore"
"${pkgs.qtile}/bin/qtile cmd-obj -o cmd -f restart"
];
}
{
name = "gaming";
outputs_connected = [ "DP-1-2" ];
outputs_disconnected = [ "DP-1-1" ];
configure_single = "DP-1-2";
primary = true;
atomic = true;
execute_after = [
"${pkgs.nitrogen}/bin/nitrogen --restore"
"${pkgs.qtile}/bin/qtile cmd-obj -o cmd -f restart"
];
}
{
name = "undocked";
outputs_disconnected = [ "DP-1-1" "DP-1-2" ];
configure_single = "eDP-1";
primary = true;
atomic = true;
execute_after = [
"${pkgs.nitrogen}/bin/nitrogen --restore"
"${pkgs.qtile}/bin/qtile cmd-obj -o cmd -f restart"
"${pkgs.networkmanager}/bin/nmcli radio wifi on"
];
}
{
name = "fallback";
configure_single = "eDP-1";
}
];
};
}

View File

@ -3,6 +3,4 @@
home.packages = with pkgs; [
keeweb
];
home.file.".config/qtile/autostart.d/keeweb.sh".source = ./keeweb.sh;
}

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
echo "start keeweb"
nohup keeweb > ~/.local/share/nohup.out &

View File

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
nitrogen
];
}

View File

@ -4,7 +4,6 @@
unstable.signal-desktop
];
home.file.".config/qtile/autostart.d/signal.sh".source = ./signal.sh;
xdg.desktopEntries = {
signal = {
name = "Signal with tray icon";

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
echo "start signal"
nohup signal-desktop --use-tray-icon --no-sandbox > ~/.local/share/nohup.out &

View File

@ -3,7 +3,4 @@
home.packages = with pkgs; [
unstable.tdesktop
];
home.file.".config/qtile/autostart.d/telegram.sh".source = ./telegram.sh;
}

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
echo "start telegram"
nohup telegram-desktop > ~/.local/share/nohup.out &

View File

@ -17,7 +17,6 @@
format-modules = "nixpkgs-fmt **/*.nix";
nix-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
rebuild = ''
rm -rf ~/.config/qtile/__pycache__ &&
nixos-rebuild -j auto switch --use-remote-sudo
'';
find-garbage = "ls -l /nix/var/nix/gcroots/auto/ | sort";

View File

@ -6,6 +6,7 @@
(import "${custom.inputs.self}/modules/email" { inherit custom; })
(import "${custom.inputs.self}/modules/eog" { inherit custom; })
(import "${custom.inputs.self}/modules/espanso" { inherit custom; })
"${custom.inputs.self}/modules/gnome"
"${custom.inputs.self}/modules/hunspell"
(import "${custom.inputs.self}/modules/libimobiledevice" { inherit custom; })
(import "${custom.inputs.self}/modules/nix-direnv" { inherit custom; })
@ -23,9 +24,6 @@
picom = {
enable = true;
};
redshift = {
enable = true;
};
fwupd.enable = true;
};
@ -33,8 +31,6 @@
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
displayManager.defaultSession = "none+qtile";
windowManager.qtile.enable = true;
layout = "us";
xkbOptions = "compose:ralt";
libinput.enable = true;
@ -44,16 +40,9 @@
source-code-pro
];
# Enable keyring
security.pam.services.lightdm.enableGnomeKeyring = true;
services.gnome.gnome-keyring.enable = true;
# Enable sound.
sound.enable = true;
# Enable dconf to be able to save Nautilus settings
programs.dconf.enable = true;
# Enable Flatpack
services.flatpak.enable = true;
xdg = {
@ -107,11 +96,9 @@
gnome.gnome-screenshot
gnome.nautilus
networkmanager-openvpn
nitrogen
p7zip
pavucontrol
quickemu
rofi
source-code-pro
unrar
];

View File

@ -2,7 +2,6 @@
{
services.xrdp = {
enable = true;
defaultWindowManager = "${pkgs.qtile}/bin/qtile start";
};
networking.firewall.allowedTCPPorts = [ 3389 ];
}

View File

@ -8,7 +8,6 @@
"${custom.inputs.self}/hardware/nvidia"
"${custom.inputs.self}/hardware/dvd"
(import "${custom.inputs.self}/modules/desktop" { inherit custom; })
"${custom.inputs.self}/modules/gnome"
"${custom.inputs.self}/modules/lockscreen"
"${custom.inputs.self}/modules/logs-share"
"${custom.inputs.self}/modules/rdp"