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:
Guanran Wang 2023-10-05 15:14:52 +08:00
parent 99352f7357
commit f1b0d66756
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
7 changed files with 175 additions and 263 deletions

View file

@ -13,7 +13,7 @@ exec-once = swww init # wallpaper (not working on nixos somehow)
#exec-once = hyprpaper # wallpaper but for factional scaling #exec-once = hyprpaper # wallpaper but for factional scaling
exec-once = waybar # status bar (bro why would nixos autostart waybar itself) exec-once = waybar # status bar (bro why would nixos autostart waybar itself)
#exec-once = eww open bar # status bar but better #exec-once = eww open bar # status bar but better
exec-once = fcitx5 # input method #exec-once = fcitx5 # input method
#exec-once = swayosd #exec-once = swayosd
#exec-once = dunst # notification #exec-once = dunst # notification
#exec-once = udiskie -t # auto disk mount (with tray) #exec-once = udiskie -t # auto disk mount (with tray)

View file

@ -3,11 +3,6 @@
# ~/.config/hypr/env.conf # ~/.config/hypr/env.conf
# #
# Cursor
env = XCURSOR_THEME, Adwaita
#env = XCURSOR_THEME, Bibata-Modern-Classic
env = XCURSOR_SIZE, 24
# Nvidia # Nvidia
#env = LIBVA_DRIVER_NAME, nvidia #env = LIBVA_DRIVER_NAME, nvidia
#env = XDG_SESSION_TYPE, wayland #env = XDG_SESSION_TYPE, wayland
@ -15,8 +10,3 @@ env = XCURSOR_SIZE, 24
#env = __GLX_VENDOR_LIBRARY_NAME #env = __GLX_VENDOR_LIBRARY_NAME
#env = WLR_NO_HARDWARE_CURSORS, 1 #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 #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

View file

@ -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

View file

@ -10,7 +10,7 @@ $dwp = ~/.local/bin/wrapped-mpvpaper
$changevolume = ~/.local/bin/wrapped-pamixer # use swayosd instead $changevolume = ~/.local/bin/wrapped-pamixer # use swayosd instead
$changebrightness = ~/.local/bin/wrapped-brightnessctl $changebrightness = ~/.local/bin/wrapped-brightnessctl
$gamemode = ~/.local/bin/hyprland-gamemode $gamemode = ~/.local/bin/hyprland-gamemode
$screenshot = ~/.local/bin/wrapped-slurp $screenshot = ~/.local/bin/wrapped-grim
$inputfix = ~/.local/bin/minecraft-inputfix $inputfix = ~/.local/bin/minecraft-inputfix
$video_path = ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/workshop/content/431960 $video_path = ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/workshop/content/431960

View file

@ -3,15 +3,12 @@
# ~/.config/hypr/hyprland.conf # ~/.config/hypr/hyprland.conf
# wiki: https://wiki.hyprland.org/ # wiki: https://wiki.hyprland.org/
# #
# Display settings # Display settings
monitor = ,preferred, auto, 1 monitor = ,preferred, auto, 1
#monitor= ,addreserved, 28, 0, 0, 0 # eww bar #monitor= ,addreserved, 28, 0, 0, 0 # eww bar
monitor = eDP-1, 1920x1080@60, 0x0, 1.25 # laptop screen eDP-1 monitor = eDP-1, 1920x1080@60, 0x0, 1.25 # laptop screen eDP-1
# Multi GPU # Multi GPU
#env = WLR_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0 #env = WLR_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0
# General settings # General settings
general { general {
gaps_in = 4 gaps_in = 4
@ -19,7 +16,6 @@
border_size = 2 border_size = 2
layout = dwindle layout = dwindle
} }
# Decorations # Decorations
decoration { decoration {
blur { blur {
@ -32,7 +28,6 @@
col.shadow = 0x88000000 col.shadow = 0x88000000
col.shadow_inactive = 0x44000000 col.shadow_inactive = 0x44000000
} }
# Animations # Animations
# animation=NAME,ONOFF,SPEED,CURVE,STYLE or # animation=NAME,ONOFF,SPEED,CURVE,STYLE or
# animation=NAME,ONOFF,SPEED,CURVE # animation=NAME,ONOFF,SPEED,CURVE
@ -45,7 +40,6 @@
animation = borderangle, 1, 8, default animation = borderangle, 1, 8, default
animation = workspaces, 1, 4, default animation = workspaces, 1, 4, default
} }
# Input settings # Input settings
input { input {
accel_profile = flat accel_profile = flat
@ -57,31 +51,26 @@
drag_lock = true drag_lock = true
} }
} }
# idk # idk
dwindle { dwindle {
pseudotile = true pseudotile = true
preserve_split = true preserve_split = true
} }
# Touchpad gestures # Touchpad gestures
gestures { gestures {
workspace_swipe = true # touchpad swipe to switch workspaces workspace_swipe = true # touchpad swipe to switch workspaces
workspace_swipe_distance = 600 # doubles gesture distance workspace_swipe_distance = 600 # doubles gesture distance
} }
# XWayland # XWayland
XWayland { XWayland {
use_nearest_neighbor = false use_nearest_neighbor = false
force_zero_scaling = true force_zero_scaling = true
} }
misc { misc {
disable_hyprland_logo = true disable_hyprland_logo = true
disable_splash_rendering = true disable_splash_rendering = true
animate_manual_resizes = true animate_manual_resizes = true
} }
# Windows rules # Windows rules
windowrule = float, ^(pavucontrol)$ windowrule = float, ^(pavucontrol)$
windowrule = float, ^(blueberry)$ windowrule = float, ^(blueberry)$
@ -94,7 +83,6 @@
windowrule = float, title:^(Merge Folder)$ # another nautilus windowrule = float, title:^(Merge Folder)$ # another nautilus
windowrule = noblur, ^(xdg-desktop-portal-gtk)$ # i dont really know why did i add this windowrule = noblur, ^(xdg-desktop-portal-gtk)$ # i dont really know why did i add this
windowrule = noborder, ^(wechat-uos)$ windowrule = noborder, ^(wechat-uos)$
# Layer rules # Layer rules
layerrule = blur, notifications layerrule = blur, notifications
layerrule = blur, rofi layerrule = blur, rofi

View file

@ -283,9 +283,10 @@
startup = [ startup = [
{ command = "${pkgs.swww}/bin/swww init"; } { command = "${pkgs.swww}/bin/swww init"; }
{ command = "${pkgs.waybar}/bin/waybar"; } { command = "${pkgs.waybar}/bin/waybar"; }
{ command = "${pkgs.wl-clipboard}/bin/wl-paste --watch cliphist store"; }
#{ command = "${pkgs.alacritty}/bin/alacritty"; } #{ command = "${pkgs.alacritty}/bin/alacritty"; }
#{ command = "${pkgs.fcitx5}/bin/fcitx5 -d"; } #{ command = "${pkgs.fcitx5}/bin/fcitx5 -d"; }
{ command = "fcitx5 -d"; } #{ command = "fcitx5 -d"; }
]; ];
gaps = { gaps = {
inner = 4; inner = 4;
@ -298,23 +299,66 @@
modifier = config.wayland.windowManager.sway.config.modifier; modifier = config.wayland.windowManager.sway.config.modifier;
setBrightness = "/home/guanranwang/.local/bin/wrapped-brightnessctl"; setBrightness = "/home/guanranwang/.local/bin/wrapped-brightnessctl";
setVolume = "/home/guanranwang/.local/bin/wrapped-pamixer"; 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 in
lib.mkOptionDefault { {
"${modifier}+Shift+q" = null; ### Sway itself
"${modifier}+space" = null; # Window
"${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}+s" = "split toggle";
"${modifier}+v" = "floating toggle"; "${modifier}+v" = "floating toggle";
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}"; "${modifier}+f" = "fullscreen";
#"${modifier}+backspace" = "exec loginctl lock-session";
"${modifier}+q" = "kill"; "${modifier}+q" = "kill";
"${modifier}+Shift+s" = "exec /home/guanranwang/.local/bin/wrapped-slurp region"; "${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"; "XF86MonBrightnessUp" = "exec ${setBrightness} up";
"XF86MonBrightnessDown" = "exec ${setBrightness} down"; "XF86MonBrightnessDown" = "exec ${setBrightness} down";
"XF86AudioRaiseVolume" = "exec ${setVolume} up"; "XF86AudioRaiseVolume" = "exec ${setVolume} up";
@ -327,7 +371,6 @@
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop"; "XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
"XF86AudioMedia" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; "XF86AudioMedia" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
}; };
}; };
extraConfig = '' extraConfig = ''
default_border pixel 2 default_border pixel 2