More sway fixes for NixOS
This commit is contained in:
parent
e099b3269d
commit
c71ddb0e75
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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?
|
||||
|
|
4
bin/lyte-nixos-cleanup
Executable file
4
bin/lyte-nixos-cleanup
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: use nix-shell because it's cool?
|
||||
nix-collect-garbage -d
|
|
@ -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
|
||||
|
|
40
bin/vdiff
40
bin/vdiff
|
@ -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 "<FILE CREATED>" > "$d/$fn"
|
||||
cp "$f" "$d/$cfn" 2>/dev/null || echo "<FILE DELETED>" > "$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 <leader>k :tabnext<CR> | nnoremap <leader>j :tabprev<CR>"
|
||||
nvim "${args[@]}" "$vcmd | tabnext | $remaps"
|
||||
|
||||
if ! popd &> /dev/null; then
|
||||
echo "Could not return to original directory"
|
||||
exit 4
|
||||
fi
|
12
bin/wres1080
12
bin/wres1080
|
@ -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"
|
|
@ -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
|
5
env/nix/machines/third.nix
vendored
5
env/nix/machines/third.nix
vendored
|
@ -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 = {
|
||||
|
|
26
env/nix/modules/de/gnome.nix
vendored
Normal file
26
env/nix/modules/de/gnome.nix
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { 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 ];
|
||||
}
|
2
env/nix/modules/de/graphics.nix
vendored
2
env/nix/modules/de/graphics.nix
vendored
|
@ -1,5 +1,5 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ../lightdm.nix ];
|
||||
imports = [ ../gdm.nix ];
|
||||
fonts.fonts = with pkgs; [ iosevka ];
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
|
|
4
env/nix/modules/de/sway.nix
vendored
4
env/nix/modules/de/sway.nix
vendored
|
@ -39,13 +39,15 @@ in {
|
|||
};
|
||||
services = {
|
||||
pipewire.enable = true;
|
||||
xserver.libinput = {
|
||||
xserver = {
|
||||
libinput = {
|
||||
enable = true;
|
||||
tapping = true;
|
||||
naturalScrolling = true;
|
||||
disableWhileTyping = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
gtkUsePortal = true;
|
||||
|
|
12
env/nix/modules/gdm.nix
vendored
Normal file
12
env/nix/modules/gdm.nix
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }: {
|
||||
# services.xserver.displayManager.defaultSession
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
4
env/nix/modules/neovim.nix
vendored
4
env/nix/modules/neovim.nix
vendored
|
@ -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;
|
||||
|
|
Reference in a new issue