From 9479232a1e3b9cfc8e093470229620033a54842d Mon Sep 17 00:00:00 2001
From: Hui <752549025@qq.com>
Date: Sun, 17 Mar 2024 16:48:17 +0800
Subject: [PATCH] update config file
---
dotfiles/config/hypr/hyprland.conf | 166 +++++++++++++++++-----------
dotfiles/config/waybar/config.jsonc | 19 +++-
2 files changed, 117 insertions(+), 68 deletions(-)
diff --git a/dotfiles/config/hypr/hyprland.conf b/dotfiles/config/hypr/hyprland.conf
index 58402a1..ff17a61 100644
--- a/dotfiles/config/hypr/hyprland.conf
+++ b/dotfiles/config/hypr/hyprland.conf
@@ -14,8 +14,8 @@ OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = , preferred, auto, auto
-monitor = eDP-1, 1920x1080@60, auto, 1
-monitor = DP-2, 2560x1440@75, auto, 1
+monitor = eDP-1, 1920x1080@60, 0x0, 1
+monitor = DP-2, 2560x1440@75, 0x-1440, 1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -39,8 +39,15 @@ exec-once = nm-applet --indicator
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
+# Set programs that you use
+$terminal = kitty
+$fileManager = dolphin
+$menu = wofi --show drun
+
# Some default env vars.
env = XCURSOR_SIZE,24
+# env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
+
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
@@ -58,6 +65,10 @@ input {
tap-to-click = yes
drag_lock = yes
scroll_factor = 0.5
+ middle_button_emulation = false
+ clickfinger_behavior = false
+ drag_lock = false
+ tap-and-drag = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
@@ -73,18 +84,12 @@ general {
col.inactive_border = rgba(595959aa)
layout = dwindle
-}
-misc {
- disable_hyprland_logo = yes
- disable_splash_rendering = yes
- focus_on_activate = yes
- animate_manual_resizes = yes
- animate_mouse_windowdragging = no
- suppress_portal_warnings = yes
+ # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
+ allow_tearing = false
+ cursor_inactive_timeout = 10
}
-
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
@@ -93,19 +98,28 @@ decoration {
fullscreen_opacity=1.0
rounding = 5
- blur = yes
- blur_size = 5
- blur_passes = 2
- blur_new_optimizations = on
- drop_shadow = yes
+ blur {
+ enabled = true
+ size = 5
+ passes = 2
+ ignore_opacity = false
+ new_optimizations = true
+ vibrancy = 0.1696
+ }
+
+ drop_shadow = true
shadow_range = 4
shadow_render_power = 3
+ shadow_ignore_window = true
col.shadow = rgba(1a1a1aee)
+ col.shadow_inactive = rgba(1a1a1aee)
+ shadow_scale = 1
}
animations {
enabled = yes
+ first_launch_animation = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
@@ -135,11 +149,26 @@ gestures {
workspace_swipe = yes
workspace_swipe_fingers = 3
workspace_swipe_cancel_ratio = 0.15
+ workspace_swipe_distance = 300
+ workspace_swipe_create_new = true
+ workspace_swipe_numbered = true
+}
+
+misc {
+ # See https://wiki.hyprland.org/Configuring/Variables/ for more
+ force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
+ disable_hyprland_logo = yes
+ disable_splash_rendering = yes
+ focus_on_activate = yes
+ animate_manual_resizes = yes
+ animate_mouse_windowdragging = no
+ # suppress_portal_warnings = yes
}
# Example per-device config
-# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
-device:epic mouse V1 {
+# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
+device {
+ #name = epic-mouse-v1
#sensitivity = -0.5
}
@@ -148,6 +177,11 @@ device:apple-inc.-magic-trackpad-1 {
#middle_button_emulation=0
}
+# unscale XWayland
+xwayland {
+ force_zero_scaling = true
+}
+
plugin {
hyprload {
@@ -181,21 +215,18 @@ windowrulev2 = tile, title:^(bandu_flutter)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
+#windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
windowrulev2 = opacity 0.8 0.5, class:^(Code)$
windowrulev2 = opacity 0.8 0.5, class:^(kitty)$
-windowrulev2 = opacity 0.8 0.5, class:^(thunar)$
-windowrulev2 = opacity 0.8 0.5, class:^(obsidian)$
+#windowrulev2 = opacity 0.8 0.5, class:^(thunar)$
+#windowrulev2 = opacity 0.8 0.5, class:^(obsidian)$
windowrulev2 = opacity 1.0 1.0, title:^(微信读书)$
-windowrulev2 = opacity 0.8 0.5, class:^(org.kde.kate)$
-windowrulev2 = opacity 1.0 1.0, class:^(microsoft-edge)$
+#windowrulev2 = opacity 0.8 0.5, class:^(org.kde.kate)$
+#windowrulev2 = opacity 1.0 1.0, class:^(microsoft-edge)$
windowrulev2 = opacity 0.8 0.5, class:^(org.kde.polkit-kde-authentication-agent-1)$
-windowrulev2 = animation popin, class:^(microsoft-edge)$
-windowrulev2 = tile, title:^(Cron)$
-windowrulev2 = tile, title:^(Cubox)$
+#windowrulev2 = animation popin, class:^(microsoft-edge)$
windowrulev2 = tile, title:^(少数派)$
-windowrulev2 = tile, title:^(Spotify)$
windowrulev2 = tile, title:^(微信读书)$
-windowrulev2 = tile, title:^(bandu_flutter)$
windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -203,43 +234,44 @@ $mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, F1, exec, ~/.config/hypr/scripts/gamemode.sh
-bind = $mainMod, A, exec, anytype
-bind = $mainMod SHIFT, C, exec, microsoft-edge-stable --profile-directory=Default --app-id=ciphmlapnadpablfaagijhhenhancbbb --app-url=https://calendar.cron.com/
-bind = $mainMod, E, exec, thunar
-bind = $mainMod SHIFT, E, exec, dolphin
-bind = $mainMod CTRL, E, exec, kitty ranger
-bind = $mainMod, G, exec, microsoft-edge-stable
-bind = $mainMod SHIFT, G, exec, google-chrome-stable
-bind = $mainMod CTRL, G, exec, github-desktop
-bind = $mainMod, I, exec, cd ~/.loacl/share/applications; gtk-launch jetbrains-idea.desktop
+#bind = $mainMod, A, exec, anytype
+#bind = $mainMod SHIFT, C, exec, microsoft-edge-stable --profile-directory=Default --app-id=ciphmlapnadpablfaagijhhenhancbbb --app-url=https://calendar.cron.com/
+#bind = $mainMod, E, exec, thunar
+bind = $mainMod, E, exec, dolphin
+#bind = $mainMod SHIFT, E, exec, dolphin
+#bind = $mainMod CTRL, E, exec, kitty ranger
+bind = $mainMod, G, exec, firefox-nightly
+#bind = $mainMod, G, exec, microsoft-edge-stable
+#bind = $mainMod SHIFT, G, exec, google-chrome-stable
+#bind = $mainMod CTRL, G, exec, github-desktop
+#bind = $mainMod, I, exec, cd ~/.loacl/share/applications; gtk-launch jetbrains-idea.desktop
bind = $mainMod, J, exec, pkill jupyter-lab; jupyter-lab
-bind = $mainMod SHIFT, J, exec, pkill jupyter-lab; cd ~/Documents/the-craft-of-selfteaching; jupyter-lab
-bind = $mainMod, K, exec, kate
+#bind = $mainMod SHIFT, J, exec, pkill jupyter-lab; cd ~/Documents/the-craft-of-selfteaching; jupyter-lab
+#bind = $mainMod, K, exec, kate
bind = $mainMod, L, exec, logseq
-bind = $mainMod SHIFT, L, exec, swaylock
-bind = $mainMod, M, exec, wlogout --protocol layer-shell
-bind = $mainMod CTRL, M, exec, motrix
-bind = $mainMod, N, exec, microsoft-edge --profile-directory=Default --app-id=bicgkabnllfcnajoaobgkmpjchldbdco --app-url=https://www.notion.so/000-Inbox-ed0cb9b1899648ea8007e860698d251c
+#bind = $mainMod SHIFT, L, exec, swaylock
+#bind = $mainMod, M, exec, wlogout --protocol layer-shell
+#bind = $mainMod CTRL, M, exec, motrix
+#bind = $mainMod, N, exec, microsoft-edge --profile-directory=Default --app-id=bicgkabnllfcnajoaobgkmpjchldbdco --app-url=https://www.notion.so/000-Inbox-ed0cb9b1899648ea8007e860698d251c
bind = $mainMod SHIFT, N, exec, kitty nvim
-bind = $mainMod, O, exec, obsidian
-bind = $mainMod SHIFT, O, exec, okular
+#bind = $mainMod, O, exec, obsidian
+#bind = $mainMod SHIFT, O, exec, okular
bind = $mainMod, Q, exec, kitty
-bind = $mainMod SHIFT, Q, exec, linuxqq
-bind = $mainMod, P, exec, cd ~/.loacl/share/applications; gtk-launch jetbrains-pycharm.desktop
+#bind = $mainMod SHIFT, Q, exec, linuxqq
+#bind = $mainMod, P, exec, cd ~/.loacl/share/applications; gtk-launch jetbrains-pycharm.desktop
bind = $mainMod SHIFT, P, exec, pavucontrol
bind = $mainMod, R, exec, pkill wofi; wofi --show drun
-bind = $mainMod SHIFT, R, exec, xfreerdp /u:752549025@qq.com /p:nebkij-xevkec-Zyvha9 /v:43.249.192.204:45561 /f /sound /floatbar:sticky:off,default:hidden,show:window -themes +multitouch /video -wallpaper +nego +smart-sizing
+bind = $mainMod SHIFT, R, exec, wlfreerdp /u:752549025@qq.com /p:nebkij-xevkec-Zyvha9 /v:43.249.192.204:45561 /f /sound /floatbar:sticky:off,default:hidden,show:window -themes +multitouch /video -wallpaper +nego +smart-sizing
bind = $mainMod, S, exec, spotify
#bind = $mainMod, S, exec, microsoft-edge-stable --profile-directory=Default --app-id=pjibgclleladliembfgfagdaldikeohf "--app-url=https://open.spotify.com/?utm_source=pwa_install"
-bind = $mainMod SHIFT, S, exec, microsoft-edge-stable --profile-directory=Default --app-id=idhlnkbfpmbggpopjbaemghibaoobglb "--app-url=https://pwa.sspai.com/?pwa=1"
-bind = $mainMod, T, exec, typora
+#bind = $mainMod SHIFT, S, exec, microsoft-edge-stable --profile-directory=Default --app-id=idhlnkbfpmbggpopjbaemghibaoobglb "--app-url=https://pwa.sspai.com/?pwa=1"
bind = $mainMod, V, exec, code
bind = $mainMod SHIFT, V, exec, vlc
-bind = $mainMod, W, exec, microsoft-edge-stable --profile-directory=Default --app-id=magamgmomalmppfcmkgppgboggkfiphd --app-url=https://weread.qq.com/
-bind = $mainMod SHIFT, W, exec, wechat-uos
-bind = $mainMod, X, exec, microsoft-edge-stable --profile-directory=Default --app-id=jihkolckjdlcnmbfapjpmheicbncfalm --app-url=https://webapp.songy.info/
-bind = $mainMod, F3, fullscreen,
-bind = $mainMod, F4, togglefloating,
+#bind = $mainMod, W, exec, microsoft-edge-stable --profile-directory=Default --app-id=magamgmomalmppfcmkgppgboggkfiphd --app-url=https://weread.qq.com/
+#bind = $mainMod, X, exec, microsoft-edge-stable --profile-directory=Default --app-id=jihkolckjdlcnmbfapjpmheicbncfalm --app-url=https://webapp.songy.info/
+#bind = $mainMod, F3, fullscreen,
+bind = , F11, fullscreen,
+bind = $mainMod, F12, togglefloating,
bind = $mainMod, C, killactive,
bind = $mainMod CTRL, P, pseudo,
bind = $mainMod SHIFT, M, exit,
@@ -287,21 +319,23 @@ bindm = $mainMod SHIFT, mouse:272, resizewindow
# Brightness control
#binde = $mainMod, F6, exec, ddcutil setvcp 10 + 10
#binde = $mainMod, F5, exec, ddcutil setvcp 10 - 10
-binde = $mainMod, F5, exec, brightnessctl -c backlight set 1%-
-binde = $mainMod, F6, exec, brightnessctl -c backlight set +1%
-#binde = , XF86MonBrightnessUp, exec, brightnessctl -c backlight set 1%-
-#binde = , XF86MonBrightnessDown, exec, brightnessctl -c backlight set +1%
+#binde = $mainMod, F5, exec, brightnessctl -c backlight set 1%-
+#binde = $mainMod, F6, exec, brightnessctl -c backlight set +1%
+binde = , XF86MonBrightnessUp, exec, brightnessctl -c backlight set +10%
+binde = , XF86MonBrightnessDown, exec, brightnessctl -c backlight set 10%-
# Sound control
-binde = $mainMod, F10, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%
-binde = $mainMod, F9, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%
-binde = $mainMod, F8, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
-#binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%
-#binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%
-#binde = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
+#binde = $mainMod, F10, exec, pactl set-sink-volume @DEFAULT_SINK@ +1%
+#binde = $mainMod, F9, exec, pactl set-sink-volume @DEFAULT_SINK@ -1%
+#binde = $mainMod, F8, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
+binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
+binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
+binde = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
# Player control
-binde = $mainMod, F7, exec, playerctl play-pause
-#binde = , XF86AudioPlay, exec, playerctl play-pause
+#binde = $mainMod, F7, exec, playerctl play-pause
+binde = , XF86AudioPlay, exec, playerctl play-pause
#binde = , XF86AudioNext, exec, playerctl next
#binde = , XF86AudioPrev, exec, playerctl previous
+binde = $mainMod SHIFT, right, exec, playerctl next
+binde = $mainMod SHIFT, left, exec, playerctl previous
diff --git a/dotfiles/config/waybar/config.jsonc b/dotfiles/config/waybar/config.jsonc
index ef993bf..d8a3f8e 100644
--- a/dotfiles/config/waybar/config.jsonc
+++ b/dotfiles/config/waybar/config.jsonc
@@ -9,7 +9,8 @@
"modules-left": [
"custom/launcher",
"clock",
- "wlr/workspaces",
+ //"wlr/workspaces",
+ "hyprland/workspaces",
"wlr/taskbar",
"hyprland/window"
//"custom/playerctl",
@@ -68,6 +69,20 @@
"10": []
}
},
+ "hyprland/workspaces": {
+ "format": "{name}",
+ "format-icons": {
+ "active": "",
+ "default": "",
+ "persistent": ""
+ },
+ "on-scroll-up": "hyprctl dispatch workspace r-1",
+ "on-scroll-down": "hyprctl dispatch workspace r+1",
+ "all-outputs": false,
+ //"persistent_workspaces": {
+ // "*": 5
+ //}
+ },
"custom/playerctl": {
"format": "{icon}",
"return-type": "json",
@@ -80,7 +95,7 @@
"format-icons": {
"Playing": " ",
"Paused": " "
- },
+ }
},
"custom/playerlabel": {