From 8512162cd07d0de8193b028068b63a780329a538 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Sun, 26 Oct 2025 23:16:13 +0100 Subject: [PATCH] endos.py --- ROOT/etc/greetd/config.toml | 16 - ROOT/etc/greetd/environments | 2 - ROOT/etc/qtgreet/config.ini | 23 -- ROOT/etc/systemd/logind.conf.d/suspend.conf | 8 + ROOT/etc/systemd/sleep.conf.d/hibernate.conf | 2 + ROOT/usr/local/bin/start-sway | 19 -- endos.py | 324 ++++++++++++++++++ foot/foot.ini | 10 +- manjaro.sh | 129 ------- sway/config | 332 ------------------- sway/config.d/application_defaults | 31 ++ sway/config.d/autostart_applications | 50 +++ sway/config.d/default | 247 ++++++++++++++ sway/config.d/input | 20 ++ sway/config.d/output | 1 + sway/config.d/theme | 38 +++ sway/idle.yaml | 29 -- 17 files changed, 729 insertions(+), 552 deletions(-) delete mode 100644 ROOT/etc/greetd/config.toml delete mode 100644 ROOT/etc/greetd/environments delete mode 100644 ROOT/etc/qtgreet/config.ini create mode 100644 ROOT/etc/systemd/logind.conf.d/suspend.conf create mode 100644 ROOT/etc/systemd/sleep.conf.d/hibernate.conf delete mode 100755 ROOT/usr/local/bin/start-sway create mode 100755 endos.py delete mode 100755 manjaro.sh delete mode 100644 sway/config create mode 100644 sway/config.d/application_defaults create mode 100644 sway/config.d/autostart_applications create mode 100644 sway/config.d/default create mode 100644 sway/config.d/input create mode 100644 sway/config.d/output create mode 100644 sway/config.d/theme delete mode 100644 sway/idle.yaml diff --git a/ROOT/etc/greetd/config.toml b/ROOT/etc/greetd/config.toml deleted file mode 100644 index 3970c13..0000000 --- a/ROOT/etc/greetd/config.toml +++ /dev/null @@ -1,16 +0,0 @@ -[terminal] -# The VT to run the greeter on. Can be "next", "current" or a number -# designating the VT. -vt = 1 - -# The default session, also known as the greeter. -[default_session] - -# `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh` -# with whatever you want started, such as `sway`. -command = "start-sway --unsupported-gpu --config /etc/greetd/sway-config 2> /etc/sway/sway.log" - -# The user to run the command as. The privileges this user must have depends -# on the greeter. A graphical greeter may for example require the user to be -# in the `video` group. -user = "greeter" diff --git a/ROOT/etc/greetd/environments b/ROOT/etc/greetd/environments deleted file mode 100644 index d16bb19..0000000 --- a/ROOT/etc/greetd/environments +++ /dev/null @@ -1,2 +0,0 @@ -sway -bash diff --git a/ROOT/etc/qtgreet/config.ini b/ROOT/etc/qtgreet/config.ini deleted file mode 100644 index e0bbc91..0000000 --- a/ROOT/etc/qtgreet/config.ini +++ /dev/null @@ -1,23 +0,0 @@ -[General] -Backend = GreetD -Theme = sidebar -BlurBackground = true -IconTheme = breeze - -[Overrides] -Background = /usr/share/qtgreet/backgrounds/Water.svg -BaseColor = Theme -TextColor = Theme -FontFamily = Noto Sans - -[videobg] -File = -Playlist = - -[Environment] - -[PowerCommands] -Suspend = dbus -Hibernate = dbus -Shutdown = dbus -Reboot = dbus diff --git a/ROOT/etc/systemd/logind.conf.d/suspend.conf b/ROOT/etc/systemd/logind.conf.d/suspend.conf new file mode 100644 index 0000000..33648b7 --- /dev/null +++ b/ROOT/etc/systemd/logind.conf.d/suspend.conf @@ -0,0 +1,8 @@ +[Login] +IdleAction=suspend-then-hibernate +IdleActionSec=10min +HandlePowerKey=suspend-then-hibernate +HandlePowerKeyLongPress=poweroff +HandleLidSwitch=suspend-then-hibernate +HandleLidSwitchExternalPower=suspend-then-hibernate +HandleLidSwitchDocked=ignore diff --git a/ROOT/etc/systemd/sleep.conf.d/hibernate.conf b/ROOT/etc/systemd/sleep.conf.d/hibernate.conf new file mode 100644 index 0000000..1dcc192 --- /dev/null +++ b/ROOT/etc/systemd/sleep.conf.d/hibernate.conf @@ -0,0 +1,2 @@ +[sleep] +HibernateDelaySec=30min diff --git a/ROOT/usr/local/bin/start-sway b/ROOT/usr/local/bin/start-sway deleted file mode 100755 index 7e1c589..0000000 --- a/ROOT/usr/local/bin/start-sway +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Session -export XDG_SESSION_TYPE=wayland -export XDG_SESSION_DESKTOP=sway -export XDG_CURRENT_DESKTOP=sway - -# Environment -# Source environmental variable from all files in PATH_ENVIRONMENT -# file should be named *.conf and have KEY=value format use # for comment -PATH_ENVIRONMENT=$HOME/.config/environment.d -if [ -d "$PATH_ENVIRONMENT" ]; then - for i in "$PATH_ENVIRONMENT"/*.conf ; do - if [ -f "$i" ]; then - set -a; . "$i"; set +a - fi - done -fi - -exec sway "$@" diff --git a/endos.py b/endos.py new file mode 100755 index 0000000..07d1114 --- /dev/null +++ b/endos.py @@ -0,0 +1,324 @@ +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.13" +# dependencies = [ +# "defopt", +# ] +# /// +from difflib import unified_diff +from pathlib import Path +from subprocess import run +from urllib.request import urlretrieve + +CFG = Path("~/.config").expanduser() +DOTFILES = Path("~/dotfiles").expanduser() +installmap = dict( + fonts=("noto-fonts-emoji", "ttf-hack", "font-manager"), + nushell=("nushell", "oh-my-posh", "carapace-bin", "zoxide"), + tmux=("tmux", "urlscan"), + nvim=("neovim", "ripgrep"), + utils=("uv", "bat", "ncdu", "unzip", "jq"), + gittools=("tig", "diff-so-fancy", "git-secret", "git-delta", "git-lfs", "lazygit"), + pdftools=("sioyek", "zathura", "zathura-pdf-mupdf", "zathura-djvu", "zathura-ps"), + media=("vlc", "mpv", "protobuf", "yt-dlp", "quodlibet", "qimgv"), + filebrowsers=("pcmanfm", "yazi", "zoxide", "eza"), + netbrowsers=( + "qutebrowser", + "firefox", + "python-adblock", + "python-tldextract", + "bitwarden-cli", # for qutebrowser autofill + ), + emailcalrss=( + "vdirsyncer", # sync calendar+contacts + "khard", # contacts + "khal", # calendar + "aerc", # email + "pandoc", # md2html emails + "pass", # password manager + "w3m", # terminal browser + "newsboat", # rss reader + "python-aiohttp-oauthlib", # for google vdirsyncer + ), + monitors=( + "btop", # hardware + "nvtop", # gpu + "lazyjournal", # journald + "isd", # systemd + "bandwhich", # network + ), + apps=("bitwarden", "qalculate-gtk", "vesktop"), + swaytools=( + "flashfocus", # quick flash when changing app in focus + "noisetorch", # noise cancellation + "unipicker", # unicode symbol selector + "wl-clip-persist", # keep clipboard after close + "wlsunset", # eye saver + "blueman", # bluetooth + "wdisplays", # ui for display settings + "wev", # debugging of ui + "gtklock", # lock screen + ), + remotedata=("rclone", "dropbox", "minio-client"), + screensharing=( + "wireplumber", + "xdg-desktop-portal", + "xdg-desktop-portal-wlr", + ), + optional_nvidia=("cuda", "nvidia-settings"), + optional_coolercontrol=("coolercontrol",), + optional_containers=( + "docker", + "docker-compose", + "docker-buildx", # advanced build + "qemu-user-static-binfmt", # build arm64 + "qemu-user-static", # build arm64 + "dry-bin", # docker tui + "k9s", # kubernetes tui + ), + optional_nvidia_containers=("nvidia-docker",), +) + + +def compare_files(a: Path, b: Path) -> str: + return "".join( + unified_diff(open(a).readlines(), open(b).readlines(), str(a), str(b)) + ) + + +def helper_symlink_contents( + source_folder: str | Path, target_folder: str | Path, overwrite: bool +) -> None: + source_folder = Path(source_folder).expanduser() + target_folder = Path(target_folder).expanduser() + target_folder.mkdir(exist_ok=True) + for folder in [source_folder, target_folder]: + assert folder.expanduser().is_dir() + for src in source_folder.iterdir(): + tgt = target_folder / src.name + if tgt.exists(): + if src.is_dir(): + if overwrite: + tgt.rmdir() + tgt.symlink_to(src) + else: + diff = "" + for subsrc in src.glob("**/*"): + subpath = subsrc.relative_to(source_folder) + subtgt = target_folder / subpath + if subtgt.exists(): + diff += compare_files(subsrc, subtgt) + if diff: + print("DIFF:\n" + diff) + if input("overwrite? (y/n) ") == "y": + tgt.rmdir() + tgt.symlink_to(src) + else: + if overwrite: + tgt.unlink() + tgt.symlink_to(src) + else: + tgt = target_folder / src.name + diff = compare_files(src, tgt) + if diff: + print("DIFF:\n" + diff) + if input("overwrite? (y/n) ") == "y": + tgt.unlink() + tgt.symlink_to(src) + + +def helper_maybe_continue(path: Path, overwrite: bool) -> bool: + path = path.expanduser() + match path.exists(), overwrite: + case False, _: + return True + case True, True: + path.unlink() + return True + case True, False: + return False + case err: + raise ValueError(err) + + +def helper_check_if_installed(pkg: str) -> bool: + return run(["yay", "-Qs", pkg], capture_output=True).returncode == 0 + + +def helper_uninstall(*pkgs: str) -> None: + for pkg in pkgs: + run(["yay", "-Rns", pkg], capture_output=True) + + +def helper_install(*pkgs: str, reinstall: bool) -> None: + for pkg in pkgs: + if reinstall or not helper_check_if_installed(pkg): + assert run(["yay", "-S", pkg]).returncode == 0 + + +def install_fonts(reinstall: bool) -> None: + urlretrieve( + "https://raw.githubusercontent.com/SUNET/static_sunet_se/refs/heads/master/fonts/Akkurat-Mono.otf", + Path("~/.local/share/fonts/Akkurat-Mono.otf").expanduser(), + ) + helper_install(*installmap["fonts"], reinstall=reinstall) + + +def install_nushell(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["nushell"], reinstall=reinstall) + helper_symlink_contents(DOTFILES / "nushell", CFG / "nushell", overwrite) + run("sudo chsh -s /usr/bin/nu".split()) + url = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/refs/heads/main/themes/peru.omp.json" + run(["oh-my-posh", "init", "nu", "--config", url]) + + +def install_tmux(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["tmux"], reinstall=reinstall) + helper_symlink_contents(DOTFILES / "tmux", CFG / "tmux", overwrite) + tpmpath = CFG / "tmux/plugins/tpm" + if overwrite or not tpmpath.exists(): + if tpmpath.exists(): + tpmpath.rmdir() + run(["git", "clone", "https://github.com/tmux-plugins/tpm", tpmpath]) + + +def install_nvim(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["nvim"], reinstall=reinstall) + helper_symlink_contents(DOTFILES / "nvim", CFG / "nvim", overwrite) + + +def install_gittools(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["gittools"], reinstall=reinstall) + helper_symlink_contents(DOTFILES / "tig", CFG / "tig", overwrite) + gitcfgpath = Path("~/.gitconfig").expanduser() + if overwrite or not gitcfgpath.exists(): + if gitcfgpath.exists(): + gitcfgpath.unlink() + gitcfgpath.expanduser().symlink_to(DOTFILES / "HOME/.gitconfig") + + +def install_pdftools(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["pdftools"], reinstall=reinstall) + helper_symlink_contents(DOTFILES / "sioyek", CFG / "sioyek", overwrite) + helper_symlink_contents(DOTFILES / "zathura", CFG / "zathura", overwrite) + + +def install_filebrowsers(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["filebrowsers"], reinstall=reinstall) + helper_symlink_contents(DOTFILES / "yazi", CFG / "yazi", overwrite) + for plugin in [ + "chmod", + "git", + "mount", + "piper", + "smart-enter", + "smart-filter", + "toggle-pane", + ]: + run(f"ya pkg add yazi-rs/plugins:{plugin}".split()) + + +def install_emailcalrss(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["emailcalrss"], reinstall=reinstall) + for tgt in ["vdirsyncer", "khard", "khal", "aerc", "newsboat"]: + helper_symlink_contents(DOTFILES / tgt, CFG / tgt, overwrite) + run(f"chmod 600 {CFG / 'aerc/accounts.conf'}".split()) + + +def install_swaytools(overwrite: bool, reinstall: bool) -> None: + helper_install(*installmap["swaytools"], reinstall=reinstall) + sub = "sway/config.d" + helper_symlink_contents(DOTFILES / sub, CFG / sub, overwrite) + run("sudo systemctl enable --now bluetooth".split()) + for sub in [ + "etc/systemd/logind.conf.d/suspend.conf", + "etc/systemd/sleep.conf.d/hibernate.conf", + ]: + run(["sudo", "cp", str(DOTFILES / "ROOT" / sub), str(Path("/") / sub)]) + run("sudo systemctl enable --now bluetooth".split()) + + +def configure_pytools(overwrite: bool) -> None: + for sub in [".ipython/profile_default", ".jupyter"]: + helper_symlink_contents(DOTFILES / "HOME" / sub, Path("~") / sub, overwrite) + + +def installer( + overwrite: bool = False, + reinstall: bool = False, + with_gpu: bool = False, + with_containers: bool = False, + with_coolercontrol: bool = False, +) -> None: + if helper_check_if_installed("cliphist"): + helper_uninstall("cliphist") + print("removed cliphist") + install_fonts(reinstall) + print("installed fonts") + install_nushell(overwrite, reinstall) + print("installed nushell") + install_tmux(overwrite, reinstall) + print("installed tmux") + install_nvim(overwrite, reinstall) + print("installed nvim") + helper_install(*installmap["utils"], reinstall=reinstall) + print("installed utils") + install_gittools(overwrite, reinstall) + print("installed gittools") + install_pdftools(overwrite, reinstall) + print("installed pdftools") + helper_install(*installmap["media"], reinstall=reinstall) + print("installed media") + install_filebrowsers(overwrite, reinstall) + print("installed filebrowsers") + helper_install(*installmap["netbrowsers"], reinstall=reinstall) + print("installed netbrowsers") + install_emailcalrss(overwrite, reinstall) + print("installed emailcalrss") + helper_install(*installmap["monitors"], reinstall=reinstall) + print("installed monitors") + helper_install(*installmap["apps"], reinstall=reinstall) + print("installed apps") + install_swaytools(overwrite, reinstall) + print("installed sway") + helper_install(*installmap["remotedata"], reinstall=reinstall) + print("installed remotedata") + helper_install(*installmap["screensharing"], reinstall=reinstall) + print("installed screensharing") + configure_pytools(overwrite=overwrite) + print("configured python tools") + if with_gpu: + helper_install(*installmap["optional_nvidia"], reinstall=reinstall) + print("installed nvidia") + if with_containers: + helper_install(*installmap["optional_containers"], reinstall=reinstall) + run("sudo systemctl enable --now docker.service".split()) + print("installed containers") + if with_gpu and with_containers: + helper_install(*installmap["optional_nvidia_containers"], reinstall=reinstall) + print("installed nvidia containers") + if with_coolercontrol: + helper_install(*installmap["optional_coolercontrol"], reinstall=reinstall) + run("sudo systemctl enable --now coolercontrold.service".split()) + print("installed coolercontrol") + print(""" + MANUAL NEXT STEPS: + + set up vdirsyncer with google calendar using + https://vdirsyncer.pimutils.org/en/stable/config.html#google + + allow firefox windowed fullscreen by setting full-screen-api.ignore-widgets + to true in about:config + + set coolercontrold log level to WARN: + `sudo systemctl edit coolercontrold.service` + + docker with non-root daemon + `sudo groupadd docker && sudo usermod -aG docker $USER` + """) + + +if __name__ == "__main__": + import defopt + + defopt.run(installer) diff --git a/foot/foot.ini b/foot/foot.ini index b2ad24e..2ca0dfb 100644 --- a/foot/foot.ini +++ b/foot/foot.ini @@ -1,8 +1,14 @@ [main] -term=xterm-256color -font=monospace:size=10,JetBrainsMono Nerd Font:size=10 +font=monospace:size=7,JetBrainsMono Nerd Font:size=7 dpi-aware=yes +[environment] +SYSTEMD_EDITOR=/usr/bin/nvim +EDITOR=/usr/bin/nvim +VISUAL=/usr/bin/nvim +PAGER="bat --style=header,rule,snip" +BROWSER=/usr/bin/qutebrowser + [scrollback] lines=100000 diff --git a/manjaro.sh b/manjaro.sh deleted file mode 100755 index ea97cdb..0000000 --- a/manjaro.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh -set -e - -# general -sudo systemctl enable --now sshd.service -sudo systemctl enable --now fstrim.timer -yay -S plymouth tldextract go nodejs unzip exa topgrade - -# display manager -yay -S greetd qtgreet - -# sway -yay -S manjaro-sway-settings swaytools swaylock-effects pamac-tray-plasma unipicker mako ly wlsunset pcmanfm-qt wev gtklock idlehack sworkstyle foot -systemctl --now --user enable foot-server.socket -# systemctl --now --user enable foot-server -# systemctl --now --user enable idlehack -# systemctl --now --user enable sworkstyle -# systemctl --now --user enable pcmanfm - -# nvidia -yay -S cuda nvidia-settings nvidia-docker - -# python -yay -S python-pip pyenv ipython - -# sound -yay -S manjaro-pipewire pavucontrol-qt - -# video sharing -yay -S wireplumber xdg-desktop-portal xdg-desktop-portal-wlr - -# theme -yay -S mint-themes mint-y-icons kvantum-theme-catppuccin-git catppuccin-gtk-theme-latte catppuccin-gtk-theme-mocha breeze-grub breeze-gtk breeze-icons -yay -S lxinput-gtk3 qt6ct pamac-gtk3 - -# terminal and shell -yay -S nushell oh-my-posh carapace-bin zoxide -chsh -s /usr/bin/nu -oh-my-posh init nu --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/refs/heads/main/themes/peru.omp.json - -# code -yay -S neovim tmux tig diff-so-fancy ripgrep urlscan -git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm -# git -yay -S git-secret git-delta git-lfs lazygit -# formatters -yay -S python-black python-blackdoc python-pyment python-isort \ - eslint_d eslint jq yamlfmt shfmt prettierd - -# file sync -yay -S rclone dropbox -systemctl --user daemon-reload -rclone config # follow instructions and paste creds from https://console.cloud.google.com/apis/credentials -systemctl --now --user enable rclone-gdrive -systemctl --now --user enable dropbox - -# docker incl non-root daemon -yay -S docker docker-compose dry-bin nvidia-docker docker-buildx -docker plugin install grafana/loki-docker-driver --alias loki --grant-all-permissions -sudo groupadd docker && sudo usermod -aG docker $USER -sudo systemctl enable --now containerd.service -sudo systemctl enable --now docker.service -# docker multi-platform build -yay -S qemu-user-static-binfmt qemu-user-static - -# printer -yay -S manajaro-printer samsung-unified-driver-printer - -# monitors -yay -S iftop btop nvtop lazyjournal isd bandwhich - -# pdf -yay -S sioyek zathura zathura-pdf-mupdf zathura-djvu zathura-ps - -# fonts -yay -S noto-fonts-emoji ttf-hack - -# coolercontrol -yay -S coolercontrol -sudo systemctl enable --now coolercontrold.service -sudo systemctl edit coolercontrold.service # set log level to WARN - -# video streaming -yay -S vlc protobuf yt-dlp -yay -S castnow - -# cal+email+contacts -yay -S khard aerc khal vdirsyncer python-aiohttp-oauthlib pandoc - -# latex -yay texlive-latexextra - -# div applications -yay -S \ - vesktop \ - qimgv \ - firefox \ - font-manager \ - i3status \ - ncspot \ - qalculate-qt \ - qbittorrent \ - quodlibet \ - qutebrowser \ - pass \ - rofi \ - steam \ - teamviewer \ - yazi \ - eza - -# firefox windowed fullscreen -# can be achieved by setting full-screen-api.ignore-widgets to true in about:config - -wget -P ~/.local/share/fonts/ https://raw.githubusercontent.com/SUNET/static_sunet_se/refs/heads/master/fonts/Akkurat-Mono.otf -sudo mkdir -p /usr/share/backgrounds/ultrawide/ -sudo wget -O rainbowsmoke.jpg -P /usr/share/backgrounds/ultrawide https://superultrawidewallpaper.com/wp-content/uploads/2022/02/rainbow-smoke-3840x1080-1860x523.jpg - -# set up vdirsyncer with google calendar using -# https://vdirsyncer.pimutils.org/en/stable/config.html#google - -# yazi plugins -ya pkg add yazi-rs/plugins:chmod -ya pkg add yazi-rs/plugins:git -ya pkg add yazi-rs/plugins:mount -ya pkg add yazi-rs/plugins:piper -ya pkg add yazi-rs/plugins:smart-enter -ya pkg add yazi-rs/plugins:smart-filter -ya pkg add yazi-rs/plugins:toggle-pane diff --git a/sway/config b/sway/config deleted file mode 100644 index 30b7523..0000000 --- a/sway/config +++ /dev/null @@ -1,332 +0,0 @@ -include /etc/sway/config.d/10-service.conf -include /etc/sway/config.d/50-systemd-user.conf - -# THEME -set $background /usr/share/backgrounds/wallpapers-juhraya/Austria_by_Rutger_Heijmerikx.jpg -set $gui-font Noto Sans 10 -set $term-font Akkurat Mono -# light -# set $cursor-theme xcursor-breeze-snow -# set $gtk-theme catppuccin-latte-teal-standard+default -# set $icon-theme Papirus -# set $kvantum-theme catppuccin-latte-teal -# set $gtk-color-scheme prefer-light -# dark -set $cursor-theme xcursor-breeze -set $gtk-theme catppuccin-mocha-teal-standard+default -set $icon-theme Papirus-Dark -set $kvantum-theme catppuccin-mocha-teal -set $gtk-color-scheme prefer-dark -# colors -set $background-color #1E1E2E -set $text-color #CDD6F4 -set $accent-color #89B4FA -# target title bg text indicator -client.focused #556064 #F9CE5C #000000 #FDF6E3 -client.focused_inactive #CB4B16 #2F3D44 #1ABC9C #454948 -client.unfocused #556064 #2F3D44 #1ABC9C #454948 -client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 -client.placeholder #000000 #0C0C0C #ffffff #000000 -client.background #2B2C2B - -# DEFINIIONS -# controls -set $mod Mod4 -set $left h -set $down j -set $up k -set $right l -# Workspace numbers -set $ws1 number 1 -set $ws2 number 2 -set $ws3 number 3 -set $ws4 number 4 -set $ws5 number 5 -set $ws6 number 6 -set $ws7 number 7 -set $ws8 number 8 -set $ws9 number 9 -set $ws10 number 10 -# terminal editor -set $term footclient -set $term_float footclient --app-id floating_shell --window-size-chars 120x45 -# swayidle -set $locking swaylock --screenshots --clock --grace 10 --fade-in 0.5 --effect-blur 5x5 --effect-greyscale -# scaling -set $scale_up /usr/share/sway/scripts/scale.sh up -set $scale_down /usr/share/sway/scripts/scale.sh down -set $scale_default /usr/share/sway/scripts/scale.sh default -# audio -set $pulseaudio $term_float pulsemixer -set $sink_volume pactl get-sink-volume @DEFAULT_SINK@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//' -set $source_volume pactl get-source-volume @DEFAULT_SOURCE@ | grep '^Volume:' | cut -d / -f 2 | tr -d ' ' | sed 's/%//' -set $volume_down $(pactl set-sink-volume @DEFAULT_SINK@ -5% && $sink_volume) -set $volume_up $(pactl set-sink-volume @DEFAULT_SINK@ +5% && $sink_volume) -set $volume_mute $(pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl get-sink-mute @DEFAULT_SINK@ | sed -En "/no/ s/.*/$($sink_volume)/p; /yes/ s/.*/0/p") -set $mic_mute $(pactl set-source-mute @DEFAULT_SOURCE@ toggle && pactl get-source-mute @DEFAULT_SOURCE@ | sed -En "/no/ s/.*/$($source_volume)/p; /yes/ s/.*/0/p") -# rofi -set $rofi_theme "* {\nlightbg: $background-color;\nbackground: $background-color;\nlightfg: $accent-color;\nforeground: $text-color;\n}\nwindow {\nwidth: 25em;\n}\n" -set $menu rofi -show combi -combi-modi "drun,run" -terminal "$term" -ssh-command "{terminal} {ssh-client} {host} [-p {port}]" -run-shell-command "{terminal} {cmd}" -show-icons -font "$gui-font" -lines 10 -# Screenshot commands -set $grimshot grimshot -set $pipe_output $grimshot save output - -set $pipe_selection $grimshot save area - -set $notify_paste [[ $(wl-paste -l) == "image/png" ]] && notify-send "Screenshot copied to clipboard" -set $swappy swappy -f - -set $upload_pipe curl -s -F "file=@-;filename=.png" https://x0.at/ | tee >(wl-copy) >(xargs notify-send) -set $screenshot_screen $pipe_output | $swappy && $notify_paste -set $screenshot_screen_upload $pipe_output | $upload_pipe -set $screenshot_selection $pipe_selection | $swappy && $notify_paste -set $screenshot_selection_upload $pipe_selection | $upload_pipe - -# AUTOSTART APPLICATIONS -exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec_always { - # theming (from manjaro sway desktop config) - /usr/share/sway/scripts/enable-gtk-theme.sh "$gtk-theme" - /usr/share/sway/scripts/fontconfig.sh "monospace" "$term-font" - gsettings set org.gnome.desktop.interface icon-theme "$icon-theme" - gsettings set org.gnome.desktop.interface cursor-theme "$cursor-theme" - gsettings set org.gnome.desktop.interface font-name "$gui-font" - gsettings set org.gnome.desktop.input-sources show-all-sources true - gsettings set org.gnome.desktop.interface monospace-font-name "$term-font" - gsettings set org.freedesktop.appearance color-scheme "$gtk-color-scheme" - gsettings set org.gnome.desktop.interface color-scheme "$gtk-color-scheme" - kvantummanager --set "$kvantum-theme" -} -exec { - pamac-tray-plasma - wlsunset -l 59.91:10.76 - systemctl --user enable --now blueman-applet - # idle lock - systemctl --user enable --now swayidle - systemctl --user enable --now idlehack - # focus switch animations - systemctl --user enable --now flashfocus - # usb automount - systemctl --user enable --now pcmanfm - # workspace icons - systemctl --user enable --now sworkstyle - # foot server - systemctl --user enable --now foot-server -} -exec_always { - nm-applet - calcurse --daemon - # persist clipboard after close - pkill -x wl-clip-persist - wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+' - # mako daemon - pkill -x mako - mako --font "$term-font" --text-color "$text-color" --border-color "$accent-color" --background-color "$background-color" --border-size 3 --width 400 --height 200 --padding 20 --margin 20 --default-timeout 15000 - # enable noisetorch - noisetorch -u - noisetorch -i - # update rofi theme - mkdir -p $HOME/.config/rofi/ - echo $rofi_theme > $HOME/.config/rofi/config.rasi -} - -# CONFIGS -font $gui-font -focus_follows_mouse no -mouse_warping none -workspace_auto_back_and_forth no -bar { - swaybar_command waybar -} -# don't show gaps if there's only one window on the desktop -smart_gaps on -gaps inner 5 -# borders -default_border normal -default_floating_border normal -hide_edge_borders smart - -# BINDINGS -include ~/.config/sway/local_config -bindsym $mod+Return exec $term -bindsym $mod+Shift+Return exec foot -bindsym $mod+Shift+q kill -bindsym $mod+d exec $menu -floating_modifier $mod normal -bindsym $mod+r reload -bindsym $mod+a focus parent -bindsym $mod+Shift+a focus child -# Moving around -bindsym $mod+$left focus left -bindsym $mod+$down focus down -bindsym $mod+$up focus up -bindsym $mod+$right focus right -# Moving -bindsym $mod+Shift+$left move left -bindsym $mod+Shift+$down move down -bindsym $mod+Shift+$up move up -bindsym $mod+Shift+$right move right -# splits -bindsym $mod+b splith -bindsym $mod+s splitv -bindsym $mod+q split toggle -# split formats -bindsym $mod+w layout stacking -bindsym $mod+t layout tabbed -bindsym $mod+e layout toggle split -bindsym $mod+f fullscreen -# floating -bindsym $mod+Shift+space floating toggle -bindsym $mod+Ctrl+space sticky toggle -bindsym $mod+space focus mode_toggle -# scratchpad -bindsym $mod+Shift+minus move scratchpad -bindsym $mod+Shift+slash move scratchpad -bindsym $mod+minus scratchpad show -bindsym $mod+slash scratchpad show -# sound -bindsym Scroll_Lock exec $volume_mute -bindsym Print exec $volume_down -bindsym Pause exec $volume_up -# screenshots -bindsym $mod+Shift+s exec --no-startup-id $screenshot_selection -# scale -bindsym $mod+greater exec $scale_up -bindsym $mod+less exec $scale_down -bindsym $mod+equal exec $scale_default -# apps -bindsym $mod+F1 exec qalculate-qt -bindsym $mod+F2 exec qutebrowser -bindsym $mod+F3 exec quodlibet -bindsym $mod+F4 exec $term_float ncspot -bindsym $mod+n exec makoctl dismiss -bindsym $mod+Shift+n exec makoctl dismiss -a -bindsym $mod+p exec pcmanfm-qt -bindsym $mod+Shift+p exec $term_float yazi -bindsym $mod+u exec unipicker --command "rofi -dmenu | wl-copy" -bindsym $mod+period exec $term_float khal interactive -bindsym $mod+comma exec $term_float aerc - -# Special keys -bindsym --locked XF86AudioMute exec $volume_mute -bindsym --locked XF86AudioLowerVolume exec $volume_down -bindsym --locked XF86AudioRaiseVolume exec $volume_up -bindsym --locked XF86AudioMicMute exec $mic_mute -bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- -bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+ - -# resize -mode "resize" { - bindsym $left resize shrink width 10px - bindsym $down resize grow height 10px - bindsym $up resize shrink height 10px - bindsym $right resize grow width 10px - bindsym Shift+$left resize shrink width 50px - bindsym Shift+$down resize grow height 50px - bindsym Shift+$up resize shrink height 50px - bindsym Shift+$right resize grow width 50px - - # Return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+z mode "resize" - -# shut down, restart and locking -set $mode_system System (l) lock, (e) exit, (s) suspend, (r) reboot, (p) shutdown -mode "$mode_system" { - bindsym e exec --no-startup-id swaymsg exit, mode "default" - bindsym s exec --no-startup-id systemctl suspend, mode "default" - bindsym r exec --no-startup-id systemctl reboot, mode "default" - bindsym p exec --no-startup-id systemctl poweroff -i, mode "default" - bindsym l exec --no-startup-id $locking, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+Shift+e mode "$mode_system" - -# config tools -set $mode_config (b) bt, (c) cooling, (d) display, (g) gparted, (k) kvantum, (l) lxappearance, (m) manjaro, (p) packages, (q) qt5, (Q) qt6, (s) sound, (u) upgrade -mode "$mode_config" { - # bindsym b exec --no-startup-id blueman-manager, mode "default" - bindsym c exec --no-startup-id coolercontrol, mode "default" - bindsym d exec --no-startup-id wdisplays, mode "default" - bindsym g exec --no-startup-id gparted, mode "default" - bindsym k exec --no-startup-id kvantummanager, mode "default" - bindsym l exec --no-startup-id lxappearance, mode "default" - bindsym m exec --no-startup-id manjaro-settings-manager, mode "default" - bindsym p exec --no-startup-id pamac-manager, mode "default" - bindsym q exec --no-startup-id qt5ct, mode "default" - bindsym Shift+q exec --no-startup-id qt6ct, mode "default" - bindsym s exec --no-startup-id pavucontrol-qt, mode "default" - bindsym u exec --no-startup-id $term_float topgrade --only config_update --only system, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+c mode "$mode_config" - -# config tools -set $mode_monitor (b) btop, (h) htop, (s) isd, (j) journal, (n) nvtop -mode "$mode_monitor" { - bindsym b exec $term_float btop, mode "default" - bindsym h exec $term_float htop, mode "default" - bindsym s exec $term_float isd, mode "default" - bindsym j exec $term_float lazyjournal, mode "default" - bindsym n exec $term_float nvtop, mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+m mode "$mode_monitor" - -# WINDOWS -for_window [all] title_format "%app_id - %title" - -# set floating mode for generated windows -for_window [title="(?:Open|Save) (?:File|Folder|As)"] floating enable -for_window [title="(?:Open|Save) (?:File|Folder|As)"] resize set 800 600 -for_window [title="Save File"] floating enable -for_window [window_role="pop-up"] floating enable -for_window [window_role="bubble"] floating enable -for_window [window_role="task_dialog"] floating enable -for_window [window_role="Preferences"] floating enable -for_window [window_type="dialog"] floating enable -for_window [window_type="menu"] floating enable - -# remove title -for_window [app_id="foot"] border pixel 2 -for_window [class="discord"] border pixel 2 -for_window [app_id="thunderbird"] border pixel 2 -for_window [app_id="qutebrowser"] border pixel 2 - -# Open specific applications in floating mode -for_window [app_id="GParted"] floating enable -for_window [app_id="qalculate-qt"] floating enable -for_window [class="pavucontrol-qt"] floating enable - -# https://github.com/ValveSoftware/steam-for-linux/issues/1040 -for_window [app_id="^steam$"] floating enable -for_window [app_id="^Steam$"] floating enable -for_window [app_id="^steam$" title="^Steam$"] floating disable - -# set floating mode for specific applications -for_window [app_id="thunderbird"] border pixel 2 -for_window [app_id="thunderbird" title=".*Reminder"] floating enable -for_window [app_id="floating_shell"] floating enable, border pixel 1 - -# Don't allow applications to inhibit shortcuts, i.e. grab total control of the -# keyboard. Chrome currently abuses this by enabling it for all "--app=..." shortcuts. -seat * shortcuts_inhibitor disable - -# IO -output * bg $background fill -input type:keyboard { - xkb_layout "us" - xkb_variant "altgr-weur" - xkb_options "caps:escape" - repeat_delay 400 - repeat_rate 30 -} -input type:mouse { - accel_profile "flat" - pointer_accel 0.5 -} diff --git a/sway/config.d/application_defaults b/sway/config.d/application_defaults new file mode 100644 index 0000000..9bb778e --- /dev/null +++ b/sway/config.d/application_defaults @@ -0,0 +1,31 @@ +# Custom windowing rules +for_window [class="Yad" instance="yad"] floating enable +for_window [app_id="yad"] floating enable +for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt +for_window [app_id="pavucontrol" ] floating enable, resize set width 40 ppt height 30 ppt +for_window [window_role="pop-up"] floating enable +for_window [window_role="bubble"] floating enable +for_window [window_role="task_dialog"] floating enable +for_window [window_role="Preferences"] floating enable +for_window [window_type="dialog"] floating enable +for_window [window_type="menu"] floating enable +for_window [window_role="About"] floating enable +for_window [title="File Operation Progress"] floating enable, border pixel 1, sticky enable, resize set width 40 ppt height 30 ppt +for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt +for_window [title="Picture in picture"] floating enable, sticky enable +for_window [title="waybar_htop"] floating enable, resize set width 70 ppt height 70 ppt +for_window [title="waybar_nmtui"] floating enable +for_window [title="Save File"] floating enable +for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill +# https://github.com/ValveSoftware/steam-for-linux/issues/1040 +for_window [app_id="^steam$"] floating enable +for_window [app_id="^Steam$"] floating enable +for_window [app_id="^steam$" title="^Steam$"] floating disable + +# Inhibit idle +for_window [app_id="firefox"] inhibit_idle fullscreen +for_window [app_id="Chromium"] inhibit_idle fullscreen + +# Don't allow applications to inhibit shortcuts, i.e. grab total control of the +# keyboard. Chrome currently abuses this by enabling it for all "--app=..." shortcuts. +seat * shortcuts_inhibitor disable diff --git a/sway/config.d/autostart_applications b/sway/config.d/autostart_applications new file mode 100644 index 0000000..03358e0 --- /dev/null +++ b/sway/config.d/autostart_applications @@ -0,0 +1,50 @@ +# Auth with polkit-gnome: +exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + +# Import environment variables for user systemd service manager +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK + +# Update dbus environments with display variables +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK + +# Idle configuration +exec swayidle idlehint 1 +exec_always swayidle -w before-sleep "gtklock -d" + +# Desktop notifications +exec mako + +# Start foot server +exec_always --no-startup-id foot --server + +# Autotiling +exec autotiling + +# Network Applet +exec nm-applet --indicator + +# Firewall Applet +exec sleep 2 && firewall-applet + +# nwg-drawer +exec_always nwg-drawer -r -c 7 -is 90 -mb 10 -ml 50 -mr 50 -mt 10 + +# focus switch animations +exec systemctl --user enable --now flashfocus + +# usb automount +exec systemctl --user enable --now pcmanfm + +# persist clipboard after close +exec_always { + # persist clipboard after close + pkill -x wl-clip-persist + wl-clip-persist --clipboard regular --all-mime-type-regex '(?i)^(?!image/x-inkscape-svg).+' +} + +# enable noisetorch +exec_always { + noisetorch -u + noisetorch -i +} diff --git a/sway/config.d/default b/sway/config.d/default new file mode 100644 index 0000000..625899d --- /dev/null +++ b/sway/config.d/default @@ -0,0 +1,247 @@ +# Logo key. Use Mod1 for Alt. +set $mod Mod4 + +# Add Vim key support +set $left h +set $down j +set $up k +set $right l + +# Set default terminal emulator +set $term footclient + +# Application launcher +set $launcher fuzzel + +# Application menu +set $menu nwg-drawer + +# Power Menu +set $powermenu ~/.config/sway/scripts/power_menu.sh + +### Key bindings +# +# Basics: +# + bindsym $mod+r reload + + # Launch the terminal + bindsym $mod+Return exec $term + bindsym $mod+Shift+Return exec foot + + # Open the power menu + bindsym $mod+Shift+e exec $powermenu + + # Kill focused window + bindsym $mod+Shift+q kill + + # Start your launcher + bindsym $mod+d exec $launcher + + # Menu + bindsym $mod+Shift+d exec $menu + + # Lock screen + bindsym $mod+f1 exec gtklock + + # Activities + bindsym $mod+p exec ~/.config/sway/scripts/window_switcher.sh + + # Move windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Change "normal" to "inverse" to switch left and right + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+c reload + +# +# Moving around: +# + bindsym { + # Change window focus + $mod+Left focus left + $mod+Down focus down + $mod+Up focus up + $mod+Right focus right + # Vim key support + $mod+$left focus left + $mod+$down focus down + $mod+$up focus up + $mod+$right focus right + + # Move the focused window + $mod+Shift+Left move left + $mod+Shift+Down move down + $mod+Shift+Up move up + $mod+Shift+Right move right + # Vim key support + $mod+Shift+$left move left + $mod+Shift+$down move down + $mod+Shift+$up move up + $mod+Shift+$right move right + } + +# +# Workspaces: +# + # Workspace bindings are using bindcode instead of bindsym for better Azerty compatibility. + # https://github.com/EndeavourOS-Community-Editions/sway/pull/81 + # Use wev to find keycodes for setting up other bindings this way. + + bindcode { + # Switch to workspace + $mod+10 workspace number 1 + $mod+11 workspace number 2 + $mod+12 workspace number 3 + $mod+13 workspace number 4 + $mod+14 workspace number 5 + $mod+15 workspace number 6 + $mod+16 workspace number 7 + $mod+17 workspace number 8 + $mod+18 workspace number 9 + $mod+19 workspace number 10 + + # Move focused container to workspace + $mod+Shift+10 move container to workspace number 1 + $mod+Shift+11 move container to workspace number 2 + $mod+Shift+12 move container to workspace number 3 + $mod+Shift+13 move container to workspace number 4 + $mod+Shift+14 move container to workspace number 5 + $mod+Shift+15 move container to workspace number 6 + $mod+Shift+16 move container to workspace number 7 + $mod+Shift+17 move container to workspace number 8 + $mod+Shift+18 move container to workspace number 9 + $mod+Shift+19 move container to workspace number 10 + } + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. + +# +# Layout stuff: +# + # Set how the current window will be split + # Split the window vertically + # bindsym $mod+v splitv + # Split the window horizontally + # bindsym $mod+b splith + # Toggle + bindsym $mod+q split toggle + + # Switch the current container between different layout styles + bindsym $mod+w layout stacking + bindsym $mod+t layout tabbed + bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle between tiling and floating mode + bindsym $mod+Shift+space floating toggle + bindsym $mod+Ctrl+space sticky toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent + # Move focus to the child container + bindsym $mod+Shift+a focus child + +# +# Scratchpad: +# + # Sway has a "scratchpad", which is a bag of holding for windows. + # You can send windows there and get them back later. + + # Move the currently focused window to the scratchpad + bindsym $mod+Shift+minus move scratchpad + + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + bindsym $mod+minus scratchpad show + +# +# Resizing containers: +# + bindsym { + # Resize with arrow keys + $mod+ctrl+Right resize shrink width 10 px + $mod+ctrl+Up resize grow height 10 px + $mod+ctrl+Down resize shrink height 10 px + $mod+ctrl+Left resize grow width 10 px + # Resize with Vim keys + $mod+ctrl+$right resize shrink width 10 px + $mod+ctrl+$up resize grow height 10 px + $mod+ctrl+$down resize shrink height 10 px + $mod+ctrl+$left resize grow width 10 px + } + + # Resize floating windows with mouse scroll: + bindsym --whole-window --border { + # Resize vertically + $mod+button4 resize shrink height 5 px or 5 ppt + $mod+button5 resize grow height 5 px or 5 ppt + # Resize horizontally + $mod+Shift+button4 resize shrink width 5 px or 5 ppt + $mod+Shift+button5 resize grow width 5 px or 5 ppt + } + +# +# Media Keys +# + bindsym { + # Volume + XF86AudioRaiseVolume exec pamixer -ui 2 + XF86AudioLowerVolume exec pamixer -ud 2 + XF86AudioMute exec pamixer --toggle-mute + + # Player + XF86AudioPlay exec playerctl play-pause + XF86AudioNext exec playerctl next + XF86AudioPrev exec playerctl previous + + # Backlight + XF86MonBrightnessUp exec brightnessctl -c backlight set +5% + XF86MonBrightnessDown exec brightnessctl -c backlight set 5%- + } + +# +# App shortcuts +# + bindsym $mod+u exec unipicker --command "rofi -dmenu | wl-copy" + + # Launch the file explorer + bindsym $mod+b exec pcmanfm + + # Dismiss message + bindsym $mod+n exec makoctl dismiss + bindsym $mod+Shift+n exec makoctl dismiss -a + + # Launch the browser + bindsym $mod+o exec qutebrowser + + # config tools + set $mode_monitor (b) btop, (h) htop, (s) isd, (j) journal, (n) nvtop + mode "$mode_monitor" { + bindsym b exec $term_float btop, mode "default" + bindsym h exec $term_float htop, mode "default" + bindsym s exec $term_float isd, mode "default" + bindsym j exec $term_float lazyjournal, mode "default" + bindsym n exec $term_float nvtop, mode "default" + + bindsym Return mode "default" + bindsym Escape mode "default" + } + bindsym $mod+m mode "$mode_monitor" + +# +# Screenshots +# + # Snip a selection and pipe to swappy + bindsym print exec grim -g "$(slurp)" - | swappy -f - + # Screenshot a window and pipe to swappy + bindsym Ctrl+Print exec ~/.config/sway/scripts/screenshot_window.sh + # Screenshot the current display and pipe to swappy + bindsym Shift+Print exec ~/.config/sway/scripts/screenshot_display.sh + diff --git a/sway/config.d/input b/sway/config.d/input new file mode 100644 index 0000000..92b0f62 --- /dev/null +++ b/sway/config.d/input @@ -0,0 +1,20 @@ +input type:touchpad { + dwt enabled + tap disabled + natural_scroll enabled + accel_profile "adaptive" + pointer_accel 0.8 +} + +input type:keyboard { + xkb_layout "us" + xkb_variant "altgr-weur" + xkb_options "caps:escape" + repeat_delay 400 + repeat_rate 30 +} + +input type:mouse { + accel_profile "flat" + pointer_accel 0.5 +} diff --git a/sway/config.d/output b/sway/config.d/output new file mode 100644 index 0000000..7055309 --- /dev/null +++ b/sway/config.d/output @@ -0,0 +1 @@ +output eDP-1 resolution 2496x1664 position 0,0 scale 1.3 diff --git a/sway/config.d/theme b/sway/config.d/theme new file mode 100644 index 0000000..4c205e4 --- /dev/null +++ b/sway/config.d/theme @@ -0,0 +1,38 @@ +# Apply gtk theming +exec_always ~/.config/sway/scripts/import-gsettings + +# Set inner/outer gaps +gaps inner 2 +gaps outer 0 + +# Hide titlebar on windows: +default_border pixel 1 + +# Default Font +font pango:Noto Sans Regular 10 + +# Thin borders: +smart_borders on + +# Set wallpaper: +exec ~/.azotebg + +# Title format for windows +for_window [shell="xdg_shell"] title_format "%title (%app_id)" +for_window [shell="x_wayland"] title_format "%class - %title" + +# class border bground text indicator child_border +client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 +client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A +client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36 +client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555 +client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 +client.background #F8F8F2 + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. +bar { + swaybar_command waybar +} diff --git a/sway/idle.yaml b/sway/idle.yaml deleted file mode 100644 index 19aa377..0000000 --- a/sway/idle.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -debug: true -wait: false -timeouts: - # idle_timeout - - timeout: 240 - command: brightnessctl -s && brightnessctl set 10 - resume: brightnessctl -r - # locking_timeout - - timeout: 1200 - command: swaymsg exec \$locking - # screen_timeout - - timeout: 2400 - command: swaymsg "output * power off" - resume: swaymsg "output * power on" - # dpms_timeout - # - timeout: 3600 - # command: swaymsg "output * dpms off" - # resume: swaymsg "output * dpms on" - # sleep_timeout_bat - # - timeout: 900 - # command: acpi --ac-adapter | grep -v 'on-line' && systemctl sleep - # sleep_timeout_ac - # - timeout: 3600 - # command: acpi --ac-adapter | grep 'on-line' && systemctl sleep -before-sleep: swaymsg exec \$locking -after-resume: swaymsg "output * dpms on", exec "systemctl restart --user mako" -lock: swaymsg exec \$locking -idlehint: '240'