Keybind to toggle wlsunset (with notifications!)
This commit is contained in:
parent
a7f303f8ac
commit
2631071221
|
@ -32,7 +32,7 @@ gestures {
|
|||
}
|
||||
|
||||
# Execute apps at launch
|
||||
exec-once = NO_TMUX=1 wezterm & firefox & discord
|
||||
exec-once = wezterm & firefox & discord
|
||||
|
||||
# {{{ Window rules
|
||||
# {{{ Automatically move stuff to workspaces
|
||||
|
@ -51,17 +51,18 @@ windowrulev2 = idleinhibit focus, class:^(firefox)$, title:^(.*YouTube.*)$
|
|||
# {{{ Keybinds
|
||||
$mod = SUPER
|
||||
|
||||
#u {{{ General
|
||||
# {{{ General
|
||||
bind = $mod, C, killactive, # Kill current
|
||||
bind = $mod, F, fullscreen, # Fullscreen
|
||||
|
||||
# Execute external things
|
||||
bind = $mod, return, exec, NO_TMUX=1 wezterm # Launch wezterm
|
||||
bind = $mod, return, exec, wezterm # Launch wezterm
|
||||
bind = $mod, T, exec, wl-ocr # Use ocr script
|
||||
bind = $mod SHIFT, T, exec, hyprpicker | wl-copy && libnotify "Copied color $(wp-paste)" # Color picker
|
||||
bind = $mod, Q, exec, wlogout # Show logout menu
|
||||
bind = $mod, L, exec, loginctl lock-session # Lock screen
|
||||
bind = $mod, P, exec, wofi --show drun # Launch app
|
||||
bind = $mod, B, exec, wlsunset-toggle # Toggle blue light filter thingy
|
||||
|
||||
# Work with the special workspace
|
||||
bind = $mod, x, togglespecialworkspace,
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
libnotify = lib.getExe pkgs.libnotify;
|
||||
|
||||
wlsunset-toggle = pkgs.writeShellScriptBin "wlsunset-toggle" ''
|
||||
if [ "active" = "$(systemctl --user is-active wlsunset.service)" ]
|
||||
then
|
||||
systemctl --user stop wlsunset.service
|
||||
${libnotify} "Stopped wlsunset"
|
||||
else
|
||||
systemctl --user start wlsunset.service
|
||||
${libnotify} "Started wlsunset"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
services.wlsunset = {
|
||||
enable = true;
|
||||
|
@ -6,4 +21,6 @@
|
|||
latitude = "53.2";
|
||||
longitude = "6.5";
|
||||
};
|
||||
|
||||
home.packages = [ wlsunset-toggle ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue