diff --git a/README.md b/README.md index fe0f2014..392250f8 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ This is only public so I can easily share it across machines. There is probably My usage is mostly terminal-based, via Crostini on Chromebook, WSL2 on Windows, and (rarely) MacOS terminal. Making heavy use of: * Bash / Tmux -* FZF +* FZF / pistol / fd / ripgrep * Neovim * cmus Graphical sections are Linux-only, and use: -* i3wm & picom & dunst & rofi -* Alacritty +* sway / swaync / waybar +* foot * Firefox ## Letting me own your machine @@ -215,6 +215,54 @@ The Bullseye to Bookworm upgrade requires a few manual steps that I'm too lazy t - `exa` is now unmaintained, need to either go to [eza](https://github.com/eza-community/eza) or `lsd` - `1password` GUI not installing correctly, something wrong w/ bash logic +## Sway Migration + +Work in progress. The [Sway Wiki](https://github.com/swaywm/sway/wiki/i3-Migration-Guide) has some good links for migration, and there are [useful tools](https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway) as well + +- Chromium: Need to either use command-line flags `--ozone-platform-hint=auto` or go to `chrome://flags` and set `Preferred Ozone platform` +- Read through [this guide](https://anarc.at/software/desktop/wayland/) a bit more, lots of good detail and using debian and systemd to drive a bunch of stuff +- Notifications + - [x] `sway-notification-center` over dunst, much better + - [ ] No need to start automatically, dbus does that + - [ ] Figure out volume, etc controls in there. Can substitute for some of the waybar stuff + - Looks like this is on newer version than what's in Debian repos, so need to either go to sid early, or just wait + - Can also do arbitrary buttons? + - [ ] Figure out how to show icons for screenshot, etc + - [ ] Make styling a bit more consistent with rest of UX +- Bar + - Figure out bar content, using some combination of `waybar` and the [helpers](https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway#bar-content-generators) + - [ ] Music control + - [ ] Better volume display + - [ ] Screen recording indicator could be nice +- [ ] Figure out clipboard, likely `wl-clipboard` (`wayclip` not in repos) +- [ ] Need to hook up pipewire in tmux as well? +- [ ] Input / keyboard setup, mostly native in sway? +- [ ] `swhkd` to consider as hotkey handler, get `sway` out of the business? +- [ ] Update instructions for setup + - get `sway/config.local` out of source control, etc +- [ ] Figure out how to make wacom tablet work (and update instructions) + - [OpenTabletDriver](https://github.com/OpenTabletDriver/OpenTabletDriver) looks promising, but need to test +- [x] Figure out how to get things using Wayland where necessary + - Firefox, Chrome need flags + - Signal as well, watch out for needing floating at start + - `signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland` +- [x] Need to update screenshot scripts, will likely be `grim` / `slurp` / `grimshot` + - Screen recording via `wf-recorder`? +- [x] Volume keyboard controls not working +- [x] Need a `rofi` replacement for app launching, window switching, and shutdown, etc commands. + - Might consider just using a terminal with `fzf`, but need to figure out the data sources + - `wofi` kinda working, need to get terminal apps running (e.g. `htop`) + - Window switcher kinda works, need icons +- [x] `gammastep` seems to work on Wayland, need to figure out all the launching, etc + - `gammastep-indicator` broken due to not including `/usr/lib/python3/dist-packages` in `PYTHONPATH`, works if done manually, not sure if something wrong with sway config or what + - Need to double-check at night, but should be good? +- [x] `dunst` seems to support wayland, but need to get launching, etc. + - Hm, dbus does this for us, probably fine + - `mako-notifier` an option, need to configure in order to get icons + - [x] Tray doesn't seem to work? Should have gammastep there? + - Tray does work, just nothing in it right now +- [x] Need to port background drawing handling over, likely using `swaybg` or just native sway + ## Future Improvements - Try switching from docker to podman @@ -224,17 +272,16 @@ The Bullseye to Bookworm upgrade requires a few manual steps that I'm too lazy t - [ ] (caniuse-cli)[https://github.com/sgentle/caniuse-cmd] - [ ] Look into `stevearc/conform.nvim` - [ ] Add [Firefox Nightly](https://blog.nightly.mozilla.org/2023/10/30/introducing-mozillas-firefox-nightly-deb-packages-for-debian-based-linux-distributions/) -- [ ] Figure out why gammastep not starting up automatically in some cases, may need to re-write the systemd user entries +- [ ] Use [native OSC52 support in Neovim](https://github.com/neovim/neovim/issues/3344) instead of plugin +- [ ] sixel support in tmux 3.4, but gotta wait until it (hopefully) hits Debian backports + - Once sixels are supported, can make a bunch of improvements to scripts here + - May want to consider `zellij` which supports sixel? Currently slightly janky though +- [ ] `wshowkeys` or similar for showing keypresses for screencasts, etc - [ ] Figure out Lutris / Wine / Proton for Linux gaming - [ ] [Auto-publish Docker images](https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages) - [ ] Better colorschemes, coordinated everywhere - - [ ] Easier swapping into light mode - Check [themer](https://github.com/themerdev/themer) for generation -- [ ] Setup `xautolock` or similar to automatically lock screen on idle -- [ ] Figure out rofi / dmenu whatever else would make sense to do more in i3 -- [ ] Check out [`zutty` terminal](https://tomscii.sig7.se/zutty/) -- [ ] Migrate off of X11 to Wayland: Either use nouveau or wait until Sway has Nvidia support (or get an AMD card) - - [ ] `foot` on Wayland seems to be quite good for terminal + - [ ] Easier swapping into light mode - [ ] Figure out how to get USB-C DP Alt devices to work, might need [displaylink-debian](https://github.com/AdnanHodzic/displaylink-debian) or at the very least `evdi-dkms` - [ ] Get [Nvidia Drivers](https://wiki.debian.org/NvidiaGraphicsDrivers) drivers with a reasonable resolution for linux console - Install `nvidia-detect` and run to check support diff --git a/scripts/apt-packages b/scripts/apt-packages index e30ec2ea..849ec12e 100644 --- a/scripts/apt-packages +++ b/scripts/apt-packages @@ -1,45 +1,44 @@ -alacritty alsa-utils chromium cmake cmus -dbus-x11 -dex -dunst exfat-fuse exfatprogs -feh foliate fonts-dejavu +fonts-font-awesome fonts-hack fonts-noto fonts-noto-color-emoji fonts-noto-mono fonts-noto-ui-core +fonts-roboto +fonts-open-sans +foot +foot-themes +fuzzel gammastep gnome-keyring hsetroot -i3 -i3blocks -i3lock imv -kitty libnotify-bin libpam-gnome-keyring lxqt-policykit -maim +mkchromecast mpv +mpv-mpris +papirus-icon-theme pasystray -picom +pipewire playerctl pulseaudio -rofi -slop software-properties-common -x11-xserver-utils -xclip -xdotool -xinit -xsel -xserver-xorg -xzoom +sway +sway-backgrounds +sway-notification-center +swayidle +swaylock +waybar +wev +wf-recorder +xwayland diff --git a/scripts/create_local_profile b/scripts/create_local_profile index 73efea1d..244f43fe 100755 --- a/scripts/create_local_profile +++ b/scripts/create_local_profile @@ -14,7 +14,7 @@ main() { # Default to headless in Crostini / Docker / WSL, even though GUI might be # possible, can always be overridden local is_headless=$([[ -n "${is_crostini}${is_docker}${is_wsl}" || \ - -z "${DISPLAY:-}" ]] && printf 1) + -z "${WAYLAND_DISPLAY:-}" ]] && printf 1) cat < /dev/null > /dev/null && xhost 2> /dev/null > /dev/null; then - notify-send --hint int:transient:1 "$1" $rest -else - hterm-notify.sh "$1" "$rest" -fi - -# Tmux doesn't support titles -if [ -n "$TMUX" ]; then - tmux display-message "$1: $rest" -fi diff --git a/stowed-files/bin/.local/bin/yank b/stowed-files/bin/.local/bin/yank index 26fc2173..49af0464 100755 --- a/stowed-files/bin/.local/bin/yank +++ b/stowed-files/bin/.local/bin/yank @@ -2,8 +2,11 @@ # Copies to clipboard, using one or more of the following: # - tmux -# - xsel -# - Osc52 over SSH +# - wl-copy +# - OSC52 over SSH + +set -euo pipefail +IFS=$'\n\t' isWithinTmux() { if [ -n "$TMUX" ]; then @@ -13,8 +16,8 @@ isWithinTmux() { fi } -inX() { - if command -v xhost > /dev/null && xhost 2> /dev/null > /dev/null; then +inWayland() { + if [[ $XDG_SESSION_TYPE == "wayland" ]]; then return 0 else return 1 @@ -34,10 +37,15 @@ get_osc52() { main() { buf=$(cat "$@") - if inX; then - echo "$buf" | xsel -ib + if inWayland; then + echo "$buf" | wl-copy if command -v notify-send > /dev/null; then - notify-send --hint=int:transient:1 -u low -t 1000 'Copied!' + notify-send \ + --urgency low \ + --transient \ + --expire-time 1000 \ + --icon edit-copy-symbolic \ + 'Copied!' 'Saved to clipboard' elif isWithinTmux; then tmux display-message 'Copied!' fi @@ -51,7 +59,7 @@ main() { len=${#output} if [ "${len}" -lt "${OSC_52_MAX_SEQUENCE}" ]; then - printf $output + printf "%s" "${output}" else echo "ERROR: selection too long to send to terminal: ${len}" >&2 exit 1 diff --git a/stowed-files/chromium/.local/share/applications/altium.desktop b/stowed-files/chromium/.local/share/applications/altium.desktop index e2d6e4ea..8fb12df0 100644 --- a/stowed-files/chromium/.local/share/applications/altium.desktop +++ b/stowed-files/chromium/.local/share/applications/altium.desktop @@ -5,5 +5,5 @@ Version=1.0 Name=Altium Comment=Second profile for Chromium Terminal=false -Exec=sh -c "/usr/bin/chromium --user-data-dir\=\$XDG_CONFIG_HOME/chromium_alt_profile" -Icon=/usr/share/pixmaps/chromium.png +Exec=sh -c '/usr/bin/chromium --user-data-dir=$XDG_CONFIG_HOME/chromium_alt_profile --ozone-platform-hint=auto' +Icon=chromium diff --git a/stowed-files/cmus/.local/bin/cmus-album-background b/stowed-files/cmus/.local/bin/cmus-album-background index 0c72d98f..f4c1c0fa 100755 --- a/stowed-files/cmus/.local/bin/cmus-album-background +++ b/stowed-files/cmus/.local/bin/cmus-album-background @@ -10,13 +10,19 @@ tmp_art_path="/tmp/cmus-album-bg-blurred.png" previous_folder_path="/tmp/cmus-album-folder-path.txt" clear_background() { - hsetroot -solid "${default_bg}" + swaymsg "output * background ${default_bg} solid_color" rm -rf "${tmp_art_path}" "${previous_folder_path}" } main() { - if ! command_exists cmus-remote || ! command_exists hsetroot || ! command_exists feh; then - echo 'Missing requirements, exiting' + local album_dirpath + local art_path + local previous_dirpath + local resolution + local status + + if [[ -z ${WAYLAND_DISPLAY} ]]; then + echo "Not running under Wayland, aborting" return 1 fi @@ -49,14 +55,16 @@ main() { return 1 fi - local resolution="$(xrandr | grep \* | awk '{print $1}' | head -n 1)" + resolution="$(swaymsg -t get_outputs | jq -r ' + .[] | select(.focused) | "\(.current_mode.width)x\(.current_mode.height)" + ')" convert "${art_path}" -background "${default_bg}" \ -scale "${resolution}"\^ -paint 6 \ -modulate 100,20,100 -fill "${default_bg}" -colorize 20% \ "${tmp_art_path}" echo "setting background to ${tmp_art_path}" - feh --bg-center "${tmp_art_path}" + swaymsg "output '*' background ${tmp_art_path} fill" } main "${@}" diff --git a/stowed-files/cmus/.local/bin/cmus-status b/stowed-files/cmus/.local/bin/cmus-status index d4344db2..8b54fd43 100755 --- a/stowed-files/cmus/.local/bin/cmus-status +++ b/stowed-files/cmus/.local/bin/cmus-status @@ -55,7 +55,7 @@ CMUS_STATUS tmux refresh-client -S fi - if [[ -n ${DISPLAY:-} ]]; then + if [[ -n ${WAYLAND_DISPLAY:-} ]]; then # Run in background since PNG generation can take a while cmus-album-background >> /tmp/cmus-album-background.log 2>&1 & fi diff --git a/stowed-files/dunst/.config/autostart/dunst.desktop b/stowed-files/dunst/.config/autostart/dunst.desktop deleted file mode 100644 index d16179f4..00000000 --- a/stowed-files/dunst/.config/autostart/dunst.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Dunst -GenericName= -Comment=Lightweight notification daemon -Exec=dunst -Icon=dunst -StartupNotify=true -Type=Application -Categories=Utility; -Keywords=notification; -OnlyShowIn=i3; diff --git a/stowed-files/dunst/.config/dunst/dunstrc b/stowed-files/dunst/.config/dunst/dunstrc deleted file mode 100644 index bdc87c76..00000000 --- a/stowed-files/dunst/.config/dunst/dunstrc +++ /dev/null @@ -1,43 +0,0 @@ -[global] - corner_radius = 4 - enable_recursive_icon_lookup = true - follow = mouse - font = "Noto Sans 16" - format = "%s\n%b" - frame_color = "#cccccc" - frame_width = 2 - geometry = "400x5-6-30" - history = ctrl+grave - history_length = 10 - horizontal_padding = 8 - icon_position = left - max_icon_size = 48 - idle_threshold = 120 - ignore_newline = no - indicate_hidden = yes - line_height = 0 - markup = full - padding = 8 - separator_color = "#585858" - separator_height = 2 - show_age_threshold = 30 - sort = yes - stack_duplicates = true - transparency = 20 - word_wrap = yes - -[urgency_low] - background = "#181818" - foreground = "#787878" - timeout = 5 - -[urgency_normal] - background = "#181818" - foreground = "#e8e8e8" - timeout = 20 - -[urgency_critical] - background = "#9b3648" - foreground = "#e8e8e8" - icon = /usr/share/icons/gnome/48x48/status/stock_dialog-warning.png - timeout = 0 diff --git a/stowed-files/foot/.config/foot/foot.ini b/stowed-files/foot/.config/foot/foot.ini new file mode 100644 index 00000000..4c857296 --- /dev/null +++ b/stowed-files/foot/.config/foot/foot.ini @@ -0,0 +1,195 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot +# title=foot +# locked-title=no + +# font=monospace:size=8 +# font-bold= +# font-italic= +# font-bold-italic= +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# box-drawings-uses-font-glyphs=no +# dpi-aware=auto + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +# pad=2x2 # optionally append 'center' +# resize-delay-ms=100 + +# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# command= +# command-focused=no + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format= + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color= +# blink=no +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[colors] +# alpha=1.0 +# foreground=dcdccc +# background=111111 + +## Normal/regular colors (color palette 0-7) +# regular0=222222 # black +# regular1=cc9393 # red +# regular2=7f9f7f # green +# regular3=d0bf8f # yellow +# regular4=6ca0a3 # blue +# regular5=dc8cc3 # magenta +# regular6=93e0e3 # cyan +# regular7=dcdccc # white + +## Bright colors (color palette 8-15) +# bright0=666666 # bright black +# bright1=dca3a3 # bright red +# bright2=bfebbf # bright green +# bright3=f0dfaf # bright yellow +# bright4=8cd0d3 # bright blue +# bright5=fcace3 # bright magenta +# bright6=b3ffff # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= + +[csd] +# preferred=server +# size=26 +# font= +# color= +# hide-when-typing=no +# border-width=0 +# border-color= +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# show-urls-launch=Control+Shift+u +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=none +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-to-word-boundary=Control+w +# extend-to-next-whitespace=Control+Shift+w +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-row=BTN_LEFT-3 + +# vim: ft=dosini diff --git a/stowed-files/fuzzel/.config/fuzzel/fuzzel.ini b/stowed-files/fuzzel/.config/fuzzel/fuzzel.ini new file mode 100644 index 00000000..dc8ac0cd --- /dev/null +++ b/stowed-files/fuzzel/.config/fuzzel/fuzzel.ini @@ -0,0 +1,19 @@ +font=Noto Sans:size=18 +icon-theme=Papirus +inner-pad=10 +horizontal-pad=20 +width=60 +vertical-pad=20 + +[colors] + background=383838dd + text=e8e8e8ff + match=f7ca88ff + selection=7cafc2dd + selection-match=181818ff + selection-text=f8f8f8ff + border=181818ff + +[border] + width=5 + radius=10 diff --git a/stowed-files/gammastep/.config/autostart/gammastep-indicator.desktop b/stowed-files/gammastep/.config/autostart/gammastep-indicator.desktop deleted file mode 100644 index e1e48a42..00000000 --- a/stowed-files/gammastep/.config/autostart/gammastep-indicator.desktop +++ /dev/null @@ -1,15 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Gammastep Indicator -GenericName=Indicator for color temperature adjustment -GenericName[es]=Ajuste de la temperatura de color -Comment=Indicator for color temperature adjustment -Comment[es]=Ajuste de la temperatura de color -Keywords=display;color;soft;hue;temperature;eyes;strain; -Exec=gammastep-indicator -Icon=gammastep -Terminal=false -Type=Application -Categories=Utility; -StartupNotify=true -OnlyShowIn=i3; diff --git a/stowed-files/gammastep/.config/gammastep/config.ini b/stowed-files/gammastep/.config/gammastep/config.ini index 3579ae8b..ce90b9e6 100644 --- a/stowed-files/gammastep/.config/gammastep/config.ini +++ b/stowed-files/gammastep/.config/gammastep/config.ini @@ -7,7 +7,7 @@ temp-night=2400 ; Disable the smooth fade between temperatures when Redshift starts and stops. ; 0 will cause an immediate change between screen temperatures. ; 1 will gradually apply the new screen temperature over a couple of seconds. -fade=0 +fade=1 ; Set the screen brightness. Default is 1.0. ;brightness=0.9 @@ -28,7 +28,7 @@ fade=0 ; 'randr' is the preferred X11 method, 'vidmode' is an older API ; that works in some cases when 'randr' does not. ; The adjustment method settings are in a different section. -adjustment-method=randr +adjustment-method=wayland ; Set the location-provider: 'geoclue2', 'manual'. ; The location provider settings are in a different section. diff --git a/stowed-files/gammastep/.config/systemd/user/gammastep.service b/stowed-files/gammastep/.config/systemd/user/gammastep.service new file mode 100644 index 00000000..24f54c3c --- /dev/null +++ b/stowed-files/gammastep/.config/systemd/user/gammastep.service @@ -0,0 +1,13 @@ +[Unit] +Description=Gammastep Indicator +PartOf=sway-session.target + +[Service] +Type=simple +# There's some bug with this on Debian right now, so do this temporarily +Environment=PYTHONPATH=/usr/lib/python3/dist-packages +ExecStart=/usr/bin/gammastep-indicator +Restart=always + +[Install] +WantedBy=sway-session.target diff --git a/stowed-files/gammastep/.config/systemd/user/sway-session.target.wants/gammastep.service b/stowed-files/gammastep/.config/systemd/user/sway-session.target.wants/gammastep.service new file mode 120000 index 00000000..67be042b --- /dev/null +++ b/stowed-files/gammastep/.config/systemd/user/sway-session.target.wants/gammastep.service @@ -0,0 +1 @@ +../gammastep.service \ No newline at end of file diff --git a/stowed-files/i3/.config/autostart/gnome-keyring.desktop b/stowed-files/i3/.config/autostart/gnome-keyring.desktop deleted file mode 100644 index 76797120..00000000 --- a/stowed-files/i3/.config/autostart/gnome-keyring.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Secret Storage Service -Comment=GNOME Keyring: Secret Service -Exec=/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh -OnlyShowIn=i3; -NoDisplay=true diff --git a/stowed-files/i3/.config/autostart/lxqt-policykit-agent.desktop b/stowed-files/i3/.config/autostart/lxqt-policykit-agent.desktop deleted file mode 100644 index e3c25751..00000000 --- a/stowed-files/i3/.config/autostart/lxqt-policykit-agent.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Policy Kit Agent -Comment=LXQt Policy Kit Agent -Exec=/usr/bin/lxqt-policykit-agent -OnlyShowIn=i3; -NoDisplay=true diff --git a/stowed-files/i3/.config/i3/config b/stowed-files/i3/.config/i3/config deleted file mode 100644 index 8401381c..00000000 --- a/stowed-files/i3/.config/i3/config +++ /dev/null @@ -1,285 +0,0 @@ -# vim: ft=conf -# http://i3wm.org/docs/userguide.html for reference - -set $mod Mod1 - -# Change nasty default font -font pango:Noto Sans Medium 11 - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal with mod-enter -bindsym $mod+Return exec i3-sensible-terminal -# floating terminal with mod-` (for some reason, not working with Alacritty) -bindsym $mod+grave exec kitty --class='console' --override font_size=16 -# floating incognito browser with mod-~ -bindsym $mod+Shift+grave exec chromium --temp-profile --incognito --class='console' - -# start a browser with mod-shift-enter -bindsym $mod+Shift+Return exec sensible-browser - -# lock screen with mod-shift-z -bindsym $mod+Shift+z exec --no-startup-id ~/.local/bin/i3blurlock - -# kill focused window -bindsym $mod+Shift+q kill - -# launch program launcher -bindsym $mod+d exec --no-startup-id "rofi -modi drun -show drun -i -show-icons -width 600" -bindsym $mod+Shift+d exec --no-startup-id "rofi -show window -show-icons -width 800" - -# Use vim-like bindings for movement of focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# move focused window with vim-like bindings -bindsym $mod+Shift+h move left -bindsym $mod+Shift+j move down -bindsym $mod+Shift+k move up -bindsym $mod+Shift+l move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# tmux-like bindings for split in vertical/horizontal orientation -bindsym $mod+Shift+minus split v -bindsym $mod+Shift+backslash split h - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle sticky (stays across workspaces) -bindsym $mod+Shift+s floating toggle, sticky toggle, resize set 400px 280px - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# toggle title display -bindsym $mod+Shift+t border toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# toggle scratchpad -bindsym $mod+x scratchpad show - -# Move window to scratchpad -bindsym $mod+Shift+x move scratchpad - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -bindsym $mod+z focus child - -# switch to workspace -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 - -# mod-tab to cycle through workspaces -bindsym $mod+Tab workspace next -bindsym $mod+Shift+Tab workspace prev - -# Automatically return to last container when moving to containers by number -workspace_auto_back_and_forth yes - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace 1 -bindsym $mod+Shift+2 move container to workspace 2 -bindsym $mod+Shift+3 move container to workspace 3 -bindsym $mod+Shift+4 move container to workspace 4 -bindsym $mod+Shift+5 move container to workspace 5 -bindsym $mod+Shift+6 move container to workspace 6 -bindsym $mod+Shift+7 move container to workspace 7 -bindsym $mod+Shift+8 move container to workspace 8 -bindsym $mod+Shift+9 move container to workspace 9 -bindsym $mod+Shift+0 move container to workspace 10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec --no-startup-id i3_wm_menu - -# Use multimedia/Fx keys for sound -bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle -bindsym F8 exec --no-startup-id amixer set Master toggle -bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- -bindsym F9 exec --no-startup-id amixer set Master 5%- -bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 5%+ -bindsym F10 exec --no-startup-id amixer set Master 5%+ - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -bindsym $mod+r mode "resize" - -# Quick resize w/o mode or mouse -bindsym $mod+Ctrl+Shift+Right resize grow width 5 px or 5 ppt -bindsym $mod+Ctrl+Shift+Left resize shrink width 5 px or 5 ppt -bindsym $mod+Ctrl+Shift+Up resize grow height 5 px or 5 ppt -bindsym $mod+Ctrl+Shift+Down resize shrink height 5 px or 5 ppt - -# Use hardware keys to control music -bindsym XF86AudioPrev exec "playerctl previous && notify-send -t 600 -a i3 -u low 'Previous track'" -bindsym XF86AudioPlay exec "playerctl play-pause && notify-send -t 600 -a i3 -u low 'Paused'" -bindsym XF86AudioNext exec "playerctl next && notify-send -t 600 -a i3 -u low 'Next track'" - -# Capture entire screen with mod-F12 -bindsym --release $mod+F12 exec "maim ~/Downloads/screenshot-$(date +%F-%T).png && notify-send -t 1000 -a i3 -u low 'Screen Captured'" -# Capture portion of screen with mod-Shift-F12 or PrintScreen -bindsym --release $mod+Shift+F12 exec "capture_screen >> /tmp/i3_command.log" -bindsym --release Print exec "capture_screen >> /tmp/i3_command.log" -# Toggle full screen recording with mod-F11 -bindsym --release $mod+F11 exec "record_screen >> /tmp/i3_command.log" -# Current window with mod-Shift-F11 or Shift-PrintScreen -bindsym --release $mod+Shift+F11 exec "record_window >> /tmp/i3_command.log" -bindsym --release Shift+Print exec "record_window >> /tmp/i3_command.log" - -# Clear notifications with mod-BackSpace -bindsym $mod+BackSpace exec dunstctl close - -## Base16 Default Dark -# Author: Chris Kempson (http://chriskempson.com) -# -# You can use these variables anywhere in the i3 configuration file. - -set $base00 #181818 -set $base01 #282828 -set $base02 #383838 -set $base03 #585858 -set $base04 #b8b8b8 -set $base05 #d8d8d8 -set $base06 #e8e8e8 -set $base07 #f8f8f8 -set $base08 #ab4642 -set $base09 #dc9656 -set $base0A #f7ca88 -set $base0B #a1b56c -set $base0C #86c1b9 -set $base0D #7cafc2 -set $base0E #ba8baf -set $base0F #a16946 - -# Basic color configuration using the Base16 variables for windows and borders. -# Property Name Border BG Text Indicator Child Border -client.focused $base05 $base0D $base02 $base0D $base04 -client.focused_inactive $base01 $base01 $base05 $base03 $base04 -client.unfocused $base01 $base00 $base05 $base01 $base04 -client.urgent $base08 $base08 $base00 $base08 $base08 -client.placeholder $base00 $base00 $base05 $base00 $base00 -client.background $base07 - -# Bar shows workspaces and status, but only displayed when hitting Mod key -bar { - font pango:Noto Sans Medium 16 - hidden_state hide - mode hide - modifier $mod - position bottom - # May need `xrandr --output [NAME] --primary` in `~/.xinitrc.local` - tray_output primary - status_command i3blocks - - # Bar configuration using the Base16 variables. - colors { - background $base00 - separator $base01 - statusline $base04 - - # State Border BG Text - focused_workspace $base05 $base0D $base00 - active_workspace $base05 $base03 $base00 - inactive_workspace $base03 $base01 $base05 - urgent_workspace $base08 $base08 $base00 - binding_mode $base00 $base0A $base00 - } -} - -# Focus only via keyboard / clicks -focus_follows_mouse no - -# Hide borders adjacent to screen edges -hide_edge_borders smart - -# No title bar or borders for browsers (works for Chrome & Firefox) -for_window [window_role="browser"] border none - -# Float terminals launched floating -for_window [window_role="console"] floating enable, border none -for_window [class="console"] floating enable, border none -# Move floating terminal to scratchpad at top of screen -for_window [title="(?i)(alacr|k)itty" class="console"] resize set 100ppt 20ppt, move position 0 px 0 px, move scratchpad, scratchpad show - -# Hide title bar for terminals, which seem to have no unifying class / role :( -for_window [class="(?i)x?term"] border none -for_window [class="(?i)x-terminal-emulator"] border none -for_window [class="(?i)(alacr|k)itty"] border none - -# Dialogs should open floating by default -for_window [window_role="pop-up"] floating enable -for_window [window_role="task_dialog"] floating enable - -# Chrome task manager should float -for_window [title="Task Manager - Chromium"] floating enable - -# Screen maginifier needs to float in order to not mess up layout -for_window [title="^xzoom"] floating enable - -for_window [class=zoom] border none -# Always float a few specific Zoom windows -for_window [class=zoom title="(?i)(participants|settings)"] floating enable - -# Games are a problem sometimes -for_window [class="(?i)steam" title="(?i)steam - news"] floating enable -for_window [class="(?i)wine"] floating enable, border none, move position center -# Wine programs end in '.exe' a bunch -for_window [class="(?i)\.exe"] floating enable, border none, move position center - -# Needed for inactive window transparency -exec --no-startup-id picom -b -# Try to get right primary monitor -exec --no-startup-id guess_primary_monitor -# Start XDG autostart .desktop files (see ~/.config/autostart) -exec --no-startup-id dex --autostart --environment i3 diff --git a/stowed-files/i3/.local/bin/capture_screen b/stowed-files/i3/.local/bin/capture_screen deleted file mode 100755 index 6e9dc222..00000000 --- a/stowed-files/i3/.local/bin/capture_screen +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -set -euo pipefail - -# Pick up `command_exists` -# shellcheck source=/dev/null -source ~/.profile - -main() { - # Gotta have a display - if [ -z "${DISPLAY:-}" ]; then - echo "No DISPLAY environment variable set" >&2 - exit 1 - fi - - if ! command_exists maim; then - echo "maim not found" >&2 - exit 1 - fi - - if ! command_exists xclip; then - echo "xclip not found" >&2 - exit 1 - fi - - local filename - filename="${XDG_DOWNLOAD_DIR:-$HOME}/screenshot-$(date '+%F-%T').png" - - # Mouse must move 5px after clicking to select region instead of window - maim \ - --select \ - --tolerance 5 \ - --bordersize 1 \ - --hidecursor \ - --highlight \ - --nokeyboard \ - --color=0.25,0.5,1,0.5 \ - --format png \ - "${filename}" - echo "$(basename "${filename}") saved to clipboard" - - # Also copy into clipboard - xclip \ - -selection clipboard \ - -target image/png \ - "${filename}" - - echo "$(basename "${filename}") copied to clipboard" - - # Weird if it does not exist, but not fatal - if command_exists notify-send; then - notify-send \ - --urgency low \ - --transient \ - --expire-time 1000 \ - --app-name "i3" \ - --icon "camera-photo-symbolic" \ - "$(basename "${filename}") saved and copied to clipboard" - fi -} - -main "${@}" diff --git a/stowed-files/i3/.local/bin/guess_primary_monitor b/stowed-files/i3/.local/bin/guess_primary_monitor deleted file mode 100755 index 8e75d71c..00000000 --- a/stowed-files/i3/.local/bin/guess_primary_monitor +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -euo pipefail - -if xrandr | grep -i primary | grep -qi disconnected; then - # Grab first connected display - CONNECTED=$(xrandr | grep -i " connected " | awk '{print $1}' | head -n 1) - xrandr --output "$CONNECTED" --primary - i3-msg restart - echo "Set $CONNECTED to primary" -fi diff --git a/stowed-files/i3/.local/bin/i3_wm_menu b/stowed-files/i3/.local/bin/i3_wm_menu deleted file mode 100755 index 3b315593..00000000 --- a/stowed-files/i3/.local/bin/i3_wm_menu +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -set -euo pipefail - -OPTIONS=$(cat <<-END -🚫 Cancel -🔐 Lock -⏯️ Pause -⏭️ Next -🔃 Restart -📴 Shutdown -🌀 Reload i3 -📤 Exit i3 -END -) - -SELECTION=$(echo "$OPTIONS" | rofi -dmenu -i -p Action -lines 8 -width 400 | awk '{print $2}') -echo "$SELECTION" -case "$SELECTION" in - "[Cancel]") - # noop - ;; - "Lock") - i3blurlock - ;; - "Pause") - cmus-remote -u - ;; - "Next") - cmus-remote -n - ;; - "Reload") - i3-msg restart - ;; - "Exit") - i3-msg exit - ;; - "Restart") - systemctl reboot - ;; - "Exit") - systemctl poweroff - ;; -esac diff --git a/stowed-files/i3/.local/bin/i3blurlock b/stowed-files/i3/.local/bin/i3blurlock deleted file mode 100755 index 6687e714..00000000 --- a/stowed-files/i3/.local/bin/i3blurlock +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - - -# Use currently playing album, if available -BG_FILEPATH="/tmp/album-bg-blurred.png" - -if [ ! -f "$BG_FILEPATH" ]; then - # Blurry screen effect when locked, taken from: - # https://faq.i3wm.org/question/83/how-to-run-i3lock-after-computer-inactivity - BG_FILEPATH="/tmp/lock-screen-blurred.png" - TMP_SCREENSHOT="/tmp/lock-screen.png" - maim "$TMP_SCREENSHOT" && \ - convert /tmp/lock-screen.png -scale 10% -scale 1000% "$BG_FILEPATH" && \ - rm "$TMP_SCREENSHOT" -fi - -xset s activate -i3lock -i "$BG_FILEPATH" -e -f -t diff --git a/stowed-files/i3/.local/bin/record_screen b/stowed-files/i3/.local/bin/record_screen deleted file mode 100755 index e228f198..00000000 --- a/stowed-files/i3/.local/bin/record_screen +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# Records the entire screen, run second time to stop recording - -# strict mode -set -euo pipefail -IFS=$'\n\t' - -# Acts as `stdin` for `ffmpeg` process -SCREEN_CAP_INPUT_FILE=/tmp/i3-screencap-input -if [ -f "$SCREEN_CAP_INPUT_FILE" ]; then - # Quit if already running - echo 'q' > "$SCREEN_CAP_INPUT_FILE" - rm "$SCREEN_CAP_INPUT_FILE" - notify-send \ - --urgency low \ - --transient \ - --expire-time 1000 \ - --app-name "i3" \ - --icon "camera-video-symbolic" \ - 'Screen recording saved' -t 2 -u low - exit -fi - -SCREEN_DIMENSIONS=$(xdotool getdisplaygeometry | tr ' ' x) -FILENAME="$HOME/Downloads/screencast-$(date +%F-%T).mp4" - -touch "$SCREEN_CAP_INPUT_FILE" -< "$SCREEN_CAP_INPUT_FILE" ffmpeg -framerate 25 \ - -f x11grab \ - -video_size "$SCREEN_DIMENSIONS" \ - -i ":0.0" \ - "$FILENAME" \ - > /dev/null 2> /tmp/i3-screencap.log - -notify-send \ - --urgency low \ - --transient \ - --expire-time 1000 \ - --app-name "i3" \ - --icon "camera-video-symbolic" \ - 'Screen recording captured' - -if command -v video_to_gif > /dev/null; then - video_to_gif "$FILENAME" -fi diff --git a/stowed-files/i3/.local/bin/record_window b/stowed-files/i3/.local/bin/record_window deleted file mode 100755 index c84361e3..00000000 --- a/stowed-files/i3/.local/bin/record_window +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# -# Records current window - -# strict mode -set -euo pipefail -IFS=$'\n\t ' - -# Acts as `stdin` for `ffmpeg` process -SCREEN_CAP_INPUT_FILE=/tmp/i3-screencap-input -if [ -f "$SCREEN_CAP_INPUT_FILE" ]; then - # Quit if already running - echo 'q' > "$SCREEN_CAP_INPUT_FILE" - rm "$SCREEN_CAP_INPUT_FILE" - notify-send \ - --urgency low \ - --transient \ - --expire-time 1000 \ - --app-name "i3" \ - --icon "camera-video-symbolic" \ - 'Window recording saved' - exit -fi - -FILENAME="$HOME/Downloads/screencast-$(date +%F-%T).mp4" - -SCREEN_COORDS=$(slop -f "%x %y %w %h" --highlight --color=0.25,0.5,1,0.25) || exit 1 -read -r X Y W H < <(echo $SCREEN_COORDS) - -touch "$SCREEN_CAP_INPUT_FILE" -< "$SCREEN_CAP_INPUT_FILE" ffmpeg -framerate 25 \ - -f x11grab \ - -s "$W"x"$H" \ - -i :0.0+"$X","$Y" \ - "$FILENAME" \ - > /dev/null 2> /tmp/i3-screencap.log - -notify-send \ - --urgency low \ - --transient \ - --expire-time 1000 \ - --app-name "i3" \ - --icon "camera-video-symbolic" \ - 'Window recording captured' - -if command -v video_to_gif > /dev/null; then - video_to_gif "$FILENAME" -fi diff --git a/stowed-files/i3/.local/bin/video_to_gif b/stowed-files/i3/.local/bin/video_to_gif deleted file mode 100755 index 767d7f01..00000000 --- a/stowed-files/i3/.local/bin/video_to_gif +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Converts a video file to GIF -# Cribbed from `http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html` - -# strict mode -set -euo pipefail -IFS=$'\n\t' - -VIDEO_FILE=$1 -PALETTE_FILE_PATH=$(mktemp -u -t palette-XXXX.png) -WIDTH=1024 - -FFMPEG_FILTERS="fps=15,scale=$WIDTH:-1:flags=lanczos" -echo "$VIDEO_FILE → $VIDEO_FILE.gif" -# Generate palette -ffmpeg -v warning -i "file:$VIDEO_FILE" \ - -vf "$FFMPEG_FILTERS,palettegen" \ - -y "$PALETTE_FILE_PATH" - -ffmpeg -v warning \ - -i "file:$VIDEO_FILE" \ - -i "$PALETTE_FILE_PATH" \ - -lavfi "$FFMPEG_FILTERS [x]; [x][1:v] paletteuse" -y "file:$VIDEO_FILE.gif" - -rm "$PALETTE_FILE_PATH" diff --git a/stowed-files/kitty/.config/kitty/kitty-common.conf b/stowed-files/kitty/.config/kitty/kitty-common.conf deleted file mode 100644 index f6d0f82f..00000000 --- a/stowed-files/kitty/.config/kitty/kitty-common.conf +++ /dev/null @@ -1,10 +0,0 @@ -font_family DejaVu Sans Mono -font_size 13.0 - -# Work around bug where OSC 52 copy always appends -clipboard_control write-primary write-clipboard no-append - -map ctrl+minus change_font_size all -1.0 -map ctrl+equal change_font_size all +1.0 -map ctrl+0 change_font_size all 0 - diff --git a/stowed-files/kitty/.config/kitty/kitty-light.conf b/stowed-files/kitty/.config/kitty/kitty-light.conf deleted file mode 100644 index bd9c22ad..00000000 --- a/stowed-files/kitty/.config/kitty/kitty-light.conf +++ /dev/null @@ -1,47 +0,0 @@ -include kitty-common.conf - -# Used by bash scripts -env COLOR_THEME=light -# Default bat theme is illegible when light -env BAT_THEME=GitHub - -# Base16 Default Light - kitty color config -background #f8f8f8 -foreground #383838 -selection_background #383838 -selection_foreground #f8f8f8 -url_color #585858 -cursor #383838 -active_border_color #b8b8b8 -active_tab_background #f8f8f8 -active_tab_foreground #383838 -inactive_tab_background #e8e8e8 -inactive_tab_foreground #585858 - -# normal -color0 #f8f8f8 -color1 #ab4642 -color2 #a1b56c -color3 #f7ca88 -color4 #7cafc2 -color5 #ba8baf -color6 #86c1b9 -color7 #383838 - -# bright -color8 #b8b8b8 -color9 #ab4642 -color10 #a1b56c -color11 #f7ca88 -color12 #7cafc2 -color13 #ba8baf -color14 #86c1b9 -color15 #383838 - -# extended base16 colors -color16 #dc9656 -color17 #a16946 -color18 #e8e8e8 -color19 #d8d8d8 -color20 #585858 -color21 #282828 diff --git a/stowed-files/kitty/.config/kitty/kitty.conf b/stowed-files/kitty/.config/kitty/kitty.conf deleted file mode 100644 index 75ca07a6..00000000 --- a/stowed-files/kitty/.config/kitty/kitty.conf +++ /dev/null @@ -1,42 +0,0 @@ -include kitty-common.conf - -# Base16 Default Dark - kitty color config -background #181818 -foreground #d8d8d8 -selection_background #d8d8d8 -selection_foreground #181818 -url_color #b8b8b8 -cursor #d8d8d8 -active_border_color #585858 -active_tab_background #181818 -active_tab_foreground #d8d8d8 -inactive_tab_background #282828 -inactive_tab_foreground #b8b8b8 - -# normal -color0 #181818 -color1 #ab4642 -color2 #a1b56c -color3 #f7ca88 -color4 #7cafc2 -color5 #ba8baf -color6 #86c1b9 -color7 #d8d8d8 - -# bright -color8 #585858 -color9 #ab4642 -color10 #a1b56c -color11 #f7ca88 -color12 #7cafc2 -color13 #ba8baf -color14 #86c1b9 -color15 #d8d8d8 - -# extended base16 colors -color16 #dc9656 -color17 #a16946 -color18 #282828 -color19 #383838 -color20 #b8b8b8 -color21 #e8e8e8 diff --git a/stowed-files/kitty/.local/share/applications/kitty-light.desktop b/stowed-files/kitty/.local/share/applications/kitty-light.desktop deleted file mode 100644 index 830011ba..00000000 --- a/stowed-files/kitty/.local/share/applications/kitty-light.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] - -Type=Application -Version=1.0 -Name=Kitty Light -Comment=Light mode for Kitty -Terminal=false -Exec=sh -c "/usr/bin/kitty --config \$XDG_CONFIG_HOME/kitty/kitty-light.conf" -Icon=/usr/share/icons/hicolor/256x256/apps/kitty.png diff --git a/stowed-files/mkchromecast/.config/systemd/user/mkchromecast.service b/stowed-files/mkchromecast/.config/systemd/user/mkchromecast.service new file mode 100644 index 00000000..f86d8212 --- /dev/null +++ b/stowed-files/mkchromecast/.config/systemd/user/mkchromecast.service @@ -0,0 +1,11 @@ +[Unit] +Description=Mkchromecast +PartOf=sway-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/mkchromecast --tray --port 5555 --encoder-backend ffmpeg +Restart=always + +[Install] +WantedBy=sway-session.target diff --git a/stowed-files/mkchromecast/.config/systemd/user/sway-session.target.wants/mkchromecast.service b/stowed-files/mkchromecast/.config/systemd/user/sway-session.target.wants/mkchromecast.service new file mode 120000 index 00000000..ef820ec1 --- /dev/null +++ b/stowed-files/mkchromecast/.config/systemd/user/sway-session.target.wants/mkchromecast.service @@ -0,0 +1 @@ +../mkchromecast.service \ No newline at end of file diff --git a/stowed-files/picom/.config/picom.conf b/stowed-files/picom/.config/picom.conf deleted file mode 100644 index 8a681429..00000000 --- a/stowed-files/picom/.config/picom.conf +++ /dev/null @@ -1,8 +0,0 @@ -# Fade inactive windows -inactive-dim = 0.15; - -# Mark override-redirect windows that doesn't have a child window with WM_STATE focused -# This happens in Firefox menus, and extentions like 1password, etc -mark-ovredir-focused = true; -# Happens in Firefox informational popups -mark-wmwin-focused = true; diff --git a/stowed-files/placeholders/.config/autostart/.gitignore b/stowed-files/placeholders/.config/autostart/.gitignore deleted file mode 100644 index 16a9b19a..00000000 --- a/stowed-files/placeholders/.config/autostart/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# This file is just here so we avoid having stow symlink the entire parent dir diff --git a/stowed-files/rofi/.config/rofi/config.rasi b/stowed-files/rofi/.config/rofi/config.rasi deleted file mode 100644 index 9e4c48fe..00000000 --- a/stowed-files/rofi/.config/rofi/config.rasi +++ /dev/null @@ -1,9 +0,0 @@ -@import "/usr/share/rofi/themes/Monokai.rasi" - -configuration { - case-sensitive: false; - font: "Noto Sans Medium 18"; - matching: "glob"; - display-drun: "👉"; - display-window: "📋"; -} diff --git a/stowed-files/sway/.config/.gitignore b/stowed-files/sway/.config/.gitignore new file mode 100644 index 00000000..ca8605f8 --- /dev/null +++ b/stowed-files/sway/.config/.gitignore @@ -0,0 +1 @@ +config.local diff --git a/stowed-files/sway/.config/sway/config b/stowed-files/sway/.config/sway/config new file mode 100644 index 00000000..6abdf514 --- /dev/null +++ b/stowed-files/sway/.config/sway/config @@ -0,0 +1,229 @@ +# Logo key +set $mod Mod4 + +# Don't use mouse position for focus +focus_follows_mouse no + +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +set $term foot +set $browser firefox +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +# set $menu dmenu_path | dmenu | xargs swaymsg exec -- +set $menu "fuzzel" + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill + +# Start a terminal +bindsym $mod+Return exec $term + +# Start a terminal +bindsym $mod+Shift+Return exec $browser + +# Kill focused window +bindsym $mod+Shift+q kill + +# Launcher with Mod-D / Special key +bindsym $mod+d exec $menu +bindsym XF86Tools exec $menu +# Window switcher with Alt-Tab / Mod-Shift-D +bindsym $mod+Shift+d exec wl-switch-windows +bindsym $mod+Tab exec wl-switch-windows +bindsym Alt+Tab exec wl-switch-windows +# Reload the configuration file with Mod-Shift-C +bindsym $mod+Shift+c reload +# Show commands (including exit) with Mod-Shift-E +bindsym $mod+Shift+e exec sway-system-menu +# Lock with Mod-Shift-Z +bindsym $mod+Shift+z exec sway-blur-lock -f -c 000000 +# Lock and turn off screen with Mod-Shift-X +# Must sleep, otherwise immediately wakes due to key up +bindsym $mod+Shift+x exec sleep 1 && killall -s SIGUSR1 swayidle && swaymsg 'output * epms off' + +# Drag floating windows by holding down $mod and left mouse button. +# Resize them with right mouse button + $mod. +# Despite the name, also works for non-floating windows. +# Change normal to inverse to use left mouse button for resizing and right +# mouse button for dragging. +floating_modifier $mod normal + +# Moving around: +# Move your focus around +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right +# Or use $mod+[up|down|left|right] +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Move the focused window with the same, but add Shift +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right +# Ditto, with arrow keys +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Workspaces: +# Switch to workspace +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 +bindsym $mod+0 workspace number 10 +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number 1 +bindsym $mod+Shift+2 move container to workspace number 2 +bindsym $mod+Shift+3 move container to workspace number 3 +bindsym $mod+Shift+4 move container to workspace number 4 +bindsym $mod+Shift+5 move container to workspace number 5 +bindsym $mod+Shift+6 move container to workspace number 6 +bindsym $mod+Shift+7 move container to workspace number 7 +bindsym $mod+Shift+8 move container to workspace number 8 +bindsym $mod+Shift+9 move container to workspace number 9 +bindsym $mod+Shift+0 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: +# You can "split" the current object of your focus with +# $mod+b or $mod+v, for horizontal and vertical splits +# respectively. +bindsym $mod+b splith +bindsym $mod+v splitv + +# Switch the current container between different layout styles +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# Make the current focus fullscreen +bindsym $mod+f fullscreen + +# Toggle the current focus between tiling and floating mode +bindsym $mod+Shift+space floating toggle + +# Toggle sticky status +bindsym $mod+Shift+f floating toggle, sticky toggle, resize 500x300 + +# 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 + +# 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: +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + # up will shrink the containers height + # down will grow the containers height + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. +bar { + swaybar_command waybar + position bottom + mode dock + modifier Mod4 + + # When the status_command prints a new line to stdout, swaybar updates. + # The default just shows the current date and time. + status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done + + colors { + statusline #ffffff + background #323232 + inactive_workspace #32323200 #32323200 #5c5c5c + } +} + +# Use multimedia keys for sound +bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%+ +bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +# And music control +# TODO: Detect multiple players, also show notification +bindsym XF86AudioPrev exec music-control previous +bindsym XF86AudioPlay exec music-control toggle +bindsym XF86AudioNext exec music-control next + +# Screen capture +# Plain print screen captures active window +bindsym Print exec "grimshot --notify copy active" +# Mod-Shift-S for area, same as Windows snipping tool +bindsym $mod+Shift+s exec grimshot --notify copy area +# Shift-PrintScreen to video capture area, same as ShareX on Windows +bindsym Shift+Print exec wl-record-screen + +# Notification panel with Mod-Shift-N +bindsym $mod+Shift+n exec swaync-client -t + +# App-specific tweaks +for_window [app_id="pavucontrol"] floating enable +for_window [app_id="(?i)foot|(alacr|k)itty"] border pixel 0 +for_window [app_id="(?i)firefox"] border pixel 0 +for_window [app_id="(?i)signal"] border pixel 0 +for_window [app_id="(?i)chromium"] border pixel 0 + +# Workaround for crash on start if signal isnt floating on launch +# run with args `--enable-features=UseOzonePlatform --ozone-platform=wayland` +for_window [app_id="signal"] floating enable + +# Make sure system-user environment gets variables +include /etc/sway/config.d/* + +# Autostart things like gammastep via systemd +exec systemctl --user start sway-session.target + +# Local overrides +include ~/.config/sway/config.local diff --git a/stowed-files/sway/.config/sway/config.local.example b/stowed-files/sway/.config/sway/config.local.example new file mode 100644 index 00000000..3ddbdc3e --- /dev/null +++ b/stowed-files/sway/.config/sway/config.local.example @@ -0,0 +1,14 @@ +# vim:ft=config +# Copy into `~/.config/sway/config.local` and override with monitor layout or +# other machine-specific configuration +# +# Example configuration: +# +# output DP-1 resolution 1920x1080 position 0,0 +# output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# workspace 1 output DP-1 +# workspace 2 output HDMI-A-1 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + diff --git a/stowed-files/sway/.config/swaylock/config b/stowed-files/sway/.config/swaylock/config new file mode 100644 index 00000000..3b0be773 --- /dev/null +++ b/stowed-files/sway/.config/swaylock/config @@ -0,0 +1,7 @@ +color=181818 +daemonize +ignore-empty-password +indicator-caps-lock +indicator-thickness=20 +indicator-radius=100 +show-failed-attempts diff --git a/stowed-files/sway/.config/systemd/user/pasystray.service b/stowed-files/sway/.config/systemd/user/pasystray.service new file mode 100644 index 00000000..78d13cc2 --- /dev/null +++ b/stowed-files/sway/.config/systemd/user/pasystray.service @@ -0,0 +1,11 @@ +[Unit] +Description=PulseAudio system tray +PartOf=sway-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/pasystray +Restart=always + +[Install] +WantedBy=sway-session.target diff --git a/stowed-files/sway/.config/systemd/user/sway-session.target b/stowed-files/sway/.config/systemd/user/sway-session.target new file mode 100644 index 00000000..49e96a0a --- /dev/null +++ b/stowed-files/sway/.config/systemd/user/sway-session.target @@ -0,0 +1,2 @@ +[Unit] +Description=Sway Session diff --git a/stowed-files/sway/.config/systemd/user/sway-session.target.wants/pasystray.service b/stowed-files/sway/.config/systemd/user/sway-session.target.wants/pasystray.service new file mode 120000 index 00000000..2697d12d --- /dev/null +++ b/stowed-files/sway/.config/systemd/user/sway-session.target.wants/pasystray.service @@ -0,0 +1 @@ +../pasystray.service \ No newline at end of file diff --git a/stowed-files/sway/.local/bin/sway-blur-lock b/stowed-files/sway/.local/bin/sway-blur-lock new file mode 100755 index 00000000..24732d98 --- /dev/null +++ b/stowed-files/sway/.local/bin/sway-blur-lock @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Blur and lock the screen +# +# Usage: +# sway-blur-lock + +set -euo pipefail +IFS=$'\n\t' + +main() { + local image_directory + local lock_args=() + local outputs + + image_directory="$(mktemp -d /tmp/sway_blur_lock.XXXXXX)" + + if [[ -z ${WAYLAND_DISPLAY} ]]; then + echo "Not running under Wayland, aborting" + return 1 + fi + + outputs="$(swaymsg -t get_outputs | \ + jq -r '.[] | select(.active == true) | .name')" + + for output in ${outputs}; do + local image_path="${image_directory}/${output}.png" + grim -o "${output}" - | \ + convert - -scale 10% -scale 1000% "${image_path}" + lock_args+=("--image=${output}:${image_path}") + done + + swaylock "${lock_args[@]}" +} + +main "$@" + diff --git a/stowed-files/sway/.local/bin/sway-system-menu b/stowed-files/sway/.local/bin/sway-system-menu new file mode 100755 index 00000000..70409d9e --- /dev/null +++ b/stowed-files/sway/.local/bin/sway-system-menu @@ -0,0 +1,67 @@ +#!/bin/bash +# +# Interactive commands for Sway +# +# Usage: +# sway-system-menu + +set -euo pipefail +IFS=$'\n\t' + +get_options() { + echo -e "Terminal\\0icon\\x1ffoot" + echo -e "Firefox\\0icon\\x1ffirefox-esr" + if playerctl status | grep -q Playing; then + echo -e "Pause $(playerctl metadata title)\\0icon\\x1fmedia-playback-pause" + echo -e "Next\\0icon\\x1fmedia-skip-forward" + elif playerctl status | grep -q Paused; then + echo -e "Resume $(playerctl metadata title)\\0icon\\x1fmedia-playback-pause" + echo -e "Next\\0icon\\x1fmedia-skip-forward" + fi + echo -e "Lock\\0icon\\x1fsystem-lock-screen" + echo -e "Reload Sway\\0icon\\x1fsystem-software-update" + echo -e "Exit Sway\\0icon\\x1fsystem-log-out" +} + +main() { + local selection + + if [[ -z ${WAYLAND_DISPLAY} ]]; then + echo "Not running under Wayland, aborting" + return 1 + fi + + selection=$(get_options | fuzzel --dmenu --prompt "Sway:") + case "$selection" in + Cancel) + echo "Cancelled" + ;; + Terminal) + swaymsg exec foot + ;; + Firefox) + swaymsg exec firefox-esr + ;; + Lock) + swaylock -f -c 000000 + ;; + Resume|Pause) + playerctl play-pause + ;; + Next) + playerctl next + ;; + Reload\ Sway) + swaymsg reload + ;; + Exit\ Sway) + swaymsg exit + ;; + *) + echo "Unknown option: ${selection}" + return 1 + ;; + esac +} + +main "$@" diff --git a/stowed-files/sway/.local/bin/wl-record-screen b/stowed-files/sway/.local/bin/wl-record-screen new file mode 100755 index 00000000..dfb07a56 --- /dev/null +++ b/stowed-files/sway/.local/bin/wl-record-screen @@ -0,0 +1,75 @@ +#!/bin/sh +# +# Records the entire screen, run again to stop recording +# +# Usage: +# wl-record-screen [...wf-recorder args] + +TMP_LOG_PATH="/tmp/wf-recorder.log" + +on_failure() { + log_path="${1:-/tmp/wf-recorder}.log" + if [ -n "$1" ]; then + mv --force "${TMP_LOG_PATH}" "${log_path}" + fi + + notify-send \ + --urgency critical \ + --app-name "sway" \ + "Recording failed!" "See $(echo "$log_path" | sed "s:$HOME:~:g") for details" +} + +main() { + coords='' + output_dir="${XDG_DOWNLOAD_DIR:-$HOME/Downloads}" + pretty_output_dir="$(echo "$output_dir" | sed "s:$HOME:~:g")" + out_path='' + pid='' + + pid=$(pgrep -x wf-recorder) + + if ! command -v slurp > /dev/null || ! command -v wf-recorder > /dev/null; then + echo "slurp/wf-recorder not installed, aborting" + exit 1 + fi + + if [ -n "${pid}" ]; then + pkill --signal SIGINT wf-recorder + echo "Saved in ${pretty_output_dir}" + notify-send \ + --urgency low \ + --transient \ + --expire-time 2500 \ + --app-name "sway" \ + --icon camera-video-symbolic \ + -t 500 "Recording Complete" "Saved in ${pretty_output_dir}" + exit 0 + fi + + if [ -z "${WAYLAND_DISPLAY}" ]; then + echo "Not running under Wayland, aborting" + exit 1 + fi + + echo "Starting recording..." + if [ "$#" -gt 0 ]; then + if ! wf-recorder "$@" > "${TMP_LOG_PATH}" 2>&1; then + on_failure + exit 1 + fi + else + coords="$(slurp -d 2>/dev/null)" + if [ -z "${coords}" ]; then + echo "Capture cancelled" + exit 1 + fi + out_path="${output_dir}/screen-$(date +%Y-%m-%d_%H-%M-%S).mp4" + + if ! wf-recorder --geometry "${coords}" -f "${out_path}" > "${TMP_LOG_PATH}" 2>&1; then + on_failure "${out_path}" + exit 1 + fi + fi +} + +main "$@" diff --git a/stowed-files/sway/.local/bin/wl-switch-windows b/stowed-files/sway/.local/bin/wl-switch-windows new file mode 100755 index 00000000..2491ca3b --- /dev/null +++ b/stowed-files/sway/.local/bin/wl-switch-windows @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Interactive window switcher for wayland +# +# Usage: +# wl-switch-windows [...wf-recorder args] + +IFS=$'\n\t' + +function get_windows() { + swaymsg -t get_tree | jq -r ' + recurse(.nodes[]?, .floating_nodes[]?) + | select(.type=="con" and .name!=null and .app_id!=null) + | "\(.name)\\0icon\\x1f" + ( + if .app_id == "signal" then "signal-desktop" + elif .app_id | startswith("chromium") then "chromium" + else .app_id end | ascii_downcase) + ' +} + +function get_window_id_for_index() { + local index="$1" + swaymsg -t get_tree | jq -r '[ + recurse(.nodes[]?, .floating_nodes[]?) + | select(.type=="con" and .name!=null and .app_id!=null) + | .id + ] | .['"${index}"']' +} + +main() { + local count + local selected_window_id + local windows + + if [[ -z ${WAYLAND_DISPLAY} ]]; then + echo "Not running under Wayland, aborting" + return 1 + fi + + windows="$(get_windows)" + + count="$(echo "$windows" | wc -l)" + + # Don't want id in the display, so grab index and then re-query to get id + selected_window_index=$(echo -ne "$windows" | \ + fuzzel --dmenu --lines="${count}" --prompt "Switch to:" --index | \ + cut -d' ' -f1 + ) + + selected_window_id="$(get_window_id_for_index "${selected_window_index}")" + + if [[ -n "${selected_window_id}" ]]; then + swaymsg "[con_id=${selected_window_id}]" focus + else + echo "Cancelled" + return 1 + fi +} + +main "$@" diff --git a/stowed-files/swayidle/.config/swayidle/config b/stowed-files/swayidle/.config/swayidle/config new file mode 100644 index 00000000..2f0c84ed --- /dev/null +++ b/stowed-files/swayidle/.config/swayidle/config @@ -0,0 +1,10 @@ +# vim: set ft=config + +# Turn off the screen after 5 minutes seconds of inactivity +timeout 300 'swaymsg --quiet "output * dpms off"' resume 'swaymsg --quiet "output * dpms on"' + +# lock screen after 10 minutes +timeout 600 'swaylock' resume 'swaymsg --quiet "output * dpms on"' + +# lock screen before suspending +before-sleep 'swaylock' diff --git a/stowed-files/swayidle/.config/systemd/user/sway-session.target.wants/swayidle.service b/stowed-files/swayidle/.config/systemd/user/sway-session.target.wants/swayidle.service new file mode 120000 index 00000000..cf3fe099 --- /dev/null +++ b/stowed-files/swayidle/.config/systemd/user/sway-session.target.wants/swayidle.service @@ -0,0 +1 @@ +../swayidle.service \ No newline at end of file diff --git a/stowed-files/swayidle/.config/systemd/user/swayidle.service b/stowed-files/swayidle/.config/systemd/user/swayidle.service new file mode 100644 index 00000000..2d471837 --- /dev/null +++ b/stowed-files/swayidle/.config/systemd/user/swayidle.service @@ -0,0 +1,19 @@ +[Unit] +Description=Idle manager for Wayland +; After=sway.service +PartOf=sway-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/swayidle -w -d +Restart=always +# wait 2 seconds before retrying instead of 100ms +# +# this will keep the service trying without tripping the +# StartLimitBurst, while giving sway possibly time to properly +# initialize +RestartSec=2s + +[Install] +WantedBy=sway-session.target + diff --git a/stowed-files/swaync/.config/swaync/config.json b/stowed-files/swaync/.config/swaync/config.json new file mode 100644 index 00000000..3db1079c --- /dev/null +++ b/stowed-files/swaync/.config/swaync/config.json @@ -0,0 +1,65 @@ +{ + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "layer": "top", + "cssPriority": "application", + "control-center-margin-top": 0, + "control-center-margin-bottom": 0, + "control-center-margin-right": 0, + "control-center-margin-left": 0, + "notification-icon-size": 64, + "notification-body-image-height": 100, + "notification-body-image-width": 200, + "timeout": 10, + "timeout-low": 5, + "timeout-critical": 0, + "fit-to-screen": true, + "control-center-width": 500, + "control-center-height": 600, + "notification-window-width": 500, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 200, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "scripts": { + "example-script": { + "exec": "echo 'Do something...'", + "urgency": "Normal" + } + }, + "notification-visibility": { + "example-name": { + "state": "muted", + "urgency": "Low", + "app-name": "Spotify" + } + }, + "widgets": [ + "title", + "dnd", + "volume", + "mpris", + "notifications" + ], + "widget-config": { + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "label": { + "max-lines": 5, + "text": "Label Text" + }, + "mpris": { + "image-size": 96, + "image-radius": 12 + } + } +} diff --git a/stowed-files/waybar/.config/waybar/config b/stowed-files/waybar/.config/waybar/config new file mode 100644 index 00000000..7c1ef02b --- /dev/null +++ b/stowed-files/waybar/.config/waybar/config @@ -0,0 +1,112 @@ +{ + // Required for hiding + "ipc": true, + // "layer": "top", // Waybar at top layer + "position": "bottom", // Waybar position (top|bottom|left|right) + "height": 30, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "spacing": 4, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad", "custom/media"], + "modules-center": ["sway/window"], + "modules-right": ["idle_inhibitor", "pulseaudio", "clock", "tray"], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "playerctl metadata --format '{\"text\": \"{{title}}\", \"tooltip\": \"{{playerName}} : {{title}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F", // Script in resources folder + "on-click": "playerctl play-pause" + } +} + diff --git a/stowed-files/waybar/.config/waybar/style.css b/stowed-files/waybar/.config/waybar/style.css new file mode 100644 index 00000000..cf5c5fb0 --- /dev/null +++ b/stowed-files/waybar/.config/waybar/style.css @@ -0,0 +1,280 @@ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; + font-size: 13px; +} + +window#waybar { + background-color: rgba(43, 48, 59, 0.5); + border-bottom: 3px solid rgba(100, 114, 125, 0.5); + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: #ffffff; +} + +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); +} + +#workspaces button.focused { + background-color: #64727D; + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #64727D; + border-bottom: 3px solid #ffffff; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#mpd { + padding: 0 10px; + color: #ffffff; +} + +#window, +#workspaces { + margin: 0 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +#clock { + background-color: #64727D; +} + +#battery { + background-color: #ffffff; + color: #000000; +} + +#battery.charging, #battery.plugged { + color: #ffffff; + background-color: #26A65B; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: #f53c3c; + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +label:focus { + background-color: #000000; +} + +#cpu { + background-color: #2ecc71; + color: #000000; +} + +#memory { + background-color: #9b59b6; +} + +#disk { + background-color: #964B00; +} + +#backlight { + background-color: #90b1b1; +} + +#network { + background-color: #2980b9; +} + +#network.disconnected { + background-color: #f53c3c; +} + +#pulseaudio { + background-color: #f1c40f; + color: #000000; +} + +#pulseaudio.muted { + background-color: #90b1b1; + color: #2a5c45; +} + +#wireplumber { + background-color: #fff0f5; + color: #000000; +} + +#wireplumber.muted { + background-color: #f53c3c; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: #f0932b; +} + +#temperature.critical { + background-color: #eb4d4b; +} + +#tray { + background-color: #2980b9; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#idle_inhibitor { + background-color: #2d3436; +} + +#idle_inhibitor.activated { + background-color: #ecf0f1; + color: #2d3436; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state { + background: #97e1ad; + color: #000000; + padding: 0 0px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state > label { + padding: 0 5px; +} + +#keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad.empty { + background-color: transparent; +}