aboutsummaryrefslogtreecommitdiff
path: root/share/home/hyprdesktop.nix
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-04-06 20:08:58 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-04-06 20:39:25 +0200
commit661d4964d99a0a5cbab358643c6a271422e0d001 (patch)
tree9ebc3d6316a1333a39b9817acb3753d8cdbfff7f /share/home/hyprdesktop.nix
parent1c716c86fd1f038e2e0a566593ba04676628b5e8 (diff)
Programming Feng Shui praxis
Diffstat (limited to 'share/home/hyprdesktop.nix')
-rw-r--r--share/home/hyprdesktop.nix224
1 files changed, 0 insertions, 224 deletions
diff --git a/share/home/hyprdesktop.nix b/share/home/hyprdesktop.nix
deleted file mode 100644
index 0adaf43..0000000
--- a/share/home/hyprdesktop.nix
+++ /dev/null
@@ -1,224 +0,0 @@
-# Module containing a bunch of things that make up a `desktop environment` built
-# off of hyprland. I install this on all my desktop/laptop machines.
-# IMPORTANT: this module requires the system to already have `programs.hyprland`
-# enabled.
-{ pkgs, config, ... }: {
- imports = [
- # Custom home manager modules
- ../hm-modules/wpaperd.nix
- ../hm-modules/tofi.nix
-
- # Config
- ./minimal.nix
- ./wpaperd.nix
- ./tofi.nix
- ./waybar.nix
- ./git.nix
- ./mpv.nix
- ./kitty.nix
- ./offpunk.nix
- ./firefox
- ./helix.nix
- ];
-
- wayland.windowManager.hyprland =
- let
- programs = {
- audio = {
- increase = "wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%+";
- decrease = "wpctl set-volume @DEFAULT_AUDIO_SINK@ --limit 1.0 5%-";
- toggle-mute = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
- };
- screenshot = ''grim -g "$(slurp)" -t png - | wl-copy --type image/png'';
- cmd = {
- run = "tofi-run";
- drun = "tofi-drun";
- };
- brightness = {
- increase = "brightnessctl set +5%";
- decrease = "brightnessctl set 5%-";
- };
- terminal = "kitty";
- };
- in
- {
- enable = true;
- extraConfig = ''
- $mod = SUPER
-
- bind = $mod SHIFT, Return, exec, ${programs.terminal}
-
- general {
- layout = master
- }
-
- master {
- mfact = 0.5
- new_is_master = false
- }
-
- # workspaces
- # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
- ${builtins.concatStringsSep "\n" (builtins.genList (x:
- let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
- in ''
- bind = $mod, ${ws}, workspace, ${toString (x + 1)}
- bind = $mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}
- '') 10)}
-
- bind = $mod SHIFT, C, killactive
- bind = $mod SHIFT, F, togglefloating
- bind = $mod SHIFT, Q, exit
- bind = $mod, P, exec, ${programs.cmd.drun}
- bind = $mod SHIFT, P, exec, ${programs.cmd.run}
-
- bind = $mod, H, cyclenext, prev
- bind = $mod, L, cyclenext
- bind = $mod SHIFT, H, swapnext, prev
- bind = $mod SHIFT, L, swapnext
-
- # audio control
- binde =, XF86AudioRaiseVolume, exec, ${programs.audio.increase}
- binde =, XF86AudioLowerVolume, exec, ${programs.audio.decrease}
- bind =, XF86AudioMute, exec, ${programs.audio.toggle-mute}
-
- # monitor brightness control
- binde =, XF86MonBrightnessUp, exec, ${programs.brightness.increase}
- binde =, XF86MonBrightnessDown, exec, ${programs.brightness.decrease}
-
- # Screenshotting
- # My stupid laptop outputs these three key codes when the PrtSc key is
- # pressed instead of using just one code like any sane device would
- bind = SUPER SHIFT, S, exec, ${programs.screenshot}
-
- input {
- # focus change on cursor move
- follow_mouse = 1
- accel_profile = flat
- }
- monitor=,preferred,auto,1
-
- # set opacity to 0.9 active and 0.5 inactive for kitty
- windowrule = opacity 0.9 override 0.5 override,^(kitty)$
-
- # Move windows to their designated workspaces
- windowrulev2 = workspace 3,class:(firefox)
- windowrulev2 = workspace 4,class:(fluffychat)
- windowrulev2 = workspace 4,class:(org.telegram.desktop)
- windowrulev2 = workspace 4,class:(Signal)
- windowrulev2 = workspace 5,class:(Bitwarden)
-
- # workaround for https://github.com/hyprwm/Hyprland/issues/2661
- windowrulev2 = stayfocused, title:^()$,class:^(steam)$
- windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
-
- # No fade-in animation for the lanucher
- layerrule = noanim, launcher
- '';
- };
-
- home.packages = with pkgs; [
- xh # Nice to use HTTP client
- bc # CLI calculator
- amfora # Gemini CLI browser
- trashy # Trash CLI
- tokei # counts lines of code
- btop # modern top
- brightnessctl
- wineWowPackages.full
- winetricks
- qemu_kvm
- wireplumber # session & policy manager for pipewire
- grim # screenshot utility for wayland
- slurp # region selection UI for wayland
- wl-clipboard # clipboard utility
- nushell # next-generation shell
- ffmpeg
- imagemagick
- exiftool
- sl
- jaq # json query tool
- git-annex
- git-remote-gcrypt
- # tools for dealing with all sorts archives
- atool
- unzip
- gnutar
- unrar-wrapper
- # Useful nix tooling
- nix-tree
- fzf
-
- # TUI/GUI programs
- cmus # music player
- calibre # Document organisation/reading program
- libreoffice-qt
- beekeeper-studio # SQL database client
- thunderbird # email client
- nsxiv # image viewer
- discord
- signal-desktop
- tdesktop # Telegram desktop
- fluffychat # matrix client
- qbittorrent # bittorrent client
- zathura # document reader
- bitwarden # password manager
- heroic # FOSS game launcher for GOG & Epic
- foliate
-
- # Gaming
- jdk17_headless
- superTuxKart
-
- # Other
- # It seems that not all gtk icon themes contain all icons? At least the
- # Flat-Remix icon themes don't contain all the icons that Foliate uses,
- # so I'm bringing in the adwaita icons as a fallback.
- gnome3.adwaita-icon-theme
- ];
-
- home.shellAliases = {
- sl = "sl -awFc5";
- };
-
- services.dunst.enable = true;
-
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true;
- };
-
- xdg = {
- systemDirs.data =
- let
- gds = pkgs.gsettings-desktop-schemas;
- gtk3 = pkgs.gtk3;
- in
- [
- "${gds}/share/gsettings-schemas/${gds.name}"
- "${gtk3}/share/gsettings-schemas/${gtk3.name}"
- ];
- userDirs =
- let
- annex = "${config.home.homeDirectory}/Annex";
- in
- {
- enable = true;
- createDirectories = true;
- pictures = "${annex}/Pictures";
- music = "${annex}/Music";
- documents = "${annex}/Documents";
- };
- };
-
- gtk = {
- theme = {
- package = pkgs.flat-remix-gtk;
- name = "Flat-Remix-GTK-Blue-Darkest";
- };
- iconTheme = {
- package = pkgs.flat-remix-icon-theme;
- name = "Flat-Remix-Blue-Dark";
- };
- };
-}