diff --git a/home-manager/dotfiles/hypr/hypridle.conf b/home-manager/dotfiles/hypr/hypridle.conf
new file mode 100644
index 0000000..430fd4c
--- /dev/null
+++ b/home-manager/dotfiles/hypr/hypridle.conf
@@ -0,0 +1,24 @@
+general {
+ 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 = 150 # 2.5min.
+ on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
+ on-resume = brightnessctl -r # monitor backlight restore.
+}
+
+# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
+# listener {
+# timeout = 150 # 2.5min.
+# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
+# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
+# }
+
+listener {
+ timeout = 300 # 5.5min
+ on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
+ on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
+}
diff --git a/home-manager/dotfiles/hypr/hyprland.conf b/home-manager/dotfiles/hypr/hyprland.conf
index 3a906bc..d370cb5 100644
--- a/home-manager/dotfiles/hypr/hyprland.conf
+++ b/home-manager/dotfiles/hypr/hyprland.conf
@@ -39,7 +39,7 @@ $menu = wofi --show drun
# exec-once = $terminal
# exec-once = nm-applet &
-exec-once = waybar
+exec-once = waybar & swaync & hypridle
#############################
@@ -203,20 +203,23 @@ device {
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
-bind = $mainMod, Q, exec, $terminal
+bind = $mainMod, return, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, V, togglefloating,
-bind = $mainMod, R, exec, $menu
+bind = $mainMod, space, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
+bind = , PRINT, exec, hyprshot -m window
+bind = shift, PRINT, exec, hyprshot -m region
+bind = $mainMod, L, exec, hyprlock
# Move focus with mainMod + arrow keys
-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, j, movefocus, u
+bind = $mainMod, k, movefocus, d
+bind = $mainMod, l, movefocus, r
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
diff --git a/home-manager/dotfiles/hypr/hyprlock.conf b/home-manager/dotfiles/hypr/hyprlock.conf
new file mode 100644
index 0000000..224158c
--- /dev/null
+++ b/home-manager/dotfiles/hypr/hyprlock.conf
@@ -0,0 +1,37 @@
+label {
+ monitor =
+ text = Hi there, $USER
+ color = rgba(200, 200, 200, 1.0)
+ font_size = 25
+ font_family = ComicCodeLigatures
+
+ position = 0, 80
+ halign = center
+ valign = center
+}
+
+background {
+ monitor =
+ path = screenshot
+ color = rgba(25, 20, 20, 1.0)
+ blur_passes = 2
+}
+
+input-field {
+ monitor =
+ size = 20%, 5%
+ outline_thickness = 3
+ inner_color = rgba(0, 0, 0, 0.0) # no fill
+
+ outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
+ check_color=rgba(00ff99ee) rgba(ff6633ee) 120deg
+ fail_color=rgba(ff6633ee) rgba(ff0066ee) 40deg
+
+ font_color = rgb(143, 143, 143)
+ fade_on_empty = false
+ rounding = 15
+
+ position = 0, -20
+ halign = center
+ valign = center
+}
diff --git a/home-manager/dotfiles/waybar/config.jsonc b/home-manager/dotfiles/waybar/config.jsonc
index c8b6f03..f6028c4 100644
--- a/home-manager/dotfiles/waybar/config.jsonc
+++ b/home-manager/dotfiles/waybar/config.jsonc
@@ -23,9 +23,7 @@
"temperature",
"backlight",
"keyboard-state",
- "sway/language",
"battery",
- "battery#bat2",
"clock",
"tray",
"custom/power"
@@ -37,7 +35,7 @@
"warp-on-scroll": false,
"format": "{name}: {icon}",
"format-icons": {
- // "1": "",
+ "1": "",
// "2": "",
// "3": "",
// "4": "",
@@ -104,7 +102,7 @@
"spacing": 10
},
"clock": {
- // "timezone": "America/New_York",
+ "timezone": "Asia/Karachi",
"tooltip-format": "{:%Y %B}\n{calendar}",
"format-alt": "{:%Y-%m-%d}"
},
@@ -130,7 +128,7 @@
},
"battery": {
"states": {
- // "good": 95,
+ "good": 95,
"warning": 30,
"critical": 15
},
@@ -143,9 +141,6 @@
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
- "battery#bat2": {
- "bat": "BAT2"
- },
"power-profiles-daemon": {
"format": "{icon}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
@@ -158,7 +153,6 @@
}
},
"network": {
- // "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
diff --git a/home-manager/home.nix b/home-manager/home.nix
index 02b4ea3..58453b9 100644
--- a/home-manager/home.nix
+++ b/home-manager/home.nix
@@ -98,6 +98,10 @@ in
dolphin
waybar
font-awesome
+ swaynotificationcenter
+ hyprshot
+ hyprlock
+ hypridle
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
];
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index f31fcb5..b8945dc 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -104,7 +104,7 @@
isNormalUser = true;
description = "Shahab Dogar";
- extraGroups = [ "networkmanager" "wheel" ];
+ extraGroups = [ "networkmanager" "wheel" "input" ];
};
# Allow unfree packages