home: modify wm config
- rename script `wrapped-slurp` to `wrapped-grim` - add keybinds to sway in `home.nix` - remove needed environment variables on hyprland in `autostart.conf` - remove unneeded fcitx5 autostart in `autostart.conf` and `home.nix` - remove `hyprland.bak` - remove tabs in `main.conf`
This commit is contained in:
parent
99352f7357
commit
f1b0d66756
7 changed files with 175 additions and 263 deletions
|
@ -13,7 +13,7 @@ exec-once = swww init # wallpaper (not working on nixos somehow)
|
|||
#exec-once = hyprpaper # wallpaper but for factional scaling
|
||||
exec-once = waybar # status bar (bro why would nixos autostart waybar itself)
|
||||
#exec-once = eww open bar # status bar but better
|
||||
exec-once = fcitx5 # input method
|
||||
#exec-once = fcitx5 # input method
|
||||
#exec-once = swayosd
|
||||
#exec-once = dunst # notification
|
||||
#exec-once = udiskie -t # auto disk mount (with tray)
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
# ~/.config/hypr/env.conf
|
||||
#
|
||||
|
||||
# Cursor
|
||||
env = XCURSOR_THEME, Adwaita
|
||||
#env = XCURSOR_THEME, Bibata-Modern-Classic
|
||||
env = XCURSOR_SIZE, 24
|
||||
|
||||
# Nvidia
|
||||
#env = LIBVA_DRIVER_NAME, nvidia
|
||||
#env = XDG_SESSION_TYPE, wayland
|
||||
|
@ -15,8 +10,3 @@ env = XCURSOR_SIZE, 24
|
|||
#env = __GLX_VENDOR_LIBRARY_NAME
|
||||
#env = WLR_NO_HARDWARE_CURSORS, 1
|
||||
#env = __GL_THREADED_OPTIMIZATIONS, 0 # workround for minecraft glitch on nvidia 535.xx driver, https://github.com/NVIDIA/open-gpu-kernel-modules/issues/522
|
||||
|
||||
# Qt theming
|
||||
#env = QT_QPA_PLATFORMTHEME, qt5ct
|
||||
#env = QT_STYLE_OVERRIDE, Adwaita-dark
|
||||
#env = QT_STYLE_OVERRIDE, kvantum
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
#
|
||||
# Hyprland main config
|
||||
# ~/.config/hypr/hyprland.conf
|
||||
# wiki: https://wiki.hyprland.org/
|
||||
#
|
||||
|
||||
# Display settings
|
||||
monitor = ,preferred, auto, 1
|
||||
#monitor= ,addreserved, 28, 0, 0, 0 # eww bar
|
||||
monitor = eDP-1, 1920x1080@60, 0x0, 1.25 # laptop screen eDP-1
|
||||
|
||||
# Multi GPU
|
||||
#env = WLR_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0
|
||||
|
||||
# Source (to split config in different files)
|
||||
# source = ~/.config/hypr/themes/mocha.conf
|
||||
#source = ~/.config/hypr/themes/colors.conf
|
||||
source = ~/.config/hypr/keybinds.conf
|
||||
source = ~/.config/hypr/autostart.conf
|
||||
source = ~/.config/hypr/env.conf
|
||||
#source = ~/.config/hypr/plugins.conf
|
||||
|
||||
|
||||
# General settings
|
||||
general {
|
||||
gaps_in = 4
|
||||
gaps_out = 8 # dont forget to change waybar margin
|
||||
border_size = 2
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# Decorations
|
||||
decoration {
|
||||
blur {
|
||||
size = 4
|
||||
passes = 4
|
||||
}
|
||||
rounding = 4
|
||||
shadow_range = 50
|
||||
shadow_render_power = 5
|
||||
col.shadow = 0x88000000
|
||||
col.shadow_inactive = 0x44000000
|
||||
}
|
||||
|
||||
# Animations
|
||||
# animation=NAME,ONOFF,SPEED,CURVE,STYLE or
|
||||
# animation=NAME,ONOFF,SPEED,CURVE
|
||||
animations {
|
||||
bezier = easeOutExpo, 0.16, 1, 0.3, 1
|
||||
bezier = easeOutQuint, 0.22, 1, 0.36, 1
|
||||
animation = windows, 1, 6, default, popin # slide or popin
|
||||
animation = fade, 1, 8, default
|
||||
animation = border, 1, 8, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = workspaces, 1, 4, default
|
||||
}
|
||||
|
||||
# Input settings
|
||||
input {
|
||||
accel_profile = flat
|
||||
force_no_accel = 1
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
disable_while_typing = false
|
||||
drag_lock = true
|
||||
}
|
||||
}
|
||||
|
||||
# idk
|
||||
dwindle {
|
||||
pseudotile = yes
|
||||
preserve_split = yes
|
||||
}
|
||||
|
||||
# Touchpad gestures
|
||||
gestures {
|
||||
workspace_swipe = true # touchpad swipe to switch workspaces
|
||||
workspace_swipe_distance = 600 # doubles gesture distance
|
||||
}
|
||||
|
||||
# XWayland
|
||||
XWayland {
|
||||
use_nearest_neighbor = false
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
animate_manual_resizes = true
|
||||
}
|
||||
|
||||
# Windows rules
|
||||
windowrule = float, ^(pavucontrol)$
|
||||
windowrule = float, ^(blueberry)$
|
||||
windowrule = float, ^(gnome-system-monitor)$
|
||||
windowrule = float, ^(org.gnome.Calculator)$
|
||||
windowrule = float, ^(org.gnome.Weather)$
|
||||
windowrule = float, ^(zenity)$ # popups, input boxes, etc...
|
||||
windowrule = float, title:^(Friends List)$ # steam friend list
|
||||
windowrule = float, title:^(File Conflict)$ # nautilus
|
||||
windowrule = float, title:^(Merge Folder)$ # another nautilus
|
||||
windowrule = noblur, ^(xdg-desktop-portal-gtk)$ # i dont really know why did i add this
|
||||
windowrule = noborder, ^(wechat-uos)$
|
||||
|
||||
# Layer rules
|
||||
layerrule = blur, notifications
|
||||
layerrule = blur, rofi
|
||||
layerrule = ignorezero, notifications
|
|
@ -10,7 +10,7 @@ $dwp = ~/.local/bin/wrapped-mpvpaper
|
|||
$changevolume = ~/.local/bin/wrapped-pamixer # use swayosd instead
|
||||
$changebrightness = ~/.local/bin/wrapped-brightnessctl
|
||||
$gamemode = ~/.local/bin/hyprland-gamemode
|
||||
$screenshot = ~/.local/bin/wrapped-slurp
|
||||
$screenshot = ~/.local/bin/wrapped-grim
|
||||
$inputfix = ~/.local/bin/minecraft-inputfix
|
||||
$video_path = ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/workshop/content/431960
|
||||
|
||||
|
|
|
@ -1,101 +1,89 @@
|
|||
#
|
||||
# Hyprland main config
|
||||
# ~/.config/hypr/hyprland.conf
|
||||
# wiki: https://wiki.hyprland.org/
|
||||
#
|
||||
|
||||
# Display settings
|
||||
monitor = ,preferred, auto, 1
|
||||
#monitor= ,addreserved, 28, 0, 0, 0 # eww bar
|
||||
monitor = eDP-1, 1920x1080@60, 0x0, 1.25 # laptop screen eDP-1
|
||||
|
||||
# Multi GPU
|
||||
#env = WLR_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0
|
||||
|
||||
# General settings
|
||||
general {
|
||||
gaps_in = 4
|
||||
gaps_out = 8 # dont forget to change waybar margin
|
||||
border_size = 2
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# Decorations
|
||||
decoration {
|
||||
blur {
|
||||
size = 4
|
||||
passes = 4
|
||||
}
|
||||
rounding = 4
|
||||
shadow_range = 50
|
||||
shadow_render_power = 5
|
||||
col.shadow = 0x88000000
|
||||
col.shadow_inactive = 0x44000000
|
||||
}
|
||||
|
||||
# Animations
|
||||
# animation=NAME,ONOFF,SPEED,CURVE,STYLE or
|
||||
# animation=NAME,ONOFF,SPEED,CURVE
|
||||
animations {
|
||||
bezier = easeOutExpo, 0.16, 1, 0.3, 1
|
||||
bezier = easeOutQuint, 0.22, 1, 0.36, 1
|
||||
animation = windows, 1, 6, default, popin # slide or popin
|
||||
animation = fade, 1, 8, default
|
||||
animation = border, 1, 8, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = workspaces, 1, 4, default
|
||||
}
|
||||
|
||||
# Input settings
|
||||
input {
|
||||
accel_profile = flat
|
||||
#force_no_accel = false
|
||||
natural_scroll = true
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
disable_while_typing = false
|
||||
drag_lock = true
|
||||
}
|
||||
}
|
||||
|
||||
# idk
|
||||
dwindle {
|
||||
pseudotile = true
|
||||
preserve_split = true
|
||||
}
|
||||
|
||||
# Touchpad gestures
|
||||
gestures {
|
||||
workspace_swipe = true # touchpad swipe to switch workspaces
|
||||
workspace_swipe_distance = 600 # doubles gesture distance
|
||||
}
|
||||
|
||||
# XWayland
|
||||
XWayland {
|
||||
use_nearest_neighbor = false
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
animate_manual_resizes = true
|
||||
}
|
||||
|
||||
# Windows rules
|
||||
windowrule = float, ^(pavucontrol)$
|
||||
windowrule = float, ^(blueberry)$
|
||||
windowrule = float, ^(gnome-system-monitor)$
|
||||
windowrule = float, ^(org.gnome.Calculator)$
|
||||
windowrule = float, ^(org.gnome.Weather)$
|
||||
windowrule = float, ^(zenity)$ # popups, input boxes, etc...
|
||||
windowrule = float, title:^(Friends List)$ # steam friend list
|
||||
windowrule = float, title:^(File Conflict)$ # nautilus
|
||||
windowrule = float, title:^(Merge Folder)$ # another nautilus
|
||||
windowrule = noblur, ^(xdg-desktop-portal-gtk)$ # i dont really know why did i add this
|
||||
windowrule = noborder, ^(wechat-uos)$
|
||||
|
||||
# Layer rules
|
||||
layerrule = blur, notifications
|
||||
layerrule = blur, rofi
|
||||
layerrule = ignorezero, notifications
|
||||
#
|
||||
# Hyprland main config
|
||||
# ~/.config/hypr/hyprland.conf
|
||||
# wiki: https://wiki.hyprland.org/
|
||||
#
|
||||
# Display settings
|
||||
monitor = ,preferred, auto, 1
|
||||
#monitor= ,addreserved, 28, 0, 0, 0 # eww bar
|
||||
monitor = eDP-1, 1920x1080@60, 0x0, 1.25 # laptop screen eDP-1
|
||||
# Multi GPU
|
||||
#env = WLR_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0
|
||||
# General settings
|
||||
general {
|
||||
gaps_in = 4
|
||||
gaps_out = 8 # dont forget to change waybar margin
|
||||
border_size = 2
|
||||
layout = dwindle
|
||||
}
|
||||
# Decorations
|
||||
decoration {
|
||||
blur {
|
||||
size = 4
|
||||
passes = 4
|
||||
}
|
||||
rounding = 4
|
||||
shadow_range = 50
|
||||
shadow_render_power = 5
|
||||
col.shadow = 0x88000000
|
||||
col.shadow_inactive = 0x44000000
|
||||
}
|
||||
# Animations
|
||||
# animation=NAME,ONOFF,SPEED,CURVE,STYLE or
|
||||
# animation=NAME,ONOFF,SPEED,CURVE
|
||||
animations {
|
||||
bezier = easeOutExpo, 0.16, 1, 0.3, 1
|
||||
bezier = easeOutQuint, 0.22, 1, 0.36, 1
|
||||
animation = windows, 1, 6, default, popin # slide or popin
|
||||
animation = fade, 1, 8, default
|
||||
animation = border, 1, 8, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = workspaces, 1, 4, default
|
||||
}
|
||||
# Input settings
|
||||
input {
|
||||
accel_profile = flat
|
||||
#force_no_accel = false
|
||||
natural_scroll = true
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
disable_while_typing = false
|
||||
drag_lock = true
|
||||
}
|
||||
}
|
||||
# idk
|
||||
dwindle {
|
||||
pseudotile = true
|
||||
preserve_split = true
|
||||
}
|
||||
# Touchpad gestures
|
||||
gestures {
|
||||
workspace_swipe = true # touchpad swipe to switch workspaces
|
||||
workspace_swipe_distance = 600 # doubles gesture distance
|
||||
}
|
||||
# XWayland
|
||||
XWayland {
|
||||
use_nearest_neighbor = false
|
||||
force_zero_scaling = true
|
||||
}
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
animate_manual_resizes = true
|
||||
}
|
||||
# Windows rules
|
||||
windowrule = float, ^(pavucontrol)$
|
||||
windowrule = float, ^(blueberry)$
|
||||
windowrule = float, ^(gnome-system-monitor)$
|
||||
windowrule = float, ^(org.gnome.Calculator)$
|
||||
windowrule = float, ^(org.gnome.Weather)$
|
||||
windowrule = float, ^(zenity)$ # popups, input boxes, etc...
|
||||
windowrule = float, title:^(Friends List)$ # steam friend list
|
||||
windowrule = float, title:^(File Conflict)$ # nautilus
|
||||
windowrule = float, title:^(Merge Folder)$ # another nautilus
|
||||
windowrule = noblur, ^(xdg-desktop-portal-gtk)$ # i dont really know why did i add this
|
||||
windowrule = noborder, ^(wechat-uos)$
|
||||
# Layer rules
|
||||
layerrule = blur, notifications
|
||||
layerrule = blur, rofi
|
||||
layerrule = ignorezero, notifications
|
|
@ -283,9 +283,10 @@
|
|||
startup = [
|
||||
{ command = "${pkgs.swww}/bin/swww init"; }
|
||||
{ command = "${pkgs.waybar}/bin/waybar"; }
|
||||
{ command = "${pkgs.wl-clipboard}/bin/wl-paste --watch cliphist store"; }
|
||||
#{ command = "${pkgs.alacritty}/bin/alacritty"; }
|
||||
#{ command = "${pkgs.fcitx5}/bin/fcitx5 -d"; }
|
||||
{ command = "fcitx5 -d"; }
|
||||
#{ command = "fcitx5 -d"; }
|
||||
];
|
||||
gaps = {
|
||||
inner = 4;
|
||||
|
@ -295,39 +296,81 @@
|
|||
modifier = "Mod4";
|
||||
keybindings =
|
||||
let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
setBrightness = "/home/guanranwang/.local/bin/wrapped-brightnessctl";
|
||||
setVolume = "/home/guanranwang/.local/bin/wrapped-pamixer";
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
setBrightness = "/home/guanranwang/.local/bin/wrapped-brightnessctl";
|
||||
setVolume = "/home/guanranwang/.local/bin/wrapped-pamixer";
|
||||
screenshot = "/home/guanranwang/.local/bin/wrapped-grim";
|
||||
terminal = "exec ${pkgs.alacritty}/bin/alacritty";
|
||||
browser = "exec ${pkgs.xdg-utils}/bin/xdg-open http:";
|
||||
fileManager = "exec ${pkgs.xdg-utils}/bin/xdg-open ~";
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
"${modifier}+Shift+q" = null;
|
||||
"${modifier}+space" = null;
|
||||
"${modifier}+b" = null;
|
||||
"${modifier}+w" = "exec ${pkgs.xdg-utils}/bin/xdg-open https://";
|
||||
"${modifier}+e" = "exec ${pkgs.xdg-utils}/bin/xdg-open ~";
|
||||
#"${modifier}+h" = "focus left";
|
||||
#"${modifier}+j" = "focus down";
|
||||
#"${modifier}+k" = "focus up";
|
||||
#"${modifier}+l" = "focus right";
|
||||
"${modifier}+s" = "split toggle";
|
||||
"${modifier}+v" = "floating toggle";
|
||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}";
|
||||
#"${modifier}+backspace" = "exec loginctl lock-session";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+s" = "exec /home/guanranwang/.local/bin/wrapped-slurp region";
|
||||
"XF86MonBrightnessUp" = "exec ${setBrightness} up";
|
||||
"XF86MonBrightnessDown" = "exec ${setBrightness} down";
|
||||
"XF86AudioRaiseVolume" = "exec ${setVolume} up";
|
||||
"XF86AudioLowerVolume" = "exec ${setVolume} down";
|
||||
"XF86AudioMute" = "exec ${setVolume} mute";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86AudioMedia" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
};
|
||||
{
|
||||
### Sway itself
|
||||
# Window
|
||||
"${modifier}+s" = "split toggle";
|
||||
"${modifier}+v" = "floating toggle";
|
||||
"${modifier}+f" = "fullscreen";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' '${pkgs.sway}/bin/swaymsg exit'";
|
||||
|
||||
# Move around
|
||||
"${modifier}+h" = "focus left";
|
||||
"${modifier}+j" = "focus down";
|
||||
"${modifier}+k" = "focus up";
|
||||
"${modifier}+l" = "focus right";
|
||||
|
||||
# Workspaces
|
||||
# Switch to workspace
|
||||
"${modifier}+1" = "workspace 1";
|
||||
"${modifier}+2" = "workspace 2";
|
||||
"${modifier}+3" = "workspace 3";
|
||||
"${modifier}+4" = "workspace 4";
|
||||
"${modifier}+5" = "workspace 5";
|
||||
"${modifier}+6" = "workspace 6";
|
||||
"${modifier}+7" = "workspace 7";
|
||||
"${modifier}+8" = "workspace 8";
|
||||
"${modifier}+9" = "workspace 9";
|
||||
"${modifier}+0" = "workspace 10";
|
||||
# Move focused Window to workspace
|
||||
"${modifier}+Shift+1" = "move container to workspace 1";
|
||||
"${modifier}+Shift+2" = "move container to workspace 2";
|
||||
"${modifier}+Shift+3" = "move container to workspace 3";
|
||||
"${modifier}+Shift+4" = "move container to workspace 4";
|
||||
"${modifier}+Shift+5" = "move container to workspace 5";
|
||||
"${modifier}+Shift+6" = "move container to workspace 6";
|
||||
"${modifier}+Shift+7" = "move container to workspace 7";
|
||||
"${modifier}+Shift+8" = "move container to workspace 8";
|
||||
"${modifier}+Shift+9" = "move container to workspace 9";
|
||||
"${modifier}+Shift+0" = "move container to workspace 10";
|
||||
|
||||
### Execute other stuff
|
||||
# Launch applications
|
||||
"${modifier}+Return" = terminal;
|
||||
"${modifier}+w" = browser;
|
||||
"${modifier}+e" = fileManager;
|
||||
|
||||
# Rofi
|
||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}";
|
||||
"${modifier}+Shift+d" = "exec ${pkgs.cliphist}/bin/cliphist list | ${pkgs.rofi}/bin/rofi -dmenu | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
"${modifier}+Shift+l" = "exec ${pkgs.rofi}/bin/rofi -modi \"power-menu:rofi-power-menu --confirm=reboot/shutdown\" -show power-menu";
|
||||
|
||||
# Screenshot
|
||||
"${modifier}+Shift+s" = "exec ${screenshot} region";
|
||||
"Print" = "exec ${screenshot} fullscreen";
|
||||
|
||||
# Fn keys
|
||||
"XF86MonBrightnessUp" = "exec ${setBrightness} up";
|
||||
"XF86MonBrightnessDown" = "exec ${setBrightness} down";
|
||||
"XF86AudioRaiseVolume" = "exec ${setVolume} up";
|
||||
"XF86AudioLowerVolume" = "exec ${setVolume} down";
|
||||
"XF86AudioMute" = "exec ${setVolume} mute";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86AudioMedia" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
default_border pixel 2
|
||||
|
|
Loading…
Reference in a new issue