Skip to content

Commit

Permalink
update hyprland configs
Browse files Browse the repository at this point in the history
  • Loading branch information
YingchangLiu committed Jan 22, 2024
1 parent 0017086 commit 756c86b
Show file tree
Hide file tree
Showing 11 changed files with 372 additions and 42 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# kelen's dotfiles

**Warning**: Don’t blindly use my settings unless you know what that entails. Use at your own risk!

I'm working with Arch Linux and Debian.
***Warning***: I'm working with **Arch Linux** and **Debian.** Don’t blindly use my settings unless you know what that entails. Use at your own risk!

---
## Styles
**"Keep it simple stupid."**
![image](./assets/desktop.png)
![image](./assets/windows.png)

> ri • cing /ry-sing/
>
> - Making visual improvements and customization to your desktop and/or phone that can simplify your desktop environment but (generally) are completely pointless.
> - Wasting time because aesthetic.
## Installing

```console
Expand All @@ -35,7 +39,6 @@ A concise guide to archlinux in Chinese https://arch.icekylin.online/
- btop
- conky
- dust
- eww
- fastfetch
- fcitx5 with rime-ice
- gBar
Expand All @@ -58,7 +61,7 @@ A concise guide to archlinux in Chinese https://arch.icekylin.online/
### PKGBUILDs
Research packages that are maintained by me or archived for geophysics.
- cuda-multiversion
- intel-oneapi-hpckit (include oneapi-basekit)
- intel-oneapi-hpckit (with oneapi-basekit)
- madagascar
- mathematica
- matlab
Expand All @@ -79,6 +82,7 @@ You can find a list of the geophysical codes that I am currently utilizing for m
- logout
- maintenace
- pytorch cuda test
- screenrecord
- screenshot
- volume control
- wayland session lock
Expand All @@ -87,9 +91,9 @@ You can find a list of the geophysical codes that I am currently utilizing for m
Please check in [dotfile/wallpaper](./wallpaper/).

### Window manager
- Awesomewm
- dwm
- Hyprland
- dwm (Xorg)
- GNOME (DE on workstation)
- Hyprland (Wayland)

## License
The code is available under the [MIT license][license].
Expand Down
2 changes: 1 addition & 1 deletion config/btop/btop.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ graph_symbol_net = "default"
graph_symbol_proc = "default"

#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
shown_boxes = "cpu mem net proc gpu0"
shown_boxes = "cpu mem net proc"

#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 300
Expand Down
17 changes: 10 additions & 7 deletions config/hypr/configs/animation.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ animations {
bezier = gnome, 0, 0.85, 0.3, 1
bezier = funky, 0.46, 0.35, -0.2, 1.2
bezier = ease, 0.165, 0.84, 0.44, 1
bezier = winIn, 0.1, 1.1, 0.1, 1.1
bezier = winOut, 0.3, -0.3, 0, 1
bezier = liner, 1, 1, 1, 1
# animation=NAME,ONOFF,SPEED,CURVE,STYLE


Expand All @@ -36,15 +39,15 @@ animations {
# ↳ workspaces - styles: slide, slidevert, fade, slidefade, slidefadevert
# ↳ specialWorkspace - styles: same as workspaces

animation = windows, 1, 5, md3_standard
animation = windowsIn, 1, 7, default, popin 80%
animation = windowsOut, 1, 7, default, popin 80%
animation = windowsMove, 1, 7, default, popin 80%
animation = windows, 1, 5, md3_standard, slide
animation = windowsIn, 1, 7, winIn, slide
animation = windowsOut, 1, 7, winOut, slide
animation = windowsMove, 1, 7, ease, slide

animation = fade, 1, 3, default
animation = fade, 1, 10, default

animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = border, 1, 3, liner
animation = borderangle, 1, 15, liner, loop

animation = workspaces, 1, 6, ease, slidefadevert 20%
animation = specialWorkspace, 1, 6, overshot, slide
Expand Down
3 changes: 2 additions & 1 deletion config/hypr/configs/env.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Display Environment
## Some default env vars.
env = GTK_THEME,
env = GDK_SCALE,1
env = XCURSOR_THEME,
env = XCURSOR_SIZE,24
env = WLR_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0
Expand All @@ -21,5 +22,5 @@ env = QT_AUTO_SCREEN_SCALE_FACTOR,1 # QT根据显示器的像素密度
env = QT_QPA_PLATFORM,wayland:xcb # QT 应用程序使用 Wayland 后端
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 #禁用QT应用程序上的窗户装饰
env = QT_QPA_PLATFORMTHEME,qt5ct #基于 QT 的应用程序从 qt5ct 中选择主题

env = QT_AUTO_SCREEN_SCALE_FACTOR,1

3 changes: 2 additions & 1 deletion config/hypr/configs/input.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ device:epic-mouse-v1 {
## 手势
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = off
workspace_swipe = true
workspace_swipe_fingers = 3
}
33 changes: 22 additions & 11 deletions config/hypr/configs/keybinds.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ $terminal = kitty
$filemanager = pcmanfm

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, killactive,
bind = $mainMod, C, killactive,
bind = $mainMod, Q, ~/.config/hypr/scripts/hyprkill,
bind = $mainMod, C, ~/.config/hypr/scripts/hyprkill,
bind = SUPERSHIFT, Q, exit,
bind = $mainMod, F, fullscreen,0
bind = SUPERSHIFT, F, fullscreen, 1
bind = $mainMod, SPACE, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# bind = $mainMod, P, pseudo, # dwindle
# bind = $mainMod, J, togglesplit, # dwindle


bind = SUPERSHIFT, R, exec, hyprctl reload,
Expand All @@ -28,18 +28,23 @@ bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decod
bind = SUPERSHIFT, RETURN, layoutmsg, swapwithmaster,master
bind = SUPERSHIFT, C, exec, sh ~/.config/scripts/hyprPicker.sh
bind = CTRLALT, K, exec, sh ~/.config/rofi/powermenu/type-4/powermenu.sh
bind = SUPERALT, G, exec, ~/.config/hypr/scripts/gamemode.sh # disable hypr effects for gamemode
bind = CTRLALT, L, exec, ~/.config/scripts/wayland_session_lock
bind = CTRLALT, A, exec, ~/.config/scripts/screenshot area
bind = $mainMod, O, exec, ~/.config/scripts/killprocess
bind = $mainMod, N, exec, ~/.config/scripts/wallpaper.sh

bind = , XF86PowerOff, exec, ~/.config/scripts/power-menu/powermenu.sh
bind = , XF86AudioMute, exec, ~/.config/hypr/scripts/volume mute
bind = , XF86AudioLowerVolume, exec, ~/.config/hypr/scripts/volume down
bind = , XF86AudioRaiseVolume, exec, ~/.config/hypr/scripts/volume up
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindle = , XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/brightness up # increase screen brightness
bindle = , XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/brightness down # decrease screen brightnes
bind = , XF86PowerOff, exec, ~/.config/scripts/power-menu/powermenu.sh
bind = , XF86AudioMute, exec, ~/.config/hypr/scripts/volume mute
bind = , XF86AudioLowerVolume, exec, ~/.config/hypr/scripts/volume down
bind = , XF86AudioRaiseVolume, exec, ~/.config/hypr/scripts/volume up
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindle = , XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/brightness up # increase screen brightness
bindle = , XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/brightness down # decrease screen brightnes
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPrev, exec, playerctl previous

## MPC controls. Requires mpc and mpd to be installed.
bind = SHIFTALT, right, exec, mpc next
Expand Down Expand Up @@ -126,3 +131,9 @@ bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# Create an empty “passthrough” submap then hyprland will ignore your keybinds and passes them on to the vm.
bind = CTRL Alt_L, V, submap, passthrough
submap = passthrough
bind = CTRL Alt_L, V, submap, reset
submap = reset
45 changes: 33 additions & 12 deletions config/hypr/configs/winrules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,7 @@
# windowrule = opacity 1.0 override 0.5 override,^(kitty)$ # set opacity to 1.0 active and 0.5 inactive for kitty
# windowrule = rounding 10,^(kitty)$ # set rounding to 10 for kitty

# Float Necessary Windows
windowrule=float, Rofi
windowrule=float,avucontrol
windowrulev2 = float,class:^()$,title:^(Picture in picture)$
windowrulev2 = float,class:^(brave)$,title:^(Save File)$
windowrulev2 = float,class:^(brave)$,title:^(Open File)$
windowrulev2 = float,class:^(LibreWolf)$,title:^(Picture-in-Picture)$
windowrulev2 = float,class:^(blueman-manager)$
windowrulev2 = float,class:^(org.twosheds.iwgtk)$
windowrulev2 = float,class:^(blueberry.py)$
windowrulev2 = float,class:^(xdg-desktop-portal-gtk)$
windowrulev2 = float,class:^(geeqie)$


# Increase the opacity
windowrule=opacity 0.92,Thunar
Expand Down Expand Up @@ -79,6 +68,8 @@ windowrulev2 = opacity 0.80 0.80,class:^(steam)$
windowrulev2 = opacity 0.80 0.80,class:^(steamwebhelper)$
windowrulev2 = opacity 0.80 0.80,class:^(Spotify)$
windowrulev2 = opacity 0.80 0.80,class:^(Code)$
windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$
windowrulev2 = opacity 0.80 0.80,class:^(kitty)$
windowrulev2 = opacity 0.80 0.80,class:^(thunar)$
windowrulev2 = opacity 0.80 0.80,class:^(file-roller)$
windowrulev2 = opacity 0.80 0.80,class:^(nwg-look)$
Expand All @@ -87,8 +78,15 @@ windowrulev2 = opacity 0.80 0.80,class:^(discord)$ #Discord-Electron
windowrulev2 = opacity 0.80 0.80,class:^(WebCord)$ #WebCord-Electron
windowrulev2 = opacity 0.80 0.70,class:^(pavucontrol)$
windowrulev2 = opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$
windowrulev2 = opacity 0.80 0.70,class:^(polkit-gnome-authentication-agent-1)$
windowrulev2 = opacity 0.80 0.80,class:^(org.telegram.desktop)$
windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$
windowrulev2 = opacity 0.80 0.70,class:^(nm-applet)$
windowrulev2 = opacity 0.80 0.70,class:^(nm-connection-editor)$

# Float Necessary Windows
windowrule=float, Rofi
windowrule=float,avucontrol
# Position
windowrulev2 = float,class:^(org.kde.polkit-kde-authentication-agent-1)$
windowrulev2 = float,class:^(pavucontrol)$
Expand All @@ -108,6 +106,29 @@ windowrulev2 = float,title:^(Open File)$
windowrulev2 = float,title:^(branchdialog)$
windowrulev2 = float,title:^(Confirm to replace files)
windowrulev2 = float,title:^(File Operation Progress)
windowrulev2 = float,class:^()$,title:^(Picture in picture)$
windowrulev2 = float,class:^(brave)$,title:^(Save File)$
windowrulev2 = float,class:^(brave)$,title:^(Open File)$
windowrulev2 = float,class:^(LibreWolf)$,title:^(Picture-in-Picture)$
windowrulev2 = float,class:^(blueman-manager)$
windowrulev2 = float,class:^(org.twosheds.iwgtk)$
windowrulev2 = float,class:^(blueberry.py)$
windowrulev2 = float,class:^(xdg-desktop-portal-gtk)$
windowrulev2 = float,class:^(geeqie)$
windowrulev2 = float,class:^(qt5ct)$
windowrulev2 = float,class:^(nwg-look)$
windowrulev2 = float,class:^(org.kde.ark)$
windowrulev2 = float,class:^(Signal)$ #Signal-Gtk
windowrulev2 = float,class:^(com.github.rafostar.Clapper)$ #Clapper-Gtk
windowrulev2 = float,class:^(app.drey.Warp)$ #Warp-Gtk
windowrulev2 = float,class:^(net.davidotek.pupgui2)$ #ProtonUp-Qt
windowrulev2 = float,class:^(yad)$ #Protontricks-Gtk
windowrulev2 = float,class:^(eog)$ #Imageviewer-Gtk
windowrulev2 = float,class:^(io.gitlab.theevilskeleton.Upscaler)$ #Upscaler-Gtk
windowrulev2 = float,class:^(nm-applet)$
windowrulev2 = float,class:^(nm-connection-editor)$
windowrulev2 = float,class:^(org.kde.polkit-kde-authentication-agent-1)$


windowrulev2 = move 75 44%,title:^(Volume Control)$

Expand Down
14 changes: 14 additions & 0 deletions config/hypr/scripts/gamemode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | sed -n '2p' | awk '{print $2}')
if [ $HYPRGAMEMODE = 1 ] ; then
hyprctl --batch "\
keyword animations:enabled 0;\
keyword decoration:drop_shadow 0;\
keyword decoration:blur:enabled 0;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
exit
fi
hyprctl reload
5 changes: 5 additions & 0 deletions config/hypr/scripts/hyprkill
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [ "$(hyprctl activewindow -j | jq -r ".class")" = "Steam" ]; then
xdotool getactivewindow windowunmap
else
hyprctl dispatch killactive ""
fi
Loading

0 comments on commit 756c86b

Please sign in to comment.