commit cc00398a113eadc5a9f2ae69874e6da882826886 Author: yourfriendoss <81387799+yourfriendoss@users.noreply.github.com> Date: Sat Oct 14 18:19:15 2023 +0300 first commit diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..253029a --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/.config/alacritty/catppuccin"] + path = src/.config/alacritty/catppuccin + url = https://github.com/catppuccin/alacritty.git diff --git a/apps.md b/apps.md new file mode 100644 index 0000000..553a465 --- /dev/null +++ b/apps.md @@ -0,0 +1,94 @@ +# initial commands (will be done by ansible) + +Make new user +``` +pacman -S sudo +useradd -mU yf +echo "yf ALL=(ALL:ALL) ALL" >> /etc/sudoers +passwd yf +su yf +``` + +Install yay +``` +sudo pacman -S git fakeroot make gcc +git clone https://aur.archlinux.org/yay.git +cd yay +makepkg -si +cd .. +rm -rf yay +``` + +Setup getty autologin +``` +mkdir /etc/systemd/system/getty@tty1.service.d + +cat <<- "EOF" > /etc/systemd/system/getty@tty1.service.d/skip-username.conf +[Service] +ExecStart= +ExecStart=-/sbin/agetty -o '-p -- yf' --noclear --skip-login - $TERM +Environment=XDG_SESSION_TYPE=wayland +EOF +``` + +Remove password +``` +sudo sed -i 's/yf:[^:]*/yf:/' /etc/shadow +``` + +Install stow +``` +yay -S stow +``` + +Install dotfiles +``` +git clone --recurse-submodules https://github.com/yourfriendoss/dots .shell +cd .shell +stow src +``` + +Automatically log into Hyprland +``` +cat <<- "EOF" > /home/yf/.bash_profile +if [[ "$(tty)" == "/dev/tty1" ]] +then +Hyprland +fi +EOF +``` + +# apps +Deps: `pkgconfig patch flex bison which` +1. Audio - `pipewire wireplumber pipewire-pulse pipewire-alsa pipewire-jack qpwgraph` (dots are not needed) +2. Wayland compositor - `hyprland xdg-desktop-portal-hyprland polkit-kde-agent` (.config/hypr) +3. Status bar - `waybar-hyprland-git` (.config/waybar) +4. Terminal - `alacritty` (dots are not needed) +5. Screenshotting - `wl-clipboard slurp grim` (dots are not needed) +6. Application picker - `rofi-lbonn-wayland` (.config/rofi) +7. Notifications - `mako` (.config/mako) +8. Background - `swww` (wallpaper.jpg) +**From now on, you can start Hyprland** +9. File manager - `thunar gvfs gvfs-smb` +10. Dropbox - `dropbox thunar-dropbox dropbox-cli` +``` +rm -rf ~/.dropbox-dist +install -dm0 ~/.dropbox-dist +``` +11. Music - `spotify spicetify-cli` +``` +curl -fsSL https://raw.githubusercontent.com/spicetify/spicetify-marketplace/main/resources/install.sh | sh +spicetify backup apply +``` +12. Fonts - `TBD` +13. Discord - `discord` +``` +sudo chown -R $USER:$USER /opt/discord +sh -c "$(curl -sS https://raw.githubusercontent.com/Vendicated/VencordInstaller/main/install.sh)" +``` +Install vencord, and then install openasar! +14. Browser - `vivaldi` +``` +(credit: Archwiki) +Go to chrome://flags page, then search wayland. You will see the Preferred Ozone platform setting. Set it to auto. The default one is "X11". "Auto" selects Wayland if possible, X11 otherwise. +``` diff --git a/install-arch.md b/install-arch.md new file mode 100644 index 0000000..65e7abb --- /dev/null +++ b/install-arch.md @@ -0,0 +1,48 @@ +# yourfriend's arch installscript + +This does not do the partitioning of your system. [Look at the example layouts](https://wiki.archlinux.org/title/Partitioning#Example_layouts) for Archlinux, and apply your changes with `cfdisk`. + +We are assuming you want to use BTRFS, NetworkManager, linux-zen, and UEFI/GPT. + +``` +# create filesystems +mkfs.fat -F 32 /dev/sda1 +fatlabel /dev/vda1 ESP +mkswap -L SWAP /dev/vda2 +mkfs.btrfs -L ROOT /dev/vda3 + +# enables swap, and mounts filesystems +swapon /dev/disk/by-label/SWAP +mount /dev/disk/by-label/ROOT /mnt +mkdir /mnt/boot +mkdir /mnt/boot/efi +mkdir /mnt/home +mount /dev/disk/by-label/ESP /mnt/boot/efi + +# generates minimum to chroot +pacstrap -K /mnt base linux-zen linux-firmware nano networkmanager grub efibootmgr btrfs-progs +genfstab -U /mnt >> /mnt/etc/fstab + +# chroot and setup time +arch-chroot /mnt +ln -sf /usr/share/zoneinfo/Europe/Riga /etc/localtime +hwclock --systohc + +# setup locale +sed -i "s/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.gen +sed -i "s/#lv_LV.UTF-8 UTF-8/lv_LV.UTF-8 UTF-8/" /etc/locale.gen +locale-gen +echo "LANG=en_US.UTF-8" > /etc/locale.conf + +# set hostname & setup grub +echo "my-system" > /etc/hostname +passwd +grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB +grub-mkconfig -o /boot/grub/grub.cfg + +# enable networkmanager +systemctl enable NetworkManager.service + + +# Finished! +``` \ No newline at end of file diff --git a/src/.config/alacritty/alacritty.yml b/src/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..c8b6add --- /dev/null +++ b/src/.config/alacritty/alacritty.yml @@ -0,0 +1,2 @@ +import: + - ~/.config/alacritty/catppuccin/catppuccin-macchiato.yml diff --git a/src/.config/alacritty/catppuccin b/src/.config/alacritty/catppuccin new file mode 160000 index 0000000..3c808cb --- /dev/null +++ b/src/.config/alacritty/catppuccin @@ -0,0 +1 @@ +Subproject commit 3c808cbb4f9c87be43ba5241bc57373c793d2f17 diff --git a/src/.config/hypr/hyprland.conf b/src/.config/hypr/hyprland.conf new file mode 100644 index 0000000..52ccd53 --- /dev/null +++ b/src/.config/hypr/hyprland.conf @@ -0,0 +1,143 @@ +source=~/.config/hypr/macchiato.conf + +# This is for my workstation. +# monitor=,highres,auto,auto is for my laptop. + +monitor=HDMI-A-1, 1920x1080@60, 0x0, 1 +monitor=DP-3, 1920x1080@60, 1920x0, 1 + +workspace=HDMI-A-1,1 +workspace=DP-3,5 + +monitor=,highres,auto,auto + +exec-once=/usr/lib/polkit-kde-authentication-agent-1 +exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once=~/.config/hypr/portal.sh +exec-once=swww init && swww img ~/wallpaper.jpg +exec-once=waybar +exec-once=mako +exec=~/.config/hypr/import-gsettings.sh + +env = XCURSOR_SIZE,24 + +input { + kb_layout = lv + kb_variant = + kb_model = + kb_options = compose:menu + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 +} + +general { + gaps_in = 0 + gaps_out = 0 + border_size = 3 + + col.active_border = $pink + col.inactive_border = $surface0 + + col.group_border_active=$flamingo + col.group_border=$surface0 + + layout = dwindle +} + +decoration { + rounding = 0 + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow=$surface0 + col.shadow_inactive=$surface0 +} + +animations { + enabled = false + + bezier = overshot, 0.05, 0.9, 0.1, 1.1 + + animation = windows, 1, 7, overshot + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + new_is_master = true +} + +gestures { + workspace_swipe = off +} + +misc { + disable_hyprland_logo = yes + disable_splash_rendering = yes +} + + +$mainMod = ALT + +bind = $mainMod, Q, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, Z, exec, alacritty --class floating +bind = $mainMod, E, exec, thunar +bind = $mainMod, V, togglefloating, +bind = $mainMod, D, exec, rofi -show drun +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle +bind = SHIFT_ALT,S, exec, grim -g "$(slurp)" - | wl-copy + +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# bind = $mainMod, mouse_down, workspace, e+1 +# bind = $mainMod, mouse_up, workspace, e-1 + +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +windowrulev2 = float, class:floating +windowrulev2 = size 800 800, class:winecfg.exe +windowrulev2 = fakefullscreen, class:^(code-url-handler)$ diff --git a/src/.config/hypr/import-gsettings.sh b/src/.config/hypr/import-gsettings.sh new file mode 100755 index 0000000..967620f --- /dev/null +++ b/src/.config/hypr/import-gsettings.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# usage: import-gsettings +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" diff --git a/src/.config/hypr/macchiato.conf b/src/.config/hypr/macchiato.conf new file mode 100644 index 0000000..91a88a1 --- /dev/null +++ b/src/.config/hypr/macchiato.conf @@ -0,0 +1,61 @@ +$rosewaterAlpha = f4dbd6 +$flamingoAlpha = f0c6c6 +$pinkAlpha = f5bde6 +$mauveAlpha = c6a0f6 +$redAlpha = ed8796 +$maroonAlpha = ee99a0 +$peachAlpha = f5a97f +$yellowAlpha = eed49f +$greenAlpha = a6da95 +$tealAlpha = 8bd5ca +$skyAlpha = 91d7e3 +$sapphireAlpha = 7dc4e4 +$blueAlpha = 8aadf4 +$lavenderAlpha = b7bdf8 + +$textAlpha = cad3f5 +$subtext1Alpha = b8c0e0 +$subtext0Alpha = a5adcb + +$overlay2Alpha = 939ab7 +$overlay1Alpha = 8087a2 +$overlay0Alpha = 6e738d + +$surface2Alpha = 5b6078 +$surface1Alpha = 494d64 +$surface0Alpha = 363a4f + +$baseAlpha = 24273a +$mantleAlpha = 1e2030 +$crustAlpha = 181926 + +$rosewater = 0xfff5e0dc +$flamingo = 0xfff2cdcd +$pink = 0xfff5c2e7 +$mauve = 0xffcba6f7 +$red = 0xfff38ba8 +$maroon = 0xffeba0ac +$peach = 0xfffab387 +$yellow = 0xfff9e2af +$green = 0xffa6e3a1 +$teal = 0xff94e2d5 +$sky = 0xff89dceb +$sapphire = 0xff74c7ec +$blue = 0xff89b4fa +$lavender = 0xffb4befe + +$text = 0xffcdd6f4 +$subtext1 = 0xffbac2de +$subtext0 = 0xffa6adc8 + +$overlay2 = 0xff9399b2 +$overlay1 = 0xff7f849c +$overlay0 = 0xff6c7086 + +$surface2 = 0xff585b70 +$surface1 = 0xff45475a +$surface0 = 0xff313244 + +$base = 0xff1e1e2e +$mantle = 0xff181825 +$crust = 0xff11111b diff --git a/src/.config/hypr/portal.sh b/src/.config/hypr/portal.sh new file mode 100755 index 0000000..8f692bf --- /dev/null +++ b/src/.config/hypr/portal.sh @@ -0,0 +1,8 @@ +#!/bin/bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/lib/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & diff --git a/src/.config/mako/config b/src/.config/mako/config new file mode 100644 index 0000000..d9aa325 --- /dev/null +++ b/src/.config/mako/config @@ -0,0 +1,2 @@ +background-color=#000000a6 +border-color=#000000eb diff --git a/src/.config/rofi/config.rasi b/src/.config/rofi/config.rasi new file mode 100644 index 0000000..df37abd --- /dev/null +++ b/src/.config/rofi/config.rasi @@ -0,0 +1,17 @@ +configuration{ + modi: "run,drun,window"; + icon-theme: "Oranchelo"; + show-icons: true; + terminal: "alacritty"; + drun-display-format: "{icon} {name}"; + location: 0; + disable-history: false; + hide-scrollbar: true; + display-drun: "  Apps "; + display-run: "  Run "; + display-window: " 﩯 Window"; + display-Network: " 󰤨 Network"; + sidebar-mode: true; +} + +@theme "catppuccin-mocha" \ No newline at end of file diff --git a/src/.config/waybar/config b/src/.config/waybar/config new file mode 100644 index 0000000..b86296a --- /dev/null +++ b/src/.config/waybar/config @@ -0,0 +1,46 @@ +{ + "layer": "top", + "height": 30, + "spacing": 4, + "modules-left": ["wlr/workspaces", "custom/media"], + "modules-right": [ + "pulseaudio", + "clock", + "tray" + ], + "wlr/workspaces": { + "format": "{icon}", + "on-scroll-up": "hyprctl dispatch workspace e+1", + "on-scroll-down": "hyprctl dispatch workspace e-1", + "on-click": "activate" + }, + "tray": { + "spacing": 10 + }, + "network": { + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + } + } +} + diff --git a/src/.config/waybar/macchiato.css b/src/.config/waybar/macchiato.css new file mode 100644 index 0000000..12bc89c --- /dev/null +++ b/src/.config/waybar/macchiato.css @@ -0,0 +1,37 @@ +/* +* +* Catppuccin Mocha palette +* Maintainer: rubyowo +* +*/ + +@define-color base #24273a; +@define-color mantle #1e2030; +@define-color crust #181926; + +@define-color text #cad3f5; +@define-color subtext0 #a5adcb; +@define-color subtext1 #b8c0e0; + +@define-color surface0 #363a4f; +@define-color surface1 #494d64; +@define-color surface2 #5b6078; + +@define-color overlay0 #6e738d; +@define-color overlay1 #8087a2; +@define-color overlay2 #939ab7; + +@define-color blue #8aadf4; +@define-color lavender #b7bdf8; +@define-color sapphire #7dc4e4; +@define-color sky #91d7e3; +@define-color teal #8bd5ca; +@define-color green #a6da95; +@define-color yellow #eed49f; +@define-color peach #f5a97f; +@define-color maroon #ee99a0; +@define-color red #ed8796; +@define-color mauve #c6a0f6; +@define-color pink #f5bde6; +@define-color flamingo #f0c6c6; +@define-color rosewater #f4dbd6; diff --git a/src/.config/waybar/style.css b/src/.config/waybar/style.css new file mode 100644 index 0000000..958b2e8 --- /dev/null +++ b/src/.config/waybar/style.css @@ -0,0 +1,32 @@ +@import "macchiato.css"; + +#waybar { + padding: 5px; + background-color: @surface0; + border-bottom: 1px solid @surface1; + color: @pink; +} + +#workspaces button { + border-radius: 0; + transition: 0.4s; + background-color: @surface1; +} + +#workspaces button.active { + background-color: @surface2; +} + +#workspaces button.urgent { + background-color: @red; +} + +#workspaces button:hover { + background-color: @rosewater; +} + +#clock, #pulseaudio, #tray { + background-color: @surface1; + padding: 0px 10px 0px 10px; + margin: 0px 3px 0px 3px; +} diff --git a/src/.local/share/rofi/themes/catppuccin-macchiato.rasi b/src/.local/share/rofi/themes/catppuccin-macchiato.rasi new file mode 100644 index 0000000..696d769 --- /dev/null +++ b/src/.local/share/rofi/themes/catppuccin-macchiato.rasi @@ -0,0 +1,111 @@ +* { + bg-col: #24273a; + bg-col-light: #24273a; + border-col: #24273a; + selected-col: #24273a; + blue: #8aadf4; + fg-col: #cad3f5; + fg-col2: #ed8796; + grey: #6e738d; + + width: 600; + font: "JetBrainsMono Nerd Font 14"; +} + +element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; +} + +window { + height: 360px; + border: 3px; + border-color: @border-col; + background-color: @bg-col; +} + +mainbox { + background-color: @bg-col; +} + +inputbar { + children: [prompt,entry]; + background-color: @bg-col; + border-radius: 5px; + padding: 2px; +} + +prompt { + background-color: @blue; + padding: 6px; + text-color: @bg-col; + border-radius: 3px; + margin: 20px 0px 0px 20px; +} + +textbox-prompt-colon { + expand: false; + str: ":"; +} + +entry { + padding: 6px; + margin: 20px 0px 0px 10px; + text-color: @fg-col; + background-color: @bg-col; +} + +listview { + border: 0px 0px 0px; + padding: 6px 0px 0px; + margin: 10px 0px 0px 20px; + columns: 2; + lines: 5; + background-color: @bg-col; +} + +element { + padding: 5px; + background-color: @bg-col; + text-color: @fg-col ; +} + +element-icon { + size: 25px; +} + +element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; +} + +mode-switcher { + spacing: 0; + } + +button { + padding: 10px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +button selected { + background-color: @bg-col; + text-color: @blue; +} + +message { + background-color: @bg-col-light; + margin: 2px; + padding: 2px; + border-radius: 5px; +} + +textbox { + padding: 6px; + margin: 20px 0px 0px 20px; + text-color: @blue; + background-color: @bg-col-light; +} diff --git a/src/wallpaper.jpg b/src/wallpaper.jpg new file mode 100644 index 0000000..fe3def5 Binary files /dev/null and b/src/wallpaper.jpg differ