Skip to content

Commit

Permalink
[refactor]: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rxyhn committed Jan 6, 2024
1 parent 2b1af3a commit 340dd2b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
3 changes: 3 additions & 0 deletions home/modules/programs/firefox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ in {
"media.rdd-ffmpeg.enabled" = true;
"widget.dmabuf.force-enabled" = true;
};

userChrome = ''
@import "${firefox-gnome-theme}/share/firefox-gnome-theme/userChrome.css";
'';

userContent = ''
@import "${firefox-gnome-theme}/share/firefox-gnome-theme/userContent.css";
'';

extraConfig = builtins.readFile "${firefox-gnome-theme}/share/firefox-gnome-theme/configuration/user.js";
};
};
Expand Down
3 changes: 3 additions & 0 deletions home/modules/programs/kitty.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{...}: {
home.sessionVariables.TERMINAL = "kitty";

programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
theme = "Nord";

settings = {
active_tab_font_style = "bold";
background = "#000000";
Expand Down Expand Up @@ -36,6 +38,7 @@
window_margin_width = 0;
window_padding_width = 15;
};

keybindings = {
"ctrl+shift+v" = "paste_from_clipboard";
"ctrl+shift+s" = "paste_from_selection";
Expand Down
13 changes: 1 addition & 12 deletions home/modules/shell/scripts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
lib,
config,
...
}: let
ocrScript = let
inherit (pkgs) grim libnotify slurp tesseract5 wl-clipboard;
_ = lib.getExe;
in
pkgs.writeShellScriptBin "wl-ocr" ''
${_ grim} -g "$(${_ slurp})" -t ppm - | ${_ tesseract5} - - | ${wl-clipboard}/bin/wl-copy
${_ libnotify} "$(${wl-clipboard}/bin/wl-paste)"
'';
in {
}: {
imports = [./run-as-service.nix];
home = {
sessionPath = [
Expand All @@ -35,7 +26,5 @@ in {
text = import ./extract.nix {inherit lib pkgs;};
};
};

packages = [ocrScript];
};
}
13 changes: 13 additions & 0 deletions home/modules/windowManager/hyprland/config/binds.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
lib,
config,
pkgs,
...
}: let
ocrScript = let
inherit (pkgs) grim libnotify slurp tesseract5 wl-clipboard;
_ = lib.getExe;
in
pkgs.writeShellScriptBin "wl-ocr" ''
${_ grim} -g "$(${_ slurp})" -t ppm - | ${_ tesseract5} - - | ${wl-clipboard}/bin/wl-copy
${_ libnotify} "$(${wl-clipboard}/bin/wl-paste)"
'';

screenshotarea = "hyprctl keyword animation 'fadeOut,0,0,default'; grimblast --notify copysave area; hyprctl keyword animation 'fadeOut,1,4,default'";

workspaces = builtins.concatLists (builtins.genList (
Expand All @@ -22,6 +32,8 @@
browser = config.home.sessionVariables.BROWSER;
editor = config.home.sessionVariables.EDITOR;
in {
home.packages = [ocrScript];

wayland.windowManager.hyprland = {
settings = {
bind = let
Expand Down Expand Up @@ -84,6 +96,7 @@ in {
"SUPER ALT, mouse:272, resizewindow"
];
};

extraConfig = ''
bind = SUPERSHIFT, S, submap, resize
Expand Down
4 changes: 0 additions & 4 deletions home/modules/windowManager/hyprland/services/dunst.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
_ = lib.getExe;
in
pkgs.writeShellScriptBin "volumectl" ''
#!/usr/bin/env sh
case "$1" in
up)
${_ pamixer} -i "$2"
Expand Down Expand Up @@ -47,8 +45,6 @@
_ = lib.getExe;
in
pkgs.writeShellScriptBin "lightctl" ''
#!/usr/bin/env sh
case "$1" in
up)
${_ brightnessctl} -q s +"$2"%
Expand Down

0 comments on commit 340dd2b

Please sign in to comment.