mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-09-07 12:10:45 +02:00
merge
This commit is contained in:
@@ -45,9 +45,7 @@
|
||||
|
||||
set -l rel_file (realpath --relative-to=$config_dir $file)
|
||||
|
||||
if home-manager switch --flake "$config_dir#${
|
||||
if isNixOS then "nixos" else "arch"
|
||||
}" -b backup
|
||||
if nh home switch $config_dir -c ${if isNixOS then "nixos" else "arch"}
|
||||
git add -A
|
||||
set commit_msg "update: $rel_file"
|
||||
git commit -m "$commit_msg"
|
||||
@@ -61,6 +59,11 @@
|
||||
'';
|
||||
};
|
||||
|
||||
reload_dotfiles = {
|
||||
body = # fish
|
||||
"nh home switch ~/.config/home-manager -c ${if isNixOS then "nixos" else "arch"}";
|
||||
};
|
||||
|
||||
ls = {
|
||||
body = # fish
|
||||
"eza --long --icons --group-directories-first --git $argv";
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
gtk.enable = true;
|
||||
gtk = {
|
||||
enable = true;
|
||||
colorScheme = "dark";
|
||||
};
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ ... }:
|
||||
{ isNixOS, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.mako = {
|
||||
@@ -20,7 +20,11 @@
|
||||
border-color = "#89b4fa";
|
||||
progress-color = "over #313244";
|
||||
output = "DP-1";
|
||||
on-notify = "exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga";
|
||||
on-notify =
|
||||
if isNixOS then
|
||||
"exec ${pkgs.pulseaudio}/bin/paplay ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/dialog-information.oga"
|
||||
else
|
||||
"exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga";
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
@@ -31,7 +35,13 @@
|
||||
border-color=#FF6347
|
||||
|
||||
[urgency=critical]
|
||||
on-notify=exec paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga
|
||||
on-notify =
|
||||
${
|
||||
if isNixOS then
|
||||
"exec ${pkgs.pulseaudio}/bin/paplay ${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/dialog-information.oga"
|
||||
else
|
||||
"exec paplay /usr/share/sounds/freedesktop/stereo/dialog-information.oga"
|
||||
};
|
||||
border-color=#FF0000
|
||||
|
||||
[mode=do-not-disturb]
|
||||
|
||||
@@ -6,7 +6,22 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
exe = pkg: bin: if isNixOS then "${pkg}/bin/${bin}" else "/usr/bin/${bin}";
|
||||
|
||||
jq = exe pkgs.jq "jq";
|
||||
grim = exe pkgs.grim "grim";
|
||||
satty = exe pkgs.satty "satty";
|
||||
wl_copy = exe pkgs.wl-clipboard "wl-copy";
|
||||
notify_send = exe pkgs.libnotify "notify-send";
|
||||
xdg-desktop-portal-hyprland =
|
||||
if isNixOS then
|
||||
"${pkgs.xdg-desktop-portal-hyprland}/libexec/xdg-desktop-portal-hyprland"
|
||||
else
|
||||
"/usr/lib/xdg-desktop-portal-hyprland";
|
||||
hyprlock = exe pkgs.hyprlock "hyprlock";
|
||||
playerctl = exe pkgs.playerctl "playerctl";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
@@ -108,9 +123,9 @@
|
||||
};
|
||||
|
||||
permission = [
|
||||
".*(grim), screencopy, allow"
|
||||
".*(hyprlock), screencopy, allow"
|
||||
".*(xdg-desktop-portal-hyprland), screencopy, allow"
|
||||
"^${grim}$, screencopy, allow"
|
||||
"^${hyprlock}$, screencopy, allow"
|
||||
"^${xdg-desktop-portal-hyprland}$, screencopy, allow"
|
||||
];
|
||||
|
||||
input = {
|
||||
@@ -294,19 +309,36 @@
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle && ~/.local/bin/check-if-muted.sh"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", Pause, exec, playerctl play-pause"
|
||||
"$mainMod, Pause, exec, playerctl play-pause --player spotify"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindt = [
|
||||
", PRINT, exec, ~/.local/bin/screenshot.sh region"
|
||||
"$mainMod, PRINT, exec, ~/.local/bin/screenshot.sh fullscreen"
|
||||
"alt_l, PRINT, exec, ~/.local/bin/screenshot.sh window"
|
||||
", PRINT, exec, ${pkgs.writeShellScript "screenshot-region" ''
|
||||
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')
|
||||
${grim} -o "$MONITOR" - | ${satty} -f -
|
||||
''}"
|
||||
|
||||
"$mainMod, PRINT, exec, ${pkgs.writeShellScript "screenshot-fullscreen" ''
|
||||
target_path="$HOME/${userConfig.pathConfig.screenshot}/$(date +'%d-%m-%Y_%H-%M-%S').png"
|
||||
mkdir -p "$(dirname "$target_path")"
|
||||
|
||||
MONITOR=$(hyprctl monitors -j | ${jq} -r '.[] | select(.focused == true) | .name')
|
||||
|
||||
${grim} -o "$MONITOR" "$target_path"
|
||||
${wl_copy} < "$target_path"
|
||||
${notify_send} -i "$target_path" -u low -a "Screenshot" "Screenshot fullscreen" "Saved and copied"
|
||||
''}"
|
||||
|
||||
"alt_l, PRINT, exec, ${pkgs.writeShellScript "screenshot-window" ''
|
||||
target_path="$HOME/${userConfig.pathConfig.screenshot}/$(date +'%d-%m-%Y_%H-%M-%S').png"
|
||||
mkdir -p "$(dirname "$target_path")"
|
||||
|
||||
GEOMETRY=$(hyprctl activewindow -j | ${jq} -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
|
||||
|
||||
${grim} -g "$GEOMETRY" "$target_path"
|
||||
${wl_copy} < "$target_path"
|
||||
${notify_send} -i "$target_path" -u low -a "Screenshot" "Screenshot window" "Saved and copied"
|
||||
''}"
|
||||
|
||||
", PAUSE, exec, ${playerctl} play-pause"
|
||||
"$mainMod, PAUSE, exec, ${playerctl} play-pause --player spotify"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
|
||||
Reference in New Issue
Block a user