diff --git a/apps/de/sway/config b/apps/de/sway/config index 0d84237..f3f6ea7 100644 --- a/apps/de/sway/config +++ b/apps/de/sway/config @@ -4,6 +4,7 @@ # + Super+Control+{1-9} should control the size of the preselect space. # + Super+Shift+b should balance the size of all selected nodes. +set $dfpbin $HOME/.config/dotfiles/bin set $mod Mod4 set $default_gap 0 @@ -33,17 +34,17 @@ input type:touchpad { bindsym $mod+control+space exec makoctl dismiss bindsym $mod+shift+space exec makoctl invoke bindsym $mod+return exec kitty -bindsym $mod+shift+return exec floating-term +bindsym $mod+shift+return exec $dfpbin/floating-term bindsym $mod+t exec kitty bindsym $mod+shift+alt+return exec kitty bindsym $mod+c kill bindsym $mod+shift+c kill # TODO: kill -9? -bindsym $mod+space exec app-launcher +bindsym $mod+space exec $dfpbin/app-launcher bindsym $mod+e exec thunar bindsym $mod+shift+r reload bindsym $mod+control+Escape exit bindsym $mod+shift+e exit -bindsym $mod+shift+p exec pass-chooser +bindsym $mod+shift+p exec $dfpbin/pass-chooser bindsym $mod+control+j split v bindsym $mod+control+l split h bindsym $mod+control+f focus mode_toggle diff --git a/apps/kanshi/config b/apps/kanshi/config index 3a2b97e..31f264f 100644 --- a/apps/kanshi/config +++ b/apps/kanshi/config @@ -4,3 +4,7 @@ profile desktop-H { output "Dell Inc. DELL U2719DC 9DL4QS2" enable mode 2560x1440@60Hz position 4880,0 scale 1 transform 270 exec "$HOME/.config/dotfiles/apps/kanshi/desktop-H-workspaces.sh" } + +profile laptop-solo { + output "Sharp Corporation 0x144A 0x00000000" enable mode 3200x1800@60Hz position 0,0 scale 2 transform normal +} diff --git a/bin/lib/sudo_setup b/bin/lib/sudo_setup index f730ba0..5742020 100755 --- a/bin/lib/sudo_setup +++ b/bin/lib/sudo_setup @@ -9,12 +9,11 @@ fi dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../../" && pwd) source "${dfp}/bin/lib/setup_helpers.bash" -cp "$dfp/apps/de/sway/dm-entry" "/usr/share/wayland-sessions/lsway.desktop" +# cp "$dfp/apps/de/sway/dm-entry" "/usr/share/wayland-sessions/lsway.desktop" links=( # display manager files "apps/de/sway/init" "/usr/bin/sway-lytedev" - "apps/de/sway/dm-entry" "/usr/share/wayland-sessions/sway-lytedev.desktop" # udev rules # TODO: how does this work in nix? diff --git a/bin/lyte-nixos-cleanup b/bin/lyte-nixos-cleanup new file mode 100755 index 0000000..5fc33cb --- /dev/null +++ b/bin/lyte-nixos-cleanup @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# TODO: use nix-shell because it's cool? +nix-collect-garbage -d diff --git a/bin/upload b/bin/upload index 00970aa..afc679a 100755 --- a/bin/upload +++ b/bin/upload @@ -7,7 +7,7 @@ HOST="faceless" f="${1}" fname="${2:-$(basename "${f}")}" subdir="${3:-uploads}" -internal_dir="/home/daniel/files/${subdir}" +internal_dir="/home/daniel/public-static-files/${subdir}" url="https://files.lyte.dev/${subdir}/${fname}" [ "${f}" = "" ] && echo "No file provided. Exiting." >&2 && exit 2 diff --git a/bin/vdiff b/bin/vdiff deleted file mode 100755 index 14c24ca..0000000 --- a/bin/vdiff +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -repo_root="$(git rev-parse --show-toplevel)" -if ! pushd "$repo_root" &> /dev/null; then - echo "Repo doesn't exist!" - exit 2 -fi -td="$(mktemp -d "vdiff.XXXXXXXX")" -trap 'rm -rf '"$td" EXIT -files="$(git diff --name-only "$@")" - -args=() -vcmd="" -for f in $files; do - d="$(dirname "$td/$f")" - rfn="$(basename "$f")" - fn="$rfn._@HEAD" - cfn="$rfn" - - mkdir -p "$d" - # TODO: show at ref if provided - git --no-pager show HEAD:"$f" > "$d/$fn" 2>/dev/null || \ - echo "" > "$d/$fn" - cp "$f" "$d/$cfn" 2>/dev/null || echo "" > "$d/$cfn" - - if [ -z "${args[0]}" ]; then - args+=("$d/$fn -c") - vcmd="vert diffsplit $d/$cfn" - else - vcmd="$vcmd | tabnew | e $d/$fn | vert diffsplit $d/$cfn" - fi -done - -remaps="nnoremap k :tabnext | nnoremap j :tabprev" -nvim "${args[@]}" "$vcmd | tabnext | $remaps" - -if ! popd &> /dev/null; then - echo "Could not return to original directory" - exit 4 -fi diff --git a/bin/wres1080 b/bin/wres1080 deleted file mode 100755 index 305ab62..0000000 --- a/bin/wres1080 +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -targetwidth="1920" -targetheight="1080" -dimensions="$(bspc query -T -n | jq '.client.tiledRectangle | .width, .height')" -width=$(echo "$dimensions" | head -n 1) -height=$(echo "$dimensions" | tail -n 1) -diffwidth=$((targetwidth - width)) -diffheight=$((targetheight - height)) -# bspc node -d -echo "width: ${width}, height ${height}, dw ${diffwidth}, dh ${diffheight}" -bspc node focused --resize bottom_right "$diffwidth" "$diffheight" diff --git a/bin/wsteam b/bin/wsteam deleted file mode 100755 index da57a81..0000000 --- a/bin/wsteam +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash - -WIN_STEAM="/storage/network/public/Games/wine/Program Files (x86)/Steam/Steam.exe" -wine "$WIN_STEAM" -no-dwrite diff --git a/env/nix/machines/third.nix b/env/nix/machines/third.nix index cb945a8..694f575 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -8,6 +8,7 @@ ../modules/bluetooth.nix ../modules/pulseaudio.nix ../modules/de/sway.nix + ../modules/de/gnome.nix ../modules/users/daniel.nix ../modules/users/valerie.nix ]; @@ -27,10 +28,6 @@ # TODO: setup caps-lock as Control/Escape? # console.font = "TER16x32"; - services.xserver.displayManager.lightdm.greeters.gtk.extraConfig = '' - xft-dpi=260 - ''; - swapDevices = [ { device = "/swapfile"; size = (1024*16); } ]; boot = { diff --git a/env/nix/modules/de/gnome.nix b/env/nix/modules/de/gnome.nix new file mode 100644 index 0000000..4fcb58a --- /dev/null +++ b/env/nix/modules/de/gnome.nix @@ -0,0 +1,26 @@ +{ config, pkgs, ... }: + +let + unstable = import { config = { allowUnfree = true; }; }; +in { + imports = [ ./graphics.nix ]; + programs = { + }; + services = { + pipewire.enable = true; + xserver = { + libinput = { + enable = true; + tapping = true; + naturalScrolling = true; + disableWhileTyping = false; + }; + }; + gnome3 = { + gnome-keyring.enable = true; + sushi.enable = true; + }; + }; + systemd.packages = with pkgs.gnome3; [ gnome-session gnome-shell]; + environment.systemPackages = with pkgs.gnome3; [ adwaita-icon-theme ]; +} diff --git a/env/nix/modules/de/graphics.nix b/env/nix/modules/de/graphics.nix index ca67c8b..2067b5b 100644 --- a/env/nix/modules/de/graphics.nix +++ b/env/nix/modules/de/graphics.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: { - imports = [ ../lightdm.nix ]; + imports = [ ../gdm.nix ]; fonts.fonts = with pkgs; [ iosevka ]; hardware.opengl = { enable = true; diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index bef89cd..2c2d381 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -39,11 +39,13 @@ in { }; services = { pipewire.enable = true; - xserver.libinput = { - enable = true; - tapping = true; - naturalScrolling = true; - disableWhileTyping = false; + xserver = { + libinput = { + enable = true; + tapping = true; + naturalScrolling = true; + disableWhileTyping = false; + }; }; }; xdg.portal = { diff --git a/env/nix/modules/gdm.nix b/env/nix/modules/gdm.nix new file mode 100644 index 0000000..f58becf --- /dev/null +++ b/env/nix/modules/gdm.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: { + # services.xserver.displayManager.defaultSession + services.xserver = { + enable = true; + displayManager = { + gdm = { + enable = true; + wayland = true; + }; + }; + }; +} diff --git a/env/nix/modules/neovim.nix b/env/nix/modules/neovim.nix index 37a8a8e..d81e4b3 100644 --- a/env/nix/modules/neovim.nix +++ b/env/nix/modules/neovim.nix @@ -10,7 +10,9 @@ in EDITOR = "nvim"; PAGER = "nvim"; VISUAL = "nvim"; - MANPAGER = "nvim +Man!"; + # we have to escape these doublequotes so that they work when NixOS + # injects them into the shell + MANPAGER = ''env MANWIDTH=\"\" nvim --cmd \"let g:prosession_on_startup=0\" +Man!''; MANWIDTH = "80"; }; shellAliases = aliases;