Remove sway config

This commit is contained in:
Nathan McCarty 2023-06-16 18:47:59 -04:00
parent a1c8347057
commit 9c9c9132d6
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
2 changed files with 2 additions and 168 deletions

View File

@ -189,166 +189,7 @@ in with lib; {
}; };
}; };
######################### #########################
## Sway ## Hyprland Addons
#########################
wayland.windowManager.sway = let modifier = "Mod4";
in {
enable = true;
systemdIntegration = true;
wrapperFeatures = {
base = true;
gtk = true;
};
extraSessionCommands = ''
# Make qt theming work
export QT_QPA_PLATFORMTHEME="qt5ct"
# Prepare for wob
export WOBSOCK="$XDG_RUNTIME_DIR/wob.sock"
rm -rf $WOBSOCK && mkfifo $WOBSOCK
'';
config = {
# Startup wob
startup = [{ command = "tail -f $WOBSOCK | wob"; }];
# Setup gaps
gaps = {
smartGaps = true;
inner = 9;
};
# Window configuration
window = {
# Configure borders
border = 2;
# Application specific configuration
commands = [
# Make pinentry float
{
command = "floating enable";
criteria = { app_id = "pinentry-qt"; };
}
# Make bitwarden float
{
command = "floating enable";
criteria = { title = ".*Bitwarden.*"; };
}
# Make swayimg float, this is required to make it work
{
command = "floating enable";
criteria = { app_id = "^swayimg.*"; };
}
# Work around for chrome ui bug
{
command = "shortcuts_inhibitor disable";
criteria = { app_id = "chrome-.*"; };
}
];
};
# Use windows key as modifier
modifier = "Mod4";
# Alacritty as default terminal
terminal = "alacritty";
# Use krunner (from kde) as our launcher
menu = ''
${fuzzel-command}
'';
# Use waybar, but through systemd
bars = [
# {
# command = "waybar";
# }
];
# Use Iosevka
fonts = {
names = [ "Iosevka Sans Quasi" ];
size = 10.0;
};
# Selenize it
colors = {
focused = {
border = "75b938";
background = "184956";
text = "adbcbc";
indicator = "84c747";
childBorder = "75b938";
};
focusedInactive = {
border = "41c7b9";
background = "#103c48";
text = "adbcbc";
indicator = "53d6c7";
childBorder = "41c7b9";
};
unfocused = {
border = "72898f";
background = "103c48";
text = "72898f";
indicator = "adbcbc";
childBorder = "72898f";
};
urgent = {
border = "f275be";
background = "184956";
text = "fa5750";
indicator = "fa5750";
childBorder = "f275be";
};
};
# Setup keybindings
keybindings = lib.mkOptionDefault {
"${modifier}+q" = "kill";
"${modifier}+z" = "exec ${swaylock-command}";
## Sreenshot keybinds
# Copy area to clipboard
"${modifier}+x" =
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
# Copy window to clipboard
"${modifier}+Ctrl+x" =
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy window";
# Clpy entire output to clipboard
"${modifier}+Alt+x" =
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy output";
# Make the mute key work
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
# Make the volume keys work
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume @DEFAULT_SINK@ -5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK";
# Play/pause and next song
"XF86AudioPlay" = "exec mpc toggle";
"XF86AudioNext" = "exec mpc next";
# Setup scratchpads
"${modifier}+n" =
"exec sh -c 'swaymsg [app_id=\"emacs\"] scratchpad show'";
"${modifier}+m" =
"exec sh -c 'swaymsg [app_id=\"Alacritty\"] scratchpad show'";
# Rebind movement keys to use layman
"${modifier}+Shift+h" = "nop layman move left";
"${modifier}+Shift+j" = "nop layman move down";
"${modifier}+Shift+k" = "nop layman move up";
"${modifier}+Shift+l" = "nop layman move right";
# Switch to layman mode
"${modifier}+g" = "mode layout";
};
modes = lib.mkOptionDefault {
layout = {
h = "nop layman layout none; mode default";
j = "nop layman layout Autotiling; mode default";
k = "nop layman layout Grid; mode default";
l = "nop layman layout MasterStack; mode default";
Escape = "mode default";
Return = "mode default";
};
};
# Setup a custom mode for layman operations
# Turn on numlock by default
input = {
"*" = { xkb_numlock = "enable"; };
"type:pointer" = { accel_profile = "flat"; };
};
};
};
#########################
## Sway Addons
######################### #########################
# Setup polkit as a service # Setup polkit as a service
systemd.user.services.polkit-gnome = { systemd.user.services.polkit-gnome = {

View File

@ -14,7 +14,7 @@ in with lib; {
}; };
theme = "sugar-dark"; theme = "sugar-dark";
}; };
defaultSession = "sway"; defaultSession = "hyprland";
}; };
# Enable plasma for the applications # Enable plasma for the applications
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;
@ -51,13 +51,6 @@ in with lib; {
}) })
]; ];
qt.platformTheme = "qt5ct"; qt.platformTheme = "qt5ct";
# Enable and configure sway itself
programs.sway = {
enable = true;
# Enable the wrapper for gtk applications
wrapperFeatures.gtk = true;
# package = null;
};
# Enable and configure hyperland # Enable and configure hyperland
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;