summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configuration.nix10
-rwxr-xr-xhome.nix51
-rwxr-xr-xhypr/hypridle.conf16
-rwxr-xr-xhypr/hyprland.conf214
-rwxr-xr-xhypr/hyprlock.conf50
-rwxr-xr-xhypr/hyprpaper.conf2
-rwxr-xr-xhypr/monitors.conf5
-rwxr-xr-xmango/config.conf2
-rwxr-xr-xmango/screenshotwayland.sh (renamed from hypr/screenshotwayland.sh)6
9 files changed, 58 insertions, 298 deletions
diff --git a/configuration.nix b/configuration.nix
index bedbe1a..d3606f0 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -73,6 +73,7 @@
nixpkgs.config.allowUnfree = true;
+ security.pam.services.swaylock = {};
services.tailscale.enable = true;
services.blueman.enable = true;
services.logind.settings.Login = {
@@ -156,9 +157,8 @@
ferdium
spotify-player
wl-clipboard
- hypridle
- hyprlock
- hyprshot
+ grim
+ slurp
trash-cli
nh
mosh
@@ -192,10 +192,6 @@
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;
};
- # programs.hyprland = {
- # enable = true;
- # xwayland.enable = true;
- # };
programs.firefox.enable = true;
programs.thunar = {
enable = true;
diff --git a/home.nix b/home.nix
index 39054f1..fc6848d 100755
--- a/home.nix
+++ b/home.nix
@@ -16,7 +16,6 @@ let
qutebrowser = "qutebrowser";
dunst = "dunst";
waybar = "waybar";
- hypr = "hypr";
rmpc = "rmpc";
fastfetch = "fastfetch";
mutt = "mutt";
@@ -28,6 +27,56 @@ let
};
in
{
+ programs.swaylock = {
+ enable = true;
+ settings = {
+ font-size = 24;
+ indicator-idle-visible = false;
+ show-failed-attempts = true;
+ };
+ };
+ services.swayidle =
+ let
+ # Lock command
+ lock = "${pkgs.swaylock}/bin/swaylock --daemonize";
+ suspend = "systemctl suspend";
+ in
+ {
+ enable = true;
+ timeouts = [
+ {
+ timeout = 290; # in seconds
+ command = "${pkgs.libnotify}/bin/notify-send 'Locking in 10 seconds' -t 10000";
+ }
+ {
+ timeout = 300;
+ command = lock;
+ }
+ {
+ timeout = 800;
+ command = "${pkgs.systemd}/bin/systemctl suspend";
+ }
+ ];
+ events = [
+ # {
+ # event = "before-sleep";
+ # # adding duplicated entries for the same event may not work
+ # command = (display "off") + "; " + lock;
+ # }
+ # {
+ # event = "after-resume";
+ # command = display "on";
+ # }
+ # {
+ # event = "lock";
+ # command = (display "off") + "; " + lock;
+ # }
+ # {
+ # event = "unlock";
+ # command = display "on";
+ # }
+ ];
+ };
programs.bash = {
enable = true;
enableCompletion = true;
diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf
deleted file mode 100755
index 197f65f..0000000
--- a/hypr/hypridle.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-general {
- ignore_dbus_inhibit=false
- lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
- before_sleep_cmd = loginctl lock-session # lock before suspend.
- after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
-}
-
-listener {
- timeout=300
- on-timeout=hyprlock
-}
-
-listener {
- timeout=800
- on-timeout=systemctl suspend
-}
diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf
deleted file mode 100755
index e448bd4..0000000
--- a/hypr/hyprland.conf
+++ /dev/null
@@ -1,214 +0,0 @@
-monitor=,preferred,auto,auto
-
-input {
- kb_layout = us
- kb_options = caps:escape
-}
-
-#################
-### AUTOSTART ###
-################
-
-exec-once = nm-applet &
-exec-once = systemctl --user start hyprpolkitagent
-exec-once = dunst &
-exec-once = waybar
-exec-once = hypridle
-exec-once = playerctl daemon &
-exec-once = xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1
-exec-once = xinput set-prop 10 "libinput Natural Scrolling Enabled" 1
-exec-once = swww-daemon &
-exec-once = swww img /home/anand/dots/walls/wallpaper.png
-exec-once = copyq &
-exec-once = xrdb ~/.Xresources &
-
-#############################
-### ENVIRONMENT VARIABLES ###
-#############################
-
-env = XCURSOR_SIZE,24
-env = HYPRCURSOR_SIZE,24
-
-#####################
-### LOOK AND FEEL ###
-#####################
-
-general {
- gaps_in = 2
- gaps_out = 2
- border_size = 1
- col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
- col.inactive_border = rgba(595959aa)
- resize_on_border = false
- allow_tearing = false
- layout = master
-}
-
-dwindle {
- force_split=2
-}
-
-decoration {
- rounding = 10
- # active_opacity = 1.0
- # inactive_opacity = 0.8
- blur {
- enabled = false
- }
-}
-
-animations {
- enabled = true
- animation = windows, 1, 3, default
- animation = windowsOut, 1, 3, default, popin 80%
- animation = border, 1, 3, default
- animation = borderangle, 1, 3, default
- animation = fade, 1, 3, default
- animation = workspaces, 1, 3, default
-}
-
-master {
- new_status = inherit
-}
-
-misc {
- force_default_wallpaper = 0
- disable_hyprland_logo = true
-}
-
-
-#############
-### INPUT ###
-#############
-
-input {
- kb_layout = us
- # kb_options = caps:swapescape
- follow_mouse = 1
- sensitivity = -0.1
- touchpad {
- natural_scroll = true
- middle_button_emulation = true
- tap-and-drag = true
- tap-to-click = true
- drag_lock = true
- disable_while_typing = true
- }
- # Turning this on fucks with the sensitivity, no clue why
- # force_no_accel = true
-}
-
-gestures {
- workspace_swipe_touch = true
-}
-
-device {
- name = synps/2-synaptics-touchpad
- sensitivity = 0
-}
-
-
-###################
-### KEYBINDINGS ###
-###################
-
-$mainMod = SUPER # Sets "Windows" key as main modifier
-$terminal = wezterm
-$fileManager = thunar
-$textEditor = $terminal -e nvim
-$menu = rofi -show drun
-$browser = firefox
-
-bind = $mainMod, Return, exec, $terminal
-bind = $mainMod, Q, killactive,
-bind = $mainMod, E, exec, $fileManager
-bind = $mainMod SHIFT, E, exit
-bind = $mainMod, A, exec, $textEditor
-bind = $mainMod, T, togglefloating,
-bind = $mainMod, SPACE, exec, $menu
-bind = $mainMod, B, exec, $browser
-bind = $mainMod, M, fullscreen, 1
-bind = $mainMod SHIFT, M, fullscreen, 0
-bind = $mainMod, P, exec, passmenu
-bind = $mainMod, period, exec, rofi -show emoji
-bind = $mainMod SHIFT, S, exec, .config/hypr/screenshotwayland.sh
-bind = $mainMod, V, exec, copyq toggle
-bind = $mainMod SHIFT, P, exec, playerctl play-pause
-
-bind = $mainMod SHIFT, left, movewindow, l
-bind = $mainMod SHIFT, right, movewindow, r
-bind = $mainMod SHIFT, up, movewindow, u
-bind = $mainMod SHIFT, down, movewindow, d
-
-bind = $mainMod SHIFT, H, movewindow, l
-bind = $mainMod SHIFT, L, movewindow, r
-bind = $mainMod SHIFT, K, movewindow, u
-bind = $mainMod SHIFT, J, movewindow, d
-
-bind = $mainMod, left, movefocus, l
-bind = $mainMod, right, movefocus, r
-bind = $mainMod, up, movefocus, u
-bind = $mainMod, down, movefocus, d
-
-bind = $mainMod, H, movefocus, l
-bind = $mainMod, L, movefocus, r
-bind = $mainMod, K, movefocus, u
-bind = $mainMod, J, movefocus, d
-
-bind = $mainMod, 1, workspace, 1
-bind = $mainMod, 2, workspace, 2
-bind = $mainMod, 3, workspace, 3
-bind = $mainMod, 4, workspace, 4
-bind = $mainMod, 5, workspace, 5
-bind = $mainMod, 6, workspace, 6
-bind = $mainMod, 7, workspace, 7
-bind = $mainMod, 8, workspace, 8
-bind = $mainMod, 9, workspace, 9
-bind = $mainMod, 0, workspace, 10
-
-bind = $mainMod SHIFT, 1, movetoworkspace, 1
-bind = $mainMod SHIFT, 2, movetoworkspace, 2
-bind = $mainMod SHIFT, 3, movetoworkspace, 3
-bind = $mainMod SHIFT, 4, movetoworkspace, 4
-bind = $mainMod SHIFT, 5, movetoworkspace, 5
-bind = $mainMod SHIFT, 6, movetoworkspace, 6
-bind = $mainMod SHIFT, 7, movetoworkspace, 7
-bind = $mainMod SHIFT, 8, movetoworkspace, 8
-bind = $mainMod SHIFT, 9, movetoworkspace, 9
-bind = $mainMod SHIFT, 0, movetoworkspace, 10
-
-# make window wider / narrower
-bind = SUPER CTRL, L, resizeactive, 20 0
-bind = SUPER CTRL, H, resizeactive, -20 0
-
-# make window taller / shorter
-bind = SUPER CTRL, K, resizeactive, 0 -20
-bind = SUPER CTRL, J, resizeactive, 0 20
-
-bindm = $mainMod, mouse:272, movewindow
-bindm = $mainMod, mouse:273, resizewindow
-
-# Laptop multimedia keys for volume and LCD brightness
-bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
-bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
-bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
-bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
-bindel = ,XF86MonBrightnessUp, exec, brillo -qA 5
-bindel = ,XF86MonBrightnessDown, exec, brillo -qU 5
-
-##############################
-### WINDOWS AND WORKSPACES ###
-##############################
-
-# windowrulev2 = float,class:com.github.hluk.copyq
-
-cursor {
- sync_gsettings_theme = false
- enable_hyprcursor = true
- zoom_factor = 1
-}
-
-xwayland {
- force_zero_scaling = true
- use_nearest_neighbor = true
-}
diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf
deleted file mode 100755
index 7d51a65..0000000
--- a/hypr/hyprlock.conf
+++ /dev/null
@@ -1,50 +0,0 @@
-background {
- monitor=
- path= $HOME/dots/walls/lock.jpeg
-}
-
-label {
- monitor =
- text = <span foreground='##000000'>Hi there, $USER</span>
- color = rgba(0.0, 0.0, 0.0, 1.0)
- font_size = 25
- font_family = monospace
-
- position = 0, 80
- halign = center
- valign = center
-}
-
-label {
- monitor =
- text = cmd[update:1000] echo "<span foreground='##000000'>$(date)</span>"
- color = rgba(0.0, 0.0, 0.0, 1.0)
- font_size = 25
- font_family = Iosevka NFM
- position = 0,120
- halign = center
- valign = center
-}
-
-input-field {
- monitor=
- size=20%,5%
- outine-thickness=1
- dots_size=0.1
- dots_spacing=0.5
- fade_on_empty=true
- hide_input=false
- fade_timeout=1000
-}
-
-
-label {
- monitor =
- text = cmd[update:1000] echo "<span foreground='##000000'>$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage;)</span>"
- color = rgba(0.0, 0.0, 0.0, 1.0)
- font_size = 25
- font_family = Iosevka NFM
- position = 0,-120
- halign = center
- valign = center
-}
diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf
deleted file mode 100755
index a928b80..0000000
--- a/hypr/hyprpaper.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-preload=/home/anand/Pictures/wallpapers/trueWallPaper.png
-wallpaper= ,/home/anand/Pictures/wallpapers/23_XZr6FXT.jpeg
diff --git a/hypr/monitors.conf b/hypr/monitors.conf
deleted file mode 100755
index 3701bc0..0000000
--- a/hypr/monitors.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-# Generated by nwg-displays on 2025-09-25 at 18:45:22. Do not edit manually.
-
-monitor=eDP-1,1366x768@60.14,0x0,1.0
-monitor=eDP-1,disable
-monitor=DP-2,1920x1080@60.0,1935x768,1.0
diff --git a/mango/config.conf b/mango/config.conf
index 00dd941..a1185e8 100755
--- a/mango/config.conf
+++ b/mango/config.conf
@@ -151,7 +151,7 @@ bind=NONE,XF86AudioMicMute,spawn, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind=NONE,XF86MonBrightnessUp,spawn, brillo -qA 5
bind=NONE,XF86MonBrightnessDown,spawn, brillo -qU 5
-bind=SUPER+SHIFT,s,spawn,/home/anand/dots/hypr/screenshotwayland.sh
+bind=SUPER+SHIFT,s,spawn,/home/anand/dots/mango/screenshotwayland.sh
# menu and terminal
bind=SUPER,space,spawn,rofi -show drun
diff --git a/hypr/screenshotwayland.sh b/mango/screenshotwayland.sh
index 212d8e2..642da01 100755
--- a/hypr/screenshotwayland.sh
+++ b/mango/screenshotwayland.sh
@@ -2,10 +2,12 @@
input_type=$(printf "region\nwindow" | rofi -dmenu)
case "$input_type" in
"window")
- hyprshot -m window --clipboard-only
+ # hyprshot -m window --clipboard-only
+ grim -g "$(slurp)" - | wl-copy
;;
*)
- hyprshot -m region --clipboard-only
+ # hyprshot -m region --clipboard-only
+ grim -g "$(slurp)" - | wl-copy
;;
esac