Fixed screenshotting, added screenshot directory, made rofi contextual

This commit is contained in:
Tyler Kelley 2024-02-07 22:47:47 -06:00
parent 01bbdaeca2
commit 311982ab44
8 changed files with 44 additions and 5 deletions

BIN
.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -14,6 +14,7 @@
./starship.nix
./style1-waybar.nix
./style2-waybar.nix
./swappy.nix
./swaylock.nix
./swaync.nix

View File

@ -126,12 +126,12 @@ in with lib; {
new_is_master = true
}
bind = ${modifier},Return,exec,kitty
bind = ${modifier}SHIFT,Return,exec,rofi -show drun
bind = ${modifier}SHIFT,Return,exec,rofi-launcher
bind = ${modifier}SHIFT,W,exec,web-search
bind = ${modifier}SHIFT,S,exec,swaync-client -rs
bind = ${modifier},W,exec,${browser}
bind = ${modifier},E,exec,emopicker9000
bind = ${modifier},S,exec,grim -g "$(slurp)" - | swappy -f -
bind = ${modifier},S,exec,screenshootin
bind = ${modifier},D,exec,discord
bind = ${modifier},O,exec,obs
bind = ${modifier},G,exec,gimp

View File

@ -22,5 +22,7 @@ in {
(import ./../scripts/theme-selector.nix { inherit pkgs; })
(import ./../scripts/nvidia-offload.nix { inherit pkgs; })
(import ./../scripts/web-search.nix { inherit pkgs; })
(import ./../scripts/rofi-launcher.nix { inherit pkgs; })
(import ./../scripts/screenshootin.nix { inherit pkgs; })
];
}

18
config/home/swappy.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs, config, ... }:
let
inherit (import ../../options.nix) screenshotDir;
in {
home.file.".config/swappy/config".text = ''
[Default]
save_dir=${screenshotDir}
save_filename_format=swappy-%Y%m%d-%H%M%S.png
show_panel=false
line_size=5
text_size=20
text_font=Ubuntu
paint_mode=brush
early_exit=true
fill_shape=false
'';
}

View File

@ -0,0 +1,10 @@
{ pkgs }:
pkgs.writeShellScriptBin "rofi-launcher" ''
if pgrep -x "rofi" > /dev/null; then
# Rofi is running, kill it
pkill -x rofi
exit 0
fi
rofi -show drun
''

View File

@ -0,0 +1,5 @@
{ pkgs }:
pkgs.writeShellScriptBin "screenshootin" ''
grim -g "$(slurp)" - | swappy -f -
''

View File

@ -2,7 +2,9 @@
# VALUES FOR THIS PAGE.
# https://gitlab.com/Zaney/zaneyos/-/wikis/Setting-Options
{
let
userHome = "/home/zaney";
in {
# User Variables
gitUsername = "Tyler Kelley";
gitEmail = "tylerzanekelley@gmail.com";
@ -11,8 +13,9 @@
borderAnim = true; # anything other than on disables anim borders in Hyprland
browser = "firefox";
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
wallpaperDir = "/home/zaney/Pictures/Wallpapers";
flakeDir = "/home/zaney/zaneyos";
wallpaperDir = "${userHome}/Pictures/Wallpapers";
flakeDir = "${userHome}/zaneyos";
screenshotDir = "${userHome}/Pictures/Screenshots";
# System Settings
theLocale = "en_US.UTF-8";