diff --git a/backgrounds/lambda-bg-bright.png b/backgrounds/lambda-bg-bright.png deleted file mode 100644 index cef3fb0..0000000 Binary files a/backgrounds/lambda-bg-bright.png and /dev/null differ diff --git a/backgrounds/lambda-bg-dark.png b/backgrounds/lambda-bg-dark.png deleted file mode 100644 index 6d7cadb..0000000 Binary files a/backgrounds/lambda-bg-dark.png and /dev/null differ diff --git a/alacritty-alacritty.toml b/config/alacritty-alacritty.toml similarity index 100% rename from alacritty-alacritty.toml rename to config/alacritty-alacritty.toml diff --git a/fish-config.fish b/config/fish-config.fish similarity index 80% rename from fish-config.fish rename to config/fish-config.fish index db63d07..d791313 100644 --- a/fish-config.fish +++ b/config/fish-config.fish @@ -1,5 +1,8 @@ if status is-interactive - # Commands to run in interactive sessions can go here + fortune -s | cowsay + echo + uptime | sed 's/^ //' + echo end set -x EDITOR hx diff --git a/helix-config.toml b/config/helix-config.toml similarity index 100% rename from helix-config.toml rename to config/helix-config.toml diff --git a/hypr-colors.conf b/config/hypr-colors.conf similarity index 100% rename from hypr-colors.conf rename to config/hypr-colors.conf diff --git a/hypr-hypridle.conf b/config/hypr-hypridle.conf similarity index 100% rename from hypr-hypridle.conf rename to config/hypr-hypridle.conf diff --git a/hypr-hyprland.conf b/config/hypr-hyprland.conf similarity index 96% rename from hypr-hyprland.conf rename to config/hypr-hyprland.conf index 4a08815..bc4e29b 100644 --- a/hypr-hyprland.conf +++ b/config/hypr-hyprland.conf @@ -26,22 +26,23 @@ monitor=,preferred,auto,auto # Set programs that you use $terminal = kitty -$fileManager = nautilus +$fileManager = dolphin $menu = wofi -S drun -i -I -s $HOME/.config/wofi/style.css exec-once = $HOME/.config/waybar/start.sh exec-once = hypridle exec-once = hyprpaper exec-once = copyq --start-server +exec-once = gnome-keyring-daemon --start --components=pkcs11,secrets,ssh exec-once = nm-applet exec-once = blueman-applet # Some default env vars. env = HYPRCURSOR_ENABLED,0 -env = XCURSOR_THEME,Bibata-Modern-Ice +env = XCURSOR_THEME,Adwaita env = XCURSOR_SIZE,24 -env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that +env = QT_QPA_PLATFORMTHEME,qt6ct # change to qt6ct if you have that # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { @@ -213,7 +214,6 @@ bind = $mainMod, mouse_up, workspace, e-1 bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow - bind = , XF86AudioRaiseVolume, exec, pactl -- set-sink-volume @DEFAULT_SINK@ +5% bind = , XF86AudioLowerVolume, exec, pactl -- set-sink-volume @DEFAULT_SINK@ -5% bind = , XF86AudioMute, exec, pactl -- set-sink-mute @DEFAULT_SINK@ toggle @@ -226,4 +226,4 @@ bind = , XF86MonBrightnessDown, exec, light -U 5 bind = CONTROL ALT SHIFT, H, exec, systemctl hibernate bind = CONTROL ALT SHIFT, S, exec, systemctl suspend -bind = , Print, exec, hyprshot -m region --clipboard-only +bind = , Print, exec, grim -g "$(slurp)" - | wl-copy diff --git a/hypr-hyprlock.conf b/config/hypr-hyprlock.conf similarity index 100% rename from hypr-hyprlock.conf rename to config/hypr-hyprlock.conf diff --git a/hypr-hyprpaper.conf b/config/hypr-hyprpaper.conf similarity index 100% rename from hypr-hyprpaper.conf rename to config/hypr-hyprpaper.conf diff --git a/hypr-lockbg.jpg b/config/hypr-lockbg.jpg similarity index 100% rename from hypr-lockbg.jpg rename to config/hypr-lockbg.jpg diff --git a/hypr-wallpaper.jpg b/config/hypr-wallpaper.jpg similarity index 100% rename from hypr-wallpaper.jpg rename to config/hypr-wallpaper.jpg diff --git a/kitty-kitty.conf b/config/kitty-kitty.conf similarity index 86% rename from kitty-kitty.conf rename to config/kitty-kitty.conf index 0fd3ac7..b4e2bd5 100644 --- a/kitty-kitty.conf +++ b/config/kitty-kitty.conf @@ -1,12 +1,13 @@ font_size 12 -font_family GoMono +font_family JetBrains Mono window_margin_width 0 background #131313 foreground #d6dae4 cursor #b9b9b9 -selection_background #1f1f1f +selection_background #d6dae4 +selection_foreground #131313 color0 #1f1f1f color8 #d6dae4 color1 #f71118 @@ -23,4 +24,3 @@ color6 #0f80d5 color14 #0f7cda color7 #d6dae4 color15 #ffffff -selection_foreground #131313 diff --git a/sway-clamshell.sh b/config/sway-clamshell.sh similarity index 100% rename from sway-clamshell.sh rename to config/sway-clamshell.sh diff --git a/sway-status.sh b/config/sway-status.sh similarity index 100% rename from sway-status.sh rename to config/sway-status.sh diff --git a/config/systemd-user-rclonesync.service b/config/systemd-user-rclonesync.service new file mode 100644 index 0000000..b6c07e6 --- /dev/null +++ b/config/systemd-user-rclonesync.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run rclone bisync for sync folder +After=network.target + +[Service] +ExecStart=bash -c 'mkdir -p $HOME/sync && rclone bisync $HOME/sync drive1:backup/nx-data/2_sync --config $HOME/.config/rclone/rclone.conf --resync --force' +Type=oneshot +RemainAfterExit=true + +[Install] +WantedBy=default.target diff --git a/config/systemd-user-rclonesync.timer b/config/systemd-user-rclonesync.timer new file mode 100644 index 0000000..6692a2e --- /dev/null +++ b/config/systemd-user-rclonesync.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run rclone bisync for sync folder every 15 minutes + +[Timer] +OnBootSec=10min +OnUnitActiveSec=15min +Unit=rclonesync.service + +[Install] +WantedBy=timers.target diff --git a/config/systemd-user-sshagent.service b/config/systemd-user-sshagent.service new file mode 100644 index 0000000..9428410 --- /dev/null +++ b/config/systemd-user-sshagent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target diff --git a/tmux-tmux.conf b/config/tmux-tmux.conf similarity index 100% rename from tmux-tmux.conf rename to config/tmux-tmux.conf diff --git a/waybar-battery.sh b/config/waybar-battery.sh similarity index 100% rename from waybar-battery.sh rename to config/waybar-battery.sh diff --git a/waybar-brightness.sh b/config/waybar-brightness.sh similarity index 100% rename from waybar-brightness.sh rename to config/waybar-brightness.sh diff --git a/waybar-cpu.sh b/config/waybar-cpu.sh similarity index 100% rename from waybar-cpu.sh rename to config/waybar-cpu.sh diff --git a/waybar-media.py b/config/waybar-media.py similarity index 100% rename from waybar-media.py rename to config/waybar-media.py diff --git a/waybar-ram.sh b/config/waybar-ram.sh similarity index 100% rename from waybar-ram.sh rename to config/waybar-ram.sh diff --git a/waybar-start.sh b/config/waybar-start.sh similarity index 100% rename from waybar-start.sh rename to config/waybar-start.sh diff --git a/waybar-style.css b/config/waybar-style.css similarity index 100% rename from waybar-style.css rename to config/waybar-style.css diff --git a/wofi-style.css b/config/wofi-style.css similarity index 100% rename from wofi-style.css rename to config/wofi-style.css diff --git a/install b/install index e55e902..6f7e079 100755 --- a/install +++ b/install @@ -1,14 +1,13 @@ #!/usr/bin/env bash -DIR="$(dirname $(realpath "$0"))" -cd "$DIR" +cd "$(dirname $(realpath "$0"))" # install config files -for filename in $(ls -p | grep -v "install" | grep -v "/" | grep -v "README.md"); do - app=$(echo $filename | tr "-" "\n" | head -1) - appdir="$HOME/.config/$app" - mkdir -p $appdir - cp $filename "$appdir/${filename:${#app}+1:200}" +for filename in $(ls -p config); do + subpath="${filename//-//}" + filepath="$HOME/.config/$subpath" + mkdir -p "$(dirname $filepath)" + cp "config/$filename" "$filepath" done # install backrounds @@ -29,4 +28,16 @@ if [[ ! -e "$HOME/.local/bin/rickroll" ]]; then chmod +x "$HOME/.local/bin/rickroll" fi +if command -v gsettings &> /dev/null; then + gsettings set org.gnome.desktop.interface gtk-theme Adwaita + gsettings set org.gnome.desktop.interface icon-theme Adwaita + gsettings set org.gnome.desktop.interface cursor-theme Adwaita +fi +systemctl enable --now --user sshagent.service &> /dev/null + +systemctl enable --user rclonesync.service &> /dev/null +systemctl enable --now --user rclonesync.timer &> /dev/null +if [[ ! -e "$HOME/.config/rclone/rclone.conf" ]]; then + echo "WARN: ~/.config/rclone/rclone.conf missing" +fi diff --git a/setup b/setup new file mode 100755 index 0000000..4329750 --- /dev/null +++ b/setup @@ -0,0 +1,134 @@ +#!/usr/bin/env bash + +DIR="$(dirname $(realpath "$0"))" +cd "$DIR" + +if [[ ! -f /etc/os-release ]]; then + echo "Could not determine distribution; exiting..." + exit 1 +fi + +. /etc/os-release +distro=${NAME,,} + +if [[ $distro == "arch linux" ]]; then + pacman=( + # services + "networkmanager" + "bluez" "bluez-libs" + "pipewire" "pipewire-alsa" "pipewire-pulse" "pipewire-audio" "pipewire-jack" "wireplumber" + + # Hyprland core + "hyprland" "hypridle" "hyprpaper" "hyprlock" + "hyprpolkitagent" "hyprutils" "hyprland-qtutils" + "xdg-desktop-portal-hyprland" "xdg-desktop-portal-gtk" + # Hyprland extra + "qt6ct" "gnome-keyring" + "waybar" "dunst" "wofi" "wl-clipboard" "copyq" "grim" "slurp" + "adwaita-icon-theme" "adwaita-cursors" "dolphin" + "network-manager-applet" "blueman" + "playerctl" "pavucontrol" + "upower" + + # terminal + "kitty" "fish" "ranger" "htop" "tmux" "psmisc" + + # misc + "wget" "curl" "git" "entr" "zip" "base-devel" + "ninja" "make" "cmake" + "neofetch" "fortune-mod" "cowsay" + + # languages + "python" "php" "go" "clang" + + # editors + "nano" "vim" "helix" + + # network drives + "rclone" "cifs-utils" + + # container + "podman" "podman-compose" "podman-docker" "distrobox" + + # VMs + "virtualbox" "virtualbox-host-modules-arch" "linux-headers" + + # fonts + "adwaita-fonts" + "ttf-jetbrains-mono" "ttf-jetbrains-mono-nerd" + "noto-fonts" "noto-fonts-emoji" "noto-fonts-cjk" + + # flatpak + "flatpak" "libportal" + + # apps + "keepassxc" "remmina" + ) + + yay=( + "light" + "snapd" + "brave-bin" + ) + + systemd=( + "snapd.socket" + "snapd.apparmor.service" + "NetworkManager.service" + "bluetooth.service" + ) + + snap_classic=( + "code" + "flutter" + "android-studio" + ) + + flatpak=( + "org.signal.Signal" + "com.spotify.Client" + "net.ankiweb.Anki" + "org.gimp.GIMP" + "org.inkscape.Inkscape" + "org.onlyoffice.desktopeditors" + "com.github.xournalpp.xournalpp" + "net.nokyan.Resources" + "org.gnome.Loupe" + "org.gnome.Evince" + ) + + sudo pacman -Syu --noconfirm + sudo pacman --noconfirm --needed -S "${pacman[@]}" + + sudo ln -s "$(which helix)" /usr/local/bin/hx + + if ! command -v yay &> /dev/null; then + git clone https://aur.archlinux.org/yay.git /tmp/yay + cd /tmp/yay && makepkg -si --noconfirm + yay -Sy --noconfirm + cd "$DIR" + fi + + yay --noconfirm --needed -S "${yay[@]}" + + sudo ln -s /var/lib/snapd/snap /snap + + for item in "${systemd[@]}"; do + sudo systemctl enable --now $item + done + + while ! sudo snap refresh; do sleep 1; done + + sudo snap install "${snap_classic[@]}" --classic + + flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + flatpak install -y "${flatpak[@]}" +else + echo "Unknown distribution '$distro'; exiting..." + exit 1 +fi + +"$DIR/install" + +echo "-" +echo "Done!"