1
Fork 0

Removed uneeded udev rules + some wayland stuff

This commit is contained in:
Matei Adriel 2023-05-28 00:40:59 +02:00
parent 11fc0f67bf
commit 5c076b8989
No known key found for this signature in database
3 changed files with 11 additions and 13 deletions

View file

@ -1,6 +1,6 @@
# Common wayland stuff # Common wayland stuff
{ lib, pkgs, upkgs, ... }: { { lib, pkgs, upkgs, ... }: {
imports = [ ../common/wofi.nix ]; imports = [ ./wofi.nix ./dunst.nix ];
# Makes some stuff run on wayland (?) # Makes some stuff run on wayland (?)
# Taken from [here](https://github.com/fufexan/dotfiles/blob/3b0075fa7a5d38de13c8c32140c4b020b6b32761/home/wayland/default.nix#L14) # Taken from [here](https://github.com/fufexan/dotfiles/blob/3b0075fa7a5d38de13c8c32140c4b020b6b32761/home/wayland/default.nix#L14)
@ -26,23 +26,29 @@
let let
_ = lib.getExe; _ = lib.getExe;
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
# TODO: put this in it's own file perhaps? # TODO: put this in it's own file perhaps?
# Taken from [here](https://github.com/fufexan/dotfiles/blob/3b0075fa7a5d38de13c8c32140c4b020b6b32761/home/wayland/default.nix#L14) # Taken from [here](https://github.com/fufexan/dotfiles/blob/3b0075fa7a5d38de13c8c32140c4b020b6b32761/home/wayland/default.nix#L14)
wl-ocr = pkgs.writeShellScriptBin "wl-ocr" '' wl-ocr = pkgs.writeShellScriptBin "wl-ocr" ''
${_ pkgs.grim} -g "$(${_ pkgs.slurp})" -t ppm - \ ${_ pkgs.grim} -g "$(${_ pkgs.slurp})" -t ppm - \
| ${_ pkgs.tesseract5} - - \ | ${_ pkgs.tesseract5} - - \
| ${pkgs.wl-clipboard}/bin/wl-copy | ${wl-copy}
${_ pkgs.libnotify} "Run ocr on area with output \"$(${wl-paste})\""
''; '';
in in
with pkgs; [ with pkgs; [
# utils # Utils
libnotify # Send notifications
wl-ocr # Custom ocr script wl-ocr # Custom ocr script
wl-clipboard # Clipboard manager wl-clipboard # Clipboard manager
wlogout # Nice logout script wlogout # Nice logout script
# REASON: not available on stable yet # REASON: not available on stable yet
upkgs.hyprpicker # Color picker upkgs.hyprpicker # Color picker
# screenshot related tools # Screenshot related tools
grim # Take screenshot grim # Take screenshot
slurp # Area selector slurp # Area selector
]; ];

View file

@ -58,7 +58,7 @@ bind = $mod, F, fullscreen, # Fullscreen
# Execute external things # Execute external things
bind = $mod, return, exec, NO_TMUX=1 wezterm # Launch wezterm bind = $mod, return, exec, NO_TMUX=1 wezterm # Launch wezterm
bind = $mod, T, exec, wl-ocr # Use ocr script bind = $mod, T, exec, wl-ocr # Use ocr script
bind = $mod SHIFT, T, exec, hyprpicker -a # Color picker bind = $mod SHIFT, T, exec, hyprpicker | wl-copy && libnotify "Copied color $(wp-paste)" # Color picker
bind = $mod, Q, exec, wlogout # Show logout menu bind = $mod, Q, exec, wlogout # Show logout menu
bind = $mod, L, exec, loginctl lock-session # Lock screen bind = $mod, L, exec, loginctl lock-session # Lock screen
bind = $mod, P, exec, wofi --show drun # Launch app bind = $mod, P, exec, wofi --show drun # Launch app

View file

@ -10,14 +10,6 @@ in
# Password file stored through agenix # Password file stored through agenix
age.secrets.adrielusPassword.file = ./adrielus_password.age; age.secrets.adrielusPassword.file = ./adrielus_password.age;
# Temporary stuff until I package my keyboard script
users.groups.uinput = { };
services.udev.extraRules =
''
# Access to /dev/uinput
KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"
'';
users = { users = {
# Configure users through nix only # Configure users through nix only
mutableUsers = false; mutableUsers = false;