├── .github ├── README.md └── assets │ ├── nvim.png │ ├── wayland.png │ └── x11.png ├── flake.lock ├── flake.nix ├── hosts ├── fancy │ ├── configuration.nix │ ├── default.nix │ ├── hardware-configuration.nix │ └── virtualisation │ │ ├── default.nix │ │ └── pkgs.nix ├── progs-conf │ └── st.nix └── ultra │ ├── configuration.nix │ ├── default.nix │ ├── hardware-configuration.nix │ └── virtualisation │ ├── default.nix │ └── pkgs.nix ├── pkgs ├── dark-decay-gtk.nix ├── decayce-gtk.nix ├── luaFormatter.nix ├── material-symbols.nix ├── monaco-nf.nix ├── sfmono-nf.nix └── st.nix └── users └── alpha ├── bin └── run.nix ├── cfg ├── awesome │ ├── README.md │ ├── assets │ │ ├── autostart.sh │ │ ├── fallback-music.png │ │ ├── icons │ │ │ ├── hints.svg │ │ │ ├── launcher.svg │ │ │ ├── menu.svg │ │ │ ├── poweroff.svg │ │ │ ├── volume-muted.svg │ │ │ └── volume-on.svg │ │ ├── launcher.png │ │ ├── menu.png │ │ ├── pfp.png │ │ ├── shapes │ │ │ └── triangle.png │ │ ├── titlebar │ │ │ └── circle.png │ │ └── wallpaper.jpg │ ├── autostart.lua │ ├── configuration │ │ ├── autofocus.lua │ │ ├── floating-clients.lua │ │ ├── init.lua │ │ ├── keybindings.lua │ │ ├── layouts.lua │ │ ├── monitor.lua │ │ ├── mousebindings.lua │ │ ├── rules.lua │ │ └── theme.lua │ ├── helpers.lua │ ├── modules │ │ ├── bling │ │ │ ├── .editorconfig │ │ │ ├── AUTHORS.md │ │ │ ├── CODEOWNERS │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bling-dev-1.rockspec │ │ │ ├── docs │ │ │ │ ├── .nojekyll │ │ │ │ ├── _sidebar.md │ │ │ │ ├── home.md │ │ │ │ ├── index.html │ │ │ │ ├── javacafe.css │ │ │ │ ├── layouts │ │ │ │ │ └── layout.md │ │ │ │ ├── module │ │ │ │ │ ├── flash.md │ │ │ │ │ ├── scratch.md │ │ │ │ │ ├── swal.md │ │ │ │ │ ├── tabbed.md │ │ │ │ │ ├── twall.md │ │ │ │ │ └── wall.md │ │ │ │ ├── signals │ │ │ │ │ └── pctl.md │ │ │ │ ├── theme.md │ │ │ │ └── widgets │ │ │ │ │ ├── tabbed_misc.md │ │ │ │ │ ├── tag_preview.md │ │ │ │ │ ├── task_preview.md │ │ │ │ │ └── window_switcher.md │ │ │ ├── helpers │ │ │ │ ├── client.lua │ │ │ │ ├── color.lua │ │ │ │ ├── filesystem.lua │ │ │ │ ├── icon_theme.lua │ │ │ │ ├── init.lua │ │ │ │ ├── shape.lua │ │ │ │ └── time.lua │ │ │ ├── icons │ │ │ │ └── layouts │ │ │ │ │ ├── centered.png │ │ │ │ │ ├── deck.png │ │ │ │ │ ├── equalarea.png │ │ │ │ │ ├── horizontal.png │ │ │ │ │ ├── mstab.png │ │ │ │ │ └── vertical.png │ │ │ ├── images │ │ │ │ ├── bling_banner-2x.png │ │ │ │ └── bling_banner.png │ │ │ ├── init.lua │ │ │ ├── layout │ │ │ │ ├── centered.lua │ │ │ │ ├── deck.lua │ │ │ │ ├── equalarea.lua │ │ │ │ ├── horizontal.lua │ │ │ │ ├── init.lua │ │ │ │ ├── mstab.lua │ │ │ │ └── vertical.lua │ │ │ ├── module │ │ │ │ ├── flash_focus.lua │ │ │ │ ├── init.lua │ │ │ │ ├── scratchpad.lua │ │ │ │ ├── tabbed.lua │ │ │ │ ├── tiled_wallpaper.lua │ │ │ │ ├── wallpaper.lua │ │ │ │ └── window_swallowing.lua │ │ │ ├── signal │ │ │ │ ├── init.lua │ │ │ │ └── playerctl │ │ │ │ │ ├── init.lua │ │ │ │ │ ├── playerctl_cli.lua │ │ │ │ │ └── playerctl_lib.lua │ │ │ ├── theme-var-template.lua │ │ │ └── widget │ │ │ │ ├── app_launcher │ │ │ │ ├── init.lua │ │ │ │ └── prompt.lua │ │ │ │ ├── init.lua │ │ │ │ ├── tabbar │ │ │ │ ├── boxes.lua │ │ │ │ ├── default.lua │ │ │ │ ├── modern.lua │ │ │ │ └── pure.lua │ │ │ │ ├── tabbed_misc │ │ │ │ ├── custom_tasklist.lua │ │ │ │ ├── init.lua │ │ │ │ └── titlebar_indicator.lua │ │ │ │ ├── tag_preview.lua │ │ │ │ ├── task_preview.lua │ │ │ │ └── window_switcher.lua │ │ ├── color │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── color-1.1-1.rockspec │ │ │ ├── color.lua │ │ │ ├── images │ │ │ │ └── spinny.gif │ │ │ ├── init.lua │ │ │ ├── tags │ │ │ ├── transition.lua │ │ │ └── utils.lua │ │ ├── rubato │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── easing.lua │ │ │ ├── images │ │ │ │ ├── beautiful.gif │ │ │ │ ├── connected_graph.png │ │ │ │ ├── disconnected_graph.png │ │ │ │ ├── forwards_forwards_graph.png │ │ │ │ ├── normal_graph.png │ │ │ │ ├── quadratic_easing.gif │ │ │ │ ├── slope_graph.png │ │ │ │ ├── trapezoid_easing.gif │ │ │ │ └── triangleish.png │ │ │ ├── init.lua │ │ │ ├── manager.lua │ │ │ ├── rubato-1.2-1.rockspec │ │ │ ├── subscribable.lua │ │ │ └── timed.lua │ │ └── screenshot │ │ │ ├── AUTHORS.md │ │ │ ├── LICENSE │ │ │ └── init.lua │ ├── rc.lua │ ├── scripts │ │ ├── airplane.sh │ │ ├── bluetooth │ │ ├── redshift.sh │ │ ├── screensht │ │ ├── set-volume.sh │ │ ├── temp.sh │ │ ├── toggle-muted.sh │ │ ├── toggle-network.sh │ │ └── uptime.sh │ ├── signal │ │ ├── airplane.lua │ │ ├── bluetooth.lua │ │ ├── brightness.lua │ │ ├── cpu.lua │ │ ├── date.lua │ │ ├── disk.lua │ │ ├── global.lua │ │ ├── network.lua │ │ ├── ram.lua │ │ ├── redshift.lua │ │ ├── temperature.lua │ │ ├── user.lua │ │ └── volume.lua │ ├── theme.lua │ ├── ui │ │ ├── bar │ │ │ ├── content.lua │ │ │ ├── init.lua │ │ │ └── modules │ │ │ │ ├── dispatch_dashboard.lua │ │ │ │ ├── dispatch_infosidebar.lua │ │ │ │ ├── infobox.lua │ │ │ │ ├── launcher.lua │ │ │ │ ├── powermenu.lua │ │ │ │ ├── searchbox.lua │ │ │ │ └── workspaces.lua │ │ ├── dashboard │ │ │ ├── content.lua │ │ │ ├── dimensions.lua │ │ │ ├── init.lua │ │ │ ├── listener.lua │ │ │ └── modules │ │ │ │ ├── calendar.lua │ │ │ │ ├── date.lua │ │ │ │ ├── info.lua │ │ │ │ ├── music.lua │ │ │ │ ├── notifcenter │ │ │ │ ├── body.lua │ │ │ │ ├── header.lua │ │ │ │ └── init.lua │ │ │ │ ├── profile.lua │ │ │ │ ├── settings.lua │ │ │ │ ├── settings │ │ │ │ ├── charts.lua │ │ │ │ ├── core.lua │ │ │ │ ├── quick-settings.lua │ │ │ │ └── sliders.lua │ │ │ │ └── tabbed.lua │ │ ├── infosidebar │ │ │ ├── content.lua │ │ │ ├── dimensions.lua │ │ │ ├── init.lua │ │ │ ├── listener.lua │ │ │ └── modules │ │ │ │ ├── details │ │ │ │ ├── calendar.lua │ │ │ │ └── searchbox.lua │ │ │ │ ├── details_container.lua │ │ │ │ └── time.lua │ │ ├── init.lua │ │ ├── menu.lua │ │ ├── notifications.lua │ │ ├── titlebars.lua │ │ └── wallpaper.lua │ └── user_likes.lua ├── bd-themes │ └── decayce.theme.css ├── hilbish │ ├── init.lua │ ├── modules │ │ ├── alias.lua │ │ ├── greeting.lua │ │ ├── init.lua │ │ ├── prompt.lua │ │ └── vim.lua │ └── util.lua ├── nvim │ ├── init.lua │ ├── lua │ │ ├── check_packer.lua │ │ ├── config │ │ │ ├── autocmds.lua │ │ │ ├── keymaps.lua │ │ │ ├── options.lua │ │ │ ├── plugins.lua │ │ │ └── theme.lua │ │ ├── helpers.lua │ │ ├── modules │ │ │ ├── autopairs.lua │ │ │ ├── bufferline.lua │ │ │ ├── colorizer.lua │ │ │ ├── init.lua │ │ │ ├── lualine.lua │ │ │ ├── masonc.lua │ │ │ ├── nvim-tree.lua │ │ │ ├── telescope.lua │ │ │ ├── toggleterm.lua │ │ │ ├── treesitter.lua │ │ │ └── zenmode.lua │ │ └── pkgs │ │ │ └── theme │ │ │ ├── config.lua │ │ │ ├── core.lua │ │ │ ├── highlights.lua │ │ │ ├── init.lua │ │ │ └── lualine.lua │ └── plugin │ │ └── packer_compiled.lua └── rofi │ └── config.rasi ├── config.nix ├── fonts ├── assets │ ├── ProductSans-Black.ttf │ ├── ProductSans-BlackItalic.ttf │ ├── ProductSans-Bold.ttf │ ├── ProductSans-BoldItalic.ttf │ ├── ProductSans-Italic.ttf │ ├── ProductSans-Light.ttf │ ├── ProductSans-LightItalic.ttf │ ├── ProductSans-Medium.ttf │ ├── ProductSans-MediumItalic.ttf │ ├── ProductSans-Regular.ttf │ ├── ProductSans-Thin.ttf │ ├── ProductSans-ThinItalic.ttf │ ├── RobotoCondensed-Bold.ttf │ ├── RobotoCondensed-BoldItalic.ttf │ ├── RobotoCondensed-Italic.ttf │ ├── RobotoCondensed-Light.ttf │ ├── RobotoCondensed-LightItalic.ttf │ └── RobotoCondensed-Regular.ttf ├── default.nix └── nerdfonts.nix ├── home.nix ├── programs ├── alacritty │ ├── default.nix │ ├── setfont.nix │ └── theming.nix ├── firefox │ ├── default.nix │ ├── userChrome-css.nix │ └── userContent-css.nix ├── fish.nix ├── helix │ ├── default.nix │ └── theme.nix ├── kitty │ ├── default.nix │ └── settings.nix ├── picom.nix ├── rofi.nix ├── starship.nix ├── vscode │ └── default.nix └── wezterm │ ├── default.nix │ ├── raw-config.lua │ └── settings.nix ├── theme ├── base16.nix ├── colors.nix ├── nvim │ ├── default.nix │ └── theme.nix └── raw-colors.nix └── wayland ├── default.nix ├── foot └── default.nix ├── hyprland ├── assets │ └── wallpaper.png ├── config.nix └── default.nix └── waybar ├── config.nix ├── default.nix └── style.nix /.github/README.md: -------------------------------------------------------------------------------- 1 | # nixdots 2 | 3 | My personal dotfiles for a Nix-Managed Operative System (NixOS). 4 | 5 | > Maybe some things may not work as how should, or look different from the screenshots 6 | 7 | > since this dots are intended to be for my personal use and not stable :| 8 | 9 | > if you want stable dotfiles and others design ideas, check my official [dotfiles](https://github.com/AlphaTechnolog/dotfiles) 10 | 11 | > X11 (AwesomeWM) 12 | 13 | ![x11](./assets/x11.png) 14 | 15 | > Wayland (Hyprland) 16 | 17 | ![wayland](./assets/wayland.png) 18 | 19 | > [!TIP] 20 | > If you're looking for a (imo) very better structured nixos configuration, you could 21 | > look at my new maintained nixos configuration [nixmoment](https://github.com/alphatechnolog/nixmoment) 22 | > imo it's far organised and i've put more nix experience in the building process of it 23 | > this one could be pretty outdated when it comes to packages and you may experience 24 | > issues when updating the system now since things could've changed a lot 25 | 26 | ## Installation 27 | 28 | To install it see the next steps: 29 | 30 | - Boot into the installer environment 31 | - Format and mount your disks inside /mnt 32 | - execute this 33 | 34 | ```sh 35 | # go into a root shell 36 | sudo su 37 | 38 | # go inside a shell with properly required programs 39 | nix-shell -p git nixUnstable 40 | 41 | # create this folder if necessary 42 | mkdir -p /mnt/etc/ 43 | 44 | # clone the repo 45 | git clone https://github.com/AlphaTechnolog/nixdots.git /mnt/etc/nixos --recurse-submodules 46 | 47 | # remove this file 48 | rm /mnt/etc/nixos/hosts/ultra/hardware-configuration.nix 49 | 50 | # generate the config and take some files 51 | nixos-generate-config --root /mnt 52 | rm /mnt/etc/nixos/configuration.nix 53 | mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/ultra 54 | 55 | # make sure you're in this path 56 | cd /mnt/etc/nixos 57 | 58 | # to install the xorg version: 59 | nixos-install --flake '.#ultra' --impure 60 | 61 | # to install the wayland version 62 | nixos-install --flake '.#fancy' --impure 63 | ``` 64 | 65 | > You could get some hashes errors, just change the bad hashes in the config file to the given ones by the Nix Output. 66 | 67 | - Reboot, login as root, and change the password for your user using `passwd` (by default, it's alpha) 68 | - Log-in in the displayManager. 69 | - Then do this: 70 | 71 | ```sh 72 | doas chown -R $USER /etc/nixos 73 | ``` 74 | 75 | ## Enjoy 76 | 77 | Now, you're done, remember that this is in work in progress so, some 78 | things could stop working... 79 | 80 | ## Thanks to 81 | 82 | This good people who helped me when learning nix-related stuff! really, thanks! 83 | 84 | - [AloneER0](https://github.com/AloneER0) 85 | - [JavaCafe01](https://github.com/JavaCafe01) 86 | - [rxyhn](https://github.com/rxyhn) 87 | 88 | ## Inspiration 89 | 90 | - nvim: [dharmx](https://github.com/dharmx). What a beautiful nvim that he has! 91 | 92 | > How looks mine: 93 | 94 | ![nvim](./assets/nvim.png) 95 | -------------------------------------------------------------------------------- /.github/assets/nvim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/.github/assets/nvim.png -------------------------------------------------------------------------------- /.github/assets/wayland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/.github/assets/wayland.png -------------------------------------------------------------------------------- /.github/assets/x11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/.github/assets/x11.png -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "My NixOS Configuration Files! home-manager + flakes + nix = power!"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | 7 | home-manager = { 8 | url = github:nix-community/home-manager; 9 | inputs.nixpkgs.follows = "nixpkgs"; 10 | }; 11 | 12 | neovim-nightly.url = "github:nix-community/neovim-nightly-overlay"; 13 | nixpkgs-f2k.url = "github:fortuneteller2k/nixpkgs-f2k"; 14 | nur.url = github:nix-community/NUR; 15 | 16 | hyprland = { 17 | url = github:hyprwm/Hyprland; 18 | inputs.nixpkgs.follows = "nixpkgs"; 19 | }; 20 | 21 | sf-mono-liga-src = { 22 | url = "github:shaunsingh/SFMono-Nerd-Font-Ligaturized"; 23 | flake = false; 24 | }; 25 | 26 | st = { 27 | url = github:AlphaTechnolog/st; 28 | flake = false; 29 | }; 30 | 31 | luaFormatter = { 32 | type = "git"; 33 | url = "https://github.com/Koihik/LuaFormatter.git"; 34 | submodules = true; 35 | flake = false; 36 | }; 37 | }; 38 | 39 | outputs = { self, nixpkgs, home-manager, nixpkgs-f2k, luaFormatter, ... }@inputs: 40 | let 41 | system = "x86_64-linux"; 42 | 43 | pkgs = nixpkgs.legacyPackages.${system}; 44 | 45 | config = { 46 | system = system; 47 | allowUnfree = true; 48 | }; 49 | 50 | lib = nixpkgs.lib; 51 | 52 | overlays = with inputs; [ 53 | (final: _: 54 | let 55 | inherit (final) system; 56 | in { 57 | neovim-nightly = neovim.packages."${system}".neovim; 58 | st = pkgs.callPackage ./pkgs/st.nix { 59 | src = st; 60 | conf = import ./hosts/progs-conf/st.nix; 61 | }; 62 | } // (with nixpkgs-f2k.packages.${system}; { 63 | awesome = awesome-git; 64 | picom = picom-git; 65 | }) // { 66 | luaFormatter-src = luaFormatter; 67 | sf-mono-liga-bin = pkgs.callPackage ./pkgs/sfmono-nf.nix { 68 | src = inputs.sf-mono-liga-src; 69 | }; 70 | } 71 | ) 72 | (final: prev: { 73 | luaFormatter = prev.callPackage ./pkgs/luaFormatter.nix { 74 | src = prev.luaFormatter-src; 75 | version = "999-master"; 76 | }; 77 | }) 78 | neovim-nightly.overlay 79 | nixpkgs-f2k.overlays.default 80 | nur.overlay 81 | ]; 82 | in { 83 | nixosConfigurations = { 84 | ultra = import ./hosts/ultra { 85 | inherit config nixpkgs overlays inputs system home-manager; 86 | }; 87 | fancy = import ./hosts/fancy { 88 | inherit config nixpkgs overlays inputs system home-manager; 89 | hyprland = inputs.hyprland; 90 | }; 91 | }; 92 | }; 93 | } 94 | -------------------------------------------------------------------------------- /hosts/fancy/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | nixpkgs, 4 | overlays, 5 | inputs, 6 | home-manager, 7 | system, 8 | hyprland, 9 | ... 10 | }: 11 | 12 | with nixpkgs; lib.nixosSystem rec { 13 | inherit system; 14 | 15 | modules = [ 16 | ./configuration.nix 17 | 18 | { 19 | nixpkgs = { 20 | inherit overlays config; 21 | }; 22 | } 23 | 24 | home-manager.nixosModules.home-manager { 25 | home-manager.useGlobalPkgs = false; 26 | home-manager.useUserPackages = true; 27 | home-manager.users.alpha = { 28 | imports = [ 29 | inputs.hyprland.homeManagerModules.default 30 | ../../users/alpha/home.nix 31 | ../../users/alpha/wayland 32 | ]; 33 | }; 34 | } 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /hosts/fancy/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-uuid/53d905d8-17a3-4aec-a986-1f1a23f68567"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-uuid/7EA7-7135"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = 27 | [ { device = "/dev/disk/by-uuid/92572456-5135-4e00-801c-f1cd1b649dc1"; } 28 | ]; 29 | 30 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 31 | # (the default) this is the recommended approach. When using systemd-networkd it's 32 | # still possible to use this option, but it's recommended to use it in conjunction 33 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 34 | networking.useDHCP = lib.mkDefault true; 35 | # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; 36 | # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; 37 | 38 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 39 | } 40 | -------------------------------------------------------------------------------- /hosts/fancy/virtualisation/default.nix: -------------------------------------------------------------------------------- 1 | # this file basically configures everything needed to get working 2 | # a virtualization with virt-manager. 3 | 4 | { ... }: 5 | 6 | { 7 | virtualisation.libvirtd.enable = true; 8 | virtualisation.virtualbox.host.enable = true; 9 | users.extraGroups.vboxusers.members = [ "alpha" ]; 10 | programs.dconf.enable = true; 11 | } 12 | -------------------------------------------------------------------------------- /hosts/fancy/virtualisation/pkgs.nix: -------------------------------------------------------------------------------- 1 | # packages that should be installed 2 | 3 | { pkgs }: 4 | 5 | with pkgs; [ 6 | virt-manager 7 | ] 8 | -------------------------------------------------------------------------------- /hosts/ultra/default.nix: -------------------------------------------------------------------------------- 1 | { config, nixpkgs, overlays, inputs, home-manager, system, ... }: 2 | 3 | with nixpkgs; 4 | 5 | lib.nixosSystem rec { 6 | inherit system; 7 | 8 | modules = [ 9 | ./configuration.nix 10 | 11 | { 12 | nixpkgs = { 13 | inherit overlays config; 14 | }; 15 | } 16 | 17 | home-manager.nixosModules.home-manager { 18 | home-manager.useGlobalPkgs = true; 19 | home-manager.useUserPackages = true; 20 | home-manager.users.alpha = { 21 | imports = [ 22 | ../../users/alpha/home.nix 23 | ../../users/alpha/programs/helix 24 | ]; 25 | }; 26 | } 27 | ]; 28 | } 29 | -------------------------------------------------------------------------------- /hosts/ultra/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-intel" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-uuid/53d905d8-17a3-4aec-a986-1f1a23f68567"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-uuid/7EA7-7135"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = 27 | [ { device = "/dev/disk/by-uuid/92572456-5135-4e00-801c-f1cd1b649dc1"; } 28 | ]; 29 | 30 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 31 | # (the default) this is the recommended approach. When using systemd-networkd it's 32 | # still possible to use this option, but it's recommended to use it in conjunction 33 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 34 | networking.useDHCP = lib.mkDefault true; 35 | # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; 36 | # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; 37 | 38 | hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 39 | } 40 | -------------------------------------------------------------------------------- /hosts/ultra/virtualisation/default.nix: -------------------------------------------------------------------------------- 1 | # this file basically configures everything needed to get working 2 | # a virtualization with virt-manager. 3 | 4 | { ... }: 5 | 6 | { 7 | virtualisation.libvirtd.enable = true; 8 | virtualisation.virtualbox.host.enable = true; 9 | users.extraGroups.vboxusers.members = [ "alpha" ]; 10 | programs.dconf.enable = true; 11 | } 12 | -------------------------------------------------------------------------------- /hosts/ultra/virtualisation/pkgs.nix: -------------------------------------------------------------------------------- 1 | # packages that should be installed 2 | 3 | { pkgs }: 4 | 5 | with pkgs; [ 6 | virt-manager 7 | ] 8 | -------------------------------------------------------------------------------- /pkgs/dark-decay-gtk.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchzip, 5 | pkgs, 6 | ... 7 | }: 8 | stdenv.mkDerivation rec { 9 | pname = "dark-decay-gtk"; 10 | version = "0.1.0"; 11 | 12 | src = fetchzip { 13 | url = "https://github.com/decaycs/decay-gtk/releases/download/v0.1.0/dark-decay.zip"; 14 | sha256 = "lT0+qJutyu9IlqzqVzSkDvUzxUbFfQMGThtVf0U7pQs="; 15 | stripRoot = false; 16 | }; 17 | 18 | propagatedUserEnvPkgs = with pkgs; [ 19 | gnome.gnome-themes-extra 20 | gtk-engine-murrine 21 | ]; 22 | 23 | installPhase = '' 24 | mkdir -p $out/share/themes/ 25 | cp -r Dark-decay $out/share/themes 26 | ''; 27 | 28 | meta = { 29 | description = "Revamped GTK Theme for decay (dark-decay Variant)"; 30 | homepage = "https://github.com/decaycs/decay-gtk"; 31 | license = lib.licenses.gpl3; 32 | platforms = lib.platforms.unix; 33 | maintainers = [lib.maintainers.decaycs]; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /pkgs/decayce-gtk.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchzip, 5 | pkgs, 6 | ... 7 | }: 8 | stdenv.mkDerivation rec { 9 | pname = "decayce-gtk"; 10 | version = "0.1.0"; 11 | 12 | src = fetchzip { 13 | url = "https://github.com/decaycs/decay-gtk/releases/download/v0.1.0/decayce.zip"; 14 | sha256 = "LMh3bMvH3r5cxUvklXdDj3tIHbnDHqdWMfnSihcvkwk="; 15 | stripRoot = false; 16 | }; 17 | 18 | propagatedUserEnvPkgs = with pkgs; [ 19 | gnome.gnome-themes-extra 20 | gtk-engine-murrine 21 | ]; 22 | 23 | installPhase = '' 24 | mkdir -p $out/share/themes/ 25 | cp -r Decayce $out/share/themes 26 | ''; 27 | 28 | meta = { 29 | description = "Revamped GTK Theme for decay (Decayce Variant)"; 30 | homepage = "https://github.com/decaycs/decay-gtk"; 31 | license = lib.licenses.gpl3; 32 | platforms = lib.platforms.unix; 33 | maintainers = [lib.maintainers.decaycs]; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /pkgs/luaFormatter.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenv, 3 | pkgs, 4 | src, 5 | version, 6 | ... 7 | }: 8 | stdenv.mkDerivation { 9 | name = "lua-format"; 10 | inherit version; 11 | inherit src; 12 | nativeBuildInputs = [pkgs.cmake]; 13 | } 14 | -------------------------------------------------------------------------------- /pkgs/material-symbols.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenvNoCC, 4 | fetchFromGitHub, 5 | util-linux, 6 | }: 7 | stdenvNoCC.mkDerivation { 8 | pname = "material-symbols"; 9 | version = "unstable-2022-12-05"; 10 | 11 | src = fetchFromGitHub { 12 | owner = "google"; 13 | repo = "material-design-icons"; 14 | rev = "c764ca99a5f24cfca7f97d98a92b259b92f903da"; 15 | sha256 = "sha256-J45TND4CowFCaEcybFNSI3AgyqdgvzMuTKCozh+gDe0="; 16 | sparseCheckout = ["variablefont"]; 17 | }; 18 | 19 | nativeBuildInputs = [util-linux]; 20 | 21 | installPhase = '' 22 | runHook preInstall 23 | rename '[FILL,GRAD,opsz,wght]' "" variablefont/* 24 | install -Dm755 variablefont/*.ttf -t $out/share/fonts/TTF 25 | install -Dm755 variablefont/*.woff2 -t $out/share/fonts/woff2 26 | runHook postInstall 27 | ''; 28 | 29 | meta = with lib; { 30 | description = "Material Symbols icons by Google"; 31 | homepage = "https://fonts.google.com/icons"; 32 | license = lib.licenses.asl20; 33 | maintainers = with maintainers; [fufexan]; 34 | platforms = platforms.all; 35 | }; 36 | } -------------------------------------------------------------------------------- /pkgs/monaco-nf.nix: -------------------------------------------------------------------------------- 1 | { stdenv, fetchFromGitHub }: 2 | 3 | stdenv.mkDerivation { 4 | pname = "monaco-nerd-fonts"; 5 | version = "1.0.0"; 6 | src = fetchFromGitHub { 7 | owner = "Karmenzind"; 8 | repo = "monaco-nerd-fonts"; 9 | rev = "4c7fe33df56420b06e0a094db9c4d9a23333b1b7"; 10 | sha256 = "W7+ovaWbbtuGvCgqe3ntWodjBMG9JuzdTM0BlnsGk5c="; 11 | fetchSubmodules = false; 12 | }; 13 | 14 | installPhase = '' 15 | mkdir -p $out/share/fonts 16 | cp -R $src/fonts/*.ttf $out/share/fonts 17 | ''; 18 | 19 | meta.description = "Monaco font but patched with the nerd fonts tool!"; 20 | } 21 | -------------------------------------------------------------------------------- /pkgs/sfmono-nf.nix: -------------------------------------------------------------------------------- 1 | { src, stdenv, fetchFromGitHub }: 2 | 3 | stdenv.mkDerivation { 4 | pname = "sfmono-nf"; 5 | version = "dev"; 6 | inherit src; 7 | 8 | installPhase = '' 9 | mkdir -p $out/share/fonts 10 | cp -R $src/*.otf $out/share/fonts 11 | ''; 12 | 13 | meta.description = "Monaco font but patched with the nerd fonts tool!"; 14 | } -------------------------------------------------------------------------------- /pkgs/st.nix: -------------------------------------------------------------------------------- 1 | { lib, stdenv, fetchurl, src, pkg-config, fontconfig, freetype, libX11, libXft 2 | , harfbuzz, gd, glib, ncurses, writeText, conf ? null, patches ? [ ] 3 | , extraLibs ? [ ], nixosTests }: 4 | 5 | stdenv.mkDerivation rec { 6 | name = "st-snazzy"; 7 | pname = name; 8 | version = "0.8.5"; 9 | 10 | inherit src patches; 11 | 12 | configFile = 13 | lib.optionalString (conf != null) (writeText "config.def.h" conf); 14 | 15 | postPatch = lib.optionalString (conf != null) "cp ${configFile} config.def.h" 16 | + lib.optionalString stdenv.isDarwin '' 17 | substituteInPlace config.mk --replace "-lrt" "" 18 | ''; 19 | 20 | strictDeps = true; 21 | 22 | makeFlags = [ "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ]; 23 | 24 | nativeBuildInputs = [ pkg-config ncurses fontconfig freetype ]; 25 | buildInputs = [ libX11 libXft harfbuzz gd glib ] ++ extraLibs; 26 | 27 | preInstall = '' 28 | export TERMINFO=$out/share/terminfo 29 | ''; 30 | 31 | installFlags = [ "PREFIX=$(out)" ]; 32 | 33 | passthru.tests.test = nixosTests.terminal-emulators.st; 34 | 35 | meta = with lib; { 36 | homepage = "https://github.com/AlphaTechnolog/st"; 37 | description = "snazzy terminal (suckless + lightweight)"; 38 | license = licenses.mit; 39 | maintainers = with maintainers; [ alphatechnolog ]; 40 | platforms = platforms.unix; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /users/alpha/bin/run.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | with pkgs; 4 | 5 | writeScriptBin "run" '' 6 | #!/usr/bin/env bash 7 | command="$@" 8 | program=$(echo "$command" | awk '{print $1}') 9 | if [[ "$NIX_PKG" != "" ]]; then 10 | program="$NIX_PKG" 11 | fi 12 | nix-shell -p "$program" --run "$command" 13 | '' 14 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/README.md: -------------------------------------------------------------------------------- 1 | # Awesome Template 2 | 3 | Just a starting template to make my own AwesomeWM rices. 4 | 5 | ## Features 6 | 7 | - Helpers scripts that allows me to reuse scripts when making dashboards 8 | - Helpers signals that implements an API to use the custom scripts when making dashboards 9 | - A helpers file with a LOT of custom functions that (like the name says) helps me when ricing AwesomeWM. 10 | - In the helpers, there is a function called transition that automates the process on animating colors transitions using `color` and `rubato`. 11 | - the function add_hover implements an animated hover effect. 12 | - My custom keybinds 13 | - Wallpaper setup 14 | - A lot more 15 | 16 | ## Features that aren't present from my dotfiles 17 | 18 | - Custom notifications 19 | - Helpers for notifications center 20 | 21 | ## Cloning 22 | 23 | ```sh 24 | git clone --recurse-submodules --depth=1 https://github.com/AlphaTechnolog/awesome-template.git ~/.config/awesome 25 | ``` 26 | 27 | > Then just open awesomewm and you'll be able to use my keybinds. 28 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/autostart.sh: -------------------------------------------------------------------------------- 1 | cd $(dirname $0) 2 | 3 | function exe () { 4 | local cmd=$@ 5 | if ! pgrep -x $cmd; then 6 | $cmd & 7 | fi 8 | } 9 | 10 | exe $HOME/.config/awesome/scripts/redshift.sh restore 11 | 12 | xrdb merge $HOME/.Xresources 13 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/fallback-music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/fallback-music.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/icons/hints.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/icons/launcher.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/icons/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/icons/poweroff.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/icons/volume-muted.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/icons/volume-on.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/launcher.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/menu.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/pfp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/pfp.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/shapes/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/shapes/triangle.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/titlebar/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/titlebar/circle.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/assets/wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/assets/wallpaper.jpg -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/autostart.lua: -------------------------------------------------------------------------------- 1 | -- autostart, just runs `autostart.sh` 2 | 3 | local awful = require "awful" 4 | local gfs = require "gears.filesystem" 5 | 6 | local sh_path = gfs.get_configuration_dir() .. "assets/autostart.sh" 7 | 8 | local function load_autostart() 9 | awful.spawn("bash " .. sh_path) 10 | end 11 | 12 | load_autostart() -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/autofocus.lua: -------------------------------------------------------------------------------- 1 | client.connect_signal("mouse::enter", function(c) 2 | c:activate { context = "mouse_enter", raise = false } 3 | end) 4 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/floating-clients.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable:undefined-global 2 | 3 | local awful = require 'awful' 4 | 5 | client.connect_signal('request::manage', function (c) 6 | awful.placement.centered(c, { 7 | honor_workarea = true 8 | }) 9 | end) 10 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/init.lua: -------------------------------------------------------------------------------- 1 | require "configuration.theme" 2 | require "configuration.layouts" 3 | require "configuration.mousebindings" 4 | require "configuration.keybindings" 5 | require "configuration.rules" 6 | require "configuration.autofocus" 7 | require "configuration.floating-clients" 8 | require "configuration.monitor" 9 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/layouts.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | local awful = require "awful" 3 | 4 | local function set_layouts() 5 | tag.connect_signal("request::default_layouts", function () 6 | awful.layout.append_default_layouts { 7 | awful.layout.suit.tile, 8 | awful.layout.suit.floating, 9 | awful.layout.suit.max, 10 | } 11 | end) 12 | end 13 | 14 | set_layouts() 15 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/monitor.lua: -------------------------------------------------------------------------------- 1 | local awful = require 'awful' 2 | 3 | awful.screen.connect_for_each_screen(function (s) 4 | s:connect_signal('property::geometry', function () 5 | awesome.restart() 6 | end) 7 | end) 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/mousebindings.lua: -------------------------------------------------------------------------------- 1 | local awful = require "awful" 2 | local menu = require "ui.menu" 3 | 4 | local function set_mousebindings () 5 | awful.mouse.append_global_mousebindings { 6 | awful.button({ }, 3, function () menu.mainmenu:toggle() end), 7 | awful.button({ }, 4, awful.tag.viewprev), 8 | awful.button({ }, 5, awful.tag.viewnext), 9 | } 10 | 11 | client.connect_signal("request::default_mousebindings", function () 12 | awful.mouse.append_client_mousebindings { 13 | awful.button({ }, 1, function (c) 14 | c:activate { context = "mouse_click" } 15 | end), 16 | awful.button({ modkey }, 1, function (c) 17 | c:activate { context = "mouse_click", action = "mouse_move" } 18 | end), 19 | awful.button({ modkey }, 3, function (c) 20 | c:activate { context = "mouse_click", action = "mouse_resize" } 21 | end) 22 | } 23 | end) 24 | end 25 | 26 | set_mousebindings() 27 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/rules.lua: -------------------------------------------------------------------------------- 1 | local ruled = require "ruled" 2 | local awful = require "awful" 3 | 4 | local function setup_rules () 5 | ruled.client.connect_signal("request::rules", function() 6 | ruled.client.append_rule { 7 | id = "global", 8 | rule = { }, 9 | properties = { 10 | focus = awful.client.focus.filter, 11 | raise = true, 12 | screen = awful.screen.preferred, 13 | placement = awful.placement.no_overlap+awful.placement.no_offscreen 14 | } 15 | } 16 | ruled.client.append_rule { 17 | id = "floating", 18 | rule_any = { 19 | instance = { "copyq", "pinentry" }, 20 | class = { 21 | "Arandr", "Blueman-manager", "Gpick", "Kruler", "Sxiv", 22 | "Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer" 23 | }, 24 | name = { 25 | "Event Tester", -- xev. 26 | }, 27 | role = { 28 | "AlarmWindow", -- Thunderbird's calendar. 29 | "ConfigManager", -- Thunderbird's about:config. 30 | "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. 31 | } 32 | }, 33 | properties = { floating = true } 34 | } 35 | ruled.client.append_rule { 36 | id = "titlebars", 37 | rule_any = { type = { "normal", "dialog" } }, 38 | properties = { titlebars_enabled = true } 39 | } 40 | end) 41 | 42 | ruled.notification.connect_signal("request::rules", function () 43 | ruled.notification.append_rule { 44 | rule = { }, 45 | properties = { 46 | screen = awful.screen.preferred, 47 | implicit_timeout = 5, 48 | } 49 | } 50 | end) 51 | end 52 | 53 | setup_rules() 54 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/configuration/theme.lua: -------------------------------------------------------------------------------- 1 | local beautiful = require "beautiful" 2 | local gears = require "gears" 3 | 4 | local function load_theme () 5 | beautiful.init(gears.filesystem.get_configuration_dir() .. "theme.lua") 6 | end 7 | 8 | load_theme() 9 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = tab 8 | trim_trailing_whitespace = true 9 | 10 | [*.lua] 11 | indent_size = 4 12 | indent_style = space 13 | max_line_length = 80 14 | 15 | [*.yml] 16 | indent_size = 2 17 | indent_style = space 18 | 19 | [*.{html,css}] 20 | indent_size = 2 21 | indent_style = space 22 | 23 | [*.md] 24 | trim_trailing_whitespace = false 25 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/AUTHORS.md: -------------------------------------------------------------------------------- 1 | The following developers have contributed major code to bling: 2 | 3 | * [Nooo37](https://github.com/Nooo37) 4 | * [JavaCafe01](https://github.com/JavaCafe01) 5 | * [Grumph](https://github.com/Grumph) 6 | * [Bysmutheye](https://github.com/Bysmutheye) 7 | * [HumblePresent](https://github.com/HumblePresent) 8 | * [Kasper24](https://github.com/Kasper24) 9 | * [undefinedDarkness](https://github.com/undefinedDarkness) 10 | * [eylles](https://github.com/eylles) 11 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/CODEOWNERS: -------------------------------------------------------------------------------- 1 | /module/* @Nooo37 2 | /widget/* @JavaCafe01 3 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 BlingCorp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 |

5 | 6 | All documentation, instructions, and previews are [here](https://blingcorp.github.io/bling/). 7 | 8 | ## Features 9 | 10 | - Layouts 11 | - mstab (master-slave tab layout) 12 | - centered 13 | - vertical 14 | - horizontal 15 | - equalarea 16 | - Modules 17 | - Flash Focus 18 | - Tabbed container 19 | - Tiled Wallpaper 20 | - Wallpaper Easy Setup 21 | - Window Swallowing 22 | - Scratchpad 23 | - Signals 24 | - Playerctl 25 | - Widgets 26 | - Tag Preview 27 | - Task Preview 28 | 29 | All naming credit goes to [JavaCafe01](https://github.com/JavaCafe01). 30 | 31 | ### Dependencies 32 | 33 | In order to use the `tabbed` modules `pick` function, you need to install `xwininfo`. 34 | 35 | ## Contributing 36 | 37 | Contributions are welcome 💛 38 | 39 | Before requesting changes, makes sure that your editor has an "editorconfig" extension installed, this will use our code style everytime when you edit in the `bling` folder. 40 | 41 | When adding a layout/module/signal/widget, please add theme variables for customization and add the according documentation under `docs`. 42 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/bling-dev-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "bling" 2 | version = "dev-1" 3 | 4 | source = { 5 | url = "git://github.com/BlingCorp/bling", 6 | branch = "master", 7 | } 8 | 9 | description = { 10 | summary = "Utilities for the AwesomeWM", 11 | detailed = [[ 12 | This module extends the Awesome window manager with alternative layouts, 13 | flash focus, tabbing, a simple tiling wallpaper generator, a declarative 14 | wallpaper setter, window swallowing and a playerctl signal. 15 | ]], 16 | homepage = "https://github.com/BlingCorp/bling", 17 | license = "MIT", 18 | } 19 | 20 | dependencies = { 21 | "lua >= 5.1", 22 | } 23 | 24 | build = { 25 | type = "builtin", 26 | modules = { 27 | ["bling"] = "init.lua", 28 | ["bling.helpers"] = "helpers/init.lua", 29 | ["bling.helpers.client"] = "helpers/client.lua", 30 | ["bling.helpers.color"] = "helpers/color.lua", 31 | ["bling.helpers.filesystem"] = "helpers/filesystem.lua", 32 | ["bling.helpers.shape"] = "helpers/shape.lua", 33 | ["bling.helpers.time"] = "helpers/time.lua", 34 | ["bling.layout"] = "layout/init.lua", 35 | ["bling.layout.centered"] = "layout/centered.lua", 36 | ["bling.layout.deck"] = "layout/deck.lua", 37 | ["bling.layout.equalarea"] = "layout/equalarea.lua", 38 | ["bling.layout.horizontal"] = "layout/horizontal.lua", 39 | ["bling.layout.mstab"] = "layout/mstab.lua", 40 | ["bling.layout.vertical"] = "layout/vertical.lua", 41 | ["bling.module"] = "module/init.lua", 42 | ["bling.module.flash_focus"] = "module/flash_focus.lua", 43 | ["bling.module.scratchpad"] = "module/scratchpad.lua", 44 | ["bling.module.tabbed"] = "module/tabbed.lua", 45 | ["bling.module.tiled_wallpaper"] = "module/tiled_wallpaper.lua", 46 | ["bling.module.wallpaper"] = "module/wallpaper.lua", 47 | ["bling.module.window_swallowing"] = "module/window_swallowing.lua", 48 | ["bling.signal"] = "signal/init.lua", 49 | ["bling.signal.playerctl"] = "signal/playerctl/init.lua", 50 | ["bling.signal.playerctl.playerctl_cli"] = "signal/playerctl/playerctl_cli.lua", 51 | ["bling.signal.playerctl.playerctl_lib"] = "signal/playerctl/playerctl_lib.lua", 52 | ["bling.widget"] = "widget/init.lua", 53 | ["bling.widget.tabbar.boxes"] = "widget/tabbar/boxes.lua", 54 | ["bling.widget.tabbar.default"] = "widget/tabbar/default.lua", 55 | ["bling.widget.tabbar.modern"] = "widget/tabbar/modern.lua", 56 | ["bling.widget.tabbed_misc"] = "widget/tabbed_misc/init.lua", 57 | ["bling.widget.tabbed_misc.custom_tasklist"] = "widget/tabbed_misc/custom_tasklist.lua", 58 | ["bling.widget.tabbed_misc.titlebar_indicator"] = "widget/tabbed_misc/titlebar_indicator.lua", 59 | ["bling.widget.tag_preview"] = "widget/tag_preview.lua", 60 | ["bling.widget.task_preview"] = "widget/task_preview.lua", 61 | ["bling.widget.window_switcher"] = "widget/window_switcher.lua", 62 | }, 63 | } 64 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/docs/.nojekyll -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - [Home](home.md) 2 | 3 | - [Layouts](layouts/layout.md) 4 | 5 | - Modules 6 | - [Flash Focus](module/flash.md) 7 | - [Tabbed](module/tabbed.md) 8 | - [Tiled Wallpaper](module/twall.md) 9 | - [Wallpaper Easy Setup](module/wall.md) 10 | - [Window Swallowing](module/swal.md) 11 | - [Scratchpad](module/scratch.md) 12 | 13 | - Signals 14 | - [Playerctl](signals/pctl.md) 15 | 16 | - Widgets 17 | - [Tag Preview](widgets/tag_preview.md) 18 | - [Task Preview](widgets/task_preview.md) 19 | - [Tabbed Misc](widgets/tabbed_misc.md) 20 | - [Window Switcher](widgets/window_switcher.md) 21 | 22 | - Extra 23 | - [Theme Variable Template](theme.md) 24 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/home.md: -------------------------------------------------------------------------------- 1 | #
🌟 Bling - Utilities for AwesomeWM 🌟
2 | 3 | ## Why 4 | 5 | [AwesomeWM](https://awesomewm.org/) is literally what it stands for, an awesome window manager. 6 | 7 | Its unique selling point has always been the widget system, which allows for fancy buttons, sliders, bars, dashboards and anything you can imagine. But that feature can be a curse. Most modules focus on the widget side of things which leave the actual window managing part of AwesomeWM underdeveloped compared to, for example, [xmonad](https://xmonad.org/) even though it's probably just as powerfull in that area. 8 | 9 | This project focuses on that problem - adding new layouts and modules that make use of the widget system, but primarily focus on the new window managing features. 10 | 11 | ## Installation 12 | - clone this repo into your `~/.config/awesome` folder 13 | - `git clone https://github.com/BlingCorp/bling.git ~/.config/awesome/bling` 14 | - require the module in your `rc.lua`, and make sure it's under the beautiful module initialization 15 | 16 | ```lua 17 | -- other imports 18 | 19 | local beautiful = require("beautiful") 20 | 21 | -- other configuration stuff here 22 | 23 | beautiful.init("some_theme.lua") 24 | local bling = require("bling") 25 | ``` 26 | 27 | ## Contributors 28 | A special thanks to all our contributors... 29 | 30 | 31 | 32 | 33 | 34 | Made with [contributors-img](https://contrib.rocks). 35 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bling Docs 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/layouts/layout.md: -------------------------------------------------------------------------------- 1 | ## 📎 Layouts 2 | 3 | Choose layouts from the list below and add them to to your `awful.layouts` list in your `rc.lua`. 4 | 5 | Everyone of them supports multiple master clients and master width factor making them easy to use. 6 | 7 | The mstab layout uses the tab theme from the tabbed module. 8 | 9 | ```lua 10 | bling.layout.mstab 11 | bling.layout.centered 12 | bling.layout.vertical 13 | bling.layout.horizontal 14 | bling.layout.equalarea 15 | bling.layout.deck 16 | ``` 17 | 18 | ### Theme Variables 19 | 20 | ```lua 21 | -- mstab 22 | theme.mstab_bar_disable = false -- disable the tabbar 23 | theme.mstab_bar_ontop = false -- whether you want to allow the bar to be ontop of clients 24 | theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the 25 | -- currently focused stack window (set it to true if you use 26 | -- transparent terminals. False if you use shadows on solid ones 27 | theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar 28 | -- by default it will adjust based on your useless gaps. 29 | -- If you want a custom value. Set it to the number of pixels (int) 30 | theme.mstab_border_radius = 0 -- border radius of the tabbar 31 | theme.mstab_bar_height = 40 -- height of the tabbar 32 | theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) 33 | theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") 34 | -- defaults to the tabbar_style so only change if you want a 35 | -- different style for mstab and tabbed 36 | ``` 37 | 38 | ### Previews 39 | 40 | #### Mstab (dynamic tabbing layout) 41 | 42 | ![](https://imgur.com/HZRgApE.png) 43 | 44 | *screenshot by [JavaCafe01](https://github.com/JavaCafe01)* 45 | 46 | #### Centered 47 | 48 | ![](https://media.discordapp.net/attachments/769673106842845194/780095998239834142/unknown.png) 49 | 50 | *screenshot by [HeavyRain266](https://github.com/HeavyRain266)* 51 | 52 | #### Equal area 53 | 54 | ![](https://imgur.com/JCFFywv.png) 55 | 56 | *screenshot by [bysmutheye](https://github.com/bysmutheye)* 57 | 58 | #### Deck 59 | 60 | The left area shows the deck layout in action. In this screenshot it is used together with [layout machi](https://github.com/xinhaoyuan/layout-machi) and its sublayout support. 61 | 62 | ![](https://cdn.discordapp.com/attachments/635625954219261982/877957824225894430/unknown.png) 63 | 64 | *screenshot by [JavaCafe01](https://github.com/JavaCafe01)* 65 | 66 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/module/flash.md: -------------------------------------------------------------------------------- 1 | ## 🔦 Flash Focus 2 | 3 | Flash focus does an opacity animation effect on a client when it is focused. 4 | 5 | 6 | ### Usage 7 | 8 | There are two ways in which you can use this module. You can enable it by calling the `enable()` function: 9 | ```lua 10 | bling.module.flash_focus.enable() 11 | ``` 12 | This connects to the focus signal of a client, which means that the flash focus will activate however you focus the client. 13 | 14 | The other way is to call the function itself like this: `bling.module.flash_focus.flashfocus(someclient)`. This allows you to activate on certain keybinds like so: 15 | ```lua 16 | awful.key({modkey}, "Up", 17 | function() 18 | awful.client.focus.bydirection("up") 19 | bling.module.flash_focus.flashfocus(client.focus) 20 | end, {description = "focus up", group = "client"}) 21 | ``` 22 | 23 | ### Theme Variables 24 | ```lua 25 | theme.flash_focus_start_opacity = 0.6 -- the starting opacity 26 | theme.flash_focus_step = 0.01 -- the step of animation 27 | ``` 28 | 29 | ### Preview 30 | 31 | ![](https://imgur.com/5txYrlV.gif) 32 | 33 | *gif by [JavaCafe01](https://github.com/JavaCafe01)* 34 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/module/swal.md: -------------------------------------------------------------------------------- 1 | ## 😋 Window Swallowing 2 | 3 | Can your window manager swallow? It probably can... 4 | 5 | ### Usage 6 | 7 | To activate and deactivate window swallowing here are the following functions. If you want to activate it, just call the `start` function once in your `rc.lua`. 8 | ```lua 9 | bling.module.window_swallowing.start() -- activates window swallowing 10 | bling.module.window_swallowing.stop() -- deactivates window swallowing 11 | bling.module.window_swallowing.toggle() -- toggles window swallowing 12 | ``` 13 | 14 | ### Theme Variables 15 | ```lua 16 | theme.parent_filter_list = {"firefox", "Gimp"} -- class names list of parents that should not be swallowed 17 | theme.child_filter_list = { "Dragon" } -- class names list that should not swallow their parents 18 | theme.swallowing_filter = true -- whether the filters above should be active 19 | ``` 20 | 21 | ### Preview 22 | 23 | ![](https://media.discordapp.net/attachments/635625813143978012/769180910683684864/20-10-23-14-40-32.gif) 24 | 25 | *gif by [Nooo37](https://github.com/Nooo37)* 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/docs/module/twall.md: -------------------------------------------------------------------------------- 1 | ## 🏬 Tiled Wallpaper 2 | 3 | ### Usage 4 | 5 | The function to set an automatically created tiled wallpaper can be called the following way (you don't need to set every option in the table): 6 | ```lua 7 | awful.screen.connect_for_each_screen(function(s) -- that way the wallpaper is applied to every screen 8 | bling.module.tiled_wallpaper("x", s, { -- call the actual function ("x" is the string that will be tiled) 9 | fg = "#ff0000", -- define the foreground color 10 | bg = "#00ffff", -- define the background color 11 | offset_y = 25, -- set a y offset 12 | offset_x = 25, -- set a x offset 13 | font = "Hack", -- set the font (without the size) 14 | font_size = 14, -- set the font size 15 | padding = 100, -- set padding (default is 100) 16 | zickzack = true -- rectangular pattern or criss cross 17 | }) 18 | end) 19 | ``` 20 | 21 | ### Preview 22 | 23 | ![](https://media.discordapp.net/attachments/702548913999314964/773887721294135296/tiled-wallpapers.png?width=1920&height=1080) 24 | 25 | *screenshots by [Nooo37](https://github.com/Nooo37)* 26 | 27 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/helpers/filesystem.lua: -------------------------------------------------------------------------------- 1 | local Gio = require("lgi").Gio 2 | local awful = require("awful") 3 | local string = string 4 | 5 | local _filesystem = {} 6 | 7 | --- Get a list of files from a given directory. 8 | -- @string path The directory to search. 9 | -- @tparam[opt] table exts Specific extensions to limit the search to. eg:`{ "jpg", "png" }` 10 | -- If ommited, all files are considered. 11 | -- @bool[opt=false] recursive List files from subdirectories 12 | -- @staticfct bling.helpers.filesystem.get_random_file_from_dir 13 | function _filesystem.list_directory_files(path, exts, recursive) 14 | recursive = recursive or false 15 | local files, valid_exts = {}, {} 16 | 17 | -- Transforms { "jpg", ... } into { [jpg] = #, ... } 18 | if exts then 19 | for i, j in ipairs(exts) do 20 | valid_exts[j:lower()] = i 21 | end 22 | end 23 | 24 | -- Build a table of files from the path with the required extensions 25 | local file_list = Gio.File.new_for_path(path):enumerate_children( 26 | "standard::*", 27 | 0 28 | ) 29 | if file_list then 30 | for file in function() 31 | return file_list:next_file() 32 | end do 33 | local file_type = file:get_file_type() 34 | if file_type == "REGULAR" then 35 | local file_name = file:get_display_name() 36 | if 37 | not exts 38 | or valid_exts[file_name:lower():match(".+%.(.*)$") or ""] 39 | then 40 | table.insert(files, file_name) 41 | end 42 | elseif recursive and file_type == "DIRECTORY" then 43 | local file_name = file:get_display_name() 44 | files = gears.table.join( 45 | files, 46 | list_directory_files(file_name, exts, recursive) 47 | ) 48 | end 49 | end 50 | end 51 | 52 | return files 53 | end 54 | 55 | function _filesystem.save_image_async_curl(url, filepath, callback) 56 | awful.spawn.with_line_callback(string.format("curl -L -s %s -o %s", url, filepath), 57 | { 58 | exit=callback 59 | }) 60 | end 61 | 62 | return _filesystem 63 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/helpers/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | client = require(... .. ".client"), 3 | color = require(... .. ".color"), 4 | filesystem = require(... .. ".filesystem"), 5 | shape = require(... .. ".shape"), 6 | time = require(... .. ".time"), 7 | } 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/helpers/shape.lua: -------------------------------------------------------------------------------- 1 | local gears = require("gears") 2 | 3 | local shape = {} 4 | 5 | -- Create rounded rectangle shape (in one line) 6 | 7 | function shape.rrect(radius) 8 | return function(cr, width, height) 9 | gears.shape.rounded_rect(cr, width, height, radius) 10 | end 11 | end 12 | 13 | -- Create partially rounded rect 14 | 15 | function shape.prrect(radius, tl, tr, br, bl) 16 | return function(cr, width, height) 17 | gears.shape.partially_rounded_rect( 18 | cr, 19 | width, 20 | height, 21 | tl, 22 | tr, 23 | br, 24 | bl, 25 | radius 26 | ) 27 | end 28 | end 29 | 30 | return shape 31 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/helpers/time.lua: -------------------------------------------------------------------------------- 1 | local time = {} 2 | 3 | --- Parse a time string to seconds (from midnight) 4 | -- 5 | -- @string time The time (`HH:MM:SS`) 6 | -- @treturn int The number of seconds since 00:00:00 7 | function time.hhmmss_to_seconds(time) 8 | hour_sec = tonumber(string.sub(time, 1, 2)) * 3600 9 | min_sec = tonumber(string.sub(time, 4, 5)) * 60 10 | get_sec = tonumber(string.sub(time, 7, 8)) 11 | return (hour_sec + min_sec + get_sec) 12 | end 13 | 14 | --- Get time difference in seconds. 15 | -- 16 | -- @tparam string base The time to compare from (`HH:MM:SS`). 17 | -- @tparam string base The time to compare to (`HH:MM:SS`). 18 | -- @treturn int Number of seconds between the two times. 19 | function time.time_diff(base, compare) 20 | local diff = time.hhmmss_to_seconds(base) - time.hhmmss_to_seconds(compare) 21 | return diff 22 | end 23 | 24 | return time 25 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/icons/layouts/centered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/icons/layouts/centered.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/icons/layouts/deck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/icons/layouts/deck.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/icons/layouts/equalarea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/icons/layouts/equalarea.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/icons/layouts/horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/icons/layouts/horizontal.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/icons/layouts/mstab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/icons/layouts/mstab.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/icons/layouts/vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/icons/layouts/vertical.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/images/bling_banner-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/images/bling_banner-2x.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/images/bling_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/bling/images/bling_banner.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/init.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Bling 3 | Layouts, widgets and utilities for Awesome WM 4 | --]] 5 | return { 6 | layout = require(... .. ".layout"), 7 | module = require(... .. ".module"), 8 | helpers = require(... .. ".helpers"), 9 | signal = require(... .. ".signal"), 10 | widget = require(... .. ".widget"), 11 | } 12 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/layout/centered.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | local math = math 3 | 4 | local mylayout = {} 5 | 6 | mylayout.name = "centered" 7 | 8 | function mylayout.arrange(p) 9 | local area = p.workarea 10 | local t = p.tag or screen[p.screen].selected_tag 11 | local nmaster = math.min(t.master_count, #p.clients) 12 | local nslaves = #p.clients - nmaster 13 | 14 | local master_area_width = area.width * t.master_width_factor 15 | if t.master_count == 0 then master_area_width = 0 end 16 | local slave_width = 0.5 * (area.width - master_area_width) 17 | local master_area_x = area.x + slave_width 18 | 19 | 20 | -- Special case: few slaves -> make masters take more space - unless requested otherwise! 21 | if nslaves < 2 and t.master_fill_policy ~= "master_width_factor" then 22 | master_area_x = area.x 23 | 24 | if nslaves == 1 then 25 | slave_width = area.width - master_area_width 26 | else 27 | master_area_width = area.width 28 | end 29 | end 30 | 31 | 32 | -- iterate through masters 33 | for idx = 1, nmaster do 34 | local c = p.clients[idx] 35 | local g 36 | g = { 37 | x = master_area_x, 38 | y = area.y + (nmaster - idx) * (area.height / nmaster), 39 | width = master_area_width, 40 | height = area.height / nmaster, 41 | } 42 | p.geometries[c] = g 43 | end 44 | 45 | 46 | -- iterate through slaves 47 | local number_of_left_sided_slaves = math.floor(nslaves / 2) 48 | local number_of_right_sided_slaves = nslaves - number_of_left_sided_slaves 49 | local left_iterator = 0 50 | local right_iterator = 0 51 | 52 | for idx = 1, nslaves do 53 | local c = p.clients[idx + nmaster] 54 | local g 55 | if idx % 2 == 0 then 56 | g = { 57 | x = area.x, 58 | y = area.y 59 | + left_iterator 60 | * (area.height / number_of_left_sided_slaves), 61 | width = slave_width, 62 | height = area.height / number_of_left_sided_slaves, 63 | } 64 | left_iterator = left_iterator + 1 65 | else 66 | g = { 67 | x = master_area_x + master_area_width, 68 | y = area.y 69 | + right_iterator 70 | * (area.height / number_of_right_sided_slaves), 71 | width = slave_width, 72 | height = area.height / number_of_right_sided_slaves, 73 | } 74 | right_iterator = right_iterator + 1 75 | end 76 | p.geometries[c] = g 77 | end 78 | end 79 | 80 | return mylayout 81 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/layout/deck.lua: -------------------------------------------------------------------------------- 1 | local mylayout = {} 2 | 3 | mylayout.name = "deck" 4 | 5 | function mylayout.arrange(p) 6 | local area = p.workarea 7 | local t = p.tag or screen[p.screen].selected_tag 8 | local client_count = #p.clients 9 | 10 | if client_count == 1 then 11 | local c = p.clients[1] 12 | local g = { 13 | x = area.x, 14 | y = area.y, 15 | width = area.width, 16 | height = area.height, 17 | } 18 | p.geometries[c] = g 19 | return 20 | end 21 | 22 | local xoffset = area.width * 0.1 / (client_count - 1) 23 | local yoffset = area.height * 0.1 / (client_count - 1) 24 | 25 | for idx = 1, client_count do 26 | local c = p.clients[idx] 27 | local g = { 28 | x = area.x + (idx - 1) * xoffset, 29 | y = area.y + (idx - 1) * yoffset, 30 | width = area.width - (xoffset * (client_count - 1)), 31 | height = area.height - (yoffset * (client_count - 1)), 32 | } 33 | p.geometries[c] = g 34 | end 35 | end 36 | 37 | return mylayout 38 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/layout/equalarea.lua: -------------------------------------------------------------------------------- 1 | local math = math 2 | local screen = screen 3 | local mylayout = {} 4 | mylayout.name = "equalarea" 5 | 6 | local function divide(p, g, low, high, cls, mwfact, mcount) 7 | if low == high then 8 | p.geometries[cls[low]] = g 9 | else 10 | local masters = math.max(0, math.min(mcount, high) - low + 1) 11 | local numblock = high - low + 1 12 | local slaves = numblock - masters 13 | local smalldiv 14 | if numblock > 5 and (numblock % 5) == 0 then 15 | smalldiv = math.floor(numblock / 5) 16 | else 17 | if (numblock % 3) == 0 then 18 | smalldiv = math.floor(numblock / 3) 19 | else 20 | smalldiv = math.floor(numblock / 2) 21 | end 22 | end 23 | local bigdiv = numblock - smalldiv 24 | local smallmasters = math.min(masters, smalldiv) 25 | local bigmasters = masters - smallmasters 26 | local smallg = {} 27 | local bigg = {} 28 | smallg.x = g.x 29 | smallg.y = g.y 30 | if g.width > (g.height * 1.3) then 31 | smallg.height = g.height 32 | bigg.height = g.height 33 | bigg.width = math.floor( 34 | g.width 35 | * (bigmasters * (mwfact - 1) + bigdiv) 36 | / (slaves + mwfact * masters) 37 | ) 38 | smallg.width = g.width - bigg.width 39 | bigg.y = g.y 40 | bigg.x = g.x + smallg.width 41 | else 42 | smallg.width = g.width 43 | bigg.width = g.width 44 | bigg.height = math.floor( 45 | g.height 46 | * (bigmasters * (mwfact - 1) + bigdiv) 47 | / (slaves + mwfact * masters) 48 | ) 49 | smallg.height = g.height - bigg.height 50 | bigg.x = g.x 51 | bigg.y = g.y + smallg.height 52 | end 53 | divide(p, smallg, low, high - bigdiv, cls, mwfact, mcount) 54 | divide(p, bigg, low + smalldiv, high, cls, mwfact, mcount) 55 | end 56 | return 57 | end 58 | 59 | function mylayout.arrange(p) 60 | local t = p.tag or screen[p.screen].selected_tag 61 | local wa = p.workarea 62 | local cls = p.clients 63 | 64 | if #cls == 0 then 65 | return 66 | end 67 | local mwfact = t.master_width_factor * 2 68 | local mcount = t.master_count 69 | local g = {} 70 | g.height = wa.height 71 | g.width = wa.width 72 | g.x = wa.x 73 | g.y = wa.y 74 | divide(p, g, 1, #cls, cls, mwfact, mcount) 75 | end 76 | 77 | return mylayout 78 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/layout/horizontal.lua: -------------------------------------------------------------------------------- 1 | local math = math 2 | 3 | local mylayout = {} 4 | 5 | mylayout.name = "horizontal" 6 | 7 | function mylayout.arrange(p) 8 | local area = p.workarea 9 | local t = p.tag or screen[p.screen].selected_tag 10 | local mwfact = t.master_width_factor 11 | local nmaster = math.min(t.master_count, #p.clients) 12 | local nslaves = #p.clients - nmaster 13 | 14 | local master_area_height = area.height * mwfact 15 | local slave_area_height = area.height - master_area_height 16 | 17 | -- Special case: no slaves 18 | if nslaves == 0 then 19 | master_area_height = area.height 20 | slave_area_height = 0 21 | end 22 | 23 | -- Special case: no masters 24 | if nmaster == 0 then 25 | master_area_height = 0 26 | slave_area_height = area.height 27 | end 28 | 29 | -- itearte through masters 30 | for idx = 1, nmaster do 31 | local c = p.clients[idx] 32 | local g = { 33 | x = area.x + (idx - 1) * (area.width / nmaster), 34 | y = area.y, 35 | width = area.width / nmaster, 36 | height = master_area_height, 37 | } 38 | p.geometries[c] = g 39 | end 40 | 41 | -- iterate through slaves 42 | for idx = 1, nslaves do 43 | local c = p.clients[idx + nmaster] 44 | local g = { 45 | x = area.x, 46 | y = area.y 47 | + master_area_height 48 | + (idx - 1) * (slave_area_height / nslaves), 49 | width = area.width, 50 | height = slave_area_height / nslaves, 51 | } 52 | p.geometries[c] = g 53 | end 54 | end 55 | 56 | return mylayout 57 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/layout/init.lua: -------------------------------------------------------------------------------- 1 | local beautiful = require("beautiful") 2 | local gears = require("gears") 3 | 4 | local M = {} 5 | local relative_lua_path = tostring(...) 6 | 7 | local function get_layout_icon_path(name) 8 | local relative_icon_path = relative_lua_path 9 | :match("^.*bling"):gsub("%.", "/") 10 | .. "/icons/layouts/" .. name .. ".png" 11 | 12 | for p in package.path:gmatch('([^;]+)') do 13 | p = p:gsub("?.*", "") 14 | local absolute_icon_path = p .. relative_icon_path 15 | if gears.filesystem.file_readable(absolute_icon_path) then 16 | return absolute_icon_path 17 | end 18 | end 19 | end 20 | 21 | local function get_icon(icon_raw) 22 | if icon_raw ~= nil then 23 | return gears.color.recolor_image(icon_raw, beautiful.fg_normal) 24 | else 25 | return nil 26 | end 27 | end 28 | 29 | local layouts = { 30 | "mstab", 31 | "vertical", 32 | "horizontal", 33 | "centered", 34 | "equalarea", 35 | "deck" 36 | } 37 | 38 | for _, layout_name in ipairs(layouts) do 39 | local icon_raw = get_layout_icon_path(layout_name) 40 | if beautiful["layout_" .. layout_name] == nil then 41 | beautiful["layout_" .. layout_name] = get_icon(icon_raw) 42 | end 43 | M[layout_name] = require(... .. "." .. layout_name) 44 | end 45 | 46 | return M 47 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/layout/vertical.lua: -------------------------------------------------------------------------------- 1 | local math = math 2 | 3 | local mylayout = {} 4 | 5 | mylayout.name = "vertical" 6 | 7 | function mylayout.arrange(p) 8 | local area = p.workarea 9 | local t = p.tag or screen[p.screen].selected_tag 10 | local mwfact = t.master_width_factor 11 | local nmaster = math.min(t.master_count, #p.clients) 12 | local nslaves = #p.clients - nmaster 13 | 14 | local master_area_width = area.width * mwfact 15 | local slave_area_width = area.width - master_area_width 16 | 17 | -- Special case: no slaves 18 | if nslaves == 0 then 19 | master_area_width = area.width 20 | slave_area_width = 0 21 | end 22 | 23 | -- Special case: no masters 24 | if nmaster == 0 then 25 | master_area_width = 0 26 | slave_area_width = area.width 27 | end 28 | 29 | -- iterate through masters 30 | for idx = 1, nmaster do 31 | local c = p.clients[idx] 32 | local g = { 33 | x = area.x, 34 | y = area.y + (idx - 1) * (area.height / nmaster), 35 | width = master_area_width, 36 | height = area.height / nmaster, 37 | } 38 | p.geometries[c] = g 39 | end 40 | 41 | -- itearte through slaves 42 | for idx = 1, nslaves do 43 | local c = p.clients[idx + nmaster] 44 | local g = { 45 | x = area.x 46 | + master_area_width 47 | + (idx - 1) * (slave_area_width / nslaves), 48 | y = area.y, 49 | width = slave_area_width / nslaves, 50 | height = area.height, 51 | } 52 | p.geometries[c] = g 53 | end 54 | end 55 | 56 | return mylayout 57 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/module/flash_focus.lua: -------------------------------------------------------------------------------- 1 | local gears = require("gears") 2 | local beautiful = require("beautiful") 3 | 4 | local op = beautiful.flash_focus_start_opacity or 0.6 5 | local stp = beautiful.flash_focus_step or 0.01 6 | local timeout = beautiful.flash_focus_timeout or stp 7 | 8 | local flashfocus = function(c) 9 | if c and #c.screen.clients > 1 then 10 | c.opacity = op 11 | local q = op 12 | local g = gears.timer({ 13 | timeout = timeout, 14 | call_now = false, 15 | autostart = true, 16 | }) 17 | 18 | g:connect_signal("timeout", function() 19 | if not c.valid then 20 | return 21 | end 22 | if q >= 1 then 23 | c.opacity = 1 24 | g:stop() 25 | else 26 | c.opacity = q 27 | q = q + stp 28 | end 29 | end) 30 | end 31 | end 32 | 33 | local enable = function() 34 | client.connect_signal("focus", flashfocus) 35 | end 36 | local disable = function() 37 | client.disconnect_signal("focus", flashfocus) 38 | end 39 | 40 | return { enable = enable, disable = disable, flashfocus = flashfocus } 41 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/module/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | window_swallowing = require(... .. ".window_swallowing"), 3 | tiled_wallpaper = require(... .. ".tiled_wallpaper"), 4 | wallpaper = require(... .. ".wallpaper"), 5 | flash_focus = require(... .. ".flash_focus"), 6 | tabbed = require(... .. ".tabbed"), 7 | scratchpad = require(... .. ".scratchpad"), 8 | } 9 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/module/tiled_wallpaper.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | This module makes use of cairo surfaces 3 | For documentation take a look at the C docs: 4 | https://www.cairographics.org/ 5 | They can be applied to lua by changing the naming conventions 6 | and adjusting for the missing namespaces (and classes) 7 | for example: 8 | cairo_rectangle(cr, 1, 1, 1, 1) in C would be written as 9 | cr:rectangle(1, 1, 1, 1) in lua 10 | and 11 | cairo_fill(cr) in C would be written as 12 | cr:fill() in lua 13 | --]] 14 | 15 | local cairo = require("lgi").cairo 16 | local gears = require("gears") 17 | 18 | function create_tiled_wallpaper(str, s, args_table) 19 | -- user input 20 | args_table = args_table or {} 21 | local fg = args_table.fg or "#ff0000" 22 | local bg = args_table.bg or "#00ffff" 23 | local offset_x = args_table.offset_x 24 | local offset_y = args_table.offset_y 25 | local font = args_table.font or "Hack" 26 | local font_size = tonumber(args_table.font_size) or 16 27 | local zickzack_bool = args_table.zickzack or false 28 | local padding = args_table.padding or 100 29 | 30 | -- create cairo image wallpaper 31 | local img = cairo.ImageSurface(cairo.Format.RGB24, padding, padding) 32 | cr = cairo.Context(img) 33 | 34 | cr:set_source(gears.color(bg)) 35 | cr:paint() 36 | 37 | cr:set_source(gears.color(fg)) 38 | 39 | cr:set_font_size(font_size) 40 | cr:select_font_face(font) 41 | 42 | if zickzack_bool then 43 | cr:set_source(gears.color(fg)) 44 | cr:move_to(padding / 2 + font_size, padding / 2 + font_size) 45 | cr:show_text(str) 46 | end 47 | 48 | cr:set_source(gears.color(fg)) 49 | cr:move_to(font_size, font_size) 50 | cr:show_text(str) 51 | 52 | -- tile cairo image 53 | gears.wallpaper.tiled(img, s, { x = offset_x, y = offset_y }) 54 | end 55 | 56 | return create_tiled_wallpaper 57 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/signal/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | playerctl = require(... .. ".playerctl"), 3 | } 4 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/signal/playerctl/init.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | local gtimer = require("gears.timer") 3 | local beautiful = require("beautiful") 4 | local naughty = require("naughty") 5 | 6 | -- Use CLI backend as default as it is supported on most if not all systems 7 | local backend_config = beautiful.playerctl_backend or "playerctl_cli" 8 | local backends = { 9 | playerctl_cli = require(... .. ".playerctl_cli"), 10 | playerctl_lib = require(... .. ".playerctl_lib"), 11 | } 12 | 13 | local backend = nil 14 | 15 | local function enable_wrapper(args) 16 | local open = naughty.action { name = "Open" } 17 | 18 | open:connect_signal("invoked", function() 19 | awful.spawn("xdg-open https://blingcorp.github.io/bling/#/signals/pctl") 20 | end) 21 | 22 | gtimer.delayed_call(function() 23 | naughty.notify({ 24 | title = "Bling Error", 25 | text = "Global signals are deprecated! Please take a look at the playerctl documentation.", 26 | app_name = "Bling Error", 27 | app_icon = "system-error", 28 | actions = { open } 29 | }) 30 | end) 31 | 32 | backend_config = (args and args.backend) or backend_config 33 | backend = backends[backend_config](args) 34 | return backend 35 | end 36 | 37 | local function disable_wrapper() 38 | backend:disable() 39 | end 40 | 41 | return { 42 | lib = backends.playerctl_lib, 43 | cli = backends.playerctl_cli, 44 | enable = enable_wrapper, 45 | disable = disable_wrapper 46 | } -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/widget/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | tag_preview = require(... .. ".tag_preview"), 3 | task_preview = require(... .. ".task_preview"), 4 | window_switcher = require(... .. ".window_switcher"), 5 | tabbed_misc = require(... .. ".tabbed_misc"), 6 | app_launcher = require(... .. ".app_launcher"), 7 | } 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/widget/tabbar/boxes.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | local gears = require("gears") 3 | local wibox = require("wibox") 4 | 5 | local beautiful = require("beautiful") 6 | 7 | local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff" 8 | local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000" 9 | local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000" 10 | local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff" 11 | local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus 12 | local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus 13 | local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal 14 | local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal 15 | local font = beautiful.tabbar_font or beautiful.font or "Hack 15" 16 | local size = beautiful.tabbar_size or 40 17 | local position = beautiful.tabbar_position or "bottom" 18 | 19 | local function create(c, focused_bool, buttons, inactive_bool) 20 | local bg_temp = inactive_bool and bg_normal_inactive or bg_normal 21 | local fg_temp = inactive_bool and fg_normal_inactive or fg_normal 22 | if focused_bool then 23 | bg_temp = inactive_bool and bg_focus_inactive or bg_focus 24 | fg_temp = inactive_bool and fg_focus_inactive or fg_focus 25 | end 26 | local wid_temp = wibox.widget({ 27 | { 28 | { 29 | awful.widget.clienticon(c), 30 | left = 10, 31 | right = 10, 32 | bottom = 10, 33 | top = 10, 34 | widget = wibox.container.margin(), 35 | }, 36 | widget = wibox.container.place(), 37 | }, 38 | buttons = buttons, 39 | bg = bg_temp, 40 | widget = wibox.container.background(), 41 | }) 42 | return wid_temp 43 | end 44 | 45 | local layout = wibox.layout.fixed.horizontal 46 | if position == "left" or position == "right" then 47 | layout = wibox.layout.fixed.vertical 48 | end 49 | 50 | return { 51 | layout = layout, 52 | create = create, 53 | position = position, 54 | size = size, 55 | bg_normal = bg_normal, 56 | bg_focus = bg_normal, 57 | } 58 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/widget/tabbar/default.lua: -------------------------------------------------------------------------------- 1 | local gears = require("gears") 2 | local wibox = require("wibox") 3 | 4 | local beautiful = require("beautiful") 5 | 6 | local bg_normal = beautiful.tabbar_bg_normal or beautiful.bg_normal or "#ffffff" 7 | local fg_normal = beautiful.tabbar_fg_normal or beautiful.fg_normal or "#000000" 8 | local bg_focus = beautiful.tabbar_bg_focus or beautiful.bg_focus or "#000000" 9 | local fg_focus = beautiful.tabbar_fg_focus or beautiful.fg_focus or "#ffffff" 10 | local bg_focus_inactive = beautiful.tabbar_bg_focus_inactive or bg_focus 11 | local fg_focus_inactive = beautiful.tabbar_fg_focus_inactive or fg_focus 12 | local bg_normal_inactive = beautiful.tabbar_bg_normal_inactive or bg_normal 13 | local fg_normal_inactive = beautiful.tabbar_fg_normal_inactive or fg_normal 14 | local font = beautiful.tabbar_font or beautiful.font or "Hack 15" 15 | local size = beautiful.tabbar_size or 20 16 | local position = beautiful.tabbar_position or "top" 17 | 18 | local function create(c, focused_bool, buttons, inactive_bool) 19 | local flexlist = wibox.layout.flex.horizontal() 20 | local title_temp = c.name or c.class or "-" 21 | local bg_temp = inactive_bool and bg_normal_inactive or bg_normal 22 | local fg_temp = inactive_bool and fg_normal_inactive or fg_normal 23 | if focused_bool then 24 | bg_temp = inactive_bool and bg_focus_inactive or bg_focus 25 | fg_temp = inactive_bool and fg_focus_inactive or fg_focus 26 | end 27 | local text_temp = wibox.widget.textbox() 28 | text_temp.align = "center" 29 | text_temp.valign = "center" 30 | text_temp.font = font 31 | text_temp.markup = "" 34 | .. title_temp 35 | .. "" 36 | c:connect_signal("property::name", function(_) 37 | local title_temp = c.name or c.class or "-" 38 | text_temp.markup = "" 41 | .. title_temp 42 | .. "" 43 | end) 44 | local wid_temp = wibox.widget({ 45 | text_temp, 46 | buttons = buttons, 47 | bg = bg_temp, 48 | widget = wibox.container.background(), 49 | }) 50 | return wid_temp 51 | end 52 | 53 | return { 54 | layout = wibox.layout.flex.horizontal, 55 | create = create, 56 | position = position, 57 | size = size, 58 | bg_normal = bg_normal, 59 | bg_focus = bg_focus, 60 | } 61 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/widget/tabbed_misc/custom_tasklist.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local awful = require("awful") 3 | local gears = require("gears") 4 | local beautiful = require("beautiful") 5 | local dpi = require("beautiful.xresources").apply_dpi 6 | 7 | local function tabobj_support(self, c, index, clients) 8 | -- Self is the background widget in this context 9 | if not c.bling_tabbed and #c.bling_tabbed.clients > 1 then 10 | return 11 | end 12 | 13 | local group = c.bling_tabbed 14 | 15 | -- TODO: Allow customization here 16 | local layout_v = wibox.widget { 17 | vertical_spacing = dpi(2), 18 | horizontal_spacing = dpi(2), 19 | layout = wibox.layout.grid.horizontal, 20 | forced_num_rows = 2, 21 | forced_num_cols = 2, 22 | homogeneous = true 23 | } 24 | 25 | local wrapper = wibox.widget({ 26 | layout_v, 27 | id = "click_role", 28 | widget = wibox.container.margin, 29 | margins = dpi(5), 30 | }) 31 | 32 | -- To get the ball rolling. 33 | for idx, c in ipairs(group.clients) do 34 | if not (c and c.icon) then goto skip end 35 | 36 | -- Add to the last layout 37 | layout_v:add(wibox.widget { 38 | { 39 | widget = awful.widget.clienticon, 40 | client = c 41 | }, 42 | widget = wibox.container.constraint, 43 | width = dpi(24), 44 | height = dpi(24) 45 | }) 46 | ::skip:: 47 | end 48 | self.widget = wrapper 49 | end 50 | 51 | return tabobj_support 52 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/bling/widget/tabbed_misc/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | titlebar_indicator = require( 3 | tostring(...):match(".*bling") 4 | .. ".widget.tabbed_misc.titlebar_indicator" 5 | ), 6 | custom_tasklist = require( 7 | tostring(...):match(".*bling") .. ".widget.tabbed_misc.custom_tasklist" 8 | ), 9 | } 10 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/color/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 andOrlando 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/color/color-1.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "color" 2 | version = "1.1-1" 3 | source = { 4 | url = "git+https://github.com/andOrlando/color.git" 5 | } 6 | description = { 7 | detailed = [[ 8 | Allows for easy access to rgba, hsla or hex by only defining one of them as well as efficient computation of other values when one changes. It also has a couple useful color conversion methods like hex_to_rgba, rgba_to_hex, rgb_to_hsl and hsl_to_rgb and the class uses those methods to calculate the other values when one value updates. 9 | 10 | The main color class itself contains h, s, l, r, g, b and hex values which, when one is updated, updates all the others (but it only does it when the values are needed, ensuring no more calculations than necessary) 11 | 12 | There's a better description in the github's README 13 | ]], 14 | homepage = "https://github.com/andOrlando/color", 15 | license = "MIT" 16 | } 17 | build = { 18 | type = "builtin", 19 | modules = { 20 | color = "color.lua" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/color/images/spinny.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/color/images/spinny.gif -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/color/init.lua: -------------------------------------------------------------------------------- 1 | COLOR_DIR = (...):match("(.-)[^%.]+$").."color." 2 | 3 | return { 4 | color = require(COLOR_DIR.."color"), 5 | utils = require(COLOR_DIR.."utils"), 6 | transition = require(COLOR_DIR.."transition"), 7 | } 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/color/tags: -------------------------------------------------------------------------------- 1 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ 2 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ 3 | !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ 4 | !_TAG_PROGRAM_NAME Exuberant Ctags // 5 | !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ 6 | !_TAG_PROGRAM_VERSION Development // 7 | color color.lua /^local function color(args)$/;" f 8 | contains utils.lua /^local function contains(obj, value)$/;" f 9 | hex_to_rgba utils.lua /^local function hex_to_rgba(hex)$/;" f 10 | hsl_to_rgb utils.lua /^local function hsl_to_rgb(obj)$/;" f 11 | if method transition.lua /^ if method == self.RGB then return function(t) return color {$/;" f 12 | mt.__add color.lua /^ mt.__add = function(_, new) return operate(new, "+") end$/;" f 13 | mt.__index color.lua /^ mt.__index = function(self, key)$/;" f 14 | mt.__newindex color.lua /^ mt.__newindex = function(self, key, value)$/;" f 15 | mt.__sub color.lua /^ mt.__sub = function(_, new) return operate(new, "-") end$/;" f 16 | obj:_alphaize_hex color.lua /^ function obj:_alphaize_hex()$/;" f 17 | obj:_hex_to_rgba color.lua /^ function obj:_hex_to_rgba()$/;" f 18 | obj:_hsl_to_rgb color.lua /^ function obj:_hsl_to_rgb()$/;" f 19 | obj:_rgb_to_hsl color.lua /^ function obj:_rgb_to_hsl()$/;" f 20 | obj:_rgba_to_hex color.lua /^ function obj:_rgba_to_hex()$/;" f 21 | obj:set_no_update color.lua /^ function obj:set_no_update(key, value)$/;" f 22 | operate color.lua /^ local function operate(new, operator)$/;" f 23 | rgb_to_hsl utils.lua /^local function rgb_to_hsl(obj)$/;" f 24 | rgba_to_hex utils.lua /^local function rgba_to_hex(obj)$/;" f 25 | round utils.lua /^local function round(x, p)$/;" f 26 | setmetatable(transition, {__call transition.lua /^setmetatable(transition, {__call = function(self, col1, col2, method)$/;" f 27 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/color/transition.lua: -------------------------------------------------------------------------------- 1 | local color = require(COLOR_DIR.."color") 2 | 3 | --0 is rgb 4 | --1 is hsl 5 | --2 is hsl but backwards 6 | 7 | local transition = { 8 | RGB = 0, 9 | HSL = 1, 10 | HSLR = 2, 11 | } 12 | 13 | setmetatable(transition, {__call = function(self, col1, col2, method) 14 | if method == self.RGB then return function(t) return color { 15 | r = math.min(math.max(col1.r + t * (col2.r - col1.r), 0), 255), 16 | g = math.min(math.max(col1.g + t * (col2.g - col1.g), 0), 255), 17 | b = math.min(math.max(col1.b + t * (col2.b - col1.b), 0), 255) } 18 | end 19 | else return function(t) return color { 20 | h = math.max(col1.h + t * (col2.h - (method == self.HSLR and 360 or 0) - col1.h), 0) % 360, 21 | s = math.min(math.max(col1.s + t * (col2.s - col1.s), 0), 1), 22 | l = math.min(math.max(col1.l + t * (col2.l - col1.l), 0), 1) } 23 | end end 24 | end}) 25 | 26 | return transition 27 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*.lua] 4 | charset = utf-8 5 | intent_style = tab 6 | indent_size = 4 7 | trim_trailing_whitespace = true 8 | max_line_length = 120 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/.gitignore: -------------------------------------------------------------------------------- 1 | tags 2 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 andOrlando 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/easing.lua: -------------------------------------------------------------------------------- 1 | --- Linear easing (in quotes). 2 | local linear = { 3 | F = 0.5, 4 | easing = function(t) return t end 5 | } 6 | 7 | --- Sublinear (?) easing. 8 | local zero = { 9 | F = 1, 10 | easing = function() return 1 end 11 | } 12 | 13 | --- Quadratic easing. 14 | local quadratic = { 15 | F = 1/3, 16 | easing = function(t) return t * t end 17 | } 18 | 19 | -- Okay look. It works. It's not terribly slow because computers can do math 20 | -- quick. The other one decidedly does not work (thanks sagemath, I trusted 21 | -- you...) so this will have to do. I may try to fix it up at some point, I may 22 | -- just leave it be and laugh to myself whenever I see this. As they say, if 23 | -- As they say, if you want something fixed that badly, make a pull request lol 24 | local bouncy = { 25 | F = (20*math.sqrt(3)*math.pi-30*math.log(2)-6147) / 26 | (10*(2*math.sqrt(3)*math.pi-6147*math.log(2))), 27 | easing = function(t) return 28 | (4096*math.pi*math.pow(2, 10*t-10)*math.cos(20/3*math.pi*t-43/6*math.pi) 29 | +6144*math.pow(2, 10*t-10)*math.log(2)*math.sin(20/3*math.pi*t-43/6*math.pi) 30 | +2*math.sqrt(3)*math.pi-3*math.log(2)) / 31 | (2*math.pi*math.sqrt(3)-6147*math.log(2)) 32 | end 33 | } 34 | 35 | return { 36 | linear = linear, 37 | zero = zero, 38 | quadratic = quadratic, 39 | bouncy = bouncy 40 | } 41 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/beautiful.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/beautiful.gif -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/connected_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/connected_graph.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/disconnected_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/disconnected_graph.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/forwards_forwards_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/forwards_forwards_graph.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/normal_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/normal_graph.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/quadratic_easing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/quadratic_easing.gif -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/slope_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/slope_graph.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/trapezoid_easing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/trapezoid_easing.gif -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/images/triangleish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/cfg/awesome/modules/rubato/images/triangleish.png -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/init.lua: -------------------------------------------------------------------------------- 1 | if not RUBATO_DIR then RUBATO_DIR = (...):match("(.-)[^%.]+$").."rubato." end 2 | if not RUBATO_MANAGER then RUBATO_MANAGER = require(RUBATO_DIR.."manager") end 3 | 4 | return { 5 | --depreciated 6 | set_def_rate = function(rate) RUBATO_MANAGER.timed.defaults.rate = rate end, 7 | set_override_dt = function(value) RUBATO_MANAGER.timed.defaults.override_dt = value end, 8 | 9 | --Modules 10 | timed = require(RUBATO_DIR.."timed"), 11 | easing = require(RUBATO_DIR.."easing"), 12 | subscribable = require(RUBATO_DIR.."subscribable"), 13 | manager = RUBATO_MANAGER, 14 | } 15 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/manager.lua: -------------------------------------------------------------------------------- 1 | if not RUBATO_DIR then RUBATO_DIR = (...):match("(.-)[^%.]+$") end 2 | 3 | local easing = require(RUBATO_DIR.."easing") 4 | 5 | local function make_props_immutable(table) 6 | setmetatable(table, { 7 | __index = function(self, key) 8 | if self._props[key] then return self._props[key] 9 | else return rawget(self, key) end 10 | end, 11 | __newindex = function(self, key, value) 12 | if self._props[key] then return 13 | else self._props[key] = value end 14 | end, 15 | }) 16 | end 17 | 18 | local function manager() 19 | local obj = {_props = {}} 20 | make_props_immutable(obj) 21 | 22 | obj._props.timeds = {} 23 | 24 | obj._props.timed = {_props = {}} 25 | obj._props.timed._props.defaults = { 26 | duration = 1, 27 | pos = 0, 28 | prop_intro = false, 29 | intro = 0.2, 30 | easing = easing.linear, 31 | awestore_compat = false, 32 | log = function() end, 33 | override_simulate = false, 34 | override_dt = false, 35 | rate = 60, 36 | } 37 | make_props_immutable(obj.timed) 38 | obj._props.timed._props.override = {_props = { 39 | clear = function() for _, timed in pairs(obj.timeds) do timed:reset_values() end end, 40 | forall = function(func) for _, timed in pairs(obj.timeds) do func(timed) end end, 41 | }} 42 | 43 | setmetatable(obj.timed.override, { 44 | __index = function(self, key) return self._props[key] end, 45 | __newindex = function(self, key, value) 46 | for _, timed in pairs(obj.timeds) do timed[key] = value end 47 | self._props[key] = value 48 | end 49 | }) 50 | 51 | return obj 52 | end 53 | 54 | if not RUBATO_MANAGER then RUBATO_MANAGER = manager() end 55 | return RUBATO_MANAGER 56 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/rubato-1.2-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "rubato" 2 | version = "1.2-1" 3 | source = { 4 | url = "git+https://github.com/andOrlando/rubato.git" 5 | } 6 | description = { 7 | detailed = [[ 8 | Create smooth animations based off of a slope curve for near perfect interruptions. Similar to awestore, but solely dedicated to interpolation. Also has a cool name. Check out the README on github for more informaiton. Has (basically) complete compatibility with awestore. 9 | 10 | If not ran from awesomeWM, you must have lgi installed. Otherwise you're good 11 | ]], 12 | homepage = "https://github.com/andOrlando/rubato", 13 | license = "MIT" 14 | } 15 | dependencies = {} 16 | build = { 17 | type = "builtin", 18 | modules = { 19 | ["rubato"] = "init.lua", 20 | ["rubato.easing"] = "easing.lua", 21 | ["rubato.timed"] = "timed.lua", 22 | ["rubato.subscribable"] = "subscribable.lua", 23 | ["rubato.manager"] = "manager.lua" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/rubato/subscribable.lua: -------------------------------------------------------------------------------- 1 | -- Kidna copying awesotre's stores on a surface level for added compatibility 2 | local function subscribable(base) 3 | local obj = base or {} 4 | 5 | obj._subscribed = {} 6 | 7 | -- Subscrubes a function to the object so that it's called when `fire` is 8 | -- Calls subscribe_callback if it exists as well 9 | function obj:subscribe(func) 10 | local id = tostring(func):gsub("function: ", "") 11 | self._subscribed[id] = func 12 | 13 | if self.subscribe_callback then self.subscribe_callback(func) end 14 | end 15 | 16 | -- Unsubscribes a function and calls unsubscribe_callback if it exists 17 | function obj:unsubscribe(func) 18 | if not func then 19 | self._subscribed = {} 20 | else 21 | local id = tostring(func):gsub("function: ", "") 22 | self._subscribed[id] = nil 23 | end 24 | 25 | if self.unsubscribe_callback then self.unsubscribe_callback(func) end 26 | end 27 | 28 | function obj:fire(...) for _, func in pairs(self._subscribed) do func(...) end end 29 | 30 | return obj 31 | end 32 | 33 | return subscribable 34 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/screenshot/AUTHORS.md: -------------------------------------------------------------------------------- 1 | Contributors: 2 | 3 | * [AlphaTechnolog](https://github.com/AlphaTechnolog) 4 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/modules/screenshot/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 AlphaTechnolog. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/rc.lua: -------------------------------------------------------------------------------- 1 | pcall(require, "luarocks.loader") 2 | 3 | require "awful.autofocus" 4 | 5 | require "signal.global" 6 | require "user_likes" 7 | require "autostart" 8 | require "configuration" 9 | require "ui" 10 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/airplane.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | status () { 4 | status=$(nmcli radio wifi) 5 | if [[ $status == "enabled" ]]; then 6 | echo "off" 7 | else 8 | echo "on" 9 | fi 10 | } 11 | 12 | if [[ $1 == "status" ]]; then 13 | status 14 | fi 15 | 16 | if [[ $1 == "toggle" ]]; then 17 | stat=$(status) 18 | if [[ $stat == "off" ]]; then 19 | nmcli radio wifi off 20 | else 21 | nmcli radio wifi on 22 | fi 23 | fi 24 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/bluetooth: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | get_state () { 4 | state=$(bluetoothctl show | grep 'Powered' | awk '{print $2}') 5 | if [[ $state == "yes" ]]; then 6 | echo on 7 | else 8 | echo off 9 | fi 10 | } 11 | 12 | turn_off () { 13 | bluetoothctl power off 2>&1 > /dev/null 14 | } 15 | 16 | turn_on () { 17 | bluetoothctl power on 2>&1 > /dev/null 18 | } 19 | 20 | toggle () { 21 | state=$(get_state) 22 | if [[ $state == "on" ]]; then 23 | turn_off 24 | else 25 | turn_on 26 | fi 27 | } 28 | 29 | if [[ $1 == "state" ]]; then 30 | get_state 31 | fi 32 | 33 | if [[ $1 == "toggle" ]]; then 34 | toggle 35 | fi 36 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/redshift.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cache_file=$HOME/.cache/awesomewm/services/redshift_state 4 | 5 | initial_hook () { 6 | if [ ! -d $(dirname $cache_file) ]; then 7 | mkdir -p $(dirname $cache_file) 8 | fi 9 | if [ ! -f $cache_file ]; then 10 | echo off > $cache_file 11 | fi 12 | } 13 | 14 | get_state () { 15 | # check if redshift is running 16 | cat $cache_file 17 | } 18 | 19 | restore () { 20 | local state=$(get_state) 21 | if [[ $state == "on" ]]; then 22 | enable_redshift 23 | else 24 | disable_redshift 25 | fi 26 | } 27 | 28 | disable_redshift () { 29 | redshift -x 2>&1 > /dev/null 30 | # saving state 31 | echo off > $cache_file 32 | } 33 | 34 | enable_redshift () { 35 | redshift -x 2>&1 > /dev/null 36 | redshift -O 5000 2>&1 > /dev/null 37 | # saving new state 38 | echo on > $cache_file 39 | } 40 | 41 | toggle () { 42 | local state=$(get_state) 43 | if [[ $state == "on" ]]; then 44 | disable_redshift 45 | else 46 | enable_redshift 47 | fi 48 | } 49 | 50 | initial_hook 51 | 52 | if [[ $1 == "state" ]]; then 53 | get_state 54 | fi 55 | 56 | if [[ $1 == "enable" ]]; then 57 | enable_redshift 58 | fi 59 | 60 | if [[ $1 == "disable" ]]; then 61 | disable_redshift 62 | fi 63 | 64 | if [[ $1 == "toggle" ]]; then 65 | toggle 66 | fi 67 | 68 | if [[ $1 == "restore" ]]; then 69 | restore 70 | fi 71 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/screensht: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [[ "$1" == "" ]]; then 4 | exit 1 5 | fi 6 | 7 | TMP_PATH="$HOME/Pictures/screenshot-$(date '+%s').png" 8 | 9 | if ! test -f "$TMP_PATH"; then 10 | touch "$TMP_PATH" 11 | fi 12 | 13 | if [[ $1 == "select" ]]; then 14 | maim --select "$TMP_PATH" 15 | elif [[ $1 == "full" ]]; then 16 | sleep 0.5 17 | maim "$TMP_PATH" 18 | fi 19 | 20 | action=$(dunstify --icon "$TMP_PATH" -a "Screenshot" \ 21 | --action "copy,Copy" \ 22 | --action "delete,Delete" \ 23 | "Screenshot is ready!" "Screenshot saved successfully. See your Pictures.") 24 | 25 | if [[ "$action" == "copy" ]]; then 26 | xclip -sel clip -target image/png "$TMP_PATH" 27 | notify-send -i "$TMP_PATH" -a "Screenshot" "Screenshot" "Screenshot copied successfully." 28 | elif [[ "$action" == "delete" ]]; then 29 | rm "$TMP_PATH" 30 | notify-send -i "$TMP_PATH" -a "Screenshot" "Screenshot" "Screenshot removed successfully." 31 | fi 32 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/set-volume.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | SINK=$(pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1) 3 | pactl set-sink-volume $SINK $1% 4 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/temp.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # thanks to rxyhn 4 | 5 | path () { 6 | local temp_path=null 7 | for i in /sys/class/hwmon/hwmon*/temp*_input; 8 | do 9 | temp_path="$(echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || 10 | echo $(basename ${i%_*})) $(readlink -f $i)");" 11 | label="$(echo $temp_path | awk '{print $2}')" 12 | if [ "$label" = "Package" ]; 13 | then 14 | echo ${temp_path} | awk '{print $5}' | tr -d ';\n' 15 | exit; 16 | fi 17 | done 18 | } 19 | 20 | get () { 21 | local path=$(path) 22 | if [[ $path == "" ]]; then 23 | path="/sys/class/thermal/thermal_zone0/temp" 24 | fi 25 | 26 | local max_temp=200 27 | local temp=$(cat $path) 28 | 29 | jq -n $(jq -n $temp/1000)/$max_temp*100 30 | } 31 | 32 | _ () { 33 | ${@} 34 | exit 0 35 | } 36 | 37 | if [[ $1 == "get" ]]; then 38 | _ get 39 | fi 40 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/toggle-muted.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | SINK=$(pactl list short sinks | sed -e 's,^\\([0-9][0-9]*\\)[^0-9].*,\\1,' | head -n 1 | awk '{print $1}'); 3 | pactl set-sink-mute $SINK toggle 4 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/toggle-network.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | name=$(iwgetid -r) 3 | if [[ "$name" == "" ]]; then 4 | nmcli con up ifname "$(/usr/bin/ls /sys/class/ieee80211/*/device/net/)" 5 | else 6 | wifiname=$(nmcli d | grep wifi | sed 's/^.*wifi.*connected//g' | xargs) 7 | nmcli con down id "${wifiname}" 8 | fi -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/scripts/uptime.sh: -------------------------------------------------------------------------------- 1 | uptime | sed -E 's/^[^,]*up *//; s/, *[[:digit:]]* users.*//; s/min/minutes/; s/([[:digit:]]+):0?([[:digit:]]+)/\1 hours, \2 minutes/' | sed 's/ / /g' | sed 's/, load average.*//g' | sed 's/, 1 user//g' 2 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/airplane.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | 3 | local gears = require 'gears' 4 | local awful = require 'awful' 5 | local helpers = require 'helpers' 6 | local fs = gears.filesystem 7 | 8 | local airplane = {} 9 | 10 | airplane.script_path = fs.get_configuration_dir() .. 'scripts/airplane.sh' 11 | 12 | function airplane._invoke_script(args, cb) 13 | awful.spawn.easy_async_with_shell(airplane.script_path .. ' ' .. args, function (out) 14 | if cb then 15 | cb(helpers.trim(out)) 16 | end 17 | end) 18 | end 19 | 20 | function airplane.toggle() 21 | airplane._invoke_script('toggle') 22 | end 23 | 24 | gears.timer { 25 | timeout = 2, 26 | call_now = true, 27 | autostart = true, 28 | callback = function () 29 | airplane._invoke_script('status', function (status) 30 | awesome.emit_signal('airplane::enabled', status == 'on') 31 | end) 32 | end 33 | } 34 | 35 | return airplane 36 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/bluetooth.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | local awful = require 'awful' 3 | local gears = require 'gears' 4 | local helpers = require 'helpers' 5 | local fs = gears.filesystem 6 | 7 | local bluetooth = {} 8 | 9 | bluetooth.script_path = fs.get_configuration_dir() .. 'scripts/bluetooth' 10 | 11 | function bluetooth._invoke_script(args, cb) 12 | awful.spawn.easy_async_with_shell(bluetooth.script_path .. ' ' .. args, function (out) 13 | if cb then 14 | cb(helpers.trim(out)) 15 | end 16 | end) 17 | end 18 | 19 | function bluetooth.toggle() 20 | bluetooth._invoke_script('toggle') 21 | end 22 | 23 | gears.timer { 24 | timeout = 5, 25 | call_now = true, 26 | autostart = true, 27 | callback = function () 28 | bluetooth._invoke_script('state', function (state) 29 | awesome.emit_signal('bluetooth::enabled', state == 'on') 30 | end) 31 | end 32 | } 33 | 34 | return bluetooth 35 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/brightness.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | local gears = require 'gears' 3 | local awful = require 'awful' 4 | 5 | local script = [[bash -c "light -G | sed 's/\..*/ /g'"]] 6 | 7 | gears.timer { 8 | timeout = 5, 9 | call_now = true, 10 | autostart = true, 11 | callback = function () 12 | awful.spawn.easy_async(script, function (out) 13 | awesome.emit_signal('brightness::value', tonumber(out)) 14 | end) 15 | end 16 | } 17 | 18 | local function set(val) 19 | awful.spawn('light -S ' .. tonumber(val)) 20 | end 21 | 22 | return { set = set } 23 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/cpu.lua: -------------------------------------------------------------------------------- 1 | local awful = require 'awful' 2 | local gears = require 'gears' 3 | local helpers = require 'helpers' 4 | 5 | local cmd = [[grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' | sed 's/\./ /g' | awk '{print $1}']] 6 | 7 | gears.timer { 8 | timeout = 5, 9 | call_now = true, 10 | autostart = true, 11 | callback = function () 12 | awful.spawn.easy_async_with_shell(cmd, function (cpu) 13 | awesome.emit_signal('cpu::percent', helpers.trim(cpu)) 14 | end) 15 | end 16 | } 17 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/date.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | 3 | local gears = require 'gears' 4 | local awful = require 'awful' 5 | local helpers = require 'helpers' 6 | 7 | gears.timer { 8 | timeout = 30, 9 | call_now = true, 10 | autostart = true, 11 | callback = function () 12 | awful.spawn.easy_async_with_shell('date "+%H"', function (out) 13 | awesome.emit_signal('date::hour', helpers.trim(out)) 14 | end) 15 | awful.spawn.easy_async_with_shell('date "+%M"', function (out) 16 | awesome.emit_signal('date::minutes', helpers.trim(out)) 17 | end) 18 | end 19 | } -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/disk.lua: -------------------------------------------------------------------------------- 1 | local gears = require 'gears' 2 | local awful = require 'awful' 3 | 4 | local cmd = [[df --output=pcent / | tail -n 1 | sed 's/%//g' | xargs]] 5 | 6 | gears.timer { 7 | timeout = 120, 8 | call_now = true, 9 | autostart = true, 10 | callback = function () 11 | awful.spawn.easy_async_with_shell(cmd, function (usage) 12 | awesome.emit_signal('disk::usage', usage) 13 | end) 14 | end 15 | } -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/global.lua: -------------------------------------------------------------------------------- 1 | VolumeSignal = require 'signal.volume' 2 | BrightnessSignal = require 'signal.brightness' 3 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/network.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable:undefined-global 2 | 3 | -- just works with NetworkManager 4 | 5 | local gears = require 'gears' 6 | local awful = require 'awful' 7 | local helpers = require 'helpers' 8 | local gfs = require 'gears.filesystem' 9 | 10 | local network = {} 11 | 12 | local get_ssid = "iwgetid -r" 13 | 14 | function network.re_emit_connected_signal() 15 | awful.spawn.easy_async_with_shell(get_ssid, function (out) 16 | awesome.emit_signal('network::connected', helpers.trim(out) ~= '') 17 | end) 18 | end 19 | 20 | function network.re_emit_ssid_signal() 21 | awful.spawn.easy_async_with_shell(get_ssid, function (out) 22 | awesome.emit_signal('network::ssid', helpers.trim(out)) 23 | end) 24 | end 25 | 26 | function network.toggle () 27 | awful.spawn.easy_async(gfs.get_configuration_dir() .. "scripts/toggle-network.sh", function () 28 | network.re_emit_ssid_signal() 29 | network.re_emit_connected_signal() 30 | end) 31 | end 32 | 33 | gears.timer { 34 | timeout = 2, 35 | call_now = true, 36 | autostart = true, 37 | callback = network.re_emit_connected_signal 38 | } 39 | 40 | gears.timer { 41 | timeout = 2, 42 | call_now = true, 43 | autostart = true, 44 | callback = network.re_emit_ssid_signal 45 | } 46 | 47 | return network 48 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/ram.lua: -------------------------------------------------------------------------------- 1 | local gears = require 'gears' 2 | local awful = require 'awful' 3 | 4 | local cmd = [[free | grep Mem | awk '{print $3/$2 * 100.0}' | sed 's/\./ /g' | awk '{print $1}']] 5 | 6 | gears.timer { 7 | timeout = 5, 8 | call_now = true, 9 | autostart = true, 10 | callback = function () 11 | awful.spawn.easy_async_with_shell(cmd, function (used) 12 | awesome.emit_signal('ram::used', used) 13 | end) 14 | end 15 | } 16 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/redshift.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | 3 | local awful = require 'awful' 4 | local gears = require 'gears' 5 | local helpers = require 'helpers' 6 | local fs = gears.filesystem 7 | 8 | local redshift = {} 9 | 10 | redshift.script_path = fs.get_configuration_dir() .. 'scripts/redshift.sh' 11 | 12 | function redshift._invoke_script(args, cb) 13 | awful.spawn.easy_async_with_shell(redshift.script_path .. ' ' .. args, function (out) 14 | if cb then 15 | cb(helpers.trim(out)) 16 | end 17 | end) 18 | end 19 | 20 | function redshift.toggle () 21 | redshift._invoke_script('toggle') 22 | end 23 | 24 | function redshift.enable() 25 | redshift._invoke_script('enable') 26 | end 27 | 28 | function redshift.disable() 29 | redshift._invoke_script('disable') 30 | end 31 | 32 | gears.timer { 33 | timeout = 2, 34 | call_now = true, 35 | autostart = true, 36 | callback = function () 37 | redshift._invoke_script('state', function (state) 38 | awesome.emit_signal('redshift::active', state == 'on') 39 | end) 40 | end 41 | } 42 | 43 | return redshift 44 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/temperature.lua: -------------------------------------------------------------------------------- 1 | local awful = require 'awful' 2 | local gears = require 'gears' 3 | local helpers = require 'helpers' 4 | local fs = gears.filesystem 5 | 6 | local temperature = {} 7 | 8 | temperature.script_path = fs.get_configuration_dir() .. 'scripts/temp.sh' 9 | 10 | function temperature._invoke_script(args, cb) 11 | awful.spawn.easy_async_with_shell(temperature.script_path .. ' ' .. args, function (out) 12 | if cb then 13 | cb(helpers.trim(out)) 14 | end 15 | end) 16 | end 17 | 18 | function temperature.async_get(cb) 19 | temperature._invoke_script('get', cb) 20 | end 21 | 22 | gears.timer { 23 | timeout = 10, 24 | call_now = true, 25 | autostart = true, 26 | callback = function () 27 | temperature.async_get(function (temp) 28 | awesome.emit_signal('temperature::value', tonumber(temp)) 29 | end) 30 | end 31 | } 32 | 33 | return temperature 34 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/user.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | 3 | local gears = require 'gears' 4 | local awful = require 'awful' 5 | local helpers = require 'helpers' 6 | 7 | gears.timer { 8 | timeout = 100, 9 | autostart = true, 10 | call_now = true, 11 | callback = function () 12 | awful.spawn.easy_async_with_shell('whoami', function (user) 13 | awesome.emit_signal('user::name', helpers.trim(user)) 14 | end) 15 | end 16 | } -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/signal/volume.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | 3 | -- just works for pulseaudio 4 | 5 | local gears = require 'gears' 6 | local awful = require 'awful' 7 | local gfs = require 'gears.filesystem' 8 | local helpers = require 'helpers' 9 | 10 | local volume = {} 11 | 12 | local sink_part = "SINK=$(pactl list short sinks | sed -e 's,^\\([0-9][0-9]*\\)[^0-9].*,\\1,' | head -n 1 | awk '{print $1}');" 13 | local script = sink_part .. "pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \\([0-9][0-9]*\\)%.*,\\1,'" 14 | local how_to_know_if_muted = "pacmd list-sinks | awk '/muted/ { print $2 }'" 15 | 16 | function volume.re_emit_volume_value_signal() 17 | awful.spawn.easy_async_with_shell(script, function(out) 18 | awesome.emit_signal('volume::value', tonumber(out)) 19 | end) 20 | end 21 | 22 | function volume.re_emit_muted_signal () 23 | awful.spawn.easy_async_with_shell(how_to_know_if_muted, function (out) 24 | awesome.emit_signal('volume::muted', helpers.trim(out) == 'yes') 25 | end) 26 | end 27 | 28 | function volume.set(vol, reemit) 29 | awful.spawn(gfs.get_configuration_dir() .. 'scripts/set-volume.sh ' .. tonumber(vol)) 30 | if reemit then 31 | volume.re_emit_volume_value_signal() 32 | end 33 | end 34 | 35 | function volume.toggle_muted () 36 | awful.spawn(gfs.get_configuration_dir() .. "scripts/toggle-muted.sh") 37 | volume.re_emit_muted_signal() 38 | end 39 | 40 | gears.timer { 41 | timeout = 3, 42 | call_now = true, 43 | autostart = true, 44 | callback = volume.re_emit_volume_value_signal 45 | } 46 | 47 | gears.timer { 48 | timeout = 3, 49 | call_now = true, 50 | autostart = true, 51 | callback = volume.re_emit_muted_signal, 52 | } 53 | 54 | return volume 55 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/content.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | 3 | local launcher = require("ui.bar.modules.launcher") 4 | local searchbox = require("ui.bar.modules.searchbox") 5 | local dispatch_infosidebar = require("ui.bar.modules.dispatch_infosidebar") 6 | local workspaces = require("ui.bar.modules.workspaces") 7 | local dispatch_dashboard = require("ui.bar.modules.dispatch_dashboard") 8 | local infobox = require("ui.bar.modules.infobox") 9 | local powermenu = require("ui.bar.modules.powermenu") 10 | 11 | return function (s) 12 | return { 13 | { 14 | { 15 | { 16 | launcher, 17 | searchbox, 18 | dispatch_infosidebar, 19 | spacing = 6, 20 | layout = wibox.layout.fixed.horizontal, 21 | }, 22 | left = 6, 23 | widget = wibox.container.margin, 24 | }, 25 | nil, 26 | { 27 | { 28 | dispatch_dashboard, 29 | infobox(s), 30 | powermenu, 31 | spacing = 6, 32 | layout = wibox.layout.fixed.horizontal, 33 | }, 34 | right = 6, 35 | widget = wibox.container.margin, 36 | }, 37 | layout = wibox.layout.align.horizontal, 38 | }, 39 | { 40 | workspaces(s), 41 | halign = 'center', 42 | valign = 'center', 43 | layout = wibox.container.place, 44 | }, 45 | layout = wibox.layout.stack, 46 | } 47 | end 48 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/init.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | local wibox = require("wibox") 3 | local beautiful = require("beautiful") 4 | 5 | local content = require("ui.bar.content") 6 | 7 | ---@diagnostic disable-next-line: undefined-global 8 | screen.connect_signal('request::desktop_decoration', function (s) 9 | awful.tag( 10 | {'1', '2', '3', '4', '5', '6'}, 11 | s, awful.layout.layouts[1] 12 | ) 13 | 14 | local bar = wibox { 15 | x = s.geometry.x + beautiful.useless_gap * 2, 16 | y = s.geometry.y + beautiful.useless_gap * 2, 17 | width = s.geometry.width - beautiful.useless_gap * 4, 18 | height = beautiful.bar_height, 19 | ontop = false, 20 | visible = true, 21 | } 22 | 23 | bar:setup(content(s)) 24 | 25 | bar:struts { 26 | top = beautiful.bar_height + beautiful.useless_gap * 2 27 | } 28 | end) 29 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/modules/dispatch_dashboard.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local helpers = require("helpers") 4 | local awful = require("awful") 5 | 6 | local icon = wibox.widget { 7 | markup = "", 8 | font = beautiful.nerd_font .. " 19", 9 | widget = wibox.widget.textbox, 10 | } 11 | 12 | local button = wibox.widget { 13 | { 14 | icon, 15 | top = 4, 16 | bottom = 4, 17 | left = 8, 18 | right = 8, 19 | widget = wibox.container.margin, 20 | }, 21 | shape = helpers.mkroundedrect(), 22 | bg = beautiful.bg_normal, 23 | widget = wibox.container.background, 24 | } 25 | 26 | helpers.add_hover(button, beautiful.bg_normal, beautiful.black) 27 | 28 | button:add_button(awful.button({}, 1, function () 29 | awesome.emit_signal("dashboard::toggle") 30 | end)) 31 | 32 | return wibox.widget { 33 | button, 34 | top = 6, 35 | bottom = 6, 36 | widget = wibox.container.margin, 37 | } 38 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/modules/dispatch_infosidebar.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local helpers = require("helpers") 3 | local beautiful = require("beautiful") 4 | local awful = require("awful") 5 | 6 | local icon = wibox.widget.textbox() 7 | 8 | icon.font = beautiful.nerd_font .. ' 18' 9 | icon.markup = helpers.get_colorized_markup('', beautiful.blue) 10 | 11 | local button = wibox.widget { 12 | { 13 | icon, 14 | top = 4, 15 | bottom = 4, 16 | left = 9, 17 | right = 9, 18 | widget = wibox.container.margin, 19 | }, 20 | bg = beautiful.bg_normal, 21 | shape = helpers.mkroundedrect(), 22 | widget = wibox.container.background, 23 | } 24 | 25 | helpers.add_hover(button, beautiful.bg_normal, beautiful.black) 26 | 27 | button:add_button(awful.button({}, 1, function () 28 | awesome.emit_signal('infosidebar::toggle') 29 | end)) 30 | 31 | return wibox.widget { 32 | button, 33 | top = 6, 34 | bottom = 6, 35 | widget = wibox.container.margin, 36 | } 37 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/modules/infobox.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local awful = require("awful") 3 | local helpers = require("helpers") 4 | local gears = require("gears") 5 | local beautiful = require("beautiful") 6 | 7 | local layout = wibox.layout.fixed.horizontal() 8 | 9 | layout.spacing = 12 10 | 11 | layout.spacing_widget = wibox.widget { 12 | markup = helpers.get_colorized_markup("|", beautiful.light_black), 13 | align = "center", 14 | widget = wibox.widget.textbox, 15 | } 16 | 17 | local clock = wibox.widget.textbox() 18 | 19 | local update_clock = function () 20 | clock.markup = os.date("%I:%M %p") 21 | end 22 | 23 | gears.timer { 24 | timeout = 30, 25 | call_now = true, 26 | autostart = true, 27 | callback = update_clock 28 | } 29 | 30 | layout:add(clock) 31 | 32 | return function (s) 33 | local lb = awful.widget.layoutbox { 34 | screen = s, 35 | forced_height = 16, 36 | forced_width = 16, 37 | } 38 | 39 | lb._layoutbox_tooltip:remove_from_object(lb) 40 | 41 | local layoutbox = wibox.widget { 42 | lb, 43 | valign = "center", 44 | layout = wibox.container.place, 45 | } 46 | 47 | layout:add(layoutbox) 48 | 49 | local container = wibox.widget { 50 | { 51 | layout, 52 | top = 4, 53 | bottom = 4, 54 | left = 8, 55 | right = 8, 56 | widget = wibox.container.margin, 57 | }, 58 | bg = beautiful.black, 59 | shape = helpers.mkroundedrect(), 60 | widget = wibox.container.background, 61 | } 62 | 63 | return wibox.widget { 64 | container, 65 | top = 6, 66 | bottom = 6, 67 | widget = wibox.container.margin, 68 | } 69 | end -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/modules/launcher.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local helpers = require("helpers") 3 | local beautiful = require("beautiful") 4 | local awful = require("awful") 5 | 6 | local image = wibox.widget { 7 | image = beautiful.launcher_icon, 8 | halign = "center", 9 | valign = "center", 10 | forced_height = 16, 11 | forced_width = 16, 12 | widget = wibox.widget.imagebox, 13 | } 14 | 15 | local container = wibox.widget { 16 | { 17 | image, 18 | top = 4, 19 | bottom = 4, 20 | left = 8, 21 | right = 8, 22 | widget = wibox.container.margin, 23 | }, 24 | bg = beautiful.black, 25 | shape = helpers.mkroundedrect(), 26 | widget = wibox.container.background, 27 | } 28 | 29 | local transition = helpers.add_hover(container, beautiful.black, beautiful.dimblack) 30 | 31 | container:add_button(awful.button({}, 1, function () 32 | transition.off() 33 | awful.spawn("rofi -show drun") 34 | end)) 35 | 36 | return wibox.widget { 37 | container, 38 | top = 6, 39 | bottom = 6, 40 | widget = wibox.container.margin, 41 | } -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/modules/powermenu.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local helpers = require("helpers") 3 | local beautiful = require("beautiful") 4 | local awful = require("awful") 5 | 6 | local icon = wibox.widget.textbox() 7 | 8 | icon.font = beautiful.nerd_font .. " 19" 9 | icon.markup = helpers.get_colorized_markup("⏻", beautiful.red) 10 | 11 | local button = wibox.widget { 12 | { 13 | icon, 14 | top = 4, 15 | bottom = 4, 16 | left = 8, 17 | right = 8, 18 | widget = wibox.container.margin, 19 | }, 20 | bg = beautiful.bg_normal, 21 | shape = helpers.mkroundedrect(), 22 | widget = wibox.container.background, 23 | } 24 | 25 | helpers.add_hover(button, beautiful.bg_normal, beautiful.black) 26 | 27 | button:add_button(awful.button({}, 1, function () 28 | require 'naughty'.notify { title = 'needs to be implemented' } 29 | end)) 30 | 31 | return wibox.widget { 32 | button, 33 | top = 6, 34 | bottom = 6, 35 | widget = wibox.container.margin, 36 | } -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/bar/modules/searchbox.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local helpers = require("helpers") 4 | local awful = require("awful") 5 | 6 | local icon = wibox.widget.textbox() 7 | local placeholder = wibox.widget.textbox() 8 | 9 | icon.font = beautiful.nerd_font .. ' 20' 10 | icon.markup = helpers.get_colorized_markup('', beautiful.grey) 11 | 12 | -- to make a large input by default 13 | placeholder.markup = helpers.get_colorized_markup('Launch... ', beautiful.grey) 14 | 15 | local reset = function () 16 | placeholder.markup = helpers.get_colorized_markup('Launch... ', beautiful.grey) 17 | end 18 | 19 | local get_input = function () 20 | awful.prompt.run { 21 | prompt = "", 22 | text = "", 23 | bg_cursor = beautiful.blue, 24 | textbox = placeholder, 25 | hooks = { 26 | {{}, "Escape", reset} 27 | }, 28 | done_callback = reset, 29 | completion_callback = awful.completion.shell, 30 | exe_callback = function (prog) 31 | if not prog or #prog == 0 then 32 | return 33 | end 34 | awful.spawn(prog) 35 | end 36 | } 37 | end 38 | 39 | local input = wibox.widget { 40 | { 41 | { 42 | icon, 43 | placeholder, 44 | spacing = 8, 45 | layout = wibox.layout.fixed.horizontal, 46 | }, 47 | top = 4, 48 | bottom = 4, 49 | left = 12, 50 | right = 16, 51 | widget = wibox.container.margin, 52 | }, 53 | bg = beautiful.black, 54 | shape = helpers.mkroundedrect(), 55 | widget = wibox.container.background, 56 | } 57 | 58 | helpers.add_hover(input, beautiful.black, beautiful.dimblack) 59 | 60 | awesome.connect_signal("bar::searchbox::get_input", get_input) 61 | 62 | input:add_button(awful.button({}, 1, function () 63 | awesome.emit_signal("bar::searchbox::get_input") 64 | end)) 65 | 66 | return wibox.widget { 67 | input, 68 | top = 6, 69 | bottom = 6, 70 | widget = wibox.container.margin, 71 | } 72 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/content.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | 3 | local tabbed = require("ui.dashboard.modules.tabbed") 4 | local dimensions = require("ui.dashboard.dimensions") 5 | 6 | local tabs, content = tabbed() 7 | 8 | return { 9 | { 10 | tabs, 11 | { 12 | content, 13 | top = dimensions.spacing, 14 | widget = wibox.container.margin, 15 | }, 16 | nil, 17 | layout = wibox.layout.align.vertical, 18 | }, 19 | margins = dimensions.spacing, 20 | widget = wibox.container.margin, 21 | } 22 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/dimensions.lua: -------------------------------------------------------------------------------- 1 | return { 2 | width = 670, 3 | height = 700, 4 | spacing = 12, 5 | } 6 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/init.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local awful = require("awful") 3 | local beautiful = require("beautiful") 4 | 5 | local rubato = require("modules.rubato") 6 | local dimensions = require("ui.dashboard.dimensions") 7 | local content = require("ui.dashboard.content") 8 | 9 | require("ui.dashboard.listener") 10 | 11 | awful.screen.connect_for_each_screen(function (s) 12 | s.dashboard = {} 13 | 14 | s.dashboard.popup = wibox { 15 | x = s.geometry.x + (s.geometry.width - ((s.geometry.width / 2) + (dimensions.width / 2))), 16 | y = s.geometry.y - dimensions.height - beautiful.useless_gap * 4, 17 | width = dimensions.width, 18 | height = dimensions.height, 19 | ontop = true, 20 | visible = false 21 | } 22 | 23 | local self = s.dashboard.popup 24 | 25 | local void = { 26 | markup = '', 27 | widget = wibox.widget.textbox 28 | } 29 | 30 | self:setup(void) 31 | 32 | self.animate = rubato.timed { 33 | duration = 0.45, 34 | pos = s.geometry.y - dimensions.height - beautiful.useless_gap * 4 35 | } 36 | 37 | self.status = 'undefined' 38 | 39 | self.animate:subscribe(function (pos) 40 | if self.status == 'closing' and pos == s.geometry.y + beautiful.useless_gap * 4 + beautiful.bar_height then 41 | self:setup(void) 42 | elseif self.status == 'opening' and pos == s.geometry.y + beautiful.useless_gap * 4 + beautiful.bar_height then 43 | self:setup(content) 44 | end 45 | if self.status == 'closing' and pos == s.geometry.y - dimensions.height - beautiful.useless_gap * 4 then 46 | self.visible = false 47 | end 48 | self.y = pos 49 | end) 50 | 51 | function s.dashboard.toggle () 52 | if self.visible then 53 | s.dashboard.hide() 54 | else 55 | s.dashboard.show() 56 | end 57 | end 58 | 59 | function s.dashboard.show () 60 | self.visible = true 61 | self.status = 'opening' 62 | self.animate.target = s.geometry.y + beautiful.useless_gap * 4 + beautiful.bar_height 63 | end 64 | 65 | function s.dashboard.hide () 66 | self.status = 'closing' 67 | self.animate.target = s.geometry.y - dimensions.height - beautiful.useless_gap * 4 68 | end 69 | end) 70 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/listener.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | 3 | local _ = function () 4 | return awful.screen.focused().dashboard 5 | end 6 | 7 | awesome.connect_signal("dashboard::toggle", function () 8 | _().toggle() 9 | end) 10 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/calendar.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local gears = require("gears") 4 | local helpers = require("helpers") 5 | 6 | local dimensions = require("ui.infosidebar.dimensions") 7 | 8 | local calendar = wibox.widget { 9 | date = os.date('*t'), 10 | font = beautiful.font_name .. ' 10', 11 | spacing = 2, 12 | widget = wibox.widget.calendar.month, 13 | fn_embed = function (widget, flag, date) 14 | local font = beautiful.font_name .. ' ' .. tostring(tonumber(beautiful.font_size) - 1) 15 | 16 | widget.font = font 17 | 18 | local focus_widget = wibox.widget { 19 | text = date.day, 20 | font = font, 21 | align = 'center', 22 | widget = wibox.widget.textbox, 23 | } 24 | 25 | local torender = flag == 'focus' and focus_widget or widget 26 | 27 | if flag == 'header' then 28 | torender.font = beautiful.font_name .. " 11" 29 | end 30 | 31 | local colors = { 32 | header = beautiful.blue, 33 | focus = beautiful.aqua, 34 | weekday = beautiful.cyan 35 | } 36 | 37 | local color = colors[flag] or beautiful.fg_normal 38 | 39 | return wibox.widget { 40 | { 41 | torender, 42 | margins = dimensions.spacing, 43 | widget = wibox.container.margin, 44 | }, 45 | bg = flag == 'focus' and beautiful.dimblack or beautiful.bg_lighter, 46 | fg = color, 47 | widget = wibox.container.background, 48 | shape = flag == 'focus' and gears.shape.circle or helpers.mkroundedrect(12), 49 | } 50 | end 51 | } 52 | 53 | local container = wibox.widget { 54 | { 55 | calendar, 56 | halign = "center", 57 | valign = 'center', 58 | layout = wibox.container.place, 59 | }, 60 | bg = beautiful.bg_lighter, 61 | shape = helpers.mkroundedrect(12), 62 | widget = wibox.container.background, 63 | } 64 | 65 | return container 66 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/date.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local helpers = require("helpers") 3 | local beautiful = require("beautiful") 4 | local awful = require("awful") 5 | local gears = require("gears") 6 | 7 | local dimensions = require("ui.dashboard.dimensions") 8 | 9 | local hour = wibox.widget { 10 | markup = '00:00 AM', 11 | font = beautiful.font_name .. ' 42', 12 | align = 'center', 13 | widget = wibox.widget.textbox, 14 | } 15 | 16 | local function update_hour () 17 | hour.markup = "" .. os.date("%I:%M %p") .. "" 18 | end 19 | 20 | gears.timer { 21 | timeout = 30, 22 | call_now = true, 23 | autostart = true, 24 | callback = update_hour 25 | } 26 | 27 | local day = wibox.widget { 28 | markup = 'Loading...', 29 | align = 'center', 30 | widget = wibox.widget.textbox, 31 | } 32 | 33 | local function update_day () 34 | day.markup = os.date("%A %B %d") 35 | end 36 | 37 | gears.timer { 38 | timeout = 240, 39 | call_now = true, 40 | callback = update_day, 41 | autostart = true, 42 | } 43 | 44 | local date = wibox.widget { 45 | { 46 | { 47 | hour, 48 | day, 49 | spacing = dimensions.spacing / 2.5, 50 | layout = wibox.layout.fixed.vertical, 51 | }, 52 | margins = dimensions.spacing * 2, 53 | widget = wibox.container.margin, 54 | }, 55 | bg = beautiful.bg_lighter, 56 | shape = helpers.mkroundedrect(7), 57 | widget = wibox.container.background, 58 | } 59 | 60 | return date 61 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/info.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | 3 | local dimensions = require("ui.dashboard.dimensions") 4 | local date = require("ui.dashboard.modules.date") 5 | local profile = require("ui.dashboard.modules.profile") 6 | local music = require("ui.dashboard.modules.music") 7 | local calendar = require("ui.dashboard.modules.calendar") 8 | 9 | local notifcenter = require("ui.dashboard.modules.notifcenter") 10 | 11 | local info = wibox.widget { 12 | { 13 | date, 14 | profile, 15 | music, 16 | calendar, 17 | spacing = dimensions.spacing, 18 | layout = wibox.layout.fixed.vertical, 19 | }, 20 | notifcenter, 21 | spacing = dimensions.spacing, 22 | layout = wibox.layout.flex.horizontal, 23 | } 24 | 25 | return info 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/notifcenter/header.lua: -------------------------------------------------------------------------------- 1 | local wibox = require 'wibox' 2 | local helpers = require 'helpers' 3 | local gears = require 'gears' 4 | local awful = require 'awful' 5 | local beautiful = require 'beautiful' 6 | 7 | local clear_notification = wibox.widget { 8 | { 9 | markup = '', 10 | font = beautiful.nerd_font .. ' 20', 11 | align = 'center', 12 | valign = 'center', 13 | widget = wibox.widget.textbox, 14 | }, 15 | forced_height = 32, 16 | forced_width = 32, 17 | bg = beautiful.dimblack, 18 | shape = gears.shape.circle, 19 | widget = wibox.container.background 20 | } 21 | 22 | helpers.add_hover(clear_notification, beautiful.dimblack, beautiful.light_black) 23 | 24 | clear_notification:add_button(awful.button({}, 1, function () 25 | awesome.emit_signal('dashboard::clear_notifications') 26 | end)) 27 | 28 | local header = wibox.widget { 29 | { 30 | markup = 'Notification center', 31 | font = beautiful.font_name .. ' 18', 32 | widget = wibox.widget.textbox, 33 | }, 34 | { 35 | clear_notification, 36 | halign = 'right', 37 | valign = 'center', 38 | layout = wibox.container.place, 39 | }, 40 | layout = wibox.layout.stack, 41 | } 42 | 43 | return header 44 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/notifcenter/init.lua: -------------------------------------------------------------------------------- 1 | local wibox = require 'wibox' 2 | 3 | local header = require 'ui.dashboard.modules.notifcenter.header' 4 | local body = require 'ui.dashboard.modules.notifcenter.body' 5 | 6 | local dimensions = require 'ui.dashboard.dimensions' 7 | 8 | local notifcenter = wibox.widget { 9 | header, 10 | { 11 | body, 12 | top = dimensions.spacing, 13 | widget = wibox.container.margin, 14 | }, 15 | layout = wibox.layout.align.vertical, 16 | } 17 | 18 | return notifcenter 19 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/profile.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local helpers = require("helpers") 3 | local beautiful = require("beautiful") 4 | local awful = require("awful") 5 | local gears = require("gears") 6 | local gfs = require("gears.filesystem") 7 | 8 | local dimensions = require("ui.dashboard.dimensions") 9 | 10 | local name = wibox.widget.textbox() 11 | 12 | awful.spawn.easy_async_with_shell("whoami", function (whoami) 13 | name.markup = helpers.capitalize(whoami:gsub("\n", "")) 14 | end) 15 | 16 | local os = wibox.widget.textbox() 17 | local osname = [[bash -c "cat /etc/os-release | grep 'PRETTY_NAME' | sed 's/=//g' | sed 's/\"//g' | sed 's/PRETTY_NAME//g'"]] 18 | 19 | awful.spawn.easy_async(osname, function (pretty_osname) 20 | os.markup = pretty_osname:gsub("\n", "") 21 | end) 22 | 23 | local kernel = wibox.widget.textbox() 24 | 25 | awful.spawn.easy_async_with_shell("uname -r", function (stdout) 26 | kernel.markup = stdout:gsub("\n", "") 27 | end) 28 | 29 | local uptime = wibox.widget.textbox() 30 | 31 | local function update_uptime () 32 | awful.spawn.easy_async(gfs.get_configuration_dir() .. "scripts/uptime.sh", function (processed_uptime) 33 | uptime.markup = processed_uptime:gsub("\n", "") 34 | end) 35 | end 36 | 37 | gears.timer { 38 | timeout = 120, 39 | call_now = true, 40 | autostart = true, 41 | callback = update_uptime 42 | } 43 | 44 | local profile = wibox.widget { 45 | { 46 | { 47 | { 48 | image = beautiful.pfp, 49 | halign = 'center', 50 | valign = 'center', 51 | forced_height = 64, 52 | forced_width = 64, 53 | clip_shape = helpers.mkroundedrect(7), 54 | widget = wibox.widget.imagebox, 55 | }, 56 | { 57 | { 58 | name, 59 | os, 60 | kernel, 61 | uptime, 62 | layout = wibox.layout.flex.vertical, 63 | }, 64 | left = dimensions.spacing, 65 | widget = wibox.container.margin, 66 | }, 67 | layout = wibox.layout.align.horizontal, 68 | }, 69 | margins = dimensions.spacing, 70 | widget = wibox.container.margin, 71 | }, 72 | bg = beautiful.bg_lighter, 73 | shape = helpers.mkroundedrect(7), 74 | widget = wibox.container.background 75 | } 76 | 77 | return profile 78 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/settings.lua: -------------------------------------------------------------------------------- 1 | local wibox = require 'wibox' 2 | local helpers = require 'helpers' 3 | local beautiful = require 'beautiful' 4 | 5 | local dimensions = require 'ui.dashboard.dimensions' 6 | local quick_settings = require 'ui.dashboard.modules.settings.quick-settings' 7 | local core = require 'ui.dashboard.modules.settings.core' 8 | local charts = require 'ui.dashboard.modules.settings.charts' 9 | 10 | local settings = wibox.widget { 11 | quick_settings, 12 | core, 13 | { 14 | charts, 15 | valign = 'center', 16 | layout = wibox.container.place, 17 | }, 18 | spacing = dimensions.spacing, 19 | layout = wibox.layout.flex.vertical, 20 | } 21 | 22 | return settings 23 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/dashboard/modules/tabbed.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local helpers = require("helpers") 4 | local gears = require("gears") 5 | local awful = require("awful") 6 | 7 | local tabs_layout = wibox.layout.fixed.horizontal() 8 | 9 | tabs_layout.spacing = 1 10 | 11 | -- index defines which part (right or left) should be rounded 12 | -- it's also the "id" of the tab. 13 | local mktab = function (label, index) 14 | local shape = function (cr, w, h) 15 | return gears.shape.partially_rounded_rect( 16 | cr, w, h, 17 | index == 0, -- top left if it's 0 18 | index == 1, -- top right if it's 1 19 | index == 1, -- bottom right if it's 1 20 | index == 0, -- bottom left if it's 0 21 | 7 22 | ) 23 | end 24 | 25 | local w = wibox.widget { 26 | { 27 | { 28 | markup = label, 29 | align = 'center', 30 | valign = 'center', 31 | widget = wibox.widget.textbox, 32 | }, 33 | top = 6, 34 | bottom = 6, 35 | widget = wibox.container.margin, 36 | }, 37 | bg = beautiful.black, 38 | shape = shape, 39 | forced_width = 70, 40 | widget = wibox.container.background, 41 | } 42 | 43 | local bg_transition = helpers.apply_transition { 44 | element = w, 45 | prop = 'bg', 46 | bg = beautiful.black, 47 | hbg = beautiful.dimblack, 48 | } 49 | 50 | awesome.connect_signal('dashboard::tabs::set_active', function (active_index) 51 | if active_index == index then 52 | bg_transition.on() 53 | else 54 | bg_transition.off() 55 | end 56 | end) 57 | 58 | w:add_button(awful.button({}, 1, function () 59 | awesome.emit_signal('dashboard::tabs::set_active', index) 60 | end)) 61 | 62 | return w 63 | end 64 | 65 | local info_tab = mktab('Info', 0) 66 | local settings_tab = mktab('Settings', 1) 67 | 68 | awesome.emit_signal('dashboard::tabs::set_active', 0) 69 | 70 | tabs_layout:add(info_tab) 71 | tabs_layout:add(settings_tab) 72 | 73 | local tabs = wibox.widget { 74 | tabs_layout, 75 | valign = 'center', 76 | halign = 'center', 77 | widget = wibox.container.place, 78 | } 79 | 80 | -- @index 0 81 | local info = require "ui.dashboard.modules.info" 82 | local settings = require "ui.dashboard.modules.settings" 83 | 84 | local content = wibox.layout.flex.horizontal() 85 | 86 | local update_content = function(new_widget) 87 | content:reset() 88 | content:add(new_widget) 89 | end 90 | 91 | update_content(info) 92 | 93 | -- set the right widget for the content 94 | awesome.connect_signal("dashboard::tabs::set_active", function (active_index) 95 | local active_widget = content.children[1] 96 | local old_index = active_widget == info and 0 or 1 97 | 98 | if old_index ~= active_index then 99 | update_content(active_index == 0 and info or settings) 100 | end 101 | end) 102 | 103 | -- widgets getter 104 | return function () 105 | return tabs, content 106 | end 107 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/content.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | 4 | local time = require("ui.infosidebar.modules.time") 5 | local details_container = require("ui.infosidebar.modules.details_container") 6 | local dimensions = require("ui.infosidebar.dimensions") 7 | 8 | return { 9 | { 10 | time, 11 | margins = dimensions.spacing, 12 | widget = wibox.container.margin, 13 | }, 14 | details_container, 15 | layout = wibox.layout.align.vertical, 16 | } 17 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/dimensions.lua: -------------------------------------------------------------------------------- 1 | return { 2 | width = 332, 3 | spacing = 8 4 | } 5 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/init.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local awful = require("awful") 3 | local beautiful = require("beautiful") 4 | 5 | local dimensions = require("ui.infosidebar.dimensions") 6 | local content = require("ui.infosidebar.content") 7 | 8 | local rubato = require("modules.rubato") 9 | 10 | require("ui.infosidebar.listener") 11 | 12 | awful.screen.connect_for_each_screen(function (s) 13 | s.infosidebar = {} 14 | 15 | s.infosidebar.popup = awful.popup { 16 | minimum_width = dimensions.width, 17 | x = s.geometry.x - beautiful.useless_gap * 2 - dimensions.width, 18 | y = s.geometry.y + beautiful.bar_height + beautiful.useless_gap * 4, 19 | ontop = true, 20 | visible = false, 21 | widget = content, 22 | } 23 | 24 | local self = s.infosidebar.popup 25 | 26 | function s.infosidebar.toggle () 27 | if self.visible then 28 | s.infosidebar.hide() 29 | else 30 | s.infosidebar.show() 31 | end 32 | end 33 | 34 | self.animate = rubato.timed { 35 | duration = 0.45, 36 | pos = s.geometry.x - beautiful.useless_gap * 2 - dimensions.width 37 | } 38 | 39 | self.status = 'undefined' 40 | 41 | self.animate:subscribe(function (v) 42 | self.x = v 43 | if self.x == s.geometry.x - beautiful.useless_gap * 2 - dimensions.width and self.status == 'closing' then 44 | self.visible = false 45 | end 46 | end) 47 | 48 | function s.infosidebar.show () 49 | self.status = 'opening' 50 | self.visible = true 51 | self.animate.target = s.geometry.x + beautiful.useless_gap * 2 52 | end 53 | 54 | function s.infosidebar.hide () 55 | self.status = 'closing' 56 | self.animate.target = s.geometry.x - beautiful.useless_gap * 2 - dimensions.width 57 | end 58 | end) 59 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/listener.lua: -------------------------------------------------------------------------------- 1 | local awful = require("awful") 2 | 3 | local _ = function () 4 | return awful.screen.focused() 5 | end 6 | 7 | awesome.connect_signal("infosidebar::toggle", function () 8 | _().infosidebar.toggle() 9 | end) 10 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/modules/details/calendar.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local gears = require("gears") 4 | local helpers = require("helpers") 5 | 6 | local dimensions = require("ui.infosidebar.dimensions") 7 | 8 | local calendar = wibox.widget { 9 | date = os.date('*t'), 10 | font = beautiful.font_name .. ' 10', 11 | spacing = 2, 12 | widget = wibox.widget.calendar.month, 13 | fn_embed = function (widget, flag, date) 14 | local focus_widget = wibox.widget { 15 | text = date.day, 16 | align = 'center', 17 | widget = wibox.widget.textbox, 18 | } 19 | 20 | local torender = flag == 'focus' and focus_widget or widget 21 | 22 | if flag == 'header' then 23 | torender.font = beautiful.font_name .. " 12" 24 | end 25 | 26 | local colors = { 27 | header = beautiful.blue, 28 | focus = beautiful.aqua, 29 | weekday = beautiful.cyan 30 | } 31 | 32 | local color = colors[flag] or beautiful.fg_normal 33 | 34 | return wibox.widget { 35 | { 36 | torender, 37 | margins = dimensions.spacing, 38 | widget = wibox.container.margin, 39 | }, 40 | bg = flag == 'focus' and beautiful.dimblack or beautiful.black, 41 | fg = color, 42 | widget = wibox.container.background, 43 | shape = flag == 'focus' and gears.shape.circle or helpers.mkroundedrect(12), 44 | } 45 | end 46 | } 47 | 48 | local container = wibox.widget { 49 | calendar, 50 | halign = "center", 51 | layout = wibox.container.place, 52 | } 53 | 54 | return container 55 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/modules/details/searchbox.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local helpers = require("helpers") 3 | local gears = require("gears") 4 | local beautiful = require("beautiful") 5 | local awful = require("awful") 6 | 7 | local dimensions = require("ui.infosidebar.dimensions") 8 | 9 | local icon = wibox.widget.textbox() 10 | local placeholder = wibox.widget.textbox() 11 | 12 | icon.font = beautiful.nerd_font .. " 20" 13 | icon.markup = helpers.get_colorized_markup("", beautiful.blue) 14 | 15 | local reset = function () 16 | placeholder.markup = helpers.get_colorized_markup("Launch App...", beautiful.grey) 17 | end 18 | 19 | reset() 20 | 21 | local get_input = function () 22 | awful.prompt.run { 23 | prompt = "", 24 | text = "", 25 | bg_cursor = beautiful.blue, 26 | textbox = placeholder, 27 | hooks = { 28 | {{}, "Escape", reset} 29 | }, 30 | done_callback = reset, 31 | completion_callback = awful.completion.shell, 32 | exe_callback = function (prog) 33 | if not prog or #prog == 0 then 34 | return 35 | end 36 | awful.spawn(prog) 37 | end 38 | } 39 | end 40 | 41 | local searchbox = wibox.widget { 42 | { 43 | { 44 | icon, 45 | placeholder, 46 | spacing = dimensions.spacing, 47 | layout = wibox.layout.fixed.horizontal, 48 | }, 49 | top = 0, 50 | bottom = 0, 51 | left = 15, 52 | right = 15, 53 | widget = wibox.container.margin, 54 | }, 55 | bg = beautiful.black, 56 | shape = gears.shape.rounded_bar, 57 | forced_width = 274, 58 | widget = wibox.container.background, 59 | } 60 | 61 | helpers.add_hover(searchbox, beautiful.black, beautiful.dimblack) 62 | 63 | searchbox:add_button(awful.button({}, 1, function () 64 | get_input() 65 | end)) 66 | 67 | return wibox.widget { 68 | searchbox, 69 | halign = "center", 70 | layout = wibox.container.place, 71 | } 72 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/modules/details_container.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local gears = require("gears") 4 | 5 | local dimensions = require("ui.infosidebar.dimensions") 6 | local calendar = require("ui.infosidebar.modules.details.calendar") 7 | local searchbox = require("ui.infosidebar.modules.details.searchbox") 8 | 9 | local content = wibox.widget { 10 | calendar, 11 | searchbox, 12 | spacing = dimensions.spacing * 2, 13 | layout = wibox.layout.fixed.vertical, 14 | } 15 | 16 | local container = wibox.widget { 17 | { 18 | content, 19 | margins = dimensions.spacing * 2, 20 | widget = wibox.container.margin, 21 | }, 22 | bg = beautiful.bg_lighter, 23 | widget = wibox.container.background, 24 | shape = function (cr, w, h) 25 | return gears.shape.partially_rounded_rect(cr, w, h, true, true, false, false, 12) 26 | end 27 | } 28 | 29 | return container 30 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/infosidebar/modules/time.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local beautiful = require("beautiful") 3 | local gears = require("gears") 4 | 5 | local dimensions = require("ui.infosidebar.dimensions") 6 | local time_spacing = dimensions.spacing * 2 7 | 8 | local hour_widgets = {} 9 | 10 | hour_widgets.hour = wibox.widget.textbox() 11 | hour_widgets.mins = wibox.widget.textbox() 12 | 13 | hour_widgets.hour.font = beautiful.font_name .. " 40" 14 | hour_widgets.mins.font = beautiful.font_name .. " 40" 15 | 16 | gears.timer { 17 | timeout = 30, -- just to make sure ok! 18 | call_now = true, 19 | autostart = true, 20 | callback = function () 21 | hour_widgets.hour.markup = "" .. os.date("%H") .. "" 22 | hour_widgets.mins.markup = "" .. os.date("%M") .. "" 23 | end, 24 | } 25 | 26 | local mkdot = function (color) 27 | return wibox.widget { 28 | wibox.widget.textbox(), 29 | forced_width = 14, 30 | forced_height = 14, 31 | bg = color, 32 | shape = gears.shape.circle, 33 | widget = wibox.container.background, 34 | } 35 | end 36 | 37 | hour_widgets.sep = wibox.widget { 38 | { 39 | mkdot(beautiful.blue), 40 | mkdot(beautiful.blue), 41 | spacing = dimensions.spacing * 1.5, 42 | layout = wibox.layout.fixed.vertical, 43 | }, 44 | valign = 'center', 45 | layout = wibox.container.place, 46 | } 47 | 48 | local hour = wibox.widget { 49 | hour_widgets.hour, 50 | { 51 | hour_widgets.sep, 52 | left = dimensions.spacing * 2, 53 | right = dimensions.spacing * 2, 54 | widget = wibox.container.margin, 55 | }, 56 | hour_widgets.mins, 57 | layout = wibox.layout.align.horizontal, 58 | } 59 | 60 | local date = wibox.widget.textbox() 61 | 62 | date.align = "center" 63 | 64 | local update_date = function () 65 | date.markup = "" .. os.date("%A %B %d") .. "" 66 | end 67 | 68 | gears.timer { 69 | timeout = 1200, 70 | call_now = true, 71 | autostart = true, 72 | callback = update_date 73 | } 74 | 75 | local time = wibox.widget { 76 | { 77 | { 78 | hour, 79 | date, 80 | spacing = dimensions.spacing * 2, 81 | layout = wibox.layout.fixed.vertical, 82 | }, 83 | halign = "center", 84 | layout = wibox.container.place, 85 | }, 86 | top = time_spacing, 87 | bottom = time_spacing, 88 | widget = wibox.container.margin, 89 | } 90 | 91 | return time 92 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/init.lua: -------------------------------------------------------------------------------- 1 | require 'ui.notifications' 2 | require 'ui.wallpaper' 3 | require 'ui.menu' 4 | require 'ui.bar' 5 | require 'ui.titlebars' 6 | require 'ui.infosidebar' 7 | require 'ui.dashboard' 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/menu.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: undefined-global 2 | local awful = require 'awful' 3 | local beautiful = require 'beautiful' 4 | local gears = require 'gears' 5 | local wibox = require 'wibox' 6 | local helpers = require 'helpers' 7 | 8 | local menu = {} 9 | 10 | menu.awesome = { 11 | { "Edit Config", editor_cmd .. " " .. awesome.conffile }, 12 | { "Edit Config (GUI)", visual_editor .. " " .. awesome.conffile }, 13 | { "Restart", awesome.restart }, 14 | { "Close Session", function () awesome.quit() end } 15 | } 16 | 17 | menu.mainmenu = awful.menu { 18 | items = { 19 | { "Terminal", terminal }, 20 | { "Explorer", explorer }, 21 | { "Browser", browser }, 22 | { "Editor", editor_cmd }, 23 | { "GUI Editor", visual_editor }, 24 | { "AwesomeWM", menu.awesome }, 25 | } 26 | } 27 | 28 | -- apply rounded corners to menus when picom isn't available, thanks to u/signalsourcesexy 29 | -- also applies antialiasing! - By me. 30 | menu.mainmenu.wibox.shape = helpers.mkroundedrect() 31 | menu.mainmenu.wibox.bg = beautiful.bg_normal .. '00' 32 | menu.mainmenu.wibox:set_widget(wibox.widget({ 33 | menu.mainmenu.wibox.widget, 34 | bg = beautiful.bg_normal, 35 | shape = helpers.mkroundedrect(), 36 | widget = wibox.container.background, 37 | })) 38 | 39 | -- apply rounded corners to submenus, thanks to u/signalsourcesexy 40 | -- also applies antialiasing! - By me. 41 | awful.menu.original_new = awful.menu.new 42 | 43 | function awful.menu.new(...) 44 | local ret = awful.menu.original_new(...) 45 | 46 | ret.wibox.shape = helpers.mkroundedrect() 47 | ret.wibox.bg = beautiful.bg_normal .. '00' 48 | ret.wibox:set_widget(wibox.widget { 49 | ret.wibox.widget, 50 | widget = wibox.container.background, 51 | bg = beautiful.bg_normal, 52 | shape = helpers.mkroundedrect(), 53 | }) 54 | 55 | return ret 56 | end 57 | 58 | return menu 59 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/notifications.lua: -------------------------------------------------------------------------------- 1 | local naughty = require "naughty" 2 | local beautiful = require 'beautiful' 3 | local helpers = require 'helpers' 4 | 5 | local dpi = beautiful.xresources.apply_dpi 6 | 7 | -- display errors 8 | naughty.connect_signal('request::display_error', function (message, startup) 9 | naughty.notification { 10 | urgency = 'critical', 11 | title = 'An error happened' .. (startup and ' during startup' or ''), 12 | message = message, 13 | } 14 | end) 15 | 16 | -- display notification 17 | naughty.connect_signal('request::display', function (n) 18 | naughty.layout.box { 19 | notification = n, 20 | position = 'bottom_right', 21 | border_width = 0, 22 | border_color = beautiful.bg_normal .. '00', 23 | bg = beautiful.bg_normal .. '00', 24 | fg = beautiful.fg_normal, 25 | shape = helpers.mkroundedrect(), 26 | minimum_width = dpi(240), 27 | widget_template = helpers.get_notification_widget(n) 28 | } 29 | end) 30 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/titlebars.lua: -------------------------------------------------------------------------------- 1 | local wibox = require("wibox") 2 | local awful = require("awful") 3 | local beautiful = require("beautiful") 4 | local gears = require("gears") 5 | local helpers = require("helpers") 6 | 7 | local mkbutton = function (color, onclick) 8 | return function (c) 9 | local button = wibox.widget { 10 | wibox.widget.textbox(), 11 | forced_width = 14, 12 | forced_height = 14, 13 | bg = color, 14 | shape = gears.shape.circle, 15 | widget = wibox.container.background, 16 | } 17 | 18 | local color_transition = helpers.apply_transition { 19 | element = button, 20 | prop = 'bg', 21 | bg = color, 22 | hbg = beautiful.black, 23 | } 24 | 25 | client.connect_signal("property::active", function () 26 | if c.active then 27 | color_transition.off() 28 | else 29 | color_transition.on() 30 | end 31 | end) 32 | 33 | button:add_button(awful.button({}, 1, function () 34 | if onclick then 35 | onclick(c) 36 | end 37 | end)) 38 | 39 | return button 40 | end 41 | end 42 | 43 | local close = mkbutton(beautiful.red, function (c) 44 | c:kill() 45 | end) 46 | 47 | local maximize = mkbutton(beautiful.yellow, function (c) 48 | c.maximized = not c.maximized 49 | end) 50 | 51 | local minimize = mkbutton(beautiful.green, function (c) 52 | gears.timer.delayed_call(function () 53 | c.minimized = true 54 | end) 55 | end) 56 | 57 | client.connect_signal("request::titlebars", function (c) 58 | if c.requests_no_titlebar then 59 | return 60 | end 61 | 62 | local titlebar = awful.titlebar(c, { 63 | position = "top", 64 | size = 39, 65 | }) 66 | 67 | local controls_layout = wibox.layout.fixed.horizontal() 68 | 69 | controls_layout.spacing = 6 70 | 71 | controls_layout:add(close(c)) 72 | controls_layout:add(maximize(c)) 73 | controls_layout:add(minimize(c)) 74 | 75 | local buttons = wibox.widget { 76 | layout = wibox.layout.fixed.horizontal, 77 | buttons = { 78 | awful.button({ }, 1, function() 79 | c:activate { context = "titlebar", action = "mouse_move" } 80 | end), 81 | awful.button({ }, 3, function() 82 | c:activate { context = "titlebar", action = "mouse_resize"} 83 | end), 84 | } 85 | } 86 | 87 | titlebar:setup { 88 | { 89 | controls_layout, 90 | left = 15, 91 | widget = wibox.container.margin, 92 | }, 93 | buttons, 94 | buttons, 95 | layout = wibox.layout.align.horizontal 96 | } 97 | end) 98 | -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/ui/wallpaper.lua: -------------------------------------------------------------------------------- 1 | local beautiful = require 'beautiful' 2 | local gears = require 'gears' 3 | 4 | screen.connect_signal('request::wallpaper', function (s) 5 | if beautiful.wallpaper then 6 | gears.wallpaper.maximized(beautiful.wallpaper, s, false, nil) 7 | end 8 | end) -------------------------------------------------------------------------------- /users/alpha/cfg/awesome/user_likes.lua: -------------------------------------------------------------------------------- 1 | local menubar = require "menubar" 2 | 3 | terminal = "alacritty" 4 | explorer = "thunar" 5 | browser = "firefox" 6 | launcher = "rofi -show drun" 7 | editor = os.getenv("EDITOR") or "vim" 8 | visual_editor = "code" -- vscode 9 | editor_cmd = terminal .. " -e " .. editor 10 | modkey = "Mod4" -- super, the windows key 11 | 12 | -- Set the terminal for applications that require it 13 | menubar.utils.terminal = terminal 14 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/init.lua: -------------------------------------------------------------------------------- 1 | require("modules") 2 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/modules/alias.lua: -------------------------------------------------------------------------------- 1 | local hilbish = require("hilbish") 2 | local util = require("util") 3 | 4 | util.process_table(hilbish.alias, { 5 | ls = "exa --icons", 6 | la = "ls -la", 7 | tree = "ls --tree", 8 | vim = "nvim && exec hilbish -S -l", -- restart hilbish 9 | vi = "nvim && exec hilbish -S -l", -- restart hilbish 10 | cat = "bat", 11 | reset = "exec hilbish -S -l" -- replaces current shell into a new one 12 | }) 13 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/modules/greeting.lua: -------------------------------------------------------------------------------- 1 | local hilbish = require("hilbish") 2 | local util = require("util") 3 | 4 | -- turn greeting and motd off 5 | util.merge_table(hilbish.opts, { 6 | greeting = false, 7 | motd = false 8 | }) 9 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/modules/init.lua: -------------------------------------------------------------------------------- 1 | require("modules.greeting") 2 | require("modules.vim") 3 | require("modules.alias") 4 | require("modules.prompt") 5 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/modules/prompt.lua: -------------------------------------------------------------------------------- 1 | local hilbish = require("hilbish") 2 | local promptua = require("promptua") 3 | 4 | local function get_cwd () 5 | local base_cwd = hilbish.cwd() 6 | local user_dir = "/home/" .. hilbish.user 7 | 8 | local cwd = base_cwd:gsub(user_dir, "~"), _ 9 | 10 | return cwd 11 | end 12 | 13 | promptua.setConfig { 14 | prompt = { 15 | icon = " ", 16 | success = "", 17 | fail = "  " 18 | } 19 | } 20 | 21 | promptua.setTheme { 22 | { provider = "prompt.icon", style = "blue" }, 23 | { provider = get_cwd, style = "cyan", separator = "" }, 24 | { provider = "git.branch", style = "magenta", separator = "", icon = "  " }, 25 | { provider = "git.dirty", style = "white", separator = "", format = " @style@icon", icon = ""}, 26 | { provider = "prompt.failSuccess", style = "yellow" } 27 | } 28 | 29 | promptua.init() 30 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/modules/vim.lua: -------------------------------------------------------------------------------- 1 | local bait = require("bait") 2 | local ansikit = require("ansikit") 3 | local util = require("util") 4 | 5 | local modes = { 6 | insert = "lineCursor", 7 | another = "blockCursor" 8 | } 9 | 10 | -- turn on vim mode 11 | -- hilbish.inputMode("vim") 12 | 13 | -- load cursors 14 | bait.catch("hilbish.vimMode", function (mode) 15 | ansikit.cursorStyle(ansikit[modes[ 16 | util.has_key(modes, mode) and mode or "another" 17 | ]]) 18 | end) 19 | -------------------------------------------------------------------------------- /users/alpha/cfg/hilbish/util.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | function M.merge_table(table, new_table) 4 | for key, val in pairs(new_table) do 5 | table[key] = val 6 | end 7 | end 8 | 9 | function M.has_key(table, thekey) 10 | found = false 11 | for key, _ in pairs(table) do 12 | if key == thekey then 13 | found = true 14 | end 15 | end 16 | 17 | return found 18 | end 19 | 20 | function M.process_table(processor, table) 21 | for key, val in pairs(table) do 22 | processor(key, val) 23 | end 24 | end 25 | 26 | return M 27 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.defer_fn(function () 2 | pcall(require, "impatient") 3 | end, 0) 4 | 5 | require("config.options") 6 | require("config.autocmds") 7 | require("config.keymaps") 8 | require("config.theme") 9 | 10 | local executed = require("check_packer") 11 | 12 | if not executed then 13 | require("config.plugins") 14 | require("modules") 15 | end 16 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/check_packer.lua: -------------------------------------------------------------------------------- 1 | -- thanks to NvChad code, which served as reference to this file 2 | local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" 3 | local colors = require("pkgs.theme.core").get_palette() 4 | 5 | local executed = false 6 | 7 | local load_mason = function () 8 | require("modules.masonc") 9 | end 10 | 11 | if vim.fn.empty(vim.fn.glob(install_path)) > 0 then 12 | executed = true 13 | 14 | print("Cloning packer....") 15 | 16 | vim.fn.system { 17 | "git", "clone", "--depth", "1", 18 | "https://github.com/wbthomason/packer.nvim", install_path 19 | } 20 | 21 | vim.cmd("packadd packer.nvim") 22 | 23 | require("config.plugins") 24 | 25 | vim.cmd("PackerSync") 26 | 27 | vim.api.nvim_create_autocmd("User", { 28 | pattern = "PackerComplete", 29 | callback = function () 30 | load_mason() 31 | vim.cmd "bw" 32 | -- vim.cmd "bw | silent! MasonInstallAll" -- close packer window and install mason.nvim things 33 | require("modules") 34 | end, 35 | }) 36 | end 37 | 38 | if not executed then 39 | load_mason() 40 | end 41 | 42 | return executed 43 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/config/autocmds.lua: -------------------------------------------------------------------------------- 1 | vim.cmd [[ autocmd VimLeave * set guicursor=n:ver10 ]] 2 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | local keymap = function (mode, map, cmd) 2 | vim.api.nvim_set_keymap(mode, map, cmd, { noremap = true, silent = true }) 3 | end 4 | 5 | local ks = { 'jk', 'kj', 'jj', 'kk' } 6 | 7 | for _, k in ipairs(ks) do 8 | keymap('i', k, '') 9 | end 10 | 11 | keymap('n', '', "w!") 12 | keymap('n', 'fs', "w!") 13 | keymap('n', '', 'q!') 14 | 15 | local nks = {'h', 'j', 'k', 'l'} 16 | 17 | for _, nk in ipairs(nks) do 18 | keymap('n', '', '' .. nk) 19 | end 20 | 21 | keymap('n', 'x', 'Bdelete!') 22 | keymap('n', '', 'Bdelete!') 23 | 24 | keymap('n', '', 'bn!') 25 | keymap('n', '', 'bp!') 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/config/options.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | opt.number = true 4 | opt.tabstop = 2 5 | opt.shiftwidth = 2 6 | opt.expandtab = true 7 | opt.termguicolors = true 8 | opt.showmode = false 9 | opt.clipboard = 'unnamedplus' 10 | opt.laststatus = 3 11 | opt.cursorline = false 12 | opt.wrap = false 13 | opt.guifont = { "monospace", ":h13" } 14 | opt.cmdheight = 1 15 | opt.completeopt = "menu,menuone,noselect" 16 | 17 | opt.shortmess = opt.shortmess + { 18 | c = true, -- Do not show completion messages in command line 19 | F = true, -- Do not show file info when editing a file, in the command line 20 | W = true, -- Do not show "written" in command line when writing 21 | I = true, -- Do not show intro message when starting Vim 22 | } 23 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/config/plugins.lua: -------------------------------------------------------------------------------- 1 | vim.cmd [[ packadd! packer.nvim ]] 2 | 3 | local define_plugs = function (use) 4 | use "wbthomason/packer.nvim" 5 | use "nvim-treesitter/nvim-treesitter" 6 | use "nvim-lualine/lualine.nvim" 7 | use "norcalli/nvim-colorizer.lua" 8 | use "windwp/nvim-autopairs" 9 | use "akinsho/bufferline.nvim" 10 | use "lewis6991/impatient.nvim" 11 | use "akinsho/toggleterm.nvim" 12 | use "folke/tokyonight.nvim" 13 | use "rcarriga/nvim-notify" 14 | use "famiu/bufdelete.nvim" 15 | use "Pocco81/true-zen.nvim" 16 | 17 | use { 18 | "nvim-tree/nvim-tree.lua", 19 | requires = { "nvim-tree/nvim-web-devicons" } 20 | } 21 | use { 22 | "nvim-telescope/telescope.nvim", 23 | requires = { "nvim-lua/plenary.nvim" } 24 | } 25 | 26 | -- configuration of lsp things 27 | use { 28 | "onsails/lspkind.nvim", 29 | "williamboman/mason.nvim", 30 | "williamboman/mason-lspconfig.nvim", 31 | "neovim/nvim-lspconfig", 32 | "hrsh7th/cmp-nvim-lsp", 33 | "hrsh7th/cmp-buffer", 34 | "hrsh7th/cmp-path", 35 | "hrsh7th/cmp-cmdline", 36 | "hrsh7th/nvim-cmp", 37 | "L3MON4D3/LuaSnip", 38 | "saadparwaiz1/cmp_luasnip" 39 | } 40 | end 41 | 42 | return require("packer").startup({define_plugs, config = { 43 | git = { 44 | depth = 1, 45 | clone_timeout = -1, 46 | }, 47 | display = { 48 | open_fn = function () 49 | return require("packer.util").float({ 50 | border = "single" 51 | }) 52 | end 53 | } 54 | }}) 55 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/config/theme.lua: -------------------------------------------------------------------------------- 1 | -- theme is based on the decay one 2 | local theme = require("pkgs.theme") 3 | 4 | theme.setup { 5 | style = 'normal', 6 | nvim_tree = { 7 | contrast = true, 8 | }, 9 | cmp = { 10 | block_kind = true 11 | }, 12 | italics = { 13 | code = false, 14 | comments = false, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/helpers.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | M.dict_contains = function (table, value) 4 | contains = false 5 | for key, _ in pairs(table) do 6 | if value == key then 7 | contains = true 8 | end 9 | end 10 | 11 | return contains 12 | end 13 | 14 | M.list_contains = function (table, value) 15 | contains = false 16 | for _, item in ipairs(table) do 17 | if value == item then 18 | contains = true 19 | end 20 | end 21 | 22 | return contains 23 | end 24 | 25 | return M 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/autopairs.lua: -------------------------------------------------------------------------------- 1 | local present, autopairs = pcall(require, 'nvim-autopairs') 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | autopairs.setup() 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/bufferline.lua: -------------------------------------------------------------------------------- 1 | local present, bufferline = pcall(require, 'bufferline') 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | bufferline.setup { 8 | options = { 9 | show_buffer_icons = false, 10 | show_buffer_default_icon = false, 11 | separator_style = {'', ''}, 12 | indicator = { 13 | style = 'none', 14 | }, 15 | offsets = { 16 | { 17 | filetype = "NvimTree", 18 | text = "", 19 | highlight = "NvimTreeNormal", 20 | separator = true, 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/colorizer.lua: -------------------------------------------------------------------------------- 1 | local present, colorizer = pcall(require, 'colorizer') 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | colorizer.setup() 8 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/init.lua: -------------------------------------------------------------------------------- 1 | require("modules.nvim-tree") 2 | require("modules.treesitter") 3 | require("modules.telescope") 4 | require("modules.lualine") 5 | require("modules.colorizer") 6 | require("modules.autopairs") 7 | require("modules.bufferline") 8 | require("modules.toggleterm") 9 | require("modules.zenmode") 10 | 11 | -- mason isn't loaded here ok! 12 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/lualine.lua: -------------------------------------------------------------------------------- 1 | local present, lualine = pcall(require, "lualine") 2 | local theme = require("pkgs.theme.lualine") 3 | local colors = require("pkgs.theme.core").get_palette() 4 | 5 | if not present then 6 | return 7 | end 8 | 9 | local sections = {} 10 | 11 | local secs = {'a', 'b', 'c', 'x', 'y', 'z'} 12 | 13 | for _, sec in ipairs(secs) do 14 | sections['lualine_' .. sec] = {} 15 | end 16 | 17 | local function ins (sec, cmp) 18 | table.insert(sections['lualine_' .. sec], cmp) 19 | end 20 | 21 | local function wtext (txt) 22 | return function () 23 | return txt 24 | end 25 | end 26 | 27 | local function simple(name) 28 | return { name } 29 | end 30 | 31 | ins('x', { 32 | 'mode', 33 | fmt = function (s) 34 | return s:sub(1, 1) 35 | end 36 | }) 37 | 38 | ins('y', { 39 | 'filetype', 40 | icon_only = true, 41 | padding = { right = 0, left = 1 } 42 | }) 43 | 44 | ins('y', simple('filename')) 45 | 46 | ins('y', { 47 | 'branch', 48 | padding = { left = 1 }, 49 | color = { bg = colors.statusline_bg, fg = colors.magenta } 50 | }) 51 | 52 | lualine.setup { 53 | options = { 54 | theme = theme.mklualinetheme(), 55 | component_separators = { left = nil, right = nil }, 56 | section_separators = { left = nil, right = nil }, 57 | }, 58 | sections = sections, 59 | inactive_sections = { 60 | lualine_a = {}, 61 | lualine_b = {}, 62 | lualine_c = {}, 63 | lualine_x = {}, 64 | lualine_y = {}, 65 | lualine_z = {} 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/nvim-tree.lua: -------------------------------------------------------------------------------- 1 | local present, ntree = pcall(require, 'nvim-tree') 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | ntree.setup {} 8 | 9 | vim.api.nvim_set_keymap('n', '', 'NvimTreeToggle', { noremap = true, silent = true }) 10 | 11 | --- auto hide tree when focusing on files 12 | 13 | --[[ 14 | 15 | vim.api.nvim_create_autocmd('BufEnter', { 16 | command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif", 17 | nested = true, 18 | }) 19 | 20 | vim.api.nvim_create_autocmd('BufEnter', { 21 | command = "if bufname() != 'NvimTree_' . tabpagenr() | NvimTreeClose | endif", 22 | nested = true, 23 | }) 24 | 25 | --]] 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/telescope.lua: -------------------------------------------------------------------------------- 1 | local present, telescope = pcall(require, "telescope") 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | telescope.setup() 8 | 9 | local function keymap(mode, keymap, cmd) 10 | local opts = { noremap = true, silent = true } 11 | vim.api.nvim_set_keymap(mode, keymap, cmd, opts) 12 | end 13 | 14 | local maps = { 15 | ["ff"] = "Telescope find_files", 16 | [""] = "Telescope find_files" 17 | } 18 | 19 | for key, cmd in pairs(maps) do 20 | keymap("n", key, cmd) 21 | end 22 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/toggleterm.lua: -------------------------------------------------------------------------------- 1 | local present, toggleterm = pcall(require, 'toggleterm') 2 | local colors = require("pkgs.theme.core").get_palette() 3 | 4 | local keymap = function (mode, map, cmd) 5 | vim.api.nvim_set_keymap(mode, map, cmd, { noremap = true, silent = true }) 6 | end 7 | 8 | if not present then 9 | return 10 | end 11 | 12 | toggleterm.setup { 13 | shade_terminals = false, 14 | autochdir = true, 15 | persist_mode = false, 16 | highlights = { 17 | FloatBorder = { 18 | guifg = colors.brightblack, 19 | guibg = colors.background 20 | }, 21 | }, 22 | size = function (term) 23 | if term.direction == "horizontal" then 24 | return 15 25 | elseif term.direction == "vertical" then 26 | return vim.o.columns * 0.45 27 | end 28 | end, 29 | } 30 | 31 | keymap('n', 'th', 'ToggleTerm direction=horizontal') 32 | keymap('n', 'tv', 'ToggleTerm direction=vertical') 33 | keymap('n', 'tf', 'ToggleTerm direction=float') 34 | 35 | -- set keymaps for terminal mode (took from documentation) 36 | function _G.set_terminal_keymaps() 37 | local opts = { buffer = 0 } 38 | vim.keymap.set('t', '', [[]], opts) 39 | vim.keymap.set('t', 'jk', [[]], opts) 40 | vim.keymap.set('t', '', [[wincmd h]], opts) 41 | vim.keymap.set('t', '', [[wincmd j]], opts) 42 | vim.keymap.set('t', '', [[wincmd k]], opts) 43 | vim.keymap.set('t', '', [[wincmd l]], opts) 44 | vim.keymap.set('t', 'q', [[q!]], opts) 45 | end 46 | 47 | vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') 48 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/treesitter.lua: -------------------------------------------------------------------------------- 1 | local present, conf = pcall(require, 'nvim-treesitter.configs') 2 | 3 | if not present then 4 | return 5 | end 6 | 7 | conf.setup { 8 | ensure_installed = {'lua', 'javascript', 'typescript', 'tsx', 'python', 'bash', 'html', 'css', 'markdown'}, 9 | auto_install = false, 10 | highlight = { 11 | enable = true, 12 | additional_vim_regex_highlighting = true 13 | }, 14 | } 15 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/modules/zenmode.lua: -------------------------------------------------------------------------------- 1 | local api = vim.api 2 | 3 | api.nvim_set_keymap("n", "zn", ":TZNarrow", {}) 4 | api.nvim_set_keymap("v", "zn", ":'<,'>TZNarrow", {}) 5 | api.nvim_set_keymap("n", "zf", ":TZFocus", {}) 6 | api.nvim_set_keymap("n", "zm", ":TZMinimalist", {}) 7 | api.nvim_set_keymap("n", "za", ":TZAtaraxis", {}) 8 | 9 | -- or 10 | local truezen = require('true-zen') 11 | local keymap = vim.keymap 12 | 13 | keymap.set('n', 'zn', function() 14 | local first = 0 15 | local last = vim.api.nvim_buf_line_count(0) 16 | truezen.narrow(first, last) 17 | end, { noremap = true }) 18 | keymap.set('v', 'zn', function() 19 | local first = vim.fn.line('v') 20 | local last = vim.fn.line('.') 21 | truezen.narrow(first, last) 22 | end, { noremap = true }) 23 | keymap.set('n', 'zf', truezen.focus, { noremap = true }) 24 | keymap.set('n', 'zm', truezen.minimalist, { noremap = true }) 25 | keymap.set('n', 'za', truezen.ataraxis, { noremap = true }) 26 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/pkgs/theme/core.lua: -------------------------------------------------------------------------------- 1 | package.path = package.path .. ';' .. os.getenv("HOME") .. '/.config/nvim-colors.lua' 2 | 3 | return require("nvim-colors") -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/pkgs/theme/init.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | local core = require('pkgs.theme.core') 3 | local highlights = require('pkgs.theme.highlights') 4 | 5 | function M.setup (opts) 6 | if opts == nil then 7 | opts = { 8 | cmp = { 9 | block_kind = false, 10 | }, 11 | italics = { 12 | code = true, 13 | comments = false 14 | } 15 | } 16 | end 17 | -- disable bold 18 | vim.cmd [[ set t_md= ]] 19 | vim.opt.termguicolors = true 20 | 21 | local cmp_opts = opts.cmp or { block_kind = false } 22 | 23 | vim.g.decay_cmp_block_kind = cmp_opts.block_kind == nil and true or cmp_opts.block_kind 24 | 25 | local colors = core.get_palette() 26 | 27 | highlights.highlight_all(colors, opts) 28 | end 29 | 30 | return M 31 | -------------------------------------------------------------------------------- /users/alpha/cfg/nvim/lua/pkgs/theme/lualine.lua: -------------------------------------------------------------------------------- 1 | local core = require("pkgs.theme.core") 2 | local colors = core.get_palette() 3 | 4 | local M = {} 5 | 6 | function M.mklualinetheme () 7 | local custom = {} 8 | 9 | custom.normal = { 10 | a = { bg = colors.blue, fg = colors.background }, 11 | x = { bg = colors.blue, fg = colors.background }, 12 | b = { bg = colors.lighter, fg = colors.foreground }, 13 | c = { bg = colors.background, fg = colors.background }, 14 | } 15 | 16 | custom.insert = { 17 | a = { bg = colors.green, fg = colors.background }, 18 | x = { bg = colors.green, fg = colors.background }, 19 | b = { bg = colors.lighter, fg = colors.foreground }, 20 | } 21 | 22 | custom.command = { 23 | a = { bg = colors.red, fg = colors.background }, 24 | x = { bg = colors.red, fg = colors.background }, 25 | b = { bg = colors.lighter, fg = colors.foreground }, 26 | } 27 | 28 | custom.visual = { 29 | a = { bg = colors.cyan, fg = colors.background }, 30 | x = { bg = colors.cyan, fg = colors.background }, 31 | b = { bg = colors.lighter, fg = colors.foreground }, 32 | } 33 | 34 | custom.replace = { 35 | a = { bg = colors.red, fg = colors.background }, 36 | x = { bg = colors.red, fg = colors.background }, 37 | b = { bg = colors.lighter, fg = colors.foreground }, 38 | } 39 | 40 | custom.inactive = { 41 | a = { bg = colors.background, fg = colors.background }, 42 | x = { bg = colors.background, fg = colors.background }, 43 | b = { bg = colors.lighter, fg = colors.foreground }, 44 | c = { bg = colors.background, fg = colors.foreground }, 45 | } 46 | 47 | return custom 48 | end 49 | 50 | return M 51 | -------------------------------------------------------------------------------- /users/alpha/cfg/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | modi: "drun"; 3 | font: "Product Sans 10"; 4 | show-icons: true; 5 | icon-theme: "Reversal-dark"; 6 | display-drun: ""; 7 | drun-display-format: "{name}"; 8 | sidebar-mode: false; 9 | } 10 | 11 | @theme "/dev/null" 12 | 13 | * { 14 | bg: #0d0f18; 15 | fg: #a5b6cf; 16 | accent: #c296eb; 17 | button: #11131c; 18 | 19 | background-color: @bg; 20 | text-color: @fg; 21 | } 22 | 23 | window { 24 | width: 37%; 25 | padding: 5px; 26 | } 27 | 28 | prompt { 29 | background-color: @button; 30 | enabled: true; 31 | padding: 0.5% 32px 0% -0.5%; 32 | font: "Product Sans 10"; 33 | } 34 | 35 | entry { 36 | placeholder: "Search"; 37 | background-color: @button; 38 | placeholder-color: @fg; 39 | expand: true; 40 | padding: 0.15% 0% 0% 0%; 41 | } 42 | 43 | inputbar { 44 | children: [ prompt, entry ]; 45 | background-color: @button; 46 | expand: false; 47 | border-radius: 6px; 48 | margin: 0%; 49 | padding: 10px; 50 | } 51 | 52 | listview { 53 | columns: 4; 54 | lines: 3; 55 | cycle: false; 56 | dynamic: true; 57 | layout: vertical; 58 | } 59 | 60 | mainbox { 61 | children: [ inputbar, listview ]; 62 | spacing: 2%; 63 | padding: 2% 1% 2% 1%; 64 | } 65 | 66 | element { 67 | orientation: vertical; 68 | padding: 2% 0% 2% 0%; 69 | } 70 | 71 | element-icon { 72 | size: 48px; 73 | horizontal-align: 0.5; 74 | } 75 | 76 | element-text { 77 | expand: true; 78 | horizontal-align: 0.5; 79 | vertical-align: 0.5; 80 | margin: 0.5% 0.5% -0.5% 0.5%; 81 | } 82 | 83 | element-text, element-icon { 84 | background-color: inherit; 85 | text-color: inherit; 86 | } 87 | 88 | element selected { 89 | background-color: @button; 90 | border-radius: 6px; 91 | } 92 | -------------------------------------------------------------------------------- /users/alpha/config.nix: -------------------------------------------------------------------------------- 1 | { allowUnfree = true; } 2 | -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Black.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-BlackItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Bold.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-BoldItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Italic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Light.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-LightItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Medium.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-MediumItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Regular.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-Thin.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/ProductSans-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/ProductSans-ThinItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/RobotoCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/RobotoCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/RobotoCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/RobotoCondensed-Italic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/RobotoCondensed-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/RobotoCondensed-Light.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/RobotoCondensed-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/RobotoCondensed-LightItalic.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/assets/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/fonts/assets/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /users/alpha/fonts/default.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | 3 | { 4 | ".local/share/fonts".source = ./assets; 5 | } 6 | -------------------------------------------------------------------------------- /users/alpha/fonts/nerdfonts.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | with pkgs; nerdfonts.override { 4 | fonts = [ 5 | "Iosevka" 6 | "JetBrainsMono" 7 | "IBMPlexMono" 8 | "Mononoki" 9 | "Monofur" 10 | ]; 11 | } 12 | -------------------------------------------------------------------------------- /users/alpha/programs/alacritty/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, colors, ... }: 2 | 3 | let 4 | setfont = import ./setfont.nix {}; 5 | theme = import ./theming.nix { inherit colors; }; 6 | in { 7 | programs.alacritty = { 8 | enable = true; 9 | settings = { 10 | colors = theme; 11 | mouse.hide_when_typing = true; 12 | window = { 13 | padding.x = 14; 14 | padding.y = 14; 15 | dynamic_padding = true; 16 | }; 17 | font = setfont "Monaco Nerd Font" // { 18 | size = 8; 19 | }; 20 | cursor.style = { 21 | shape = "Beam"; 22 | blinking = "on"; 23 | }; 24 | }; 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /users/alpha/programs/alacritty/setfont.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | 3 | font: { 4 | normal = { 5 | family = font; 6 | style = "Regular"; 7 | }; 8 | bold = { 9 | family = font; 10 | style = "Bold"; 11 | }; 12 | italic = { 13 | family = font; 14 | style = "Italic"; 15 | }; 16 | bold_italic = { 17 | family = font; 18 | style = "Bold Italic"; 19 | }; 20 | } -------------------------------------------------------------------------------- /users/alpha/programs/alacritty/theming.nix: -------------------------------------------------------------------------------- 1 | { colors }: 2 | 3 | with colors; rec { 4 | primary = { 5 | background = bg; 6 | foreground = fg; 7 | }; 8 | 9 | cursor = { 10 | text = bg; 11 | cursor = light-black; 12 | }; 13 | 14 | selection = { 15 | text = bg; 16 | background = fg; 17 | }; 18 | 19 | normal = { 20 | black = black; 21 | red = red; 22 | green = green; 23 | yellow = yellow; 24 | blue = blue; 25 | magenta = magenta; 26 | cyan = cyan; 27 | white = white; 28 | }; 29 | 30 | bright = { 31 | black = black; 32 | red = red; 33 | green = green; 34 | yellow = yellow; 35 | blue = blue; 36 | magenta = magenta; 37 | cyan = cyan; 38 | white = white; 39 | }; 40 | 41 | dim = { 42 | black = black; 43 | red = red; 44 | green = green; 45 | yellow = yellow; 46 | blue = blue; 47 | magenta = magenta; 48 | cyan = cyan; 49 | white = white; 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /users/alpha/programs/firefox/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, nur, colors, ... }: 2 | 3 | { 4 | programs.firefox = { 5 | enable = true; 6 | 7 | extensions = with nur.repos.rycee.firefox-addons; [ 8 | enhanced-github 9 | enhancer-for-youtube 10 | refined-github 11 | stylus 12 | vue-js-devtools 13 | react-devtools 14 | reduxdevtools 15 | ]; 16 | 17 | profiles.alpha = { 18 | id = 0; 19 | settings."general.smoothScroll" = true; 20 | userChrome = import ./userChrome-css.nix { inherit colors; }; 21 | userContent = import ./userContent-css.nix {}; 22 | extraConfig = '' 23 | user_pref("browser.startup.homepage", "https://alphatechnolog.github.io/startpage"); 24 | user_pref("browser.urlbar.autoFill", false); 25 | user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); 26 | user_pref("layers.acceleration.force-enabled", true); 27 | user_pref("gfx.webrender.all", true); 28 | user_pref("svg.context-properties.content.enabled", true); 29 | user_pref("full-screen-api.ignore-widgets", true); 30 | user_pref("media.ffmpeg.vaapi.enabled", true); 31 | user_pref("media.rdd-vpx.enabled", true); 32 | ''; 33 | }; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /users/alpha/programs/firefox/userContent-css.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | 3 | '' 4 | /* 5 | ┌─┐┬┌┬┐┌─┐┬ ┌─┐ 6 | └─┐││││├─┘│ ├┤ 7 | └─┘┴┴ ┴┴ ┴─┘└─┘ 8 | ┌─┐┌─┐─┐ ┬ 9 | ├┤ │ │┌┴┬┘ 10 | └ └─┘┴ └─ 11 | by Miguel Avila 12 | */ 13 | 14 | :root { 15 | scrollbar-width: none !important; 16 | } 17 | 18 | @-moz-document url(about:privatebrowsing) { 19 | :root { 20 | scrollbar-width: none !important; 21 | } 22 | } 23 | '' 24 | -------------------------------------------------------------------------------- /users/alpha/programs/fish.nix: -------------------------------------------------------------------------------- 1 | { 2 | xdg.configFile."fish/config.fish".text = '' 3 | starship init fish | source 4 | set fish_greeting 5 | set fish_color_command brgreen 6 | set fish_color_param brwhite 7 | set fish_color_quote bryellow 8 | ''; 9 | } -------------------------------------------------------------------------------- /users/alpha/programs/kitty/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | { 4 | programs.kitty = { 5 | enable = true; 6 | extraConfig = import ./settings.nix; 7 | settings = { 8 | window_padding_width = 20; 9 | confirm_os_window_close = 0; 10 | cursor_shape = "underline"; 11 | cursor_underline_thickness = "0.5"; 12 | background_opacity = "0.40"; 13 | }; 14 | font = { 15 | size = 12; 16 | name = "monospace"; 17 | }; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /users/alpha/programs/kitty/settings.nix: -------------------------------------------------------------------------------- 1 | let 2 | colors = import ../../theme/colors.nix {}; 3 | in with colors; '' 4 | # Eye Friendly Colors 5 | # Created by https://github.com/decaycs 6 | # Special 7 | background #000000 8 | foreground ${fg} 9 | # Black 10 | color0 ${black} 11 | color8 ${dimblack} 12 | # Red 13 | color1 ${red} 14 | color9 ${red} 15 | # Green 16 | color2 ${green} 17 | color10 ${green} 18 | # Yellow 19 | color3 ${yellow} 20 | color11 ${yellow} 21 | # Blue 22 | color4 ${blue} 23 | color12 ${blue} 24 | # Magenta 25 | color5 ${magenta} 26 | color13 ${magenta} 27 | # Cyan 28 | color6 ${cyan} 29 | color14 ${cyan} 30 | # White 31 | color7 ${white} 32 | color15 ${white} 33 | # Cursor 34 | cursor ${white} 35 | cursor_text_color ${bg} 36 | # Selection highlight 37 | selection_foreground ${fg} 38 | selection_background ${dimblack} 39 | '' 40 | -------------------------------------------------------------------------------- /users/alpha/programs/picom.nix: -------------------------------------------------------------------------------- 1 | {...}: { 2 | services.picom = { 3 | enable = true; 4 | backend = "glx"; 5 | vSync = true; 6 | 7 | shadow = true; 8 | shadowOffsets = [(-10) (-10)]; 9 | shadowOpacity = 0.35; 10 | shadowExclude = [ 11 | "name = 'Notification'" 12 | "class_g = 'Conky'" 13 | "class_g ?= 'Notify-osd'" 14 | "class_g = 'Cairo-clock'" 15 | "_GTK_FRAME_EXTENTS@:c" 16 | ]; 17 | 18 | fade = true; 19 | fadeDelta = 4; 20 | fadeSteps = [0.025 0.025]; 21 | fadeExclude = []; 22 | 23 | activeOpacity = 1.0; 24 | inactiveOpacity = 1.0; 25 | menuOpacity = 1.0; 26 | opacityRules = ["70:class_g = 'splash'"]; 27 | 28 | wintypes = { 29 | tooltip = { 30 | fade = true; 31 | shadow = true; 32 | focus = true; 33 | full-shadow = true; 34 | }; 35 | dock = {shadow = false;}; 36 | dnd = {shadow = false;}; 37 | popup_menu = {opacity = 1;}; 38 | dropdown_menu = {opacity = 1;}; 39 | desktop = {full-shadow = false;}; 40 | normal = {full-shadow = false;}; 41 | }; 42 | 43 | settings = { 44 | shadow-radius = 10; 45 | shadow-color = "#000000"; 46 | shadow-ignore-shaped = false; 47 | 48 | frame-opacity = 1.0; 49 | inactive-opacity-override = false; 50 | focus-exclude = [ 51 | "class_g = 'Peek'" 52 | "class_g = 'Cairo-clock'" 53 | ]; 54 | 55 | corner-radius = 12; 56 | rounded-corners-exclude = [ 57 | "window_type = 'dock'" 58 | "_NET_WM_STATE@:32a *= '_NET_WM_STATE_MAXIMIZED_VERT'" 59 | "_NET_WM_STATE@:32a *= '_NET_WM_STATE_MAXIMIZED_HORZ'" 60 | ]; 61 | 62 | blur-method = "dual_kawase"; 63 | blur-kernel = "11x11gaussian"; 64 | blur-deviation = 3.0; 65 | blur-strength = 8; 66 | blur-background = false; 67 | blur-background-frame = true; 68 | blur-background-fixed = true; 69 | blur-background-exclude = [ 70 | "class_g = 'slop'" 71 | "class_g = 'firefox'" 72 | "_GTK_FRAME_EXTENTS@:c" 73 | "window_type = 'desktop'" 74 | "window_type = 'menu'" 75 | ]; 76 | 77 | mark-wmwin-focused = true; 78 | mark-ovredir-focused = true; 79 | detect-rounded-corners = true; 80 | detect-client-opacity = true; 81 | detect-transient = true; 82 | detect-client-leader = true; 83 | glx-no-stencil = true; 84 | use-damage = true; 85 | transparent-clipping = false; 86 | log-level = "warn"; 87 | }; 88 | }; 89 | } 90 | -------------------------------------------------------------------------------- /users/alpha/programs/starship.nix: -------------------------------------------------------------------------------- 1 | { 2 | programs.starship = { 3 | enable = true; 4 | settings = { 5 | scan_timeout = 10; 6 | add_newline = false; 7 | line_break.disabled = true; 8 | cmd_duration.disabled = true; 9 | 10 | format = let 11 | git = "$git_branch$git_metrics$git_commit$git_state$git_status"; 12 | in "$directory${git}$all"; 13 | 14 | right_format = "$status"; 15 | 16 | character = { 17 | success_symbol = "[](cyan)"; 18 | error_symbol = "[](red)"; 19 | }; 20 | 21 | directory = { 22 | format = "[$path]($style)( [$read_only]($read_only_style)) "; 23 | style = "cyan"; 24 | disabled = false; 25 | }; 26 | 27 | status = { 28 | format = "[$symbol]($style)"; 29 | symbol = "[](red)"; 30 | success_symbol = "[](green)"; 31 | disabled = false; 32 | }; 33 | 34 | git_branch = { 35 | style = "purple"; 36 | symbol = ""; 37 | }; 38 | 39 | git_metrics = { 40 | disabled = false; 41 | added_style = "bold yellow"; 42 | deleted_style = "bold red"; 43 | }; 44 | 45 | aws.symbol = " "; 46 | conda.symbol = " "; 47 | dart.symbol = " "; 48 | directory.read_only = " "; 49 | docker_context.symbol = " "; 50 | elixir.symbol = " "; 51 | elm.symbol = " "; 52 | gcloud.symbol = " "; 53 | golang.symbol = " "; 54 | java.symbol = " "; 55 | julia.symbol = " "; 56 | lua.symbol = " "; 57 | memory_usage.symbol = " "; 58 | nim.symbol = " "; 59 | nix_shell.symbol = " "; 60 | nodejs.symbol = " "; 61 | package.symbol = " "; 62 | perl.symbol = " "; 63 | php.symbol = " "; 64 | python.symbol = " "; 65 | ruby.symbol = " "; 66 | rust.symbol = " "; 67 | scala.symbol = " "; 68 | swift.symbol = "ﯣ "; 69 | terraform.symbol = "行 "; 70 | }; 71 | }; 72 | } -------------------------------------------------------------------------------- /users/alpha/programs/vscode/default.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs }: 2 | 3 | { 4 | home.packages = with pkgs; [ 5 | luaFormatter 6 | ]; 7 | 8 | programs.vscode = { 9 | enable = true; 10 | userSettings = { 11 | "workbench.colorTheme" = "Decayce Theme"; 12 | "workbench.iconTheme" = "material-icon-theme"; 13 | "editor.bracketPairColorization.enabled" = false; 14 | "editor.fontFamily" = "monospace"; 15 | "editor.fontLigatures" = true; 16 | "editor.cursorStyle" = "line-thin"; 17 | "editor.fontSize" = 16; 18 | "terminal.integrated.fontSize" = 16; 19 | "editor.defaultFormatter" = "Koihik.vscode-lua-format"; 20 | "vscode-lua-format.binaryPath" = "${pkgs.luaFormatter}/bin/lua-format"; 21 | "vscode-lua-format.configPath" = "${config.xdg.configHome}/LuaFormatter.cfg"; 22 | "window.menuBarVisibility" = "toggle"; 23 | "editor.tabSize" = 2; 24 | "editor.inlineSuggest.enabled" = true; 25 | "[python]"."editor.tabSize" = 4; 26 | }; 27 | extensions = with pkgs.vscode-extensions; [ 28 | bbenoist.nix 29 | esbenp.prettier-vscode 30 | naumovs.color-highlight 31 | svelte.svelte-vscode 32 | ms-vsliveshare.vsliveshare 33 | github.copilot 34 | ] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ 35 | { 36 | name = "volar"; 37 | publisher = "vue"; 38 | version = "1.0.12"; 39 | sha256 = "sha256-D9E3KRUOlNVXH4oMv1W0+/mbqO8Se7+6E2F5P/KvCro="; 40 | } 41 | { 42 | name = "vscode-typescript-vue-plugin"; 43 | publisher = "vue"; 44 | version = "1.0.12"; 45 | sha256 = "sha256-WiL+gc9+U861ubLlY/acR+ZcrFT7TdIDR0K1XNNidX8="; 46 | } 47 | { 48 | name = "decay"; 49 | publisher = "decaycs"; 50 | version = "1.0.6"; 51 | sha256 = "sha256-Jtxj6LmHgF7UNaXtXxHkq881BbuPtIJGxR7kdhKr0Uo="; 52 | } 53 | { 54 | name = "material-icon-theme"; 55 | publisher = "pkief"; 56 | version = "4.22.0"; 57 | sha256 = "sha256-U9P9BcuZi+SUcvTg/fC2SkjGRD4CvgJEc1i+Ft2OOUc="; 58 | } 59 | { 60 | name = "vscode-lua-format"; 61 | publisher = "koihik"; 62 | version = "1.3.8"; 63 | sha256 = "sha256-ACdjiy+Rj2wmxvSojaJmtCwyryWWB+OA/9hBEMJi39g="; 64 | } 65 | ]; 66 | }; 67 | 68 | xdg.configFile."LuaFormatter.cfg".text = '' 69 | indent_width: 2 70 | use_tab: false 71 | keep_simple_control_block_one_line: false 72 | keep_simple_function_one_line: false 73 | single_quote_to_double_quote: true 74 | chop_down_table: true 75 | chop_down_kv_table: true 76 | ''; 77 | } 78 | -------------------------------------------------------------------------------- /users/alpha/programs/wezterm/default.nix: -------------------------------------------------------------------------------- 1 | { builtins }: 2 | 3 | { 4 | programs.wezterm = { 5 | enable = true; 6 | extraConfig = import ./settings.nix { inherit builtins; }; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /users/alpha/programs/wezterm/settings.nix: -------------------------------------------------------------------------------- 1 | { builtins }: 2 | 3 | with builtins; readFile ./raw-config.lua 4 | -------------------------------------------------------------------------------- /users/alpha/theme/base16.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | 3 | { 4 | base00 = { hex.r = "0d"; hex.g = "0f"; hex.b = "18"; }; 5 | base01 = { hex.r = "11"; hex.g = "13"; hex.b = "1c"; }; 6 | base02 = { hex.r = "15"; hex.g = "17"; hex.b = "20"; }; 7 | base03 = { hex.r = "1c"; hex.g = "1e"; hex.b = "27"; }; 8 | base04 = { hex.r = "11"; hex.g = "13"; hex.b = "1c"; }; 9 | base05 = { hex.r = "a5"; hex.g = "b6"; hex.b = "cf"; }; 10 | base06 = { hex.r = "cb"; hex.g = "ce"; hex.b = "d3"; }; 11 | base07 = { hex.r = "0d"; hex.g = "0f"; hex.b = "18"; }; 12 | base08 = { hex.r = "dd"; hex.g = "67"; hex.b = "77"; }; 13 | base09 = { hex.r = "dd"; hex.g = "67"; hex.b = "77"; }; 14 | base0A = { hex.r = "ec"; hex.g = "d3"; hex.b = "a0"; }; 15 | base0B = { hex.r = "90"; hex.g = "ce"; hex.b = "aa"; }; 16 | base0C = { hex.r = "dd"; hex.g = "67"; hex.b = "77"; }; 17 | base0D = { hex.r = "86"; hex.g = "aa"; hex.b = "ec"; }; 18 | base0E = { hex.r = "c2"; hex.g = "96"; hex.b = "eb"; }; 19 | base0F = { hex.r = "86"; hex.g = "aa"; hex.b = "ec"; }; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /users/alpha/theme/colors.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | 3 | rec { 4 | bg-darker = "#0b0d16"; 5 | bg = "#0d0f18"; 6 | bg-contrast = "#0f111a"; 7 | bg-lighter = "#11131c"; 8 | black = "#151720"; 9 | dimblack = "#11131c"; 10 | light-black = "#1c1e27"; 11 | fg = "#a5b6cf"; 12 | white = "#cbced3"; 13 | grey = "#2b2d36"; 14 | red = "#dd6777"; 15 | yellow = "#ecd3a0"; 16 | magenta = "#c296eb"; 17 | green = "#90ceaa"; 18 | blue = "#86aaec"; 19 | cyan = "#93cee9"; 20 | } 21 | -------------------------------------------------------------------------------- /users/alpha/theme/nvim/default.nix: -------------------------------------------------------------------------------- 1 | { colors }: 2 | 3 | let 4 | nvim-theme = import ./theme.nix { inherit colors; }; 5 | in { 6 | xdg.configFile.nvim.source = ../../cfg/nvim; 7 | xdg.configFile."nvim-colors.lua".text = nvim-theme; 8 | } -------------------------------------------------------------------------------- /users/alpha/theme/nvim/theme.nix: -------------------------------------------------------------------------------- 1 | { colors }: 2 | 3 | with colors; '' 4 | local M = {} 5 | 6 | function M.get_palette() 7 | return { 8 | background = "${bg}", 9 | contrast = '${bg-darker}', 10 | statusline_bg = '${bg-contrast}', 11 | lighter = '${bg-lighter}', 12 | foreground = "${fg}", 13 | cursorline = '${bg-lighter}', 14 | comments = '${grey}', 15 | cursor = "${fg}", 16 | black = "${black}", 17 | red = "${red}", 18 | green = "${green}", 19 | yellow = "${yellow}", 20 | blue = "${blue}", 21 | magenta = "${magenta}", 22 | cyan = "${cyan}", 23 | white = "${white}", 24 | brightblack = "${grey}", 25 | brightred = "${red}", 26 | brightgreen = "${green}", 27 | brightyellow = "${yellow}", 28 | brightblue = "${blue}", 29 | brightmagenta = "${magenta}", 30 | brightcyan = "${cyan}", 31 | brightwhite = "${white}", 32 | accent = "${blue}", 33 | } 34 | end 35 | 36 | return M 37 | '' -------------------------------------------------------------------------------- /users/alpha/theme/raw-colors.nix: -------------------------------------------------------------------------------- 1 | {}: 2 | 3 | rec { 4 | bg-darker = "0b0d16"; 5 | bg = "0d0f18"; 6 | bg-contrast = "0f111a"; 7 | bg-lighter = "11131c"; 8 | black = "151720"; 9 | dimblack = "11131c"; 10 | light-black = "1c1e27"; 11 | fg = "a5b6cf"; 12 | white = "cbced3"; 13 | grey = "2b2d36"; 14 | red = "dd6777"; 15 | yellow = "ecd3a0"; 16 | magenta = "c296eb"; 17 | green = "90ceaa"; 18 | blue = "86aaec"; 19 | cyan = "93cee9"; 20 | } 21 | -------------------------------------------------------------------------------- /users/alpha/wayland/default.nix: -------------------------------------------------------------------------------- 1 | { ... }: 2 | 3 | { 4 | imports = [ 5 | ./hyprland 6 | ./waybar 7 | ./foot 8 | ]; 9 | } 10 | -------------------------------------------------------------------------------- /users/alpha/wayland/foot/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | let 4 | colors = import ../../theme/raw-colors.nix {}; 5 | in with colors; { 6 | programs.foot = { 7 | enable = true; 8 | settings = { 9 | main = { 10 | font = "Monaco Nerd Font:size=9"; 11 | dpi-aware = "no"; 12 | resize-delay-ms = 0; 13 | pad = "20x20"; 14 | }; 15 | cursor = { 16 | style = "beam"; 17 | beam-thickness = "1px"; 18 | color = "${bg} ${blue}"; 19 | }; 20 | colors = { 21 | foreground = fg; 22 | background = bg; 23 | regular0 = black; 24 | regular1 = red; 25 | regular2 = green; 26 | regular3 = yellow; 27 | regular4 = blue; 28 | regular5 = magenta; 29 | regular6 = cyan; 30 | regular7 = white; 31 | bright0 = light-black; 32 | bright1 = red; 33 | bright2 = green; 34 | bright3 = yellow; 35 | bright4 = blue; 36 | bright5 = magenta; 37 | bright6 = cyan; 38 | bright7 = white; 39 | }; 40 | }; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /users/alpha/wayland/hyprland/assets/wallpaper.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlphaTechnolog/nixdots/721caeae6c6dbf3d584b2b1595d8c69728b59e17/users/alpha/wayland/hyprland/assets/wallpaper.png -------------------------------------------------------------------------------- /users/alpha/wayland/hyprland/default.nix: -------------------------------------------------------------------------------- 1 | # took reference from rxyhn's dotfiles. 2 | { pkgs, ... }: 3 | 4 | let 5 | enable_animations = "yes"; 6 | colors = import ../../theme/raw-colors.nix {}; 7 | in { 8 | home.packages = with pkgs; [ 9 | wf-recorder 10 | wl-clipboard 11 | xdg-desktop-portal 12 | xdg-desktop-portal-gtk 13 | xdg-desktop-portal-wlr 14 | swaybg 15 | ]; 16 | 17 | wayland.windowManager.hyprland = { 18 | enable = true; 19 | systemdIntegration = true; 20 | extraConfig = import ./config.nix { 21 | inherit enable_animations colors; 22 | }; 23 | }; 24 | 25 | xdg.configFile.".wallpaper.png".source = ./assets/wallpaper.png; 26 | } 27 | -------------------------------------------------------------------------------- /users/alpha/wayland/waybar/config.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | let 4 | pavucontrol = "${pkgs.pavucontrol}/bin/pavucontrol"; 5 | in { 6 | mainBar = { 7 | layer = "top"; 8 | position = "left"; 9 | width = 40; 10 | modules-left = ["custom/launcher" "wlr/workspaces"]; 11 | modules-right = ["keyboard-state" "custom/settings" "pulseaudio" "network" "custom/hour" "custom/mins" "custom/powermenu"]; 12 | "custom/launcher" = { 13 | format = ""; 14 | on-click = "rofi -show drun"; 15 | tooltip = false; 16 | }; 17 | "wlr/workspaces" = { 18 | format = "{icon}"; 19 | on-click = "activate"; 20 | format-icons = { 21 | "1" = ""; 22 | "2" = "亂"; 23 | "3" = ""; 24 | "4" = ""; 25 | "5" = ""; 26 | "6" = ""; 27 | }; 28 | }; 29 | keyboard-state = { 30 | tooltip = false; 31 | numlock = false; 32 | capslock = true; 33 | format.capslock = "{icon}"; 34 | format-icons = { 35 | locked = ""; 36 | unlocked = ""; # an empty string will disable the module 37 | }; 38 | }; 39 | "custom/settings" = { 40 | format = ""; 41 | tooltip = false; 42 | }; 43 | pulseaudio = { 44 | format = "{icon}"; 45 | format-bluetooth = "{icon}"; 46 | format-muted = "婢"; 47 | on-click = "${pavucontrol}"; 48 | format-icons = { 49 | headphone = ""; 50 | default = ["" "" "墳" ""]; 51 | }; 52 | }; 53 | network = { 54 | format-wifi = ""; 55 | format-disconnected = "睊"; 56 | tooltip = false; 57 | }; 58 | "custom/hour" = { 59 | interval = 60; 60 | exec = "date '+%H'"; 61 | tooltip = false; 62 | }; 63 | "custom/mins" = { 64 | interval = 60; 65 | exec = "date '+%M'"; 66 | tooltip = false; 67 | }; 68 | "custom/powermenu" = { 69 | format = "襤"; 70 | tooltip = false; 71 | }; 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /users/alpha/wayland/waybar/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, ... }: 2 | 3 | let 4 | waybar_config = import ./config.nix { inherit pkgs; }; 5 | waybar_style = import ./style.nix; 6 | in { 7 | programs.waybar = { 8 | enable = true; 9 | package = pkgs.waybar.overrideAttrs (oldAttrs: { 10 | mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"]; 11 | patchPhase = '' 12 | substituteInPlace src/modules/wlr/workspace_manager.cpp --replace "zext_workspace_handle_v1_activate(workspace_handle_);" "const std::string command = \"${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch workspace \" + name_; system(command.c_str());" 13 | ''; 14 | }); 15 | settings = waybar_config; 16 | style = waybar_style; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /users/alpha/wayland/waybar/style.nix: -------------------------------------------------------------------------------- 1 | let 2 | colors = import ../../theme/colors.nix {}; 3 | in with colors; '' 4 | window#waybar { 5 | background: ${bg}; 6 | color: ${fg}; 7 | } 8 | 9 | #custom-launcher { 10 | border-radius: 4px; 11 | color: ${bg}; 12 | background: ${blue}; 13 | margin: 6px; 14 | font-family: BlexMono NF; 15 | font-size: 22px; 16 | } 17 | 18 | #workspaces { 19 | font-family: BlexMono Nerd Font Mono; 20 | font-size: 24px; 21 | } 22 | 23 | #workspaces button { 24 | all: unset; 25 | border-radius: 4px; 26 | transition: all ease 0.6s; 27 | margin: 2px 6px; 28 | } 29 | 30 | #workspaces button:hover { 31 | background: ${dimblack}; 32 | } 33 | 34 | #workspaces button.active { 35 | color: ${magenta}; 36 | background: ${black}; 37 | border-left: solid 1px ${magenta}; 38 | border-top-left-radius: 0px; 39 | border-bottom-left-radius: 0px; 40 | } 41 | 42 | #keyboard-state { 43 | font-family: BlexMono Nerd Font; 44 | font-size: 14px; 45 | padding-right: 6px; 46 | color: ${yellow}; 47 | } 48 | 49 | #custom-settings { 50 | all: unset; 51 | font-family: BlexMono Nerd Font Mono; 52 | font-size: 20px; 53 | margin: 6px 6px 0px 6px; 54 | padding: 0px 2px 0px 0px; 55 | color: ${fg}; 56 | background-color: ${black}; 57 | border-radius: 4px; 58 | } 59 | 60 | #pulseaudio { 61 | border-top-left-radius: 4px; 62 | border-top-right-radius: 4px; 63 | font-size: 26px; 64 | font-family: BlexMono NF; 65 | color: ${cyan}; 66 | background-color: ${black}; 67 | margin: 6px 6px 0px 6px; 68 | } 69 | 70 | #network { 71 | border-bottom-left-radius: 4px; 72 | border-bottom-right-radius: 4px; 73 | font-size: 14px; 74 | font-family: BlexMono Nerd Font; 75 | padding: 4px 7px 6px 0px; 76 | color: ${green}; 77 | background-color: ${black}; 78 | margin: 0px 6px 6px 6px; 79 | } 80 | 81 | #custom-hour { 82 | margin: 0px 6px; 83 | padding-top: 4px; 84 | font-family: BlexMono Nerd Font; 85 | font-size: 13px; 86 | border-top-left-radius: 4px; 87 | border-top-right-radius: 4px; 88 | background-color: ${black}; 89 | color: ${fg}; 90 | } 91 | 92 | #custom-mins { 93 | border-bottom-left-radius: 4px; 94 | border-bottom-right-radius: 4px; 95 | background-color: ${black}; 96 | color: ${fg}; 97 | padding: 4px 0px; 98 | margin-bottom: 4px; 99 | font-family: BlexMono Nerd Font; 100 | font-size: 13px; 101 | margin-left: 6px; 102 | margin-right: 6px; 103 | } 104 | 105 | #custom-powermenu { 106 | all: unset; 107 | font-family: BlexMono Nerd Font Mono; 108 | font-size: 20px; 109 | margin: 0px 6px 4px; 110 | color: ${red}; 111 | border-radius: 4px; 112 | background-color: ${black}; 113 | } 114 | '' 115 | --------------------------------------------------------------------------------