Browse Source

huge configuration changes for sway

Casey DeLorme 2 years ago
parent
commit
d2b5b6928a

+ 4 - 3
arch.sh

@@ -75,7 +75,7 @@ PACKAGES="${PACKAGES} nftables iptables dnsmasq rsync dhcpcd inetutils net-tools
 PACKAGES="${PACKAGES} pkgfile pkgconf bison gcc gcc-libs cmake ccache ncurses xmlstarlet jq git mercurial subversion bzr patchelf xdelta3 packer vagrant libvirt qemu libguestfs virt-install edk2-ovmf"
 
 # multimedia dependencies
-PACKAGES="${PACKAGES} mesa lib32-mesa dbus polkit giflib lib32-giflib mpg123 lib32-mpg123 v4l-utils lib32-v4l-utils lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libpng12 lib32-libpng12 pulseaudio libpulse lib32-libpulse openal lib32-openal opencl-icd-loader lib32-opencl-icd-loader libva lib32-libva gst-plugins-base-libs lib32-gst-plugins-base-libs graphicsmagick imagemagick joyutils evtest libexif ffmpeg lxsession-gtk3 yt-dlp wine-staging winetricks fcitx5 fcitx5-mozc fcitx5-configtool fcitx5-gtk fcitx5-qt"
+PACKAGES="${PACKAGES} mesa lib32-mesa dbus polkit giflib lib32-giflib mpg123 lib32-mpg123 v4l-utils lib32-v4l-utils lame libwebp libid3tag libvorbis vorbis-tools faac x264 x265 libpng12 lib32-libpng12 pulseaudio libpulse lib32-libpulse openal lib32-openal opencl-icd-loader lib32-opencl-icd-loader libva lib32-libva libva-utils gst-plugins-base-libs lib32-gst-plugins-base-libs graphicsmagick imagemagick joyutils evtest libexif ffmpeg lxsession-gtk3 yt-dlp wine-staging winetricks fcitx5 fcitx5-mozc fcitx5-configtool fcitx5-gtk fcitx5-qt"
 
 # GUI theme
 PACKAGES="${PACKAGES} gnome-themes-extra gnome-icon-theme arc-gtk-theme gtk-engines gtk-engine-murrine"
@@ -87,13 +87,13 @@ PACKAGES="${PACKAGES} gtk3 lib32-gtk3 pavucontrol pcmanfm-gtk3 ffmpegthumbnailer
 PACKAGES="${PACKAGES} libva-mesa-driver lib32-libva-mesa-driver lib32-mesa-vdpau vulkan-tools vulkan-icd-loader lib32-vulkan-icd-loader"
 
 # Sway dependencies
-PACKAGES="${PACKAGES} sway alacritty wofi waybar xorg-xwayland xorg-xlsclients qt5-wayland glfw-wayland grim slurp xdg-desktop-portal-wlr libpipewire02 wl-clipboard brightnessctl playerctl mako"
+PACKAGES="${PACKAGES} sway alacritty wofi waybar xorg-xwayland xorg-xlsclients qt5-wayland glfw-wayland grim slurp xdg-desktop-portal-wlr libpipewire02 wl-clipboard brightnessctl playerctl mako libappindicator-gtk3 lib32-libappindicator-gtk3"
 
 # fonts
 PACKAGES="${PACKAGES} fontconfig ttf-bitstream-vera ttf-droid ttf-dejavu ttf-liberation ttf-hanazono ttf-font-awesome"
 
 # GUI software
-PACKAGES="${PACKAGES} xarchiver gparted psensor hardinfo steam steam-native-runtime discord mpv openshot gimp krita firefox obs-studio dia mednafen mame ppsspp lutris sublime-text evince viewnior virt-manager virtualbox virtualbox-host-modules-arch"
+PACKAGES="${PACKAGES} xarchiver gparted psensor hardinfo steam steam-native-runtime gamemode lib32-gamemode discord mpv mpv-mpris openshot gimp krita firefox obs-studio dia mednafen mame ppsspp lutris sublime-text evince viewnior virt-manager virtualbox virtualbox-host-modules-arch"
 
 # conditional GPU packages
 if [ $(lspci | grep -i "vga" | grep -ci "amd") -gt 0 ]; then
@@ -158,6 +158,7 @@ sudo -u $aur_username git clone https://aur.archlinux.org/numix-icon-theme-git.g
 
 # corectrl
 
+# wev
 
 # cleanup aur user
 rm -rf /etc/sudoers.d/${aur_username}

+ 9 - 0
install/etc/polkit-1/rules.d/90-corectrl.rules

@@ -0,0 +1,9 @@
+polkit.addRule(function(action, subject) {
+    if ((action.id == "org.corectrl.helper.init" ||
+         action.id == "org.corectrl.helperkiller.init") &&
+        subject.local == true &&
+        subject.active == true &&
+        subject.isInGroup("your-user-group")) {
+            return polkit.Result.YES;
+    }
+});

+ 7 - 0
install/etc/skel/.bash_profile

@@ -3,6 +3,9 @@
 # add local bin to path
 export PATH=/usr/local/bin:$PATH
 
+# alias for discord wayland, since it ignores configs
+alias discord='discord --enable-features=UseOzonePlatform --ozone-platform=wayland'
+
 # fcitx IME support
 export GTK_IM_MODULE=fcitx
 export QT_IM_MODULE=fcitx
@@ -11,6 +14,10 @@ export XMODIFIERS=@im=fcitx
 # specify wayland for applications like steam
 export MOZ_ENABLE_WAYLAND=1
 export SDL_VIDEODRIVER="wayland"
+export XDG_CURRENT_DESKTOP=Unity
+
+# golang override for package behavior
+export GO111MODULE=auto
 
 # if bashrc exists and the terminal has stdin load it
 test -t 0 && . "$HOME/.bashrc"

+ 3 - 0
install/etc/skel/.config/chromium-flags.conf

@@ -0,0 +1,3 @@
+--enable-features=UseOzonePlatform
+--ozone-platform=wayland
+

+ 0 - 26
install/etc/skel/.config/conky/conky.conf

@@ -1,26 +0,0 @@
-conky.config = {
-    update_interval = 2.0,
-    cpu_avg_samples = 5,
-    net_avg_samples = 5,
-    diskio_avg_samples = 5,
-    alignment = 'tm',
-    gap_y = 0,
-    gap_x = 0,
-    use_xft = true,
-    xftalpha = 0.8,
-    font = 'ForMateKonaVe:size=9',
-    uppercase = false,
-    override_utf8_locale = true,
-    default_color = '6CBE6C',
-    own_window = true,
-    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager,above',
-    own_window_transparent = false,
-    own_window_argb_visual = true,
-    own_window_argb_value = 80,
-    double_buffer = true,
-}
-
-conky.text = [[
-${exec ip addr show | grep -v "127.0.0." | grep -v "169.254." | grep -o 'inet [0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+' | grep -o [0-9].*}    ${exec date +'%F %H:%M:%S'} (${uptime})    cpu (${cpu cpu0}%) ${cpubar cpu0 8,120}    ${mem}/${memmax} (${memperc}%) ${membar 5,120}    / (${fs_used_perc /}%) ${fs_bar 5,120 /}
-]]
-

+ 3 - 0
install/etc/skel/.config/electron-flags.conf

@@ -0,0 +1,3 @@
+--enable-features=UseOzonePlatform
+--ozone-platform=wayland
+

+ 73 - 76
install/etc/skel/.config/sway/config

@@ -11,46 +11,36 @@ set $browser firefox
 set $editor subl
 set $files pcmanfm
 
-# @todo: test loading from ~/.config/sway/config.d/*; would allow hardware specifics to be separated!
-# @reference: man 5 sway-output
-# @reference: swaymsg -t get_outputs
-# output configuration
-# output HDMI-A-1 mode --custom 2560x1440@60Hz position 0,0 adaptive_sync on
-
 # @note: we use the default wallpaper as a backup
 output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
 
 # @note: cursor theme and size set env vars; may not apply to all applications
 seat seat0 xcursor_theme Chameleon-SkyBlue-Large
 
-# @note: idle display sleep is an option, but I don't like display sleep
-# exec swayidle -w \
-#          timeout 300 'swaylock -f -c 000000' \
-#          timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
-#          before-sleep 'swaylock -f -c 000000'
-
-# @reference: man 5 sway-input
-# @reference: swaymsg -t get_inputs
-# @todo: define synaptic touchpad for laptops here
-# Example configuration:
-#   input "2:14:SynPS/2_Synaptics_TouchPad" {
-#       dwt enabled
-#       tap enabled
-#       natural_scroll enabled
-#       middle_emulation enabled
-#   }
-
 # window manager commands
 bindsym $mod+Shift+c reload
 bindsym $mod+Shift+q kill
 bindsym $mod+x exec swaymsg exit
 bindsym $mod+p focus parent
 
-# 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.
+# split workspace horizontal and vertical
+bindsym $mod+v splitv
+bindsym $mod+h splith
+
+# change workspace layout
+bindsym $mod+Shift+e layout toggle split
+bindsym $mod+Shift+s layout stacking
+bindsym $mod+Shift+w layout tabbed
+
+# fullscreen toggle
+bindsym $mod+f fullscreen
+
+# floating window controls:
+#   super+l to toggle floating mode
+#   super+_shift+l to switch focus to floating window(s)
+#   hold super then use left click to drag and right click to resize
+bindsym $mod+l floating toggle
+bindsym $mod+Shift+l focus mode_toggle
 floating_modifier $mod normal
 
 # Move your focus around
@@ -75,9 +65,7 @@ mode "resize" {
 }
 bindsym $mod+r mode "resize"
 
-# @todo: investigate named workspaces and affinities; eg. games workspace, left/right workspace navigation
-# @todo: also investigate multi-monitor hotkeys for moving containers across displays
-# workspace commands
+# navigate workspaces
 bindsym $mod+1 workspace number 1
 bindsym $mod+2 workspace number 2
 bindsym $mod+3 workspace number 3
@@ -88,6 +76,10 @@ bindsym $mod+7 workspace number 7
 bindsym $mod+8 workspace number 8
 bindsym $mod+9 workspace number 9
 bindsym $mod+0 workspace number 10
+bindsym Control+Alt+Right workspace next
+bindsym Control+Alt+Left workspace prev
+
+# send window to workspace
 bindsym $mod+Shift+1 move container to workspace number 1, workspace number 1
 bindsym $mod+Shift+2 move container to workspace number 2, workspace number 2
 bindsym $mod+Shift+3 move container to workspace number 3, workspace number 3
@@ -98,76 +90,81 @@ bindsym $mod+Shift+7 move container to workspace number 7, workspace number 7
 bindsym $mod+Shift+8 move container to workspace number 8, workspace number 8
 bindsym $mod+Shift+9 move container to workspace number 9, workspace number 9
 bindsym $mod+Shift+0 move container to workspace number 10, workspace number 10
+bindsym $mod+Control+Right move container to workspace next, workspace next
+bindsym $mod+Control+Left move container to workspace prev, workspace prev
 
 # services
-bindsym $mod+space exec $launcher
+bindsym $mod+Space exec $launcher
 bindsym $mod+Shift+F2 exec $applauncher
 bindsym $mod+t exec $term
 bindsym $mod+b exec $files
 bindsym $mod+e exec $editor
 bindsym $mod+w exec $browser
 bindsym $mod+Ctrl+3 exec screenshot
+bindsym Print exec screenshot
 bindsym $mod+Ctrl+4 exec screenshot-selection
+bindsym Shift+Print exec screenshot-selection
 
 # multimedia keys
-# bindsym XF86AudioRaiseVolume exec pash increase
-# bindsym XF86AudioLowerVolume exec pash decrease
-# bindsym XF86AudioMute exec pash mute
 bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
 bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
 bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
 bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
-bindsym XF86AudioPlay exec playerctl play-pause
-bindsym XF86AudioNext exec playerctl next
-bindsym XF86AudioPrev exec playerctl previous
+bindsym XF86AudioPlay exec playerctl -p mpv play-pause
+bindsym XF86AudioNext exec playerctl -p mpv next
+bindsym XF86AudioPrev exec playerctl -p mpv previous
 bindsym XF86MonBrightnessUp exec brightnessctl set +5%
 bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
 bindsym Shift+XF86MonBrightnessUp exec brightnessctl s 100%
 bindsym Shift+XF86MonBrightnessDown exec brightnessctl s 0%
 
-# @todo: investigate these layout behaviors; immediate testing showed no changes
-#
-# 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
-
-# @todo: identify an appropriate hotkey to toggle floating mode
-# Toggle the current focus between tiling and floating mode
-#bindsym $mod+Shift+space floating toggle
-# Swap focus between the tiling area and the floating area
-#bindsym $mod+space focus mode_toggle
-
-# @todo: investigate scratchpad usage to replace urxvtq script for persistent terminal
-#        basically mod+tilde toggle and position terminal using scratchpad to hide it
-# 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
-
-# @reference: man 5 sway-bar
-# @todo: figure out how to configure and optimize waybar
+# global push-to-talk & toggle
+bindsym $mod+m exec pactl set-source-mute @DEFAULT_SOURCE@ 0 # mute mic
+bindsym --release $mod+m exec pactl set-source-mute @DEFAULT_SOURCE@ 1 # unmute mic
+bindsym $mod+Shift+m exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
+
+# classify sane defaults for window management
+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 [class="xdg-desktop-portal-kde"] floating enable
+for_window [class="Wine"] floating enable
+for_window [app_id="lutris"] floating enable
+
+# waybar is great
 bar {
-	swaybar_command waybar
+    swaybar_command waybar
 }
 
 # load additional configuration
-# @note: input and output configuration specific to your system may be loaded from `config.d/`
 include /etc/sway/config.d/*
+
+# load user configuration from local sub-directory
+#
+# @reference: man 5 sway-output
+# @reference: swaymsg -t get_outputs
+#
+# example with custom resolution and dual monitors:
+#
+#   output HDMI-A-1 mode --custom 2560x1440@60Hz position 0,0 adaptive_sync on
+#   output DP-1 mode 3440x1440@144Hz pos 3440 0 adaptive_sync on
+#
+# @reference: man 5 sway-input
+# @reference: swaymsg -t get_inputs
+#
+# Example configuration:
+#
+#   input "2:14:SynPS/2_Synaptics_TouchPad" {
+#       dwt enabled
+#       tap enabled
+#       natural_scroll enabled
+#       middle_emulation enabled
+#   }
 include ~/.config/sway/config.d/*
 
-# launch session
+# start sway session in systemd to intialize services
 exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"

+ 56 - 0
install/etc/skel/.config/waybar/config

@@ -0,0 +1,56 @@
+    "height": 30,
+    "spacing": 4,
+    "modules-left": ["sway/workspaces", "sway/mode"],
+    "sway/mode": {
+        "format": "<span style=\"italic\">{}</span>"
+    },
+
+    "modules-center": ["sway/window"],
+
+    "modules-right": ["tray", "cpu", "memory", "backlight", "battery", "pulseaudio", "network", "clock"],
+    "tray": {
+        "spacing": 10
+    },
+    "cpu": {
+        "format": "{usage}% 💻",
+        "tooltip": false
+    },
+    "memory": {
+        "format": "{}% "
+    },
+
+    "backlight": {
+        "format": "{percent}% {icon}",
+        "format-icons": ["", ""]
+    },
+    "battery": {
+        "states": {
+            "warning": 30,
+            "critical": 15
+        },
+        "format": "{icon}: {time} ({capacity}%)",
+        "format-charging": "{icon}: {time} ({capacity}% charging)",
+        "format-plugged": "{icon}: {time} ({capacity}% plugged)",
+        "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"]
+    },
+
+    "pulseaudio": {
+        "format": "{volume}% {icon} {format_source}",
+        "format-bluetooth": "{volume}% {icon} {format_source}",
+        "format-source": "{volume}% ",
+        "format-source-muted": "",
+        "format-icons": {
+            "default": ["", "", ""]
+        },
+        "on-click": "pavucontrol"
+    },
+    "network": {
+        "format": "{ipaddr}/{cidr}",
+        "tooltip-format": "{ifname} via {gwaddr}",
+        "format-disconnected": "Disconnected ⚠",
+    },
+    "clock": {
+        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+        "format": "{:%Y-%m-%d %H:%M}"
+    },
+}

+ 254 - 0
install/etc/skel/.config/waybar/style.css

@@ -0,0 +1,254 @@
+* {
+    /* `otf-font-awesome` is required to be installed for icons */
+    font-family: 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;
+}
+
+#workspaces button {
+    padding: 0 5px;
+    background-color: transparent;
+    color: #ffffff;
+    /* Use box-shadow instead of border so the text isn't offset */
+    box-shadow: inset 0 -3px transparent;
+    /* Avoid rounded borders under each workspace name */
+    border: none;
+    border-radius: 0;
+}
+
+/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
+#workspaces button:hover {
+    background: rgba(0, 0, 0, 0.2);
+    box-shadow: inset 0 -3px #ffffff;
+}
+
+#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,
+#custom-media,
+#tray,
+#mode,
+#idle_inhibitor,
+#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;
+}
+
+#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);
+}

+ 12 - 3
install/etc/skel/.config/yt-dlp/config

@@ -1,4 +1,13 @@
-# set sane defaults to ensure video and audio work always
+# set sane defaults to ensure video and audio are saved as intended
 
--f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'
---audio-format=mp3
+# sane stream download setting
+--wait-for-video=1
+
+# optimal quality
+--audio-quality=0
+
+# save audio as opus and video as webm
+--prefer-free-formats
+-S ext:webm:webm
+--audio-format=opus
+--recode-video="opus>opus/webm"

+ 6 - 0
install/usr/local/bin/discord

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# because discord sucks and ignores configs
+# and when launched through wofi ignores aliases
+
+/usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"

+ 2 - 0
install/usr/local/bin/mhrise

@@ -0,0 +1,2 @@
+#!/bin/bash
+steam steam://run/1446780

+ 43 - 0
notes/sway.md

@@ -0,0 +1,43 @@
+
+# sway
+
+This is the new window manager based on the Wayland protocol, which is being adopted by the linux community as a replacement to xorg.
+
+
+## notes
+
+Coming from xorg, sway treats each display/monitor separately, meaning they have their own independent workspace, and you cannot drag your mouse across them.  However, the same controls that allow you to re-arrange "containers" on a single monitor directly apply to the second.  **To summarize, no additional or different `bindsym` commands are needed for multi-monitor controls.**
+
+With `waybar` you can minify `corectrl` to the system tray by clicking its icon.  _It seems this package breaks often, so it may require the user to regularly rebuild._
+
+Screen sharing on discord is broken until the developers fix it or implement pipewire support.
+
+There is currently no support for restoring containers to their previous workspaces.  _This makes restarting significantly more messy, as launching a common utility like `firefox` or `subl` (sublime text), will open all containers in the current workspace, and you have to manually re-arrange them._
+
+The `~/.config/sway/config.d/` directory should be used to establish overrides such as custom resolutions, special enhancements, or specific monitor bindings:
+
+	# dual monitor configuration
+	output HDMI-A-1 mode --custom 2560x1440@60Hz position 0 0
+	output DP-1 mode 3440x1440@144Hz pos 3440 0 adaptive_sync on
+
+	# bind workspaces 9 and 10 to HDMI/HDTV
+	workspace 9 output HDMI-A-1
+	workspace 10 output HDMI-A-1
+
+	# bind workspaces 1-5 to DP
+	workspace 1 output DP-1
+	workspace 2 output DP-1
+	workspace 3 output DP-1
+	workspace 4 output DP-1
+	workspace 5 output DP-1
+
+
+
+---
+
+My config has a global push-to-talk setup, but the initiate mic state may not be muted so you'll want to trigger it once to start it and that should save the state on next reboot.
+
+There does not appear to be a way to add temperature support to `waybar`, since by default it reads the first `hwmon` resource, which is often unrelated or unimportant, and selecting the correct ones for CPU and GPU is entirely hardware dependent.  _It may be possible to write a script that generalizes running `sensors` and scanning for common or known driver names in order to grab the correct data._
+
+The scratchpad is a bit messy in that the "cycle" for pulling windows out involves show/hide/show/hide on repeat, rather than show to show to show swapping the pulled window instead.  _It may be possible to script this with `swaymsg` with an iterator._
+

+ 1 - 1
setup/install.sh

@@ -83,7 +83,7 @@ mkfs.btrfs -fLarch "/dev/${partitions[2]}"
 # enable and mount partitions with appropriate settings
 swapon "/dev/${partitions[1]}"
 export resume_uuid="$(lsblk -no UUID "/dev/${partitions[1]}")"
-mount -t btrfs -o "noatime,compress=lzo,autodefrag,ssd" "/dev/${partitions[2]}" /mnt
+mount -t btrfs -o "noatime,compress=lzo,autodefrag,ssd,space_cache=v2" "/dev/${partitions[2]}" /mnt
 mkdir /mnt/boot
 mount "/dev/${partitions[0]}" /mnt/boot
 

+ 158 - 45
todo.md

@@ -10,48 +10,161 @@ _Expect iterative changes over the following months while fine-tuning happens on
 
 Going directly to hardware trials because virtualbox support requires too much undesirable configuration:
 
-- Verify usespace systemd sway-session launch works as intended
-	- _does sway config loading from non-existing directory crash?_
-- Check all userspace service status to see if anything failed (eg. missing package(s) etc...)
-- Verify whether `~/.config/libfm` is valid, and it's not `~/.config/libfm-gtk3`?
-- Verify whether we can remove `pash` script in favor of hand-rolled commands
-	- _delete commented commands using old scripts_
-- Verify whether `playerctl` can replace `mpv-control`; does it work when on another workspace?
-	- _see if there is an option for inactive windows_
-	- _delete commented commands using old scripts_
-- Try hidpi setting (`output * scale 2`)
-	- Do all my key applications recognize it?
-		- pcmanfm
-		- mpv (???)
-		- firefox
-			- _does firefox look like absolute dogshit?_
-- Triple check client menu like my super+tab hotkey that let's you see a list of installed applications
-	- _I don't need this, but other users might..._
-- Experiment with left/right alignment keys like I had on my other desktop; and resize support
-	- _While I don't necessarily need complex splitting, I can at least try it and get some hotkeys setup for it_
-- Experiment with `Scratchpad` and a hotkye to establish a persistent terminal
-	- _It might be as simple as using a hotkey to send and retrieve from Scratchpad, which extends to all apps?_
-	- perhaps we can name the scratchpad to allow us to "reserve" one for a script to utilize...
-- Configure `waybar`
-	- _Improve visual aesthetic?_
-	- _Eliminate unused or undesired information; battery on desktop?_
-	- _Auto-hide it?_
-- add message to waybar and pactl for battery and volume control warnings
-- Investigate wofi theming (_Supposedly supports css, but can we import GTk theme?_)
-- research firefox auto-configuration _or_ copying configuration files (_eg. if plain text can add to dot-files_):
-	- https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig
-	- verify if it remembers workspaces when re-opened
-- install `cmst` from aur and try it out as an option for wifi support; if good add to my installation by default
-	- https://aur.archlinux.org/packages/cmst/
-- Multi-Monitor configuration/hotkeys
-	- supposedly each monitor is treated as a separate workspace, so this might work well
-		- https://www.reddit.com/r/swaywm/comments/gr7yvt/assigning_workspaces_to_specific_outputs/
-		- https://fedoramagazine.org/how-to-setup-multiple-monitors-in-sway/
-		- https://www.reddit.com/r/swaywm/comments/ftuiqa/is_it_possible_to_set_my_starting_workspace/
-- test/fix multimedia keys for volume change support (_may require actual hardware; would also consider popup icons?_)
-	- https://www.reddit.com/r/swaywm/comments/bwwxg0/xf86_audio_keys/
-- Run every single game in my library; make sure everything works
-- Verify whether we should keep `pash` or the simpler commands work?
-- Verify whether `adaptive_sync` on my DisplayPort monitor works!
-- [Verify whether this is needed](https://github.com/lyfeyaj/sublime-text-imfix)
-- [Firefox Test for video, mic, and screen sharing](https://mozilla.github.io/webrtc-landing/gum_test.html)
+
+---
+
+Consider modifying this line to stop the sway-session.target:
+
+	bindsym $mod+x exec swaymsg exit
+
+Like:
+
+	bindsym $mod+x exec "systemctl --user import-environment; systemctl --user stop sway-session.target; swaymsg exit"
+
+
+---
+
+When I eventually break down and buy elden ring, try these?
+
+	PROTON_NO_FSYNC=1 WINE_FULLSCREEN_FSR=1 mangohud gamemoderun %command%
+
+May need other steps for ultrawide support?
+
+https://github.com/gurrgur/er-patcher
+
+	./er-patcher -r 144 -uavc -- env <above command>
+
+
+---
+
+- move aur packages to install under the actual user and download to their src directory (for easier updates)
+- add these packages to the installation list:
+	- xpadneo-dkms
+	- cmst (sway/wayland friendly connman management)
+	- corectrl
+		- add `.service` to userspace systemd
+	- wev (_need to verify necessity?_)
+	- https://aur.archlinux.org/packages/mpv-mpris/
+- Change aur packages to install under the user being created instead of a temporary user
+	- _this will allow that user to find and update them more readily/easily_
+
+
+- investigate `poweralertd` and `batsignal` to setup low battery alerts with `mako`
+
+
+- create alacritty config copying from former xdefaults
+	- https://sunnnychan.github.io/cheatsheet/linux/config/alacritty.yml.html
+	- _transparency is a great start, but we're not done!_
+
+
+---
+
+- continue to refine `notes/sway.md` to account for the lack of obvious world-knowledge
+
+- Test SteamVR
+	- Setup two new base stations for 4-station setup
+	- Reconfigure steam vr utils software
+		- Make sure all 4 base stations connect
+		- Make sure all 4 base stations shutdown
+		- Make sure audio transitions to and from
+	- try Beat Saber
+	- try No Man's Sky
+
+
+---
+
+- write a script to grab temperatures to replace the temperature module in waybar with custom commands...
+	- _this is because configuring temperatures is hardware dependent and the waybar has unintelligent defaults and anti-agnostic configuration!_
+
+Example that matters?
+
+for amd cpu: `k10temp` followed by `tctl`
+for intel cpu: `coretemp` followed by `package id 0`
+for amd gpu `amdgpu` followed by `edge`
+
+for nvidia we need to use `nvidia-smi` and parse that instead, but that also means if `nvidia-smi` does not exist we have to back out!
+
+_For this we will want to have an `exec-if` that checks for results
+_There may be cases where there is no GPU, so when no sensors appear can we have the custom module omitted?_
+
+For gpu temperatures:
+
+- `amdgpu`, followed by `edge`
+
+_This may not exist for laptops, may differ for nvidia, and may also differ depending on the driver._
+
+Samples:
+
+	"custom/cputemp": {
+		"format": "{}°C",
+		"interval": "3",
+		"exec": "/usr/local/bin/temps cpu",
+		"exec-if": "/usr/local/bin/temps cpu can"
+	}
+	"custom/gputemp": {
+		"format": "GPU: {}°C",
+		"interval": "3",
+		"exec": "/usr/local/bin/temps gpu",
+		"exec-if": "/usr/local/bin/temps gpu can"
+	}
+
+
+---
+
+- test writing a script to iterate scratchpad items
+	- need to be able to get a list
+	- need that list to be reliably ordered
+		- _or need to impose an order_
+	- can potentially replace `scratchpad show` with `exec`
+
+New `/usr/local/bin/alacrittyq` with `$mod+tilde` toggle:
+
+	#!/bin/bash
+
+	# @todo: query swaymsg get_tree for alacrittyq
+	# if not exists launch
+	# if exists
+	# if hidden in scratchpad show
+	# if shown hide in scratchpad
+	alacritty --class "alacrittyq"
+
+- investigate dedicated identity for an alacritty window to selectively target for scratchpad persistent terminal via mod+tilde
+
+
+---
+
+- It may be possible to write an IPC connected utility to save and restore workspaces
+	- _this tool would need to know when to save, and to intelligently restore only once when applications are first launched._
+	- It would need to have a way to pull wayland equivalents for the content mentioned in this issue:
+		- https://github.com/swaywm/sway/issues/1005
+
+
+---
+
+- test hidpi configuration
+	- `output * scale 2`
+	- also targeted output scaling for HDTV but not ultrawide
+- Verify hidpi behavior of applications is not poor:
+	- firefox (many different websites?)
+	- mpv
+	- pcmanfm
+	- steam
+	- discord
+- _Remember to take some screenshots before and after to indicate visible changes?_
+
+
+---
+
+- investigate firefox configuration
+	- [auto-configuration?](https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig)
+	- add mimetypes to bypass godawful save dialog (eg. hanlders.json in `~/.mozilla`, but unique profile path?)
+	- how to make it remember workspaces when restoring tabs (_probably not possible, so using tab manager addon_)
+
+
+---
+
+- utilize my old rig to cleanup and organize my data across my old HDD's
+	- _transfer `views/` ASAP..._
+	- uninstall all games and other content taking up space
+	- disable transmission so I can avoid accidentally increasing the files on this disk
+	- this includes sorting what is on `data/`, the other 2TB disk