diff --git a/README.md b/README.md index 663a02c..14fff7a 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# lnx-arch +linux arch \ No newline at end of file diff --git a/dots/archinstall/common/user_credentials.json b/dots/archinstall/common/user_credentials.json new file mode 100644 index 0000000..0c90053 --- /dev/null +++ b/dots/archinstall/common/user_credentials.json @@ -0,0 +1,10 @@ +{ + "!root-password": "", + "!users": [ + { + "!password": "", + "sudo": true, + "username": "poq" + } + ] +} diff --git a/dots/archinstall/t470p/packages.txt b/dots/archinstall/t470p/packages.txt new file mode 100644 index 0000000..0087528 --- /dev/null +++ b/dots/archinstall/t470p/packages.txt @@ -0,0 +1,14 @@ +firefox +neofetch +hyprland +dunst +kitty +dolphin +lf +wofi +xdg-desktop-portal-hyprland +qt5-wayland +qt6-wayland +trash-cli +htop +hyprpaper diff --git a/dots/archinstall/t470p/user_configuration.json b/dots/archinstall/t470p/user_configuration.json new file mode 100644 index 0000000..3cb18ec --- /dev/null +++ b/dots/archinstall/t470p/user_configuration.json @@ -0,0 +1,324 @@ +{ + "additional-repositories": [], + "archinstall-language": "English", + "audio_config": { + "audio": "pipewire" + }, + "bootloader": "Systemd-boot", + "config_version": "2.7.2", + "debug": false, + "disk_config": { + "config_type": "default_layout", + "device_modifications": [ + { + "device": "/dev/nvme0n1", + "partitions": [ + { + "btrfs": [], + "dev_path": null, + "flags": [ + "Boot", + "ESP" + ], + "fs_type": "fat32", + "mount_options": [], + "mountpoint": "/boot", + "obj_id": "ed2b70a1-2685-44bc-bbe2-2c96556ae251", + "size": { + "sector_size": { + "unit": "B", + "value": 512 + }, + "unit": "MiB", + "value": 512 + }, + "start": { + "sector_size": { + "unit": "B", + "value": 512 + }, + "unit": "MiB", + "value": 1 + }, + "status": "create", + "type": "primary" + }, + { + "btrfs": [ + { + "compress": false, + "mountpoint": "/", + "name": "@", + "nodatacow": false + }, + { + "compress": false, + "mountpoint": "/home", + "name": "@home", + "nodatacow": false + }, + { + "compress": false, + "mountpoint": "/var/log", + "name": "@log", + "nodatacow": false + }, + { + "compress": false, + "mountpoint": "/var/cache/pacman/pkg", + "name": "@pkg", + "nodatacow": false + }, + { + "compress": false, + "mountpoint": "/.snapshots", + "name": "@.snapshots", + "nodatacow": false + } + ], + "dev_path": null, + "flags": [], + "fs_type": "btrfs", + "mount_options": [ + "compress=zstd" + ], + "mountpoint": null, + "obj_id": "1be2b581-0f5b-43be-8404-20cd3b8111bd", + "size": { + "sector_size": { + "unit": "B", + "value": 512 + }, + "unit": "B", + "value": 511571222528 + }, + "start": { + "sector_size": { + "unit": "B", + "value": 512 + }, + "unit": "B", + "value": 537919488 + }, + "status": "create", + "type": "primary" + } + ], + "wipe": true + } + ] + }, + "hostname": "t470p", + "kernels": [ + "linux" + ], + "locale_config": { + "kb_layout": "us", + "sys_enc": "UTF-8", + "sys_lang": "en_AU" + }, + "mirror_config": { + "custom_mirrors": [], + "mirror_regions": { + "Colombia": [ + "https://mirrors.atlas.net.co/archlinux/$repo/os/$arch", + "https://edgeuno-bog2.mm.fcix.net/archlinux/$repo/os/$arch", + "http://mirrors.udenar.edu.co/archlinux/$repo/os/$arch", + "http://mirrors.atlas.net.co/archlinux/$repo/os/$arch", + "http://edgeuno-bog2.mm.fcix.net/archlinux/$repo/os/$arch" + ], + "United States": [ + "https://zxcvfdsa.com/arch/$repo/os/$arch", + "https://ziply.mm.fcix.net/archlinux/$repo/os/$arch", + "https://volico.mm.fcix.net/archlinux/$repo/os/$arch", + "https://uvermont.mm.fcix.net/archlinux/$repo/os/$arch", + "https://us.mirrors.cicku.me/archlinux/$repo/os/$arch", + "https://southfront.mm.fcix.net/archlinux/$repo/os/$arch", + "https://ridgewireless.mm.fcix.net/archlinux/$repo/os/$arch", + "https://repo.ialab.dsu.edu/archlinux/$repo/os/$arch", + "https://plug-mirror.rcac.purdue.edu/archlinux/$repo/os/$arch", + "https://ord.mirror.rackspace.com/archlinux/$repo/os/$arch", + "https://opencolo.mm.fcix.net/archlinux/$repo/os/$arch", + "https://ohioix.mm.fcix.net/archlinux/$repo/os/$arch", + "https://nocix.mm.fcix.net/archlinux/$repo/os/$arch", + "https://nnenix.mm.fcix.net/archlinux/$repo/os/$arch", + "https://mnvoip.mm.fcix.net/archlinux/$repo/os/$arch", + "https://mirrors.xtom.com/archlinux/$repo/os/$arch", + "https://mirrors.vectair.net/archlinux/$repo/os/$arch", + "https://mirrors.sonic.net/archlinux/$repo/os/$arch", + "https://mirrors.rit.edu/archlinux/$repo/os/$arch", + "https://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch", + "https://mirrors.mit.edu/archlinux/$repo/os/$arch", + "https://mirrors.lug.mtu.edu/archlinux/$repo/os/$arch", + "https://mirrors.kernel.org/archlinux/$repo/os/$arch", + "https://mirrors.iu13.net/archlinux/$repo/os/$arch", + "https://mirrors.bloomu.edu/archlinux/$repo/os/$arch", + "https://mirror.zackmyers.io/archlinux/$repo/os/$arch", + "https://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch", + "https://mirror.theash.xyz/arch/$repo/os/$arch", + "https://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch", + "https://mirror.pit.teraswitch.com/archlinux/$repo/os/$arch", + "https://mirror.pilotfiber.com/archlinux/$repo/os/$arch", + "https://mirror.mia11.us.leaseweb.net/archlinux/$repo/os/$arch", + "https://mirror.lty.me/archlinux/$repo/os/$arch", + "https://mirror.fcix.net/archlinux/$repo/os/$arch", + "https://mirror.ette.biz/archlinux/$repo/os/$arch", + "https://mirror.elightcap.com/archlinux/$repo/os/$arch", + "https://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch", + "https://mirror.clarkson.edu/archlinux/$repo/os/$arch", + "https://mirror.arizona.edu/archlinux/$repo/os/$arch", + "https://mirror.adectra.com/archlinux/$repo/os/$arch", + "https://m.lqy.me/arch/$repo/os/$arch", + "https://irltoolkit.mm.fcix.net/archlinux/$repo/os/$arch", + "https://iad.mirrors.misaka.one/archlinux/$repo/os/$arch", + "https://iad.mirror.rackspace.com/archlinux/$repo/os/$arch", + "https://ftp.osuosl.org/pub/archlinux/$repo/os/$arch", + "https://forksystems.mm.fcix.net/archlinux/$repo/os/$arch", + "https://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch", + "https://coresite.mm.fcix.net/archlinux/$repo/os/$arch", + "https://codingflyboy.mm.fcix.net/archlinux/$repo/os/$arch", + "https://arlm.tyzoid.com/$repo/os/$arch", + "https://archmirror1.octyl.net/$repo/os/$arch", + "https://arch.mirror.k0.ae/$repo/os/$arch", + "https://arch.mirror.constant.com/$repo/os/$arch", + "https://arch.hu.fo/archlinux/$repo/os/$arch", + "https://america.mirror.pkgbuild.com/$repo/os/$arch", + "http://ziply.mm.fcix.net/archlinux/$repo/os/$arch", + "http://www.gtlib.gatech.edu/pub/archlinux/$repo/os/$arch", + "http://wcbmedia.io:8000/$repo/os/$arch", + "http://volico.mm.fcix.net/archlinux/$repo/os/$arch", + "http://uvermont.mm.fcix.net/archlinux/$repo/os/$arch", + "http://us.mirrors.cicku.me/archlinux/$repo/os/$arch", + "http://southfront.mm.fcix.net/archlinux/$repo/os/$arch", + "http://ridgewireless.mm.fcix.net/archlinux/$repo/os/$arch", + "http://repo.miserver.it.umich.edu/archlinux/$repo/os/$arch", + "http://repo.ialab.dsu.edu/archlinux/$repo/os/$arch", + "http://plug-mirror.rcac.purdue.edu/archlinux/$repo/os/$arch", + "http://ord.mirror.rackspace.com/archlinux/$repo/os/$arch", + "http://opencolo.mm.fcix.net/archlinux/$repo/os/$arch", + "http://ohioix.mm.fcix.net/archlinux/$repo/os/$arch", + "http://nocix.mm.fcix.net/archlinux/$repo/os/$arch", + "http://nnenix.mm.fcix.net/archlinux/$repo/os/$arch", + "http://mnvoip.mm.fcix.net/archlinux/$repo/os/$arch", + "http://mirrors.xtom.com/archlinux/$repo/os/$arch", + "http://mirrors.vectair.net/archlinux/$repo/os/$arch", + "http://mirrors.sonic.net/archlinux/$repo/os/$arch", + "http://mirrors.rutgers.edu/archlinux/$repo/os/$arch", + "http://mirrors.rit.edu/archlinux/$repo/os/$arch", + "http://mirrors.ocf.berkeley.edu/archlinux/$repo/os/$arch", + "http://mirrors.mit.edu/archlinux/$repo/os/$arch", + "http://mirrors.lug.mtu.edu/archlinux/$repo/os/$arch", + "http://mirrors.kernel.org/archlinux/$repo/os/$arch", + "http://mirrors.iu13.net/archlinux/$repo/os/$arch", + "http://mirrors.gigenet.com/archlinux/$repo/os/$arch", + "http://mirrors.cat.pdx.edu/archlinux/$repo/os/$arch", + "http://mirrors.bloomu.edu/archlinux/$repo/os/$arch", + "http://mirrors.bjg.at/arch/$repo/os/$arch", + "http://mirrors.advancedhosters.com/archlinux/$repo/os/$arch", + "http://mirrors.acm.wpi.edu/archlinux/$repo/os/$arch", + "http://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch", + "http://mirror.vtti.vt.edu/archlinux/$repo/os/$arch", + "http://mirror.siena.edu/archlinux/$repo/os/$arch", + "http://mirror.sfo12.us.leaseweb.net/archlinux/$repo/os/$arch", + "http://mirror.pit.teraswitch.com/archlinux/$repo/os/$arch", + "http://mirror.mia11.us.leaseweb.net/archlinux/$repo/os/$arch", + "http://mirror.metrocast.net/archlinux/$repo/os/$arch", + "http://mirror.math.princeton.edu/pub/archlinux/$repo/os/$arch", + "http://mirror.lty.me/archlinux/$repo/os/$arch", + "http://mirror.fossable.org/archlinux/$repo/os/$arch", + "http://mirror.fcix.net/archlinux/$repo/os/$arch", + "http://mirror.ette.biz/archlinux/$repo/os/$arch", + "http://mirror.elightcap.com/archlinux/$repo/os/$arch", + "http://mirror.dal10.us.leaseweb.net/archlinux/$repo/os/$arch", + "http://mirror.cs.vt.edu/pub/ArchLinux/$repo/os/$arch", + "http://mirror.clarkson.edu/archlinux/$repo/os/$arch", + "http://mirror.arizona.edu/archlinux/$repo/os/$arch", + "http://mirror.adectra.com/archlinux/$repo/os/$arch", + "http://irltoolkit.mm.fcix.net/archlinux/$repo/os/$arch", + "http://iad.mirrors.misaka.one/archlinux/$repo/os/$arch", + "http://iad.mirror.rackspace.com/archlinux/$repo/os/$arch", + "http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch", + "http://forksystems.mm.fcix.net/archlinux/$repo/os/$arch", + "http://distro.ibiblio.org/archlinux/$repo/os/$arch", + "http://dfw.mirror.rackspace.com/archlinux/$repo/os/$arch", + "http://coresite.mm.fcix.net/archlinux/$repo/os/$arch", + "http://codingflyboy.mm.fcix.net/archlinux/$repo/os/$arch", + "http://arlm.tyzoid.com/$repo/os/$arch", + "http://archmirror1.octyl.net/$repo/os/$arch", + "http://arch.mirror.constant.com/$repo/os/$arch", + "http://arch.hu.fo/archlinux/$repo/os/$arch" + ] + } + }, + "network_config": { + "type": "nm" + }, + "no_pkg_lookups": false, + "ntp": true, + "offline": false, + "packages": [ + "wget", + "nano", + "tree" + ], + "parallel downloads": 0, + + "profile_config_hyprland": { + "gfx_driver": "Nvidia (proprietary)", + "greeter": "sddm", + "profile": { + "custom_settings": { + "Hyprland": { + "seat_access": "polkit" + } + }, + "details": [ + "Hyprland" + ], + "main": "Desktop" + } + }, + + "profile_config_i3wm": { + "gfx_driver": "Nvidia (proprietary)", + "greeter": "sddm", + "profile": { + "custom_settings": { + "i3-wm": {} + }, + "details": [ + "i3-wm" + ], + "main": "Desktop" + } + }, + + "profile_config_minimal": { + "gfx_driver": null, + "greeter": null, + "profile": { + "custom_settings": {}, + "details": [], + "main": "Minimal" + } + }, + + "profile_config": { + "gfx_driver": "Nvidia (proprietary)", + "greeter": null, + "profile": { + "custom_settings": {}, + "details": [], + "main": "Minimal" + } + }, + + "script": "guided", + "silent": false, + "skip_ntp": false, + "skip_version_check": false, + "swap": true, + "timezone": "America/Panama", + "uki": false, + "version": "2.7.2" +} \ No newline at end of file diff --git a/dots/hyprland/hyprland.conf b/dots/hyprland/hyprland.conf new file mode 100644 index 0000000..17de357 --- /dev/null +++ b/dots/hyprland/hyprland.conf @@ -0,0 +1,351 @@ +# -------------------------------------------------- +# klevstul +# ----- +# source documentation: +# https://wiki.hyprland.org/ +# -------------------------------------------------- + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# monitors +# - - - - - +# https://wiki.hyprland.org/Configuring/Monitors/ +# - - - - - - - - - - - - - - - - - - - - - - - - - +monitor=,preferred,auto,auto + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# keywords +# - - - - - +# https://wiki.hyprland.org/Configuring/Keywords/ +# - - - - - - - - - - - - - - - - - - - - - - - - - + +# execute at launch +#exec-once = hyprpaper & waybar & hypridle & hyprdim --strength 0.6 --duration 500 --no-dim-when-only --dialog-dim 0.1 & pcloud + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# Some default env vars. +env = XCURSOR_SIZE,24 + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# input +# - - - - - +# https://wiki.hyprland.org/Configuring/Variables/#input +# - - - - - - - - - - - - - - - - - - - - - - - - - +input { + + # switch keyboard layout + # https://wiki.hyprland.org/Configuring/Uncommon-tips--tricks/ + kb_layout = us,no + kb_options = grp:caps_toggle,grp_led:scroll # this has no effect, so a bind is done below + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# input +# - - - - - +# https://wiki.hyprland.org/Configuring/Variables/#general +# - - - - - - - - - - - - - - - - - - - - - - - - - +general { + + gaps_in = 4 + gaps_out = 4 + border_size = 2 + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + layout = dwindle # {dwindle, master} + + # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on + allow_tearing = false + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# decoration +# - - - - - +# https://wiki.hyprland.org/Configuring/Variables/#decoration +# - - - - - - - - - - - - - - - - - - - - - - - - - +decoration { + + rounding = 10 + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# animations +# - - - - - +# https://wiki.hyprland.org/Configuring/Animations/ +# - - - - - - - - - - - - - - - - - - - - - - - - - +animations { + + enabled = yes + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + 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 layout +# - - - - - +# https://wiki.hyprland.org/Configuring/Dwindle-Layout/ +# - - - - - - - - - - - - - - - - - - - - - - - - - +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 layout +# - - - - - +# https://wiki.hyprland.org/Configuring/Master-Layout/ +# - - - - - - - - - - - - - - - - - - - - - - - - - +master { + + new_is_master = true + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# gestures +# - - - - - +# https://wiki.hyprland.org/Configuring/Variables/#gestures +# - - - - - - - - - - - - - - - - - - - - - - - - - +gestures { + + workspace_swipe = off + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# binds +# - - - - - +# https://wiki.hyprland.org/Configuring/Variables/#binds +# - - - - - - - - - - - - - - - - - - - - - - - - - +binds { + + allow_workspace_cycles = yes + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# misc +# - - - - - +# https://wiki.hyprland.org/Configuring/Variables/#misc +# - - - - - - - - - - - - - - - - - - - - - - - - - +misc { + + disable_hyprland_logo = false + force_default_wallpaper = 0 + + # only key presses will turn the screen on + mouse_move_enables_dpms = false + key_press_enables_dpms = true + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# per-device input configssc +# - - - - - +# https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs +# - - - - - - - - - - - - - - - - - - - - - - - - - +device { + + name=epic-mouse-v1 + sensitivity = -0.5 + +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# window rules +# - - - - - +# https://wiki.hyprland.org/Configuring/Window-Rules/ +# - - - - - - - - - - - - - - - - - - - - - - - - - + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# plugins +# - - - - - +# https://wiki.hyprland.org/Plugins/Using-Plugins/ +# - - - - - - - - - - - - - - - - - - - - - - - - - +plugin { +} + +# - - - - - - - - - - - - - - - - - - - - - - - - - +# binds +# - - - - - +# https://wiki.hyprland.org/Configuring/Binds/ +# +# keysyms (use segment after XKB_KEY_): +# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h +# +# three keys bind example: +# bind = $mainMod_SHIFT, space, togglefloating +# +# bind[flags]=.. +# bindrl=MOD,KEY,exec,amongus +# flags: +# l -> locked, aka. works also when an an input inhibitor (e.g. a lockscreen) is active +# r -> release, will trigger on release of a key +# e -> repeat, will repeat when held. +# m -> mouse +# - - - - - - - - - - - - - - - - - - - - - - - - - + +$mainMod = SUPER + +# execute programs +bind = $mainMod, RETURN, exec, kitty +bind = $mainMod, Q, killactive, +bind = $mainMod, F3, exec, pcmanfm +bind = $mainMod, D, exec, bemenu-run +bind = $mainMod, O, exec, sleep 1; hyprctl dispatch dpms off; hyprlock # monitor off & lock (had to sleep to avoid immediate wakeup) +bind = $mainMod, L, exec, hyprlock # lock +bind = $mainMod, T, togglegroup + +bind = $mainMod SHIFT, T, changegroupactive, t +bind = $mainMod ALT, T, changegroupactive, b + +# misc +bind = $mainMod, Escape, exit, # exit +bind = $mainMod, space, togglefloating # floting (toggle) +bind = $mainMod, TAB, workspace, previous # cycle workspace + +# window cycle +# https://github.com/hyprwm/Hyprland/issues/2061 +#bind = ALT, TAB, cyclenext # cycle windows in same workspace +#bind = ALT, TAB, bringactivetotop # bring focused window to top +bind = ALT, Tab, focuscurrentorlast # switch focus from current to previous window + +# screenshot +bind = $mainMod, PRINT, exec, hyprshot -m window # window +bind = , PRINT, exec, hyprshot -m output # monitor +bind = $shiftMod, PRINT, exec, hyprshot -m region # region + +# fullscreen +bind = $mainMod, F, fullscreen, 1 # fullscreen, with border +bind = $mainMod, G, fullscreen, 0 # fullscreen, fill entire screen + +# special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# change keyboard layout +# https://wiki.hyprland.org/Configuring/Using-hyprctl/#switchxkblayout +# note: the key binding "Caps_Lock" did not work on t470p +bind = $mainMod, K, exec, hyprctl switchxkblayout at-translated-set-2-keyboard next + +# view mode +bind = $mainMod, W, exec, hyprctl keyword general:layout "master" +bind = $mainMod, E, exec, hyprctl keyword general:layout "dwindle" +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# media player control +bind = $mainMod, XF86AudioPlay, exec, playerctl play +bind = $mainMod, XF86AudioStop, exec, playerctl pause +bind = $mainMod, XF86AudioNext, exec, playerctl next +bind = $mainMod, XF86AudioPrev, exec, playerctl previous + +# volume control +bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ +bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle + +# focus window +bind = $mainMod, semicolon, focuswindow, kitty # cli +#bind = $mainMod, G, focuswindow, gimp +#bind = $mainMod, K, focuswindow, gitkraken +#bind = $mainMod, C, focuswindow, vscodium +#bind = $mainMod, S, focuswindow, subl +#bind = $mainMod, R, focuswindow, reaper + +# move window +bind = $mainMod SHIFT, left, movewindoworgroup, l +bind = $mainMod SHIFT, right, movewindoworgroup, r +bind = $mainMod SHIFT, up, movewindoworgroup, u +bind = $mainMod SHIFT, down, movewindoworgroup, d + +bind = $mainMod ALT, left, moveactive, -40 0 +bind = $mainMod ALT, right, moveactive, 40 0 +bind = $mainMod ALT, up, moveactive, 0 -40 +bind = $mainMod ALT, down, moveactive, 0 40 + +# resize window +bind = $mainMod CTRL, left, resizeactive, -40 0 +bind = $mainMod CTRL, right, resizeactive, 40 0 +bind = $mainMod CTRL, up, resizeactive, 0 -40 +bind = $mainMod CTRL, down, resizeactive, 0 40 + +# Switch workspaces with mainMod + [0-9] +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 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +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 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +#bindm = $mainMod, mouse:273, resizewindow diff --git a/dots/hyprpaper/hyprpaper.conf b/dots/hyprpaper/hyprpaper.conf new file mode 100644 index 0000000..a675c7d --- /dev/null +++ b/dots/hyprpaper/hyprpaper.conf @@ -0,0 +1,9 @@ +# klevstul + +# https://github.com/hyprwm/hyprpaper + +# list monitors with: `hyprctl monitors` + +preload = ~/.local/wp/3840x2160_tropicalSunsetDreamscape_backiee-291530-landscape.jpg +wallpaper = eDP-1,~/.local/wp/3840x2160_tropicalSunsetDreamscape_backiee-291530-landscape.jpg +wallpaper = HDMI-A-1,~/.local/wp/3840x2160_tropicalSunsetDreamscape_backiee-291530-landscape.jpg diff --git a/scripts/99_dots.sh b/scripts/99_dots.sh new file mode 100644 index 0000000..e12f492 --- /dev/null +++ b/scripts/99_dots.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +# klevstul + +echo "<< 99_dots.sh >>" + +user=poq +base_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master +targz_url=https://git.mz.fo/fro/lnx-arch/archive/master.tar.gz +clone_trg=/tmp +dots_trg=${clone_trg}/lnx-arch/dots + + +if [ "$EUID" -ne 0 ] + then echo "error: run as 'root'" + exit +fi + +this_file_name=`basename "$0"` +if [ $# -lt 1 ]; then + echo "usage: '$this_file_name {all}'" + exit 1 +fi + +operation=$1 + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# helper function +download_repo() { + + # make clone target directory, if it doesn't exist + mkdir -p ${clone_trg} + + # instead of doing a git clone (like `git clone ${clone_url} ${clone_trg}`), + # where i would have emptied the target dir each time, i download the + # source as a tar.gz. + wget --show-progress ${targz_url} -O ${clone_trg}/tmp.tar.gz + tar -xzf ${clone_trg}/tmp.tar.gz -C ${clone_trg} + rm ${clone_trg}/tmp.tar.gz + +} + + +# download all dots (dot files) from repo +if [ ${operation} == "all" ] ; then + echo "***** ${operation} *****" + download_repo + tree ${clone_trg}/lnx-arch + + target_file_name=hyprland.conf + target_file_path=/home/${user}/.config/hypr/${target_file_name} + cp -f ${dots_trg}/hyprland/${target_file_name} ${target_file_path} + chown ${user}:${user} ${target_file_path} + ls -al ${target_file_path} + + target_file_name=hyprpaper.conf + target_file_path=/home/${user}/.config/hypr/${target_file_name} + cp -f ${dots_trg}/hyprpaper/${target_file_name} ${target_file_path} + chown ${user}:${user} ${target_file_path} + ls -al ${target_file_path} + + + +fi diff --git a/scripts/99_software.sh b/scripts/99_software.sh new file mode 100644 index 0000000..8f6cfb6 --- /dev/null +++ b/scripts/99_software.sh @@ -0,0 +1,142 @@ +#!/usr/bin/env bash + +# klevstul + +# https://wiki.archlinux.org/title/pacman + +echo "<< 99_software.sh >>" + +if [ "$EUID" -ne 0 ] + then echo "error: run as 'root'" + exit +fi + +this_file_name=`basename "$0"` +if [ $# -lt 1 ]; then + echo "error: $# arguments given" + echo "usage: '$this_file_name [operation] [argument?]'" + exit 1 +fi + +operation=$1 +parameter=$2 + +param_check() { + parameter=$1 + error_msg=$2 + + if [ -z "${parameter}" ] ; then + echo "error: ${error_msg}" ; exit 1 + fi +} + +# ----- +# always update the system +# ----- +sudo pacman -Syu + +echo "-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-" + + +# ----- +# setup all packages for given host +# ----- +if [ ${operation} == "setup" ] ; then + + param_check "${parameter}" "no host name given" + + package_list_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/${parameter}/packages.txt + + trg_file=/tmp/packages.txt + + wget -q ${package_list_url} -O ${trg_file} + + if ! [ -s ${trg_file} ] ; then + echo "error: packages.txt is empty" + echo "" + echo "attempted to to download 'packages.txt' from: + echo '${package_list_url}'" + echo "'${parameter}' might be an invalid hostname, or 'packages.txt' might be created for given host." + exit 1 + fi + + # https://stackoverflow.com/questions/30988586/creating-an-array-from-a-text-file-in-bash + mapfile -t packages < ${trg_file} + + installed=$(pacman -Qq) + list=() + for x in ${packages[@]} + do + if [[ $installed == *$x* ]] + then + echo "Skipping (1) $x" + elif [[ $installed != *$x* ]] + then + if [[ $(echo "$installed" | grep -E -o "^$x$") != $x ]] + then + echo "Adding $x to list" + list+="$x " + else + echo "Skipping (2) $x" + fi + fi + done + + if [[ -n "$list" ]] + then + pacman -S --needed --noconfirm $list + else + echo "Nothing to install" + fi + + +fi + + + +# ----- +# install package +# ----- +if [ ${operation} == "install" ] ; then + + param_check "${parameter}" "no package name given" + + pacman -S ${parameter} + +fi + +# ----- +# search for package +# ----- +if [ ${operation} == "search" ] ; then + + param_check "${parameter}" "no package name given" + + # search in name and description + pacman -Ss "^${parameter}-" + +fi + +# ----- +# remove orphaned packages (packages which are no longer needed) +# ----- +if [ ${operation} == "orphans" ] ; then + echo "- - - - -" + echo "if no orphans to be removed were found, the following error will be displayed:" + echo "\"error: argument '-' specified with empty stdin\"" + echo "- - - - -" + echo "removing orphans..." + pacman -Qtdq | pacman -Rns - +fi + +# ----- +# remove orphaned packages (packages which are no longer needed) +# ----- +if [ ${operation} == "uninstall" ] ; then + + param_check "${parameter}" "no package name given" + + # uninstall program and remove orphans + pacman -Rns ${parameter} + +fi diff --git a/scripts/archinstall_config_download.sh b/scripts/archinstall_config_download.sh new file mode 100755 index 0000000..becd4c5 --- /dev/null +++ b/scripts/archinstall_config_download.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# klevstul + +echo "<< archinstall_config_prepare.sh >>" + +src_file_conf=user_configuration.json +src_file_cred=user_credentials.json +src_base_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master/dots/archinstall/ +trg_dir=/tmp + +if [ "$EUID" -ne 0 ] + then echo "error: run as 'root'" + exit +fi + +# --------------------------------- +# download user_configuration.json +# --------------------------------- + +echo "enter host name:" +read user_input +host_name=${user_input} + +src_url=${src_base_url}/${host_name}/${src_file_conf} + +curl -o ${trg_dir}/${src_file_conf} ${src_url} + +# --------------------------------- +# download user_credentials.json +# --------------------------------- + +src_url=${src_base_url}/common/${src_file_cred} + +curl -o ${trg_dir}/${src_file_cred} ${src_url} + +echo "enter password for user:" +read -s user_input # -s for silent mode (do not display input in cli) +password=${user_input} + +sed -i -e "s//${password}/g" ${trg_dir}/${src_file_cred} diff --git a/scripts/curae.sh b/scripts/curae.sh new file mode 100644 index 0000000..eacf4ed --- /dev/null +++ b/scripts/curae.sh @@ -0,0 +1,181 @@ +#!/usr/bin/env bash + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# what: curae is latin an means to take care. this script takes care +# of the system (adjusted for arch linux). +# author: fk +# started: may 2024 +# +# nifty: https://github.com/dylanaraps/pure-bash-bible +# +# requires: tree, wget +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +############################################################################# +# +# WARNING: EXAMINE THE CONTENT BEFORE EXECUTION. RUN AT YOUR OWN RISK. +# +############################################################################# +echo "<< curae.sh >>" + +base_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master +scripts_url=${base_url}/scripts +home_dir=/home/.curae +this_file=curae.sh + + +if [ "$EUID" -ne 0 ] + then echo "error: run as 'root'" + exit +fi + +this_file_name=`basename "$0"` +if [ $# -lt 1 ]; then + echo "usage: '$this_file_name { dots | uf / upd-full [host] | sw / software [host] | us / upd-self }'" + exit 1 +fi + +operation=$1 +parameter_1=$2 +parameter_2=$3 + +shopt -s extglob +case $operation in + !(dots|uf|upd-full|sw|software|us|upd-self)) + echo "error: unknown operation '$operation'" + exit + ;; +esac +shopt -u extglob + +# helper function +execute_script() { + file=$1 + parameter_1=$2 + parameter_2=$3 + echo "execute: ${file} ${parameter_1} ${parameter_2}" + wget -q ${scripts_url}/${file} -O /tmp/${file} + chmod 755 /tmp/*.sh + /tmp/${file} ${parameter_1} ${parameter_2} +} + +# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ + +# build package +#shopt -s extglob +#if [ $operation == "pkg-build" ] ; then +# +# if [ -z "${extra_parameter}" ]; then +# echo "error: missing package name" +# exit 1 +# fi +# +# package_dir=${pkgs_dir}/${extra_parameter} +# +# if ! [ -d "${package_dir}" ] ; then +# echo "invalid path: '${package_dir}'" +# exit 1 +# fi +# +# echo "building package with path: '${package_dir}'" +# cd ${package_dir} +# nix-build -A ${extra_parameter} +# cd - +# +#fi +#shopt -u extglob + +# update cfg/dot files +#shopt -s extglob +#if [ $operation == "u" ] || [ $operation == "upd-dots" ] ; then +# +# execute_script 10_download_files.sh "dots-all" +# +# tree -D /etc/nixos +# +#fi +#shopt -u extglob + +# update dot files +shopt -s extglob +if [ $operation == "dots" ] ; then + + execute_script 99_dots.sh ${parameter_1} + +fi +shopt -u extglob + + + +# install software (update system) +shopt -s extglob +if [ $operation == "sw" ] || [ $operation == "software" ] ; then + + execute_script 99_software.sh ${parameter_1} ${parameter_2} + +fi +shopt -u extglob + +# self update, by re-downloading and overwriting itself +shopt -s extglob +if [ $operation == "us" ] || [ $operation == "upd-self" ] ; then + + wget -v ${base_url}/scripts/${this_file} -O ${home_dir}/${this_file}.tmp + cp ${home_dir}/${this_file}.tmp ${home_dir}/${this_file} + rm ${home_dir}/${this_file}.tmp + chmod 755 ${home_dir}/*.sh + +fi +shopt -u extglob + +# full update: install software and update dots +shopt -s extglob +if [ $operation == "uf" ] || [ $operation == "upd-full" ] ; then + + if [ -z "${parameter_1}" ]; then + parameter_1=$HOSTNAME + fi + + if [ -z "${parameter_1}" ]; then + echo "error: missing host name" + exit 1 + fi + + ${home_dir}/${this_file} software setup ${parameter_1} + ${home_dir}/${this_file} dots all + +fi +shopt -u extglob + +# update and rebuild (all) without hostname +#shopt -s extglob +#if [ $operation == "ur" ] || [ $operation == "upd-rebuild" ] ; then +# +# ${home_dir}/${this_file} upd-dots +# ${home_dir}/${this_file} rebuild ${extra_parameter} +# +#fi +#shopt -u extglob + +# rebuild system with hostname +#shopt -s extglob +#if [ $operation == "rh" ] || [ $operation == "rebuildh" ] ; then +# +# if [ -z "${extra_parameter}" ]; then +# echo "error: missing host name" +# exit 1 +# fi +# +# nixos-rebuild switch -v --show-trace --flake /etc/nixos#${extra_parameter} +# +#fi +#shopt -u extglob + +# rebuild system without hostname +#shopt -s extglob +#if [ $operation == "r" ] || [ $operation == "rebuild" ] ; then +# +# nixos-rebuild switch -v --show-trace +# +#fi +#shopt -u extglob diff --git a/scripts/curae_setup.sh b/scripts/curae_setup.sh new file mode 100644 index 0000000..2412f65 --- /dev/null +++ b/scripts/curae_setup.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# klevstul + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# how to download this script (as root): +# +# cd /tmp +# wget tinyurl.com/fk-arc3 # same as `wget https://git.mz.fo/fro/lnx-arch/raw/branch/master/scripts/curae_setup.sh` +# cat fk-arc3 # verify the downloaded script (IMPORTANT!) +# chmod 755 fk-arc3 # make the script executable +# ./fk-arc3 # run the script +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +echo "<< genesis.sh >>" + +if [ "$EUID" -ne 0 ] + then echo "error: run as 'root'" + exit +fi + +base_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master +src_url=${base_url}/scripts/curae.sh +home_dir=/home/.curae +this_file_name=fk-arc3 + +mkdir -p ${home_dir} +cd ${home_dir} +wget -q ${src_url} -O ${home_dir}/curae.sh +chmod 755 curae.sh + +echo "a fresh copy of curae.sh is now located at '${home_dir}/curae.sh'"