fix moving windows, add wofi

This commit is contained in:
Noa Aarts 2024-02-29 15:14:08 +01:00
parent fa9a38e0a3
commit afd8319ac7
3 changed files with 134 additions and 15 deletions

View file

@ -26,7 +26,11 @@
# Enable networking
networking.networkmanager.enable = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings = {
# auto optimise every so often
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
};
# Set your time zone.
time.timeZone = "Europe/Amsterdam";

View file

@ -42,12 +42,47 @@
wl-clipboard
(writeShellScriptBin "discord" ''
exec ${pkgs.discord}/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland
exec ${discord}/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland
'')
kitty
wofi
pipewire
lsd
(writeShellScriptBin "wofi-launch" ''
${wofi}/bin/wofi --show drun
'')
(writeShellScriptBin "wofi-power" ''
lock="Lock"
logout="Logout"
poweroff="Poweroff"
reboot="Reboot"
sleep="Suspend"
selected_option=$(echo -e "$lock\n$logout\n$sleep\n$reboot\n$poweroff" | wofi --dmenu -i -p "Powermenu")
if [ "$selected_option" == "$lock" ]
then
echo "lock"
swaylock
elif [ "$selected_option" == "$logout" ]
then
echo "logout"
loginctl terminate-user `whoami`
elif [ "$selected_option" == "$poweroff" ]
then
echo "poweroff"
poweroff
elif [ "$selected_option" == "$reboot" ]
then
echo "reboot"
reboot
elif [ "$selected_option" == "$sleep" ]
then
echo "sleep"
suspend
else
echo "No match"
fi
'')
];
@ -92,6 +127,87 @@
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# TODO move to seperate file
programs.wofi = {
enable = true;
settings = {
};
style = ''
* {
outline: none;
outline-style: none;
}
#window {
margin: 10px;
border: none;
background-color: transparent;
border-radius: 10px;
font-family:
JetBrains Mono NF,
monospace;
font-weight: bold;
font-size: 14px;
}
#outer-box {
margin: 10px;
border: 2px @lavender;
border-radius: 10px;
background-color: transparent;
}
#input {
border: none;
border-radius: 10px;
margin-left: 2px;
color: @text;
outline-style: none;
background-color: @base;
}
#scroll {
border: 10px solid @mantle;
border-radius: 10px;
/*padding-right: 10px;*/
outline: none;
background-color: @base;
}
#inner-box {
border: none;
border-radius: 10px;
background-color: transparent;
}
#entry {
border: none;
/*border-radius: 10px;
margin-right: 15px;
margin-left: 15px;*/
padding-right: 10px;
padding-left: 10px;
color: @subtext0;
background-color: @base;
}
#entry:selected {
border: none;
background-color: @green;
}
#text:selected {
border: none;
color: @crust;
}
#img {
background-color: transparent;
margin-right: 6px;
}
'';
};
# TODO move to seperate file
programs.zsh = {
enable=true;
@ -168,9 +284,8 @@
"custom/poweroff" = {
# TODO fix format
format = "P";
# TODO make this file exist
on-click = "bash ${config.xdg.configHome}/wofi/powermenu.sh";
on-click-right = "bash ${config.xdg.configHome}/wofi/powermenu.sh";
on-click = "wofi-power";
on-click-right = "swaylock";
};
"custom/pronouns" = {
format = "{}";
@ -491,17 +606,17 @@
"$mod,Return,exec,kitty"
"$mod,tab,cyclenext"
"SUPERSHIFT,Q,killactive"
"$mod,SPACE,exec,bash ${config.xdg.configHome}/wofi/launcher.sh"
"$mod,P,exec,bash ${config.xdg.configHome}/wofi/powermenu.sh"
"$mod,SPACE,exec,wofi-launch"
"$mod,P,exec,wofi-power"
"SUPERSHIFT,m,exit"
"$mod,H,movefocus,l"
"$mod,J,movefocus,u"
"$mod,K,movefocus,d"
"$mod,L,movefocus,r"
"SUPERSHIFT,H,movefocus,l"
"SUPERSHIFT,J,movefocus,u"
"SUPERSHIFT,K,movefocus,d"
"SUPERSHIFT,L,movefocus,r"
"SUPERSHIFT,H,movewindow,l"
"SUPERSHIFT,J,movewindow,u"
"SUPERSHIFT,K,movewindow,d"
"SUPERSHIFT,L,movewindow,r"
"$mod,F,togglefloating"
"$mod,X,togglespecialworkspace"
"SUPERSHIFT,X,movetoworkspace,special"