diff --git a/config/hypr/hypridle.conf b/config/hypr/hypridle.conf index 3b04bc8..c16eaad 100644 --- a/config/hypr/hypridle.conf +++ b/config/hypr/hypridle.conf @@ -10,7 +10,7 @@ listener { on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. } -listener { - timeout = 1800 # 30min - on-timeout = systemctl suspend # suspend pc -} +# listener { +# timeout = 1800 # 30min +# on-timeout = systemctl suspend # suspend pc +# } diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index ce56f4d..37f6508 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,15 +1,21 @@ ################ ### MONITORS ### ################ -monitor=,preferred,auto,auto +# monitor=,1920x1200,auto,auto +monitor=desc:Lenovo Group Limited P24h-10 0x01010101,2560x1440,auto,1 + +# xwayland { +# force_zero_scaling = true +# } +# env = GDK_SCALE,1.333333 +# env = XCURSOR_SIZE,49 ################### ### MY PROGRAMS ### ################### $terminal = kitty $fileManager = dolphin -$browser = brave -$menu = rofi -show drun +$browser = brave --new-window --hide-crash-restore-bubble ################# ### AUTOSTART ### @@ -22,9 +28,10 @@ exec-once = waybar exec-once = hypridle exec-once = /usr/local/bin/pypr --debug /tmp/pypr.log exec-once = systemctl --user start sunshine +exec-once = input-remapper-control --command autoload +exec-once = org.remmina.Remmina -i -exec-once = [workspace 1 silent] $terminal -exec-once = [workspace 2 silent] $browser +exec-once = [workspace 1] $terminal ############################# ### ENVIRONMENT VARIABLES ### @@ -117,8 +124,8 @@ misc { vfr = true vrr = 0 animate_manual_resizes = true - mouse_move_focuses_monitor = true - enable_swallow = true + mouse_move_focuses_monitor = false + enable_swallow = false swallow_regex = ^(wezterm)$ } @@ -131,10 +138,9 @@ input { kb_model = kb_rules = kb_options = ctrl:nocaps, fkeys:basic_13-24 - - follow_mouse = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + follow_mouse = 0 + sensitivity = 0.4 # -1.0 - 1.0, 0 means no modification. + accel_profile = flat touchpad { natural_scroll = false @@ -146,8 +152,15 @@ gestures { } device { - name = epic-mouse-v1 - sensitivity = -0.5 + name = elecom-trackball-mouse-deft-pro-trackball-1 + # sensitivity = -0.4 + # accel_profile = adaptive +} + +device { + name = input-remapper-elecom-trackball-mouse-deft-pro-trackball-forwarded + # sensitivity = -0.4 + # accel_profile = adaptive } ################### @@ -155,16 +168,12 @@ device { ################### $mainMod = SHIFT ALT -bind = $mainMod, Q, exec, wlogout -bind = $mainMod, T, exec, [float] $terminal bind = $mainMod, X, fullscreen bind = $mainMod, C, killactive, -bind = $mainMod, M, exit, -bind = $mainMod, G, exec, flatpak run com.moonlight_stream.Moonlight -bind = $mainMod, R, exec, flatpak run org.remmina.Remmina -bind = $mainMod, F, togglefloating, -bind = ALT, Tab, workspace, m+1 +bind = $mainMod, Z, togglefloating, +bind = ALT, Tab, workspace, e+1 bind = ALT SHIFT, Tab, workspace, emptyn +bind = $mainMod, DEL, exit, # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l @@ -200,7 +209,8 @@ bind = $mainMod SUPER, 0, movetoworkspace, 10 bind = $mainMod, S, togglespecialworkspace, scratchpad bind = $mainMod, B, togglespecialworkspace, btop bind = $mainMod, D, togglespecialworkspace, discord -# bind = $mainMod, R, togglespecialworkspace, remmina +bind = $mainMod, W, togglespecialworkspace, web +bind = $mainMod, F, togglespecialworkspace, fzfmenu # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow @@ -236,32 +246,39 @@ windowrulev2 = float, onworkspace:special:scratchpad windowrulev2 = size 80% 80%, onworkspace:special:scratchpad workspace = special:scratchpad, on-created-empty:kitty +# FzfMenu +windowrulev2 = float, onworkspace:special:fzfmenu +windowrulev2 = size 30% 80%, onworkspace:special:fzfmenu +workspace = special:fzfmenu, on-created-empty:kitty fzfmenu + # Btop windowrulev2 = float, onworkspace:special:btop windowrulev2 = size 80% 80%, onworkspace:special:btop workspace = special:btop, on-created-empty:kitty btop -# Remmina -# windowrulev2 = float, onworkspace:special:remmina -# windowrulev2 = size 80% 80%, onworkspace:special:remmina -# workspace = special:remmina, on-created-empty:flatpak run org.remmina.Remmina -# windowrulev2 = float, initialClass:^(.*Remmina.*)$ -# windowrulev2 = dimaround, initialClass:^(.*Remmina.*)$ -# windowrulev2 = size 80% 80%, $initialClass:^(.*Remmina.*)$ -windowrulev2 = workspace 6, $initialClass:^(.*Remmina.*)$ +# Web +windowrulev2 = size 450 253, initialTitle:^(Picture in picture)$ +windowrulev2 = float, onworkspace:special:web +windowrulev2 = size 80% 80%, onworkspace:special:web +windowrulev2 = center, onworkspace:special:web +workspace = special:web, on-created-empty:$browser +windowrulev2 = opacity 1.0 0.9, initialTitle:^(Picture in picture)$ +windowrulev2 = float, initialTitle:^(Picture in picture)$ +windowrulev2 = move 100%-w-20 50, initialTitle:^(Picture in picture)$ +windowrulev2 = workspace e+0, initialTitle:^(Picture in picture)$ # Discord -windowrulev2 = opacity 1.0 0.7, initialTitle:^(Discord Popout)$ -windowrulev2 = float, initialTitle:^(Discord Popout)$ windowrulev2 = size 450 253, initialTitle:^(Discord Popout)$ -windowrulev2 = move 100%-w-20 50, initialTitle:^(Discord Popout)$ -windowrulev2 = workspace e+0, initialTitle:^(Discord Popout)$ windowrulev2 = float, onworkspace:special:discord windowrulev2 = size 80% 80%, onworkspace:special:discord workspace = special:discord, on-created-empty:flatpak run io.github.equicord.equibop -windowrulev2 = workspace special:discord, initialTitle:^(.*• Discord.*)$ -windowrulev2 = float, initialTitle:^(.*• Discord.*)$ -windowrulev2 = size 80% 80%, initialTitle:^(.*• Discord.*)$ +windowrulev2 = workspace special:discord, initialTitle:^(.*Discord.*)$ +windowrulev2 = float, initialTitle:^(.*Discord.*)$ +windowrulev2 = size 80% 80%, initialTitle:^(.*Discord.*)$ +windowrulev2 = opacity 1.0 0.9, initialTitle:^(Discord Popout)$ +windowrulev2 = float, initialTitle:^(Discord Popout)$ +windowrulev2 = move 100%-w-20 50, initialTitle:^(Discord Popout)$ +windowrulev2 = workspace e+0, initialTitle:^(Discord Popout)$ # Pipewire windowrulev2 = float, title:^(volume control)$ @@ -269,21 +286,23 @@ windowrulev2 = dimaround, title:^(Volume Control)$ windowrulev2 = float, title:^(Helvum - Pipewire Patchbay)$ windowrulev2 = dimaround, title:^(Helvum - Pipewire Patchbay)$ -# Kicad -windowrulev2 = workspace 4, class:^(.*kicad.*)$ +# Moonlight +windowrulev2 = workspace 2, class:^(.*moonlight.*)$ + +# FreeCad +windowrulev2 = workspace 4, class:^(.*org.freecad.FreeCAD.*)$ + +# KiCad +windowrulev2 = workspace 3, class:^(.*kicad.*)$ windowrulev2 = float, initialTitle:^(3D Viewer)$ windowrulev2 = dimaround, initialTitle:^(3D Viewer)$ windowrulev2 = size 80% 80%, $initialTitle:^(3D Viewer)$ -# Moonlight -windowrulev2 = workspace 3, class:^(.*moonlight.*)$ - -# FreeCad -windowrulev2 = workspace 5, class:^(.*org.freecad.FreeCAD.*)$ +# Remmina +windowrulev2 = workspace 5, $initialClass:^(.*Remmina.*)$ # Ignore maximize requests from apps. You'll probably like this. windowrulev2 = suppressevent maximize, class:.* # Fix some dragging issues with XWayland windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 - diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 78440b1..2bf01e9 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -157,6 +157,19 @@ require('lazy').setup({ -- 'zbirenbaum/copilot-cmp', -- config = function() require('copilot_cmp').setup() end, -- }, + { + "ahmedkhalf/project.nvim", + config = function() + require("project_nvim").setup { + sync_root_with_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, + update_root = true + }, + } + end + }, { -- Highlight, edit, and navigate code diff --git a/config/waybar/config b/config/waybar/config index 423bed1..35ea7c4 100644 --- a/config/waybar/config +++ b/config/waybar/config @@ -20,7 +20,6 @@ "modules-left": [ "hyprland/workspaces", - "hyprland/window", ], "modules-center": [ "clock", @@ -35,7 +34,6 @@ "memory", "custom/separator", "cpu", - "custom/separator", ], @@ -99,7 +97,9 @@ "hyprland/workspaces": { "all-outputs": false, "disable-scroll": true, - "format": "{name}", + "sort-by-name": true, + "sort-by-coordinates": false, + "format": " {name} ", }, "tray": { diff --git a/fzfmenu.sh b/fzfmenu.sh index befd4a7..b00f6d8 100755 --- a/fzfmenu.sh +++ b/fzfmenu.sh @@ -163,6 +163,6 @@ command) command="${PARAMS[0]}" ;; esac -hyprctl dispatch togglespecialworkspace scratchpad +hyprctl dispatch togglespecialworkspace fzfmenu hyprctl dispatch exec "$command" # hyprctl dispatch killactive diff --git a/pico-load.sh b/pico-load.sh index c9d1d4c..6a0cff5 100755 --- a/pico-load.sh +++ b/pico-load.sh @@ -1,17 +1,36 @@ #!/bin/bash -if [ "$(dpkg -l | awk '/ubuntu-desktop/ {print }'|wc -l)" -ge 1 ]; then - while [ ! -f /media/$USER/RPI-RP2/INFO_UF2.TXT ]; do - sleep 1 - done - set -e - cargo run --release +if [ -f /etc/os-release ]; then + . /etc/os-release + OS=$NAME else - sudo umount /mnt/usb - while [ ! -f /mnt/usb/INFO_UF2.TXT ]; do - sudo mount /dev/sda1 /mnt/usb -o umask=000 - sleep 1 - done - set -e - cargo run --release - sudo umount /mnt/usb + OS="none" +fi + +if [ "$OS" == "Ubuntu" ]; then + if [ "$(dpkg -l | awk '/ubuntu-desktop/ {print }' | wc -l)" -ge 1 ]; then + while [ ! -f /media/$USER/RPI-RP2/INFO_UF2.TXT ]; do + sleep 1 + done + set -e + cargo run --release + else + sudo umount /mnt/usb + while [ ! -f /mnt/usb/INFO_UF2.TXT ]; do + sudo mount /dev/sda1 /mnt/usb -o umask=000 + sleep 1 + done + set -e + cargo run --release + sudo umount /mnt/usb + fi +elif [ "$OS" == "Arch Linux" ]; then + sudo umount /mnt/usb + while [ ! -f /mnt/usb/INFO_UF2.TXT ]; do + sudo mkdir -p /mnt/usb + sudo mount /dev/sda1 /mnt/usb -o umask=000 + sleep 1 + done + set -e + cargo run --release + sudo umount /mnt/usb fi diff --git a/update_arch.sh b/update_arch.sh index 0facb05..212f662 100755 --- a/update_arch.sh +++ b/update_arch.sh @@ -68,7 +68,7 @@ ln -sf ~/code_server/gitconfig ~/.gitconfig # Install hyprland printf -- '\033[33m Installing hyprland\n\033[37m' -sudo pacman --noconfirm --needed -S plymouth dracut dunst hypridle hyprland hyprlock xdg-desktop-portal-hyprland polkit-gnome xorg-xhost gnome-keyring qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance +sudo pacman --noconfirm --needed -S usbutils plymouth dracut dunst hypridle hyprland hyprlock xdg-desktop-portal-hyprland polkit-gnome xorg-xhost gnome-keyring qt5ct qt6ct gnome-themes-extra qt5-wayland qt6-wayland lxappearance yay --noconfirm -S --needed --aur adwaita-qt5-git yay --noconfirm -S --needed --aur adwaita-qt6-git @@ -93,6 +93,11 @@ ln -sf ~/code_server/config/waybar/style.css ~/.config/waybar/style.css printf -- '\033[33m Installing Audio\n\033[37m' sudo pacman --noconfirm --needed -S pipewire pipewire-pulse pavucontrol helvum +# Install input-remapper +printf -- '\033[33m Installing input-remapper\n\033[37m' +yay --noconfirm -S --needed --aur input-remapper-git +sudo systemctl enable --now input-remapper + # Install networkmanager printf -- '\033[33m Installing networkmanager\n\033[37m' sudo pacman --noconfirm --needed -S network-manager-applet @@ -136,8 +141,8 @@ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install --all source ~/.fzf.bash -# # Install VirtualHere server -# curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh +# Install VirtualHere server +curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh # Install VirtualHere client printf -- '\033[33m Installing VirtualHere client\n\033[37m'