commit 6a41699dc36982e208f8f8d98bcee1c74249c4f0 Author: Morten Olsen Date: Tue Sep 12 08:28:05 2023 +0200 init diff --git a/desktop/gnome/default.nix b/desktop/gnome/default.nix new file mode 100644 index 0000000..261f59a --- /dev/null +++ b/desktop/gnome/default.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +{ + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "dk"; + xkbVariant = ""; + xkbOptions = "caps:swapescape"; + }; + + # Enable CUPS to print documents. + # services.printing.enable = true; + fonts = { + packages = with pkgs; [ + (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) + ubuntu_font_family + ]; + enableDefaultPackages = true; + fontconfig = { + defaultFonts = { + serif = [ "Ubuntu" ]; + sansSerif = [ "Ubuntu" ]; + monospace = [ "Ubuntu" ]; + }; + }; + fontDir.enable = true; + }; + +} diff --git a/desktop/hyprland/default.nix b/desktop/hyprland/default.nix new file mode 100644 index 0000000..a678cc2 --- /dev/null +++ b/desktop/hyprland/default.nix @@ -0,0 +1,31 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./environment.nix + ]; + environment.systemPackages = [ + pkgs.hyprland + pkgs.eww + pkgs.wofi + pkgs.swaylock-effects + pkgs.swayidle + ]; + + fonts = { + packages = with pkgs; [ + (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; }) + ubuntu_font_family + ]; + enableDefaultPackages = true; + fontconfig = { + defaultFonts = { + serif = [ "Ubuntu" ]; + sansSerif = [ "Ubuntu" ]; + monospace = [ "Ubuntu" ]; + }; + }; + fontDir.enable = true; + }; + +} diff --git a/desktop/hyprland/environment.nix b/desktop/hyprland/environment.nix new file mode 100644 index 0000000..f8c2b0f --- /dev/null +++ b/desktop/hyprland/environment.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +{ + home = { + sessionVariables = { + EDITOR = "nvim"; + BROWSER = "firefox"; + TERMINAL = "kitty"; + #GBM_BACKEND= "nvidia-drm"; + #__GLX_VENDOR_LIBRARY_NAME= "nvidia"; + #LIBVA_DRIVER_NAME= "nvidia"; # hardware acceleration + __GL_VRR_ALLOWED="1"; + WLR_NO_HARDWARE_CURSORS = "1"; + WLR_RENDERER_ALLOW_SOFTWARE = "1"; + CLUTTER_BACKEND = "wayland"; + WLR_RENDERER = "vulkan"; + + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + }; + }; +} diff --git a/desktop/kde/default.nix b/desktop/kde/default.nix new file mode 100644 index 0000000..4dbbd0f --- /dev/null +++ b/desktop/kde/default.nix @@ -0,0 +1,52 @@ +{ config, pkgs, ... }: + +{ + boot.plymouth = { + enable = true; + }; + + location = { + provider = "geoclue2"; + }; + + programs.dconf.enable = true; + + # broken due to geoclue being stupid + #services.localtime.enable = true; + + fonts = { + fontDir.enable = true; + enableGhostscriptFonts = true; + packages = with pkgs; [ + corefonts + source-code-pro + source-sans-pro + source-serif-pro + dejavu_fonts + iosevka-bin + ]; + }; + + services.xserver = { + enable = true; + #layout = "da"; + desktopManager.plasma5.enable = true; + displayManager = { + defaultSession = "plasmawayland"; + sddm = { + enable = true; + #enableHidpi = true; + }; + }; + }; + + environment.systemPackages = [ + pkgs.numix-icon-theme + pkgs.papirus-icon-theme + pkgs.arc-icon-theme + #pkgs.plasma5Packages.kdeconnect-kde + # this doesn't do much, but makes it easier to see the settings + pkgs.sddm-kcm + ]; + networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..459f9ca --- /dev/null +++ b/flake.lock @@ -0,0 +1,78 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1694375657, + "narHash": "sha256-32X8dcty4vPXx+D4yJPQZBo5hJ1NQikALhevGv6elO4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "f7848d3e5f15ed02e3f286029697e41ee31662d7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1693718952, + "narHash": "sha256-+nGdJlgTk0MPN7NygopipmyylVuAVi7OItIwTlwtGnw=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "793de77d9f83418b428e8ba70d1e42c6507d0d35", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1693663421, + "narHash": "sha256-ImMIlWE/idjcZAfxKK8sQA7A1Gi/O58u5/CJA+mxvl8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e56990880811a451abd32515698c712788be5720", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1694183432, + "narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs_2" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..592dcfe --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +# https://github.com/michaelpj/nixos-config +# https://github.com/HeinzDev/Hyprland-dotfiles/blob/main/nixos/configuration.nix +{ + inputs = { + nixpkgs = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + nixos-hardware = { + url = "github:NixOS/nixos-hardware"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + }; + }; + + outputs = { self, nixpkgs, nixos-hardware, home-manager }: { + nixosConfigurations = { + alice-xps = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (import ./machines/xps/configuration.nix) + ({ + # Let 'nixos-version --json' know about the Git revision + # of this flake. + system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; + }) + ({ + # For compatibility with other things, puts nixpkgs into NIX_PATH + environment.etc.nixpkgs.source = nixpkgs; + nix.nixPath = ["nixpkgs=/etc/nixpkgs"]; + }) + ]; + specialArgs = { inherit nixos-hardware home-manager; }; + }; + }; + + }; +} diff --git a/machines/xps/configuration.nix b/machines/xps/configuration.nix new file mode 100644 index 0000000..70adbfa --- /dev/null +++ b/machines/xps/configuration.nix @@ -0,0 +1,39 @@ +{ config, pkgs, nixos-hardware, home-manager, lib, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + nixos-hardware.nixosModules.dell-xps-13-7390 + home-manager.nixosModules.home-manager + ../../user + ../../modules/gpu/intel + ../../modules/basic + ../../modules/audio + ../../modules/samba + ../../modules/laptop + ../../modules/docker + ../../modules/flatpak + ../../desktop/gnome + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Setup keyfile + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + # Enable swap on luks + boot.initrd.luks.devices."luks-20428df9-98ee-45a6-9dc1-fcafc0ce86f2".device = "/dev/disk/by-uuid/20428df9-98ee-45a6-9dc1-fcafc0ce86f2"; + boot.initrd.luks.devices."luks-20428df9-98ee-45a6-9dc1-fcafc0ce86f2".keyFile = "/crypto_keyfile.bin"; + + boot.kernelParams = [ "i915.force_probe=9b41" ]; + + networking.hostName = "alice-xps"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + system.stateVersion = "23.05"; # Did you read the comment? +} diff --git a/machines/xps/hardware-configuration.nix b/machines/xps/hardware-configuration.nix new file mode 100644 index 0000000..5f3cb42 --- /dev/null +++ b/machines/xps/hardware-configuration.nix @@ -0,0 +1,43 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/56f7a61b-1689-42b6-b697-5c88b8e75fc1"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-f8db07f5-1808-4591-8bbf-81798eb5d4c1".device = "/dev/disk/by-uuid/f8db07f5-1808-4591-8bbf-81798eb5d4c1"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/90A7-3803"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/e92ed4b9-8ee0-4d87-9249-f6e4223abbbe"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp112s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/audio/default.nix b/modules/audio/default.nix new file mode 100644 index 0000000..bc2fe0b --- /dev/null +++ b/modules/audio/default.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: + +{ + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; +} diff --git a/modules/basic/default.nix b/modules/basic/default.nix new file mode 100644 index 0000000..f3ff83d --- /dev/null +++ b/modules/basic/default.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./locales.nix + ./nix.nix + ./security.nix + ]; + + services = { + fwupd.enable = true; + + # override nixos-hardware profile + throttled.enable = false; + thermald.enable = true; + }; +} + diff --git a/modules/basic/locales.nix b/modules/basic/locales.nix new file mode 100644 index 0000000..da85f66 --- /dev/null +++ b/modules/basic/locales.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: + +{ + console = { + font = "lat9w-16"; + keyMap = "dk-latin1"; + }; + + i18n.defaultLocale = "en_DK.UTF-8"; + + time.timeZone = "Europe/Copenhagen"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "da_DK.UTF-8"; + LC_IDENTIFICATION = "da_DK.UTF-8"; + LC_MEASUREMENT = "da_DK.UTF-8"; + LC_MONETARY = "da_DK.UTF-8"; + LC_NAME = "da_DK.UTF-8"; + LC_NUMERIC = "da_DK.UTF-8"; + LC_PAPER = "da_DK.UTF-8"; + LC_TELEPHONE = "da_DK.UTF-8"; + LC_TIME = "da_DK.UTF-8"; + }; +} diff --git a/modules/basic/network.nix b/modules/basic/network.nix new file mode 100644 index 0000000..34b6b7c --- /dev/null +++ b/modules/basic/network.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + networking.networkmanager.enable = true; +} diff --git a/modules/basic/nix.nix b/modules/basic/nix.nix new file mode 100644 index 0000000..c5b7f7a --- /dev/null +++ b/modules/basic/nix.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + nixpkgs.config.allowUnfree = true; + nix = { + package = pkgs.nixUnstable; + settings = { + sandbox = true; + cores = 0; + trusted-users = [ "@wheel" ]; + substituters = [ "https://cache.nixos.org/" ]; + builders-use-substitutes = true; + experimental-features = [ "nix-command" "flakes" ]; + }; + }; +} diff --git a/modules/basic/security.nix b/modules/basic/security.nix new file mode 100644 index 0000000..c258816 --- /dev/null +++ b/modules/basic/security.nix @@ -0,0 +1,18 @@ +{ config, pkgs, ... }: + +{ + # enable smart card reader driver + services.pcscd.enable = true; + + # yubikey stuff + services.udev.packages = [ pkgs.yubikey-personalization ]; + environment.systemPackages = [ + pkgs.yubikey-personalization + pkgs.yubikey-personalization-gui + pkgs.yubikey-manager + pkgs.yubikey-manager-qt + pkgs.yubioath-flutter + pkgs.gnupg + pkgs.pinentry-gnome + ]; +} diff --git a/modules/docker/default.nix b/modules/docker/default.nix new file mode 100644 index 0000000..44fcee4 --- /dev/null +++ b/modules/docker/default.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + virtualisation.docker.enable = true; + users.groups.docker.members = [ "alice" ]; + + environment.systemPackages = with pkgs; [ + docker-compose + ]; +} diff --git a/modules/flatpak/default.nix b/modules/flatpak/default.nix new file mode 100644 index 0000000..5ce1594 --- /dev/null +++ b/modules/flatpak/default.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + services.flatpak.enable = true; +} diff --git a/modules/gpu/intel/default.nix b/modules/gpu/intel/default.nix new file mode 100644 index 0000000..e0990cd --- /dev/null +++ b/modules/gpu/intel/default.nix @@ -0,0 +1,22 @@ +{ config, pkgs, ... }: + +{ + nixpkgs.config.packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + services.xserver.videoDrivers = [ "intel" ]; # modesetting didn't help + boot.blacklistedKernelModules = [ "nouveau" "nvidia" ]; # bbswitch + boot.kernelParams = [ "acpi_rev_override=5" "i915.enable_guc=2" ]; + boot.kernelModules = [ "kvm-intel" ]; + hardware.opengl = { + enable = true; + driSupport = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + #vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + vaapiVdpau + libvdpau-va-gl + ]; + }; + #hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ vaapiIntel ]; +} diff --git a/modules/laptop/default.nix b/modules/laptop/default.nix new file mode 100644 index 0000000..860f81e --- /dev/null +++ b/modules/laptop/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + pkgs.powertop + pkgs.acpi + pkgs.upower + ]; + + services.upower.enable = true; +} diff --git a/modules/samba/default.nix b/modules/samba/default.nix new file mode 100644 index 0000000..40005ce --- /dev/null +++ b/modules/samba/default.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: + +{ + services.gvfs.enable = true; + networking.firewall.extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns''; +} diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..5d19064 --- /dev/null +++ b/update.sh @@ -0,0 +1 @@ +sudo nixos-rebuild switch --flake . diff --git a/user/default.nix b/user/default.nix new file mode 100644 index 0000000..bf15fc2 --- /dev/null +++ b/user/default.nix @@ -0,0 +1,21 @@ +{ config, pkgs, ... }: + +{ + programs.zsh.enable = true; + + users.users.alice = { + isNormalUser = true; + description = "Alice"; + extraGroups = [ "networkmanager" "wheel" "docker" ]; + shell = pkgs.zsh; + }; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + + home-manager.useGlobalPkgs = true; + home-manager.users.alice = import ./home.nix; +} diff --git a/user/files/bash/config b/user/files/bash/config new file mode 100644 index 0000000..94097a3 --- /dev/null +++ b/user/files/bash/config @@ -0,0 +1,9 @@ +# Load all files from .shell/rc.d directory +if [ -d $HOME/.shellrc/rc.d ]; then + for file in $HOME/.shellrc/rc.d/*.sh; do + source $file + done +fi + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash + diff --git a/user/files/eww/eww.scss b/user/files/eww/eww.scss new file mode 100644 index 0000000..cb1e4bf --- /dev/null +++ b/user/files/eww/eww.scss @@ -0,0 +1,247 @@ +/* Created by https://github.com/rxyhn + Designed by https://github.com/rxyhn + Maintaned by https://github.com/rxyhn +*/ + +// Global +*{ + all: unset; +} + +// Variable Color's +$background: #1A1B26; +$foreground: #A9B1D6; + +$black: #24283B; +$gray: #565F89; +$red: #F7768E; +$green: #73DACA; +$yellow: #E0AF68; +$blue: #7AA2F7; +$magenta: #BB9AF7; +$cyan: #7DCFFF; +$white: $foreground; + +// EWW BAR +.eww_bar{ + background-color: $background; + padding: .3rem; +} + +// Launcher +.launcher_icon{ + color: $cyan; + font-family: "Font Awesome 6"; + font-size: 1.7em; + padding: 1rem 0 1rem 0; +} + +// Workspaces +.works { +font-family: "Font Awesome 6"; +padding: .2rem .7rem .2rem .7rem; +background-color: $black; +border-radius: 5px; +} + +.0 , .01, .02, .03, .04, .05, .06, +.011, .022, .033, .044, .055, .066{ + margin: .55rem 0 .55rem 0; +} + +/* Unoccupied */ +.0 { +color: $gray; +} + +/* Occupied */ +.01, .02, .03, .04, .05, .06 { + color: $gray; +} + +/* Focused */ +.011, +.022, +.033, +.044, +.055, +.066 { + color: $foreground; +} + +.0:nth-child(1), +.0:nth-child(3){ + font-size: 1.5em; +} +.0:nth-child(2){ + font-size: 1.4em; +} +.0:nth-child(4), +.0:nth-child(5){ + font-size: 1.6em; +} +.0:nth-child(6){ + font-size: 1.7em; +} +.01, +.011, +.03, +.033{ + font-size: 1.5em; +} +.02, +.022{ + font-size: 1.4em; +} +.04, +.05, +.044, +.055{ + font-size: 1.6em; +} +.06, +.066{ + font-size: 1.7em; +} + +// Control Panel +.control { +padding: .5rem; +font-family: Material Icons; +font-size: 1.6em; +background-color: $black; +border-radius: 5px; +} +.bat{ + font-family: JetBrainsMono Nerd Font; + font-size: 1.2em; + padding-right: .5rem; + color: $blue; +} +.wifi-icon{ + margin-bottom: .2rem; + color: $magenta; +} +.brightness-icon{ + margin: .2rem 0 .2rem 0; + color: $yellow; +} +.volume-icon{ + font-family: "Fira Code Nerd Font"; + margin: 0rem .0rem 0rem -.6rem; + color: $green; +} +scale trough { + all: unset; + background-color: $background; + border-radius: 5px; + min-height: 80px; + min-width: 10px; + margin: .3rem 0 .3rem 0; +} +.bribar trough highlight { + background-color: $yellow; + border-radius: 5px; +} +.volbar trough highlight { + background-color: $green; + border-radius: 5px; +} + +// Clock +.time { + font-family: Comic Mono; + font-weight: bold; + font-size: 1.2em; + background-color: $black; + color: $white; + border-radius: 5px; + padding: .7rem 0 .5rem 0; + margin: .5rem 0 .5rem 0; +} + +.workspace-entry { + margin: 5px; + border-radius: 5px; + padding: .1rem .2rem; + border: solid 3px transparent; + + &.occupied { + background-color: $black; + } + + &.current { + border: solid 3px transparent; + background: #e67e22; + } +} + +// Calendar +.cal-box { + background-color: $black; + font-family: Comic Mono; + font-size: 1em; + font-weight: bold; + + .cal-inner-box { + padding: 1rem 1rem .2rem; + + .cal { + &.highlight { + padding: 10rem; + } + + padding: .8rem .25rem 0rem; + margin-left: 10px; + } + } +} + +calendar:selected { + color: $blue; +} + +calendar.header { +color: $blue; +font-weight: bold; +} + +calendar.button { +color: $magenta; +} + +calendar.highlight { +color: $magenta; +font-weight: bold; +} + +calendar:indeterminate { +color: $background; +} + +// Powermenu +.powermenu { + font-family: feather; + font-size: 1.4em; + font-weight: bold; +} +.button-bspres, .button-reb, .button-lock, +.button-quit, .button-off{ + padding: .5rem .2rem .3rem .2rem; +} +.button-off{ + margin-bottom: .5rem; + color: $red; +} +.button-bspres{ + color: $green; +} +.button-reb{ + color: $yellow +} +.button-quit{ + color: $magenta; +} +.button-lock{ + color: $blue; +} diff --git a/user/files/eww/eww.yuck b/user/files/eww/eww.yuck new file mode 100644 index 0000000..27afb2a --- /dev/null +++ b/user/files/eww/eww.yuck @@ -0,0 +1,222 @@ +(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces") +(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace") +(defwidget workspaces [] + (eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces-widget" + (box :space-evenly true :orientation "v" + (for workspace in workspaces + (eventbox :onclick "hyprctl dispatch workspace ${workspace.id}" + (box :orientation "v" :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""} ${workspace.windows > 0 ? "occupied" : "empty"}" + (label :text "${workspace.id}") + ) + ) + ) + ) + ) + ) + + + + +;; Created by https://github.com/rxyhn +;; Designed by https://github.com/rxyhn +;; Maintaned by https://github.com/rxyhn + +;; put path to aesthetic bar config files here ;; +(defvar eww "/usr/bin/eww -c $HOME/.config/eww") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Widget Section's ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Launcher Widgets ;; +(defwidget launcher [] + (box :orientation "v" + :space-evenly "false" + :spacing -15 + (button :class "launcher_icon" + :onclick "scripts/popup launcher" ""))) + +;; Volume Widgets ;; +(defwidget volum [] + (eventbox :onhover "${eww} update volum=true" + :onhoverlost "${eww} update volum=false" + (box :orientation "v" + :space-evenly "false" + :spacing "2" + (revealer :transition "slideup" + :reveal volum + :duration "150ms" + (scale :class "volbar" + :value current-volume + :orientation "v" + :flipped true + :tooltip "Volume: ${current-volume}%" + :max 101 + :min 0 + :onchange "amixer sset Master {}%" )) + (button :onclick "pavucontrol" :class "volume-icon" "")))) +(defpoll current-volume :interval "1s" "~/.config/eww/scripts/getvol") +(defvar volum false) + + +;; Wifi Widgets ;; +(defwidget wifi [] + (box :orientation "v" + :tooltip wifi-name + (button :onclick "scripts/popup wifi" + :class "wifi-icon" wifi-icon))) +(defpoll wifi-icon :interval "1s" "scripts/wifi icon") +(defpoll wifi-name :interval "1s" "scripts/wifi name") + +;; Brightness Widgets ;; +(defwidget bright [] + (eventbox :onhover "${eww} update bright=true" + :onhoverlost "${eww} update bright=false" + (box :orientation "v" + :space-evenly "false" + :spacing 2 + (revealer :transition "slideup" + :reveal bright + :duration "550ms" + (scale :class "bribar" + :value current-brightness + :tooltip "Brightness: ${current-brightness}%" + :onchange "brightnessctl set {}%" + :orientation "v" + :flipped true + :max 101 + :min 0)) + (label :class "brightness-icon" + :text "")))) +(defpoll current-brightness :interval "1s" "brightnessctl -m | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'") +(defvar bright false) + +;; Control Panel Widgets ;; +(defwidget control [] + (box :orientation "v" + :space-evenly false + :class "control" +(volum)(bright)(wifi))) + +;; Clock Widgets ;; +(defwidget time [] + (box :orientation "v" + :class "time" + :valign "end" + (button :onclick "scripts/popup calendar" + :class "time-hour" hour) + (button :onclick "scripts/popup calendar" + :class "time-min" min))) +(defpoll hour :interval "1s" "date '+%H'") +(defpoll min :interval "1s" "date '+%M'") + +;; Calendar Widgets ;; +(defwidget cal [] + (box :class "cal-box" + :orientation "v" + (box :class "cal-inner-box" + (calendar :class "cal" + :day calendar_day + :month calendar_month + :year calendar_year)))) +(defpoll calendar_day :interval "10h" + "date '+%d'") +(defpoll calendar_month :interval "10h" + "scripts/calendar") +(defpoll calendar_year :interval "10h" + "date '+%Y'") + +;; Powermenu Widgets ;; +(defwidget power [] + (eventbox :onhover "${eww} update power=true" + :onhoverlost "${eww} update power=false" + (box :orientation "v" + :space-evenly "false" + :vexpand "false" + :class "powermenu" + (revealer :transition "slideup" + :reveal power + :duration "550ms" + (box :orientation "v" + :space-evenly "false" + + (button :class "button-bspres" + :tooltip "BSPWM Restart" + :onclick "bspc wm -r" "" ) + + (button :class "button-reb" + :tooltip "Reboot" + :onclick "reboot" "") + + (button :class "button-quit" + :tooltip "Logout" + :onclick "killall bspwm" "") + + (button :class "button-lock" + :tooltip "Lock Screen" + :onclick "betterlockscreen -l" ""))) + + (button :class "button-off" + :tooltip "Shutdown" + :onclick "shutdown now" "")))) +(defvar power false) + +;; Top Widgets ;; +(defwidget top [] + (box :orientation "v" + :space-evenly "false" + :valign "start" +(launcher) +(workspaces))) + +;; Bottom Widgets ;; +(defwidget bottom [] + (box :orientation "v" + :space-evenly false +(time) +(power))) + +;; End Widgets ;; +(defwidget end [] + (box :orientation "v" + :space-evenly "false" + :valign "end" + :spacing 5 +(control) +(bottom))) + +;; Bar Widgets ;; +(defwidget bar [] + (box :class "eww_bar" + :orientation "v" + :vexpand "false" + :hexpand "false" +(top) +(end))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Window Section's ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Bar Windows ;; +(defwindow bar + :geometry (geometry :x "0" + :y "0" + :height "100%" + :width "47px") + :monitor 0 + :reserve (struts :distance "35px" + :side "left") + :wm-ignore false + :hexpand "false" + :vexpand "false" +(bar)) + +;; Calendar Windows ;; +(defwindow calendar + :geometry (geometry :x "70px" + :y "65%" + :width "270px" + :height "60px") +(cal)) + + + diff --git a/user/files/eww/scripts/battery b/user/files/eww/scripts/battery new file mode 100755 index 0000000..300c017 --- /dev/null +++ b/user/files/eww/scripts/battery @@ -0,0 +1,44 @@ +#!/bin/sh + +bat=/sys/class/power_supply/BAT0/ +per="$(cat "$bat/capacity")" + +icon() { + +[ $(cat "$bat/status") = Charging ] && echo "" && exit + +if [ "$per" -gt "90" ]; then + icon="" +elif [ "$per" -gt "80" ]; then + icon="" +elif [ "$per" -gt "70" ]; then + icon="" +elif [ "$per" -gt "60" ]; then + icon="" +elif [ "$per" -gt "50" ]; then + icon="" +elif [ "$per" -gt "40" ]; then + icon="" +elif [ "$per" -gt "30" ]; then + icon="" +elif [ "$per" -gt "20" ]; then + icon="" +elif [ "$per" -gt "10" ]; then + icon="" + notify-send -u critical "Battery Low" "Connect Charger" +elif [ "$per" -gt "0" ]; then + icon="" + notify-send -u critical "Battery Low" "Connect Charger" +else + echo  && exit +fi +echo "$icon" +} + +percent() { +echo $per +} + +[ "$1" = "icon" ] && icon && exit +[ "$1" = "percent" ] && percent && exit +exit diff --git a/user/files/eww/scripts/change-active-workspace b/user/files/eww/scripts/change-active-workspace new file mode 100755 index 0000000..af2ce35 --- /dev/null +++ b/user/files/eww/scripts/change-active-workspace @@ -0,0 +1,21 @@ +#! /bin/bash +function clamp { + min=$1 + max=$2 + val=$3 + python -c "print(max($min, min($val, $max)))" +} + +direction=$1 +current=$2 +if test "$direction" = "down" +then + target=$(clamp 1 10 $(($current+1))) + echo "jumping to $target" + hyprctl dispatch workspace $target +elif test "$direction" = "up" +then + target=$(clamp 1 10 $(($current-1))) + echo "jumping to $target" + hyprctl dispatch workspace $target +fi diff --git a/user/files/eww/scripts/get-active-workspace b/user/files/eww/scripts/get-active-workspace new file mode 100755 index 0000000..5791828 --- /dev/null +++ b/user/files/eww/scripts/get-active-workspace @@ -0,0 +1,3 @@ +#!/bin/bash +hyprctl monitors -j | jq --raw-output .[0].activeWorkspace.id +socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 grep '^workspace>>' | stdbuf -o0 awk -F '>>|,' '{print $2}' diff --git a/user/files/eww/scripts/get-workspaces b/user/files/eww/scripts/get-workspaces new file mode 100755 index 0000000..570ff6e --- /dev/null +++ b/user/files/eww/scripts/get-workspaces @@ -0,0 +1,11 @@ +#!/bin/bash + +spaces (){ + WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries') + seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})' +} + +spaces +socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do + spaces +done diff --git a/user/files/eww/scripts/getram b/user/files/eww/scripts/getram new file mode 100755 index 0000000..791a5a5 --- /dev/null +++ b/user/files/eww/scripts/getram @@ -0,0 +1,2 @@ +#!/bin/sh +printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') diff --git a/user/files/eww/scripts/getvol b/user/files/eww/scripts/getvol new file mode 100755 index 0000000..5f2e4ea --- /dev/null +++ b/user/files/eww/scripts/getvol @@ -0,0 +1,2 @@ +#!/bin/sh +amixer sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1 diff --git a/user/files/eww/scripts/wifi b/user/files/eww/scripts/wifi new file mode 100755 index 0000000..65c23c9 --- /dev/null +++ b/user/files/eww/scripts/wifi @@ -0,0 +1,13 @@ +#!/bin/sh + +symbol() { +[ $(cat /sys/class/net/w*/operstate) = down ] && echo  && exit +echo  +} + +name() { +nmcli | grep "^wlp" | sed 's/\ connected\ to\ /Connected to /g' | cut -d ':' -f2 +} + +[ "$1" = "icon" ] && symbol && exit +[ "$1" = "name" ] && name && exit diff --git a/user/files/git/config b/user/files/git/config new file mode 100644 index 0000000..9432b98 --- /dev/null +++ b/user/files/git/config @@ -0,0 +1,44 @@ +[user] + email = fbtijfdq@void.black + name = Morten Olsen + signingkey = 0x4269430A8C3D09A8 + +[alias] + graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%C(blue)%x20(%ce)%x20%C(cyan)[gpg:%GK%x20%G?]%C(reset)%n%x20%s%n" + ll = log --oneline + st = status -sb + cm = commit -m + append = commit --amend --no-edit + sobmodules = submodule update --init --recursive + df = difftool -t nvimdiff -y + last = log -1 --stat + br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate + brr = branch --remote --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate + undo = reset HEAD~1 --mixed + unstage = reset HEAD -- + +[difftool "nvimdiff"] + cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"" +[commit] + gpgsign = true +[url "git@gitlab.com:maersktankers/"] + insteadOf = https://gitlab.com/maersktankers/ +[url "git@github.com:morten-olsen/"] + insteadOf = https://github.com/morten-olsen/ +[url "git@github.com:0north/"] + insteadOf = https://github.com/0north/ +[url "https://"] + insteadOf = git:// + +[core] + pager = delta + hooksPath = /dev/null + +[interactive] + diffFilter = delta --color-only + +[pull] + ff = only +[init] + defaultBranch = main + diff --git a/user/files/gpg/gpg-agent.conf b/user/files/gpg/gpg-agent.conf new file mode 100644 index 0000000..06cf5db --- /dev/null +++ b/user/files/gpg/gpg-agent.conf @@ -0,0 +1,10 @@ +# https://github.com/drduh/config/blob/master/gpg-agent.conf +# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html +enable-ssh-support +default-cache-ttl 60 +max-cache-ttl 120 +#pinentry-program /usr/bin/pinentry-curses +#pinentry-program /usr/bin/pinentry-curses +#pinentry-program /usr/local/bin/pinentry-curses +pinentry-program /run/current-system/sw/bin/pinentry-gnome3 + diff --git a/user/files/gpg/gpg.conf b/user/files/gpg/gpg.conf new file mode 100644 index 0000000..1cf37dd --- /dev/null +++ b/user/files/gpg/gpg.conf @@ -0,0 +1,54 @@ +# https://github.com/drduh/config/blob/master/gpg.conf +# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html +# https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html +# Use AES256, 192, or 128 as cipher +personal-cipher-preferences AES256 AES192 AES +# Use SHA512, 384, or 256 as digest +personal-digest-preferences SHA512 SHA384 SHA256 +# Use ZLIB, BZIP2, ZIP, or no compression +personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed +# Default preferences for new keys +default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed +# SHA512 as digest to sign keys +cert-digest-algo SHA512 +# SHA512 as digest for symmetric ops +s2k-digest-algo SHA512 +# AES256 as cipher for symmetric ops +s2k-cipher-algo AES256 +# UTF-8 support for compatibility +charset utf-8 +# Show Unix timestamps +fixed-list-mode +# No comments in signature +no-comments +# No version in signature +no-emit-version +# Long hexidecimal key format +keyid-format 0xlong +# Display UID validity +list-options show-uid-validity +verify-options show-uid-validity +# Display all keys and their fingerprints +with-fingerprint +# Display key origins and updates +#with-key-origin +# Cross-certify subkeys are present and valid +require-cross-certification +# Disable caching of passphrase for symmetrical ops +no-symkey-cache +# Enable smartcard +use-agent +# Disable recipient key ID in messages +throw-keyids +# Default/trusted key ID to use (helpful with throw-keyids) +default-key 0xE38E38DDAF34677F +#trusted-key 0xFF3E7D88647EBCDB +# Keyserver URL +#keyserver hkps://pgp.mit.edu +#keyserver hkps://hkps.pool.sks-keyservers.net +#keyserver hkps://keys.openpgp.org +keyserver hkps://keyserver.ubuntu.com:443 +#keyserver hkps://pgp.ocf.berkeley.edu +# Proxy to use for keyservers +#keyserver-options http-proxy=socks5-hostname://127.0.0.1:9050 + diff --git a/user/files/hyprland/binds.conf b/user/files/hyprland/binds.conf new file mode 100644 index 0000000..bfb3dfe --- /dev/null +++ b/user/files/hyprland/binds.conf @@ -0,0 +1,62 @@ +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod SHIFT, escape, exec, systemctl suspend +bind = $mainMod, return, exec, kitty +bind = $mainMod, d, exec, wofi --show drun +bind = $mainMod, v, exec, pavucontrol +bind=SUPER,Q,killactive, +bind=SUPERCONTROL,Q,exec,hyprctl kill +bind=SUPER,F,fullscreen +bind = $mainMod, M, exit, +bind = $mainMod SHIFT, return, exec, flatpak run org.mozilla.firefox +bind = $mainMod, t, togglefloating, + +# Move focus with mainMod + arrow keys +bind = $mainMod, h, movefocus, l +bind = $mainMod, l, movefocus, r +bind = $mainMod, k, movefocus, u +bind = $mainMod, j, movefocus, d + +# 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 + +# Audio controls +bind=,XF86AudioMute,exec,~/.config/hypr/scripts/volume.sh mute +bind=,XF86AudioLowerVolume,exec,~/.config/hypr/scripts/volume.sh down +bind=,XF86AudioRaiseVolume,exec,~/.config/hypr/scripts/volume.sh up +bind=,XF86AudioMicMute,exec,pactl set-source-mute @DEFAULT_SOURCE@ toggle + +# Display brightness +bindle=,XF86MonBrightnessUp,exec,~/.config/hypr/scripts/brightness.sh up # increase screen brightness +bindle=,XF86MonBrightnessDown,exec,~/.config/hypr/scripts/brightness.sh down # decrease screen brightnes diff --git a/user/files/hyprland/exec.conf b/user/files/hyprland/exec.conf new file mode 100644 index 0000000..4401cde --- /dev/null +++ b/user/files/hyprland/exec.conf @@ -0,0 +1,11 @@ +exec=mako +exec-once=avizo-service +exec-once=redshift -c ~/.config/redshift/config +exec-once=kanshi +exec-once=libinput-gestures +exec-once=hyprpaper +exec-once=~/.config/hypr/scripts/screensharing.sh +exec-once=~/.config/hypr/scripts/idle.sh +exec-once=~/.config/hypr/scripts/eww.sh +exec-once /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + diff --git a/user/files/hyprland/general.conf b/user/files/hyprland/general.conf new file mode 100644 index 0000000..c8814e4 --- /dev/null +++ b/user/files/hyprland/general.conf @@ -0,0 +1,74 @@ +general { + sensitivity=1.00 + apply_sens_to_raw=1 + cursor_inactive_timeout=5 + layout=dwindle + border_size=0 + col.active_border=0xffc0392b + col.inactive_border=0x00292a37 +} + +decoration { + rounding=4 + #blur=1 + inactive_opacity = 0.8 + drop_shadow=0 + shadow_range=20 + col.shadow=0xffb072d1 + dim_inactive=1 + dim_strength=0.6 +} + +gestures { + workspace_swipe=1 + workspace_swipe_distance=400 + workspace_swipe_invert=1 + workspace_swipe_min_speed_to_force=30 + workspace_swipe_cancel_ratio=0.5 + workspace_swipe_create_new=0 + workspace_swipe_forever=1 +} + +#Decoration section in theme file +blurls=lockscreen + +bezier=slow,0,0.85,0.3,1 +bezier=overshot,0.7,0.6,0.1,1.1 +bezier=bounce,1,1.6,0.1,0.85 +bezier=slingshot,1,-1,0.15,1.25 +bezier=nice,0,6.9,0.5,-4.20 + +animations { + enabled=1 + animation=windows,1,4,overshot,slide + animation=border,1,20,default + animation=fade,1,5,overshot + animation=workspaces,1,3,overshot,slidevert +} + +dwindle { + pseudotile=0 # enable pseudotiling on dwindle +} + +master { + new_is_master=0 + new_on_top=0 +} + +binds { + workspace_back_and_forth=1 + allow_workspace_cycles=1 + pass_mouse_when_bound=0 + } + +misc { + #no_vfr=0 + enable_swallow=1 + swallow_regex=^(foot:kitty:Alacritty)$ + no_direct_scanout=1 +} + +windowrule=float,pavucontrol +windowrule=float,title:^(Firefox — Sharing Indicator)$ +windowrule=move 95% 95%,title:^(Firefox — Sharing Indicator)$ +windowrule=nofullscreenrequest,title:^(Firefox — Sharing Indicator)$ diff --git a/user/files/hyprland/hyprland.conf b/user/files/hyprland/hyprland.conf new file mode 100644 index 0000000..55ebea8 --- /dev/null +++ b/user/files/hyprland/hyprland.conf @@ -0,0 +1,18 @@ +monitor=,preferred,auto,auto +monitor=DP-2,addreserved,0,0,50,0 +monitor=eDP-1,addreserved,0,0,50,0 +monitor=DP-2,preferred,auto,1 +monitor=DP-2,preferred,auto,1 + +#55a75e044c80 + +bindl=,switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable" +bindl=,switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefered, auto, 1" + +workspace=eDP-1,1 +workspace=DP-2,9 + +source=~/.config/hypr/general.conf +source=~/.config/hypr/input.conf +source=~/.config/hypr/exec.conf +source=~/.config/hypr/binds.conf diff --git a/user/files/hyprland/hyprpaper.conf b/user/files/hyprland/hyprpaper.conf new file mode 100644 index 0000000..0e5028b --- /dev/null +++ b/user/files/hyprland/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = ~/wallpaper.jpg + +wallpaper = ,~/wallpaper.jpg diff --git a/user/files/hyprland/input.conf b/user/files/hyprland/input.conf new file mode 100644 index 0000000..904c75a --- /dev/null +++ b/user/files/hyprland/input.conf @@ -0,0 +1,24 @@ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = caps:swapescape + kb_rules = + + follow_mouse = 1 + + touchpad { + disable_while_typing=1 + natural_scroll=1 + clickfinger_behavior=1 + middle_button_emulation=0 + tap-to-click=1 + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +device:at-translated-set-2-keyboard { + kb_layout = dk + kb_variant = nodeadkeys +} diff --git a/user/files/hyprland/scripts/brightness.sh b/user/files/hyprland/scripts/brightness.sh new file mode 100755 index 0000000..2015d9b --- /dev/null +++ b/user/files/hyprland/scripts/brightness.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +down() { + brightnessctl s '10%-' +} + +up() { + brightnessctl s +10% +} + +case "$1" in + up) up;; + down) down;; +esac diff --git a/user/files/hyprland/scripts/eww.sh b/user/files/hyprland/scripts/eww.sh new file mode 100755 index 0000000..d631a9b --- /dev/null +++ b/user/files/hyprland/scripts/eww.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +eww daemon +eww open bar diff --git a/user/files/hyprland/scripts/idle.sh b/user/files/hyprland/scripts/idle.sh new file mode 100755 index 0000000..bc57b5c --- /dev/null +++ b/user/files/hyprland/scripts/idle.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# +swayidle -w \ + before-sleep 'loginctl lock-session $XDG_SESSION_ID' \ + lock '~/.config/hypr/scripts/lock.sh' diff --git a/user/files/hyprland/scripts/lock.sh b/user/files/hyprland/scripts/lock.sh new file mode 100755 index 0000000..0c4cbf0 --- /dev/null +++ b/user/files/hyprland/scripts/lock.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +swaylock \ + --screenshots \ + --clock \ + --indicator-radius 200 \ + --indicator-thickness 8 \ + --datestr "%a %e.%m.%Y" --timestr "%k:%M" \ + --effect-scale 1 \ + --effect-blur 7x7 \ + --ring-color 000000 \ + --key-hl-color 880033 \ + --line-color 00000000 \ + --inside-color 00000066 \ + --separator-color 00000000 \ + --fade-in 0.6 + #--effect-vignette 0.5:0.5 \ diff --git a/user/files/hyprland/scripts/screensharing.sh b/user/files/hyprland/scripts/screensharing.sh new file mode 100755 index 0000000..cd9afac --- /dev/null +++ b/user/files/hyprland/scripts/screensharing.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal-wlr +killall xdg-desktop-portal +/usr/libexec/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & diff --git a/user/files/hyprland/scripts/volume.sh b/user/files/hyprland/scripts/volume.sh new file mode 100755 index 0000000..492784c --- /dev/null +++ b/user/files/hyprland/scripts/volume.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +down() { +pamixer -u +pamixer -d 5 +volume=$(pamixer --get-volume) +[ $volume -gt 0 ] && volume=`expr $volume` +prec=`echo "scale=2; $volume / 100" | bc` +avizo-client --progress=$prec --time=0.5 --background="#222" --foreground="#f39c12" +} + +up() { +pamixer -u +pamixer -i 5 +volume=$(pamixer --get-volume) +[ $volume -lt 100 ] && volume=`expr $volume` +prec=`echo "scale=2; $volume / 100" | bc` +avizo-client --progress=$prec --time=1 +} + +mute() { +muted="$(pamixer --get-mute)" +if $muted; then + pamixer -u + notify-send "Unmuted" +else + pamixer -m + notify-send "Muted" +fi +} + +case "$1" in + up) up;; + down) down;; + mute) mute;; +esac diff --git a/user/files/kitty/kitty.conf b/user/files/kitty/kitty.conf new file mode 100644 index 0000000..f8b290b --- /dev/null +++ b/user/files/kitty/kitty.conf @@ -0,0 +1,8 @@ +font_family FiraCode Nerd Font Reg +bold_font FiraCode Nerd Font Bold +italic_font auto +bold_italic_font auto +disable_ligatures cursor +enable_audio_bell no +bell_on_tab no +background_opacity 0.8 diff --git a/user/files/shell/rc.d/00-vars.sh b/user/files/shell/rc.d/00-vars.sh new file mode 100644 index 0000000..e69de29 diff --git a/user/files/shell/rc.d/01-scripts.sh b/user/files/shell/rc.d/01-scripts.sh new file mode 100644 index 0000000..416e3ef --- /dev/null +++ b/user/files/shell/rc.d/01-scripts.sh @@ -0,0 +1,2 @@ +export PATH="$PATH:$HOME/.local/bin" + diff --git a/user/files/shell/rc.d/02-alias.sh b/user/files/shell/rc.d/02-alias.sh new file mode 100644 index 0000000..287b9ed --- /dev/null +++ b/user/files/shell/rc.d/02-alias.sh @@ -0,0 +1,34 @@ +alias ..="cd .." + +alias g="git" +alias ls="eza" +alias mutt="neomutt" + +alias gr="cd \`git rev-parse --show-toplevel\`" + +# Enable aliases to be sudo’ed +alias sudo='sudo ' + +# Get week number +alias week='date +%V' + +# macOS has no `md5sum`, so use `md5` as a fallback +command -v md5sum > /dev/null || alias md5sum="md5" + +# macOS has no `sha1sum`, so use `shasum` as a fallback +command -v sha1sum > /dev/null || alias sha1sum="shasum" + +# Print each PATH entry on a separate line +alias path='echo -e ${PATH//:/\\n}' + +# Enable tab completion for `g` by marking it as an alias for `git` +command -v _git > /dev/null && command -v complete > /dev/null && complete -o default -o nospace -F _git g + +command -v xsel > /dev/null || alias copy='xsel -ib' +command -v urxvt > /dev/null || alias n="setsid urxvt &>/dev/null" + +alias sc="sudo systemctl" +alias usermount="sudo mount -o gid=users,fmask=113,dmask=002" +alias fzf="fzf --preview 'bat {} --line-range 0:100 --color always'" +alias stmux="tmux a -t base || tmux new -s base" + diff --git a/user/files/shell/rc.d/02-bat.sh b/user/files/shell/rc.d/02-bat.sh new file mode 100644 index 0000000..49ed73a --- /dev/null +++ b/user/files/shell/rc.d/02-bat.sh @@ -0,0 +1,6 @@ +if hash bat &> /dev/null; then + export MANPAGER="sh -c 'col -bx | bat -l man -p'" + export BAT_THEME="MonokaiExtended" + alias cat="bat" +fi + diff --git a/user/files/shell/rc.d/03-ssh.sh b/user/files/shell/rc.d/03-ssh.sh new file mode 100644 index 0000000..965cfe9 --- /dev/null +++ b/user/files/shell/rc.d/03-ssh.sh @@ -0,0 +1,8 @@ +export TMPDIR=${TMPDIR:-/tmp} + +if ! pgrep -U "$UID" ssh-agent > /dev/null; then + ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env" +fi +if [[ ! "$SSH_AUTH_SOCK" ]]; then + eval "$(<"$XDG_RUNTIME_DIR/ssh-agent.env")" +fi diff --git a/user/files/shell/rc.d/05-npm.sh b/user/files/shell/rc.d/05-npm.sh new file mode 100644 index 0000000..468d3cf --- /dev/null +++ b/user/files/shell/rc.d/05-npm.sh @@ -0,0 +1,7 @@ +export GH_TOKEN=${GH_TOKEN:-unset} +export NPM_GH_TOKEN=${GH_TOKEN:-unset} +export NPM_NPM_TOKEN=${NPM_NPM_TOKEN:-unset} +export PUBLISH_NPM_GITLAB_TOKEN=${NPM_NPM_TOKEN:-unset} +export NPM_PRIVATE_TOKEN=${NPM_PRIVATE_TOKEN:-unset} +npm set prefix ~/.npm-global + diff --git a/user/files/shell/rc.d/07-fzf.sh b/user/files/shell/rc.d/07-fzf.sh new file mode 100644 index 0000000..e81930f --- /dev/null +++ b/user/files/shell/rc.d/07-fzf.sh @@ -0,0 +1 @@ +export FZF_DEFAULT_COMMAND='ag -g ""' diff --git a/user/files/shell/rc.d/10-gpg-agent.sh b/user/files/shell/rc.d/10-gpg-agent.sh new file mode 100644 index 0000000..049cf20 --- /dev/null +++ b/user/files/shell/rc.d/10-gpg-agent.sh @@ -0,0 +1,5 @@ +export GPG_TTY="$(tty)" +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +gpgconf --launch gpg-agent +gpg-connect-agent updatestartuptty /bye > /dev/null + diff --git a/user/files/shell/rc.d/10-nvim.sh b/user/files/shell/rc.d/10-nvim.sh new file mode 100644 index 0000000..ffaea50 --- /dev/null +++ b/user/files/shell/rc.d/10-nvim.sh @@ -0,0 +1,3 @@ +export EDITOR=nvim +alias vim=nvim + diff --git a/user/files/ssh/authorized_keys b/user/files/ssh/authorized_keys new file mode 100644 index 0000000..cb773d8 --- /dev/null +++ b/user/files/ssh/authorized_keys @@ -0,0 +1,4 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCoklnJCZ77Pr9Vd89Wi5jlmRzRGAbGF63lxsRW46C0jwf3BT0B1rFDPr0Opi0uFG5dMbIN9YbXHnh2rVFjxhBqifkWU0zOTRcRNZUI4p28RR0H7wCPohMCOvalkf8NGbNSkBi47nVMUauJ2CASlgyGeSg6kvAtB8y4i/jF0pBsFaOdu2J088itPqoHjqFIlQ3p8lefGm2Fsj5V5g7xtPuhPmR8tvU+K1iPauptLMLbfeqNVlHoMZq0LoGnMkgx0gwFatt3Pyhe91HFJBX+Kd/yN8nkokkEd/abkbiJ2OkeHfF94NMyco9VlgRTXpkxnAldHp7a4OJGdiVh0d+k0B7EEXMQgq9M2+kBBjOBN4f3nw6ftZyJ3hYsK0K9eL/gVV14jDyt1d07xedfkBauLV1HObYd1mSily8nJZkHAQHvpjToktwwfmoNvhHBdIZm11NxoRTz4T6Pn98TCksR4UtT2jOcdlb/agSYoGMLEyw1yvSSu8Q8I3FrjPh/qfA4Ssjk2DD9HqUu1G9EMB3p/3C6LblBK1KJmpjpPFNRw7Qc/ntJ9gtb3xUlDQi7AcOitjNVVR1prvC4dQ0l2O5bXw6wInLXz2JJiyhwTtSl+Du+Ng1JnAL4EXCPrXcPTV5Jqz9h3l/crULEctFZUGQbVSyhjQbb9WxfedQVE+aEetNC2Q== +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZob/qPQN/9Fb+wVF4pcGtQiho5sVkSgr9V6ISSA5MrOTX0C7H6CHZY+2imEyu0wa14UTte03gwXuHR3ibwwHdGWFd6oMmu9C1MpNIdHn7HIT/Z7vFCO0ra/cErKpDRSrkPkqk6VkTZtpj+3xAEhjHIANfA2U0Uedzq9+p7CdO6HIH0z9jxgCb1pyJP0B6XAqiRphwS1h1DIZIfvp2Ffsx4cG7lcn8v4w7RaDVJ2HPnxeUeR9Y0TvBq+JQdwIEFL8vRdKNktzc1wPyLL0/u6qplWEF+t2V3WmTc6VS6TeFsnClEH/voiM5edQy9oZPxuV3OurCE8j8i8ciR2UlgRdy28Rt0b4NGkvlKDVt08aLmWVuLCmdWRctD7M8YqmDB/9TX/wN5Hj03sdF2duQarQMOheBtsL6OvNT1yHn0FveNZfvuxDP1GliOy5lPqp9izPkvGSFEnxiiPUzMpVVZfrI6DucqLms7EAF6RjKPbWE5xELcj+I412eTp56hUy1bXUH2Gx91tGnTNlxaRDDVXN2S+wB0TgAbFwmNfK4J9Th6TakXoyZHmoaTsTmpMRnj40rtp88ZvT8I8gMosXVqben8jccX5ZUWlTSMvaUjpBEMTmvuaHBv7qrH2itF/3ODqA8g2uXmcIkdW6PA9kxWG5IXRMCqmLuDBqhRpgw2jJP6w== +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCz43+8OPbXxTdWOvIzLKTZmXQzTvoE/Nu3K0+HA80m4HmILz9Ypv4G7HYZocw4WqhveWPUVJnjXbMNrQ1K00CeMqlEqUZj0CXfnDYyd2qDEj+eKmoL8tAFyDdEFmUvn9XfM45yanZ3Rhi1tnVMzsfkK+JQTf7jU5br1bC2XU62J/rymC4M13IDcxhqjrc+TlYafRdlSgt1NeZh/cgxMdesTvHCAIoVVqPcTxrOSK8X9lJGBc2+rnllXFBRxokur34DWuKpd4rVqbENzyuCqVvEASZQGoy9m1NEi+FJRoJy98YQXEDyna6/BCrIQ58wMOYCg1gtD5Cih9ht6bmb9iiZcmj6R25vaeqnhGdbMmWcQuv4DPpf2xV1yrY7FebazSHSZQgsc50ReO2jCnMNhun562gPq7q8Ge+xQzLdDICKyQxG1NSnuq+azxzPuXmx/y/hMEOcu4WcrTGgRtKIIMFcqKF0OIw2YGpoYuqOp1yyjp+RDdnXEDNSYR6o9ZiYvXUdqRoWEQlYIqM42M6tLwKMXIPyAwmoq5PruhU/HAppCx3UoMDUE5I+L2BEVglL3iXw+eDgoiltfKKiTul7C9D2aGEi+FRRiKjQUvT6aBnXIit+iU6i4m0WJKvFE4oAX0e7/t3GQW1ycsDj15F5RpcNX8p+pbH0e9B1Uye7TFySSQ== +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCj8wspkAnOpEmipwB/xd8vpEx9aqNbyjD2xzv0msDJvYMn26ZO3cbtbWbMI9Uns55aHcL0bStdbaJQIcL8ZVzvQtKq+spdZYQpN4cFlN16HXKR/UjBYtJEdHVxb2cwb2DM04aLDuAlCAJGChEAqpIQFpvlByyAaxSPwor5Cy5JHmm5fMkvcJEvPtxQOo4yovY8qW9scWlOCrzNSAYtBwTGG8REcRuTaEW9EJlmn8QZA+T+cE7nFdZOlmm752jW9wBCAIKlg6W5gX0rysSxy+MkKB/2ohpLI+0SeWAM8+CEtZjO7GP6xRPXZgrZJssytzQsJoiMTs6rJM5ovHUMVNPGDLCB6+8lWM7Jk4hh0lIQTOC5AMucH2jRJSyQb2AA3kbPuWOwHDDIlSUnNFsI/xUVs1lfx3ikIZEb9oZcKwWBB2PeL/KT6ca7dsI3PyFL+hC5Wi7ll0Aj5w+dBZOxwW1agSo4ujPKO9oIVwqEA+PqoK/GZtIHAx6t/m3DK8T4HAo2GZMqyzRgcqk1bttaCFzX2h074yW1du8+l4yIqWrooqD474V3MT05HUxkA1+9S5ldEwK4J50WfKlhNuZn5YeiHLngisu8WyIGREYDGlkM+1qxwHiJGohigS20kpmTUkKvyLRXItAcvQYBknCV3qb8B1Kj1bvbN3sCaqQAeVWxDw== diff --git a/user/files/ssh/config b/user/files/ssh/config new file mode 100644 index 0000000..a419e16 --- /dev/null +++ b/user/files/ssh/config @@ -0,0 +1,7 @@ +Include ~/.ssh/config.d/* + +Host * + Controlmaster auto + Controlpath ${TMPDIR}/ssh-%r@%h:%p + + diff --git a/user/files/ssh/config.d b/user/files/ssh/config.d new file mode 120000 index 0000000..9e90cea --- /dev/null +++ b/user/files/ssh/config.d @@ -0,0 +1 @@ +../.dotfiles/git/.ssh/config.d \ No newline at end of file diff --git a/user/files/ssh/known_hosts b/user/files/ssh/known_hosts new file mode 100644 index 0000000..e69de29 diff --git a/user/files/tmux/config b/user/files/tmux/config new file mode 100644 index 0000000..9903ed6 --- /dev/null +++ b/user/files/tmux/config @@ -0,0 +1,112 @@ +set -g mouse on +set -g default-terminal "screen-256color-bce" +set -g status-justify centre + +#set -ga terminal-overrides ',xterm-256color:Tc' + + +set -g base-index 1 +set -g renumber-windows on +set -g lock-command physlock +bind q lock-client + +# use C-a +# unbind C-b +# set-option -g prefix C-a +# bind-key C-a send-prefix + +# split with | and - +#bind | split-window -h +#bind - split-window -v +unbind '"' +unbind % + +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +bind -r H resize-pane -L 10 +bind -r J resize-pane -D 10 +bind -r K resize-pane -U 10 +bind -r L resize-pane -R 10 + +# switch panes using Alt-arrow without prefix +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + +bind o attach -c "#{pane_current_path}" + +# don't rename windows automatically +set-option -g allow-rename off + +set -g @plugin 'tmux-plugins/tpm' + +run -b '~/.tmux/plugins/tpm/tpm' +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" + +# set -g @plugin "arcticicestudio/nord-tmux" +# set -g @plugin 'dracula/tmux' +# set -g @dracula-show-powerline true +set -g @plugin 'wfxr/tmux-power' +# open pane in vim +bind-key / capture-pane -S -102400 -J \; new-window 'vim -c ":read !tmux save-buffer - ; tmux delete-buffer;" -c ":normal gg" -c ":set buftype=nofile" -c ":silent! ChompWhitespace"' + +# clear history +# bind k send-keys -R \; clear-history + +# copy mode +setw -g mode-keys vi +bind Escape copy-mode +unbind [ +unbind p +bind p paste-buffer +bind -Tcopy-mode-vi v send -X begin-selection +bind -Tcopy-mode-vi y send -X copy-selection +bind -Tcopy-mode-vi Escape send -X cancel + +# panes +bind - split-window -v -c "#{pane_current_path}" +bind | split-window -h -c "#{pane_current_path}" +bind C-z resize-pane -Z +bind g swap-pane -U +bind æ swap-pane -D + +# panes +#set -g window-active-style 'bg=colour236' +#set -g window-style 'bg=black' + + +# Smart pane switching with awareness of Vim splits. +# See: https://github.com/christoomey/vim-tmux-navigator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' + +bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1' +bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1' +bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1' +bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1' + +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l + +# Utils +bind -r g display-popup -d '#{pane_current_path}' -w80% -h80% -E lazygit + diff --git a/user/files/wofi/INSTALL.md b/user/files/wofi/INSTALL.md new file mode 100644 index 0000000..b6ba9f2 --- /dev/null +++ b/user/files/wofi/INSTALL.md @@ -0,0 +1,13 @@ +### [wofi](https://hg.sr.ht/~scoopta/wofi) + +#### Install using Git + +If you are a git user, you can install the theme and keep up to date by cloning the repo: + + $ git clone https://github.com/dracula/wofi.git + +#### Install manually + +Download using the [GitHub .zip download](https://github.com/dracula/wofi/archive/master.zip) option and unzip them. +Place `style.css` in your `~/.config/wofi` directory. + diff --git a/user/files/wofi/LICENSE b/user/files/wofi/LICENSE new file mode 100644 index 0000000..2095990 --- /dev/null +++ b/user/files/wofi/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Dracula Theme + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/user/files/wofi/README.md b/user/files/wofi/README.md new file mode 100644 index 0000000..4a46ff7 --- /dev/null +++ b/user/files/wofi/README.md @@ -0,0 +1,27 @@ +# Dracula for [wofi](https://hg.sr.ht/~scoopta/wofi) + +> A dark theme for [wofi](https://hg.sr.ht/~scoopta/wofi). + +![Screenshot](./screenshot.png) + +## Install + +All instructions can be found at [draculatheme.com/wofi](https://draculatheme.com/wofi). + +## Team + +This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/wofi/graphs/contributors). + +| [![elumbella](https://avatars3.githubusercontent.com/u/2538681?v=4&s=70)](https://github.com/elumbella) | +| ------------------------------------------------------------------------------------------------------- | +| [elumbella](https://github.com/elumbella) | + +## Community + +- [Twitter](https://twitter.com/draculatheme) - Best for getting updates about themes and new stuff. +- [GitHub](https://github.com/dracula/dracula-theme/discussions) - Best for asking questions and discussing issues. +- [Discord](https://draculatheme.com/discord-invite) - Best for hanging out with the community. + +## License + +[MIT License](./LICENSE) diff --git a/user/files/wofi/screenshot.png b/user/files/wofi/screenshot.png new file mode 100644 index 0000000..9f0466c Binary files /dev/null and b/user/files/wofi/screenshot.png differ diff --git a/user/files/wofi/style.css b/user/files/wofi/style.css new file mode 100644 index 0000000..58e27ba --- /dev/null +++ b/user/files/wofi/style.css @@ -0,0 +1,39 @@ +window { +margin: 0px; +border: 1px solid #bd93f9; +background-color: #282a36; +} + +#input { +margin: 5px; +border: none; +color: #f8f8f2; +background-color: #44475a; +} + +#inner-box { +margin: 5px; +border: none; +background-color: #282a36; +} + +#outer-box { +margin: 5px; +border: none; +background-color: #282a36; +} + +#scroll { +margin: 0px; +border: none; +} + +#text { +margin: 5px; +border: none; +color: #f8f8f2; +} + +#entry:selected { +background-color: #44475a; +} diff --git a/user/files/zsh/config b/user/files/zsh/config new file mode 100644 index 0000000..ba23b06 --- /dev/null +++ b/user/files/zsh/config @@ -0,0 +1,108 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then +# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +# fi +# POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-$HOME/.cache} +export ZSH="$HOME/.oh-my-zsh" +export ZSH_CUSTOM="$HOME/.config/zsh/custom" + +#ZSH_THEME="powerlevel10k/powerlevel10k" +#ZSH_THEME="spaceship" +ZSH_THEME="robbyrussell" + +plugins=( + git + zsh-autosuggestions + copypath + copyfile + copybuffer + dirhistory + history + z + bgnotify + zsh-syntax-highlighting +) +source $ZSH/oh-my-zsh.sh +export LANG=en_US.UTF-8 + +plugins+=(zsh-vi-mode) +source $ZSH_CUSTOM/zsh-vi-mode/zsh-vi-mode.plugin.zsh + +zvm_after_init() { + FZF_SHARE=/usr/share/fzf + [ -f $FZF_SHARE/completion.zsh ] && . "$FZF_SHARE/completion.zsh" + [ -f $FZF_SHARE/key-bindings.zsh ] && . "$FZF_SHARE/key-bindings.zsh" +} + +# Load all files from .shell/rc.d directory +if [ -d $HOME/.shellrc/rc.d ]; then + for file in $HOME/.shellrc/rc.d/*.sh; do + source $file + done +fi + +# Load all files from .shell/zshrc.d directory +if [ -d $HOME/.shellrc/zshrc.d ]; then + for file in $HOME/.shellrc/zshrc.d/*.zsh; do + source $file + done +fi +export GPG_TTY=$(tty) +if [[ -n "$SSH_CONNECTION" ]] ;then + export PINENTRY_USER_DATA="USE_CURSES=1" +fi + + +[ -f ~/.env ] && source ~/.env + +alias luamake=~/.config/lua-language-server/3rd/luamake/luamake + +if [ `tput cols` -gt "70" ]; then +function PRINT_CENTER { + COLS=`tput cols` + OFFSET=$(( ($COLS - $1) / 2 )) + PRE="" + for i in `seq $OFFSET`; do + PRE="$PRE " + done + while IFS= read -r line; do + echo "$PRE$line" + done <<< "$2" +} +PRINT_CENTER 60 " + + ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ + █░▄▄▀█▀▄▄▀█░▄▄░█▄░▄█▀▄▀██░▄░██░██░█░▄▄█░▄▄░█ + █░▀▀▄█░██░█░▀▄░██░██░█▀█░▀▀░▀█░██░█▄▄▀███▄██ + █▄█▄▄██▄▄██░▀▀░██▄███▄█████░███▄▄▄█▄▄▄█░▀▀░█ + ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ + + ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ + ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ + ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ + ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ + ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ + ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ + ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ + ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ + ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ + ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ + ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ +▄▄▄ . ▌ ▐·▪ ▄▄▌ ▄▄▌ ▐ ▄▌▪ ▄▄▄▄▄ ▄ .▄ ▄• ▄▌▄▄▄▄▄ +▀▄.▀·▪█·█▌██ ██• ██· █▌▐███ •██ ██▪▐█ ▄█▀▄ █▪██▌•██ +▐▀▀▪▄▐█▐█•▐█·██ ▪ ██▪▐█▐▐▌▐█· ▐█.▪██▀▀█▐█▌.▐▌█▌▐█▌ ▐█.▪ +▐█▄▄▌ ███ ▐█▌▐█▌ ▄ ▐█▌██▐█▌▐█▌ ▐█▌·██▌▐▀▐█▌.▐▌▐█▄█▌ ▐█▌· + ▀▀▀ . ▀ ▀▀▀.▀▀▀ ▀▀▀▀ ▀▪▀▀▀ ▀▀▀ ▀▀▀ · ▀█▄▀▪ ▀▀▀ ▀▀▀ + + > welcome x_x +" +fi + +which wrk > /dev/null && eval `wrk tools bash` + diff --git a/user/home.nix b/user/home.nix new file mode 100644 index 0000000..2f14ebd --- /dev/null +++ b/user/home.nix @@ -0,0 +1,142 @@ +{ config, pkgs, ... }: + +let + astronvim = builtins.fetchGit { + url = "https://github.com/AstroNvim/AstroNvim"; + rev = "dad0bec1fef2833561d04ea446a544fbfde92539"; + }; + astronvimUser = builtins.fetchGit { + url = "https://foo:foo@github.com/morten-olsen/astrovim"; + rev = "44b38567fe3adedd972b5b07f5883d47600a9078"; + }; +in { + home.username = "alice"; + home.homeDirectory = "/home/alice"; + + home.stateVersion = "23.11"; + home.packages = [ + pkgs.kitty + pkgs.eza + pkgs.bat + pkgs.fzf + pkgs.fd + pkgs.curl + pkgs.jq + pkgs.spotify + pkgs.slack + pkgs.rustup + pkgs.silver-searcher + pkgs.ncspot + pkgs.ripgrep + pkgs.thefuck + pkgs.unzip + pkgs.nodejs + pkgs.gnumake + pkgs.gcc + pkgs.terraform + pkgs.signal-desktop + pkgs.nodePackages.pnpm + pkgs.nodePackages.yarn + pkgs.steam-run + pkgs.python3 + pkgs.gimp + pkgs.blender + pkgs.gh + pkgs.discord + pkgs.binutils + pkgs.pkg-config + ]; + + programs.firefox.enable = true; + programs.zsh.enable = true; + programs.neovim.enable = true; + programs.tmux = { + enable = true; + extraConfig = builtins.readFile ./files/tmux/config; + }; + programs.git.enable = true; + + home.file = { + ".gitconfig".source = ./files/git/config; + ".tmux.conf".source = ./files/tmux/config; + ".zshrc".source = ./files/zsh/config; + ".bashrc".source = ./files/bash/config; + + ".shellrc/rc.d" = { + source = ./files/shell/rc.d; + }; + + ".gnupg" = { + source = ./files/gpg; + recursive = true; + }; + + ".oh-my-zsh" = { + source = builtins.fetchGit { + url = "https://github.com/ohmyzsh/ohmyzsh"; + rev = "b07c8cfe692bc6c7702f0aef5d493b12dfb43392"; + }; + }; + ".config/zsh/custom/plugins/zsh-autosuggestions" = { + source = builtins.fetchGit { + url = "https://github.com/zsh-users/zsh-autosuggestions"; + rev = "c3d4e576c9c86eac62884bd47c01f6faed043fc5"; + }; + }; + ".config/zsh/custom/plugins/zsh-syntax-highlighting" = { + source = builtins.fetchGit { + url = "https://github.com/zsh-users/zsh-syntax-highlighting"; + rev = "143b25eb98aa3227af63bd7f04413e1b3e7888ec"; + }; + }; + + ".config/zsh/custom/zsh-vi-mode" = { + source = builtins.fetchGit { + url = "https://github.com/jeffreytse/zsh-vi-mode"; + rev = "1f28e1886dc8e49f41b817634d5c7695b6abb145"; + }; + }; + + ".config/ssh" = { + source = ./files/ssh; + recursive = true; + }; + + ".config/hypr" = { + source = ./files/hyprland; + recursive = true; + }; + ".config/kitty" = { + source = ./files/kitty; + recursive = true; + }; + ".config/eww" = { + source = ./files/eww; + recursive = true; + }; + ".config/wofi" = { + source = ./files/wofi; + recursive = true; + }; + ".config/nvim" = { + source = astronvim; + recursive = true; + }; + ".config/nvim/lua/user" = { + source = astronvimUser; + }; + }; + + home.sessionVariables = { + # EDITOR = "emacs"; + }; + + programs.home-manager.enable = true; + + nixpkgs = { + overlays = [ + (import ./overlays/steam.nix) + ]; + + }; +} diff --git a/user/overlays/steam.nix b/user/overlays/steam.nix new file mode 100644 index 0000000..fc27493 --- /dev/null +++ b/user/overlays/steam.nix @@ -0,0 +1,19 @@ +self: super: +{ + steam = super.steam.override { + extraPkgs = p: [ + self.gtk3 + self.atk + self.at-spi2-atk + self.zlib + self.glib + self.fontconfig + self.freetype + self.dbus + self.cairo + self.gdk-pixbuf + self.pango + self.xorg.libxcb + ]; + }; +}