format stuff, switch back to brightnessctl, no more universal shell stuff, fix various things

This commit is contained in:
askiiart 2024-04-20 20:33:35 -05:00
parent 4bbfa111d5
commit ab89154611
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30
17 changed files with 108 additions and 41 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
**/fishd.tmp*
vesktop/state.json
fish/fish_variables

View file

@ -7,10 +7,10 @@ GIT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
# gnome-keyring is for VS Code
yay -S gnome-keyring lxqt-policykit --noconfirm --needed
yay -S waybar j4-dmenu-desktop swaylock swaybg swaync clipman --noconfirm --needed
yay -S waybar rofi swaylock swaybg swaync clipman wdisplays kanshi --noconfirm --needed
yay -S pipewire-pulse pavucontrol blueman bluetooth-support qpwgraph --noconfirm --needed
yay -S brightnessctl --noconfirm --needed
yay -S eog nemo gnome-calculator --noconfirm --needed
yay -S brightnessctl wl-clipboard --noconfirm --needed
yay -S eom nemo gnome-calculator gedit wireguard-tools iperf3 zstd network-manager-applet --noconfirm --needed
# for screenshots and color picker
yay -S slurp grim zenity imagemagick --noconfirm --needed

View file

@ -10,7 +10,6 @@ if command_exists "nixos-rebuild"; then
rm $GIT_DIR/fish/config.fish
mv $GIT_DIR/fish/config.fish.backup $GIT_DIR/fish/config.fish
fi
mv $GIT_DIR/fish/conf.d/universal.fish $GIT_DIR/universal-shellrc.txt
# kitty
rm -rf $GIT_DIR/kitty
@ -38,10 +37,17 @@ rm -f $GIT_DIR/vesktop/Singleton*
# VS code
rm -rf $GIT_DIR/vscode
mkdir $GIT_DIR/vscode
code --list-extensions >$GIT_DIR/vscode/extensions.txt
cp $HOME/.config/Code/User/keybindings.json $GIT_DIR/vscode/keybindings.json
cp $HOME/.config/Code/User/settings.json $GIT_DIR/vscode/settings.json
cp $HOME/.vscode/argv.json $GIT_DIR/vscode/argv.json
if command_exists "code"; then
code --list-extensions >$GIT_DIR/vscode/extensions.txt
cp $HOME/.config/Code/User/keybindings.json $GIT_DIR/vscode/keybindings.json
cp $HOME/.config/Code/User/settings.json $GIT_DIR/vscode/settings.json
cp $HOME/.vscode/argv.json $GIT_DIR/vscode/argv.json
elif command_exists "code-oss"; then
code-oss --list-extensions >$GIT_DIR/vscode/extensions.txt
cp $HOME/.config/Code/User/keybindings.json $GIT_DIR/vscode/keybindings.json
cp $HOME/.config/Code/User/settings.json $GIT_DIR/vscode/settings.json
cp $HOME/.vscode-oss/argv.json $GIT_DIR/vscode/argv.json
fi
# i3
rm -rf $GIT_DIR/i3
@ -53,8 +59,8 @@ cp -r $HOME/.config/sway/ .
# greetd (for sway)
if [ -d /etc/greetd ]; then
rm $GIT_DIR/greetd/config.toml
cp /etc/greetd/config.toml $GIT_DIR/greetd/
rm -rf $GIT_DIR/greetd/
cp -r /etc/greetd/ $GIT_DIR/
fi
# Claws Mail configs
@ -84,3 +90,8 @@ cp -r $HOME/.config/fontconfig/conf.d/* $GIT_DIR/fontconfig/
rm -rf $GIT_DIR/waybar/
mkdir $GIT_DIR/waybar/
cp -r $HOME/.config/waybar/* $GIT_DIR/waybar/
# sway runner
# TODO: make this work on nix stuff
cp /usr/bin/sway-runner $GIT_DIR/
sudo chown $(whoami) sway-runner

View file

@ -1,7 +1,10 @@
#!/usr/bin/env bash
set -e
GIT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
(crontab -l 2>/dev/null; echo "* * * * * $GIT_DIR/commit.sh") | crontab -
(
crontab -l 2>/dev/null
echo "* * * * * $GIT_DIR/commit.sh"
) | crontab -
############################################################################
# NOTE: commit signing must be turned off, or not require any interaction. #

View file

@ -6,7 +6,7 @@ if [ $(whoami) == "root" ]; then
fi
GIT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
sudo dnf install clipman swaybg swaylock slurp grim zenity wdisplays eom nemo pavucontrol light gnome-calculator wl-clipboard gedit kanshi wireguard-tools iperf3 zstd network-manager-applet -y
sudo dnf install clipman swaybg swaylock slurp grim zenity wdisplays eom nemo pavucontrol brightnessctl gnome-calculator wl-clipboard gedit kanshi wireguard-tools iperf3 zstd network-manager-applet -y
sudo usermod -aG input $(whoami) # so that waybar's keyboard-state works
sudo dnf copr enable erikreider/SwayNotificationCenter
sudo dnf install SwayNotificationCenter
@ -22,8 +22,6 @@ rm -rf grub/
echo 'GRUB_THEME=/usr/share/grub/themes/catppuccin-mocha-grub-theme/theme.txt' | sudo tee /etc/default/grub
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# greetd
#sudo dnf install tuigreet -y
#sudo cp $GIT_DIR/greetd/config.toml /etc/greetd/config.toml

View file

@ -17,17 +17,20 @@ alias pwease="please"
alias pls="please"
# kitty stuff
alias icat="kitten icat"
alias s="kitten ssh"
if [ $TERM = "xterm-kitty" ]
alias icat="kitten icat"
alias s="kitten ssh"
end
# NixOS
alias nrs="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild switch --upgrade-all"
alias nrb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild build --upgrade-all"
alias nrs-rb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild switch --upgrade-all --rollback"
alias nrb-rb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild build --upgrade-all --rollback"
alias hms="NIXPKGS_ALLOW_INSECURE=1 home-manager switch"
alias hmb="NIXPKGS_ALLOW_INSECURE=1 home-manager build"
if type -q nixos-rebuild
alias nrs="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild switch --upgrade-all"
alias nrb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild build --upgrade-all"
alias nrs-rb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild switch --upgrade-all --rollback"
alias nrb-rb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild build --upgrade-all --rollback"
alias hms="NIXPKGS_ALLOW_INSECURE=1 home-manager switch"
alias hmb="NIXPKGS_ALLOW_INSECURE=1 home-manager build"
end
# git

View file

@ -14,4 +14,12 @@ if status is-interactive
set -x NIXPKGS_ALLOW_UNFREE 1
set -x NIXPKGS_ALLOW_INSECURE 1
set -x GTK_THEME Catppuccin-Mocha-Standard-Mauve-Dark
# XDG variables
set -x XDG_DATA_HOME ~/.local/share
set -x XDG_CONFIG_HOME ~/.config
set -x XDG_STATE_HOME ~/.local/state
if not [ -d /tmp/$UID-runtime-dir ]
mkdir /tmp/$UID-runtime-dir
end
set -x XDG_RUNTIME_DIR /tmp/runtime-dir
end

View file

@ -8,9 +8,9 @@ vt = 1
# `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh`
# with whatever you want started, such as `sway`.
command = "tuigreet --cmd sway"
command = "sway-runner --config=/etc/greetd/sway-config"
# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "greetd"
user = "_greeter"

2
greetd/sway-config Normal file
View file

@ -0,0 +1,2 @@
exec "gtkgreet -l; swaymsg exit"
include /etc/sway/config.d/*

View file

@ -14,7 +14,6 @@ if command_exists "nixos-rebuild"; then
else
cp -r $GIT_DIR/fish/ $HOME/.config/
fi
cp $GIT_DIR/universal-shellrc.txt $HOME/.config/fish/conf.d/universal.fish
fish -c 'fisher update'
fish -c "tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Vertical --powerline_prompt_heads=Sharp --powerline_prompt_tails=Flat --powerline_prompt_style='One line' --prompt_spacing=Compact --icons='Many icons' --transient=No"
@ -101,7 +100,17 @@ mkdir -p $HOME/.config/Code/User/
mkdir -p $HOME/.vscode/
cp $GIT_DIR/vscode/keybindings.json $HOME/.config/Code/User/
cp $GIT_DIR/vscode/settings.json $HOME/.config/Code/User/
for ext in $(cat $GIT_DIR/vscode/extensions.txt); do code --install-extension $ext; done
cp $GIT_DIR/vscode/argv.json $HOME/.vscode/argv.json
if command_exists "code"; then
for ext in $(cat $GIT_DIR/vscode/extensions.txt); do code --install-extension $ext; done
cp $GIT_DIR/vscode/argv.json $HOME/.vscode/argv.json
elif command_exists "code-oss"; then
for ext in $(cat $GIT_DIR/vscode/extensions.txt); do code-oss --install-extension $ext; done
cp $GIT_DIR/vscode/argv.json $HOME/.vscode-oss/argv.json
fi
echo "restore.sh done!"
# sway-runner
# TODO: make this work on nix too
sudo cp $GIT_DIR/sway-runner /usr/bin/sway-runner
sudo chown root /usr/bin/sway-runner

7
sway-runner Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
if ! [ -d /tmp/$UID-runtime-dir ]; then
mkdir /tmp/$UID-runtime-dir
fi
export XDG_RUNTIME_DIR=/tmp/$UID-runtime-dir
sway $@

View file

@ -32,7 +32,7 @@ mode "$mode_system" {
bindsym l exec --no-startup-id $lockwall, mode "default"
bindsym e exec --no-startup-id swaymsg exit, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym s exec --no-startup-id systemctl poweroff -i, mode "default"
bindsym s exec --no-startup-id systemctl shutdown, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"

View file

@ -59,10 +59,10 @@ for_window [title="Authentication Required" app_id="lxqt-policykit-agent"] float
bindsym Scroll_Lock exec --no-startup-id $lockwall, mode "default"
# Adjust screen brightness with keys
bindsym Mod4+Mod1+Up exec "light -A 10%"
bindsym Mod4+Mod1+Down exec "light -U 10%"
bindsym Mod4+Mod1+Shift+Up exec "light -A 1%"
bindsym Mod4+Mod1+Shift+Down exec "light -U 1%"
bindsym Mod4+Mod1+Up exec "brightnessctl 10%+"
bindsym Mod4+Mod1+Down exec "brightnessctl 10%-"
bindsym Mod4+Mod1+Shift+Up exec "brightnessctl 1&+"
bindsym Mod4+Mod1+Shift+Down exec "brightnessctl 1%-"
# Adjust volume with keys
bindsym XF86AudioMute exec "pactl set-sink-mute @DEFAULT_SINK@ toggle"
@ -70,3 +70,6 @@ bindsym XF86AudioRaiseVolume exec "pactl set-sink-volume @DEFAULT_SINK@ +2%"
bindsym Mod4+Mod1+Right exec "pactl set-sink-volume @DEFAULT_SINK@ +2%"
bindsym XF86AudioLowerVolume exec "pactl set-sink-volume @DEFAULT_SINK@ -2%"
bindsym Mod4+Mod1+Left exec "pactl set-sink-volume @DEFAULT_SINK@ -2%"
# pipewire
exec "command_exists() { type '$1' &>/dev/null; }; if command_exists 'xbps-install'; then pipewire; fi"

View file

@ -4,8 +4,8 @@
"minimized": false,
"windowBounds": {
"x": 962,
"y": 56,
"y": 53,
"width": 956,
"height": 1142
"height": 1145
}
}

28
void-sway.sh Normal file → Executable file
View file

@ -6,11 +6,35 @@ if [ $(whoami) == "root" ]; then
fi
GIT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
sudo xbps-install clipman swaybg swaylock slurp grim zenity wdisplays eom nemo pavucontrol light gnome-calculator wl-clipboard gedit kanshi wireguard-tools network-manager-applet
sudo xbps-install sway Waybar rofi clipman swaybg swaylock slurp grim zenity wdisplays eom nemo pavucontrol brightnessctl gnome-calculator wl-clipboard gedit kanshi wireguard-tools network-manager-applet SwayNotificationCenter
git clone --depth=1 https://github.com/catppuccin/grub
sudo mkdir /usr/share/grub/themes/
sudo cp -r ./grub/src/* /usr/share/grub/themes/
rm -rf grub/
echo 'GRUB_THEME=/usr/share/grub/themes/catppuccin-mocha-grub-theme/theme.txt' | sudo tee /etc/default/grub
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo grub-mkconfig -o /boot/grub/grub.cfg
echo -e '#!/bin/sh\nfstrim /' | sudo tee /etc/cron.weekly/fstrim
sudo xbps-install dbus mesa mesa-intel-dri seatd greetd tuigreet
sudo ln -s /etc/sv/NetworkManager/ /var/service/
sudo ln -s /etc/sv/seatd/ /var/service/
sudo usermod -aG _seatd _greeter
sudo ln -s /etc/sv/greetd/ /var/service/
# pipewire setup
sudo xbps-install pipewire wireplumber pipewire-pulse
sudo usermod -aG audio $(whoami)
sudo usermod -aG video $(whoami)
sudo mkdir -p /etc/pipewire/pipewire.conf.d
sudo ln -s /usr/share/examples/wireplumber/10-wireplumber.conf /etc/pipewire/pipewire.conf.d/
sudo ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf /etc/pipewire/pipewire.conf.d/
# bluetooth setup
sudo xbps-install bluez bluez-alsa libspa-bluetooth alsa-pipewire
sudo ln -s /etc/sv/bluetoothd/ /var/service/
mkdir -p /etc/alsa/conf.d
sudo ln -s /usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d
sudo ln -s /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d
read -p "Set \`MultiProfile = multiple\` in /etc/bluetooth/main.conf" </dev/tty

View file

@ -16,6 +16,5 @@
// Unique id used for correlating crash reports sent from this instance.
// Do not edit this value.
"crash-reporter-id": "fe28ad25-80bb-4f0a-b499-0f873ab6dd78",
"password-store": "basic"
"crash-reporter-id": "39eeec78-4a15-47ce-8ee9-f7b4d0b931a6"
}

View file

@ -80,7 +80,6 @@ ms-vscode.makefile-tools
ms-vscode.remote-explorer
ms-vscode.remote-server
ms-vscode.vscode-serial-monitor
mwpb.java-prettier-formatter
nicscott.gitkraken-dark
nord.nord
novy.vsc-gcode