feat: Hyprland

This commit is contained in:
ziro 2023-04-06 08:03:28 +07:00
parent 3a4f4256f8
commit 1eaeedfd76
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
5 changed files with 149 additions and 3 deletions

133
.config/hypr/hyprland.conf Normal file
View file

@ -0,0 +1,133 @@
exec-once = xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources
exec-once = waybar
exec-once = unclutter
exec-once = dunst
exec-once = numlockx
exec-once = lxpolkit
monitor=,preferred,auto,auto
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
rounding = 5
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
pseudotile = on
preserve_split = on
no_gaps_when_only = on
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = on
}
# I don't use Trackpads/Touchpads, gestures basically useless for me (for now)
#gestures {
# # See https://wiki.hyprland.org/Configuring/Variables/ for more
# workspace_swipe = off
#}
# Alt Key = Mostly for terminals only
$mainMod = SUPER # Super Key = General MOD for WM
$metaMod = SUPER ALT # Super + Alt = MOD key(s) that control/modify the WM's behaviour
$spaceMod = SUPER SHIFT # Super + Shift = MOD key(s) that control/modify the Workspace's behaviour
bind = $mainMod, space, exec, kitty
bind = $mainMod, Q, killactive,
bind = $mainMod, B, exec, $BROWSER
bind = , Print, exec, flameshot gui
bind = , XF86Search, exec, tofi-run
bind = $metaMod, Q, exit,
bind = $metaMod, F, togglefloating,
bind = $metaMod, P, pseudo, # for dwindle only
bind = $metaMod, J, togglesplit, # for dwindle only
# Window focus
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Workspace
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $spaceMod, 1, movetoworkspace, 1
bind = $spaceMod, 2, movetoworkspace, 2
bind = $spaceMod, 3, movetoworkspace, 3
bind = $spaceMod, 4, movetoworkspace, 4
bind = $spaceMod, 5, movetoworkspace, 5
bind = $spaceMod, 6, movetoworkspace, 6
bind = $spaceMod, 7, movetoworkspace, 7
bind = $spaceMod, 8, movetoworkspace, 8
bind = $spaceMod, 9, movetoworkspace, 9
bind = $spaceMod, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
#bindm = $metaMod, mouse:272, movewindow
#bindm = $metaMod, mouse:273, resizewindow

10
.config/tofi/config Normal file
View file

@ -0,0 +1,10 @@
width = 100%
height = 100%
border-width = 0
outline-width = 0
padding-left = 35%
padding-top = 35%
result-spacing = 25
num-results = 5
font = monospace
background-color = #000A

View file

@ -78,7 +78,7 @@ Plug 'hrsh7th/nvim-cmp', { 'branch': 'main' }
Plug 'JuliaEditorSupport/julia-vim'
" --- enhanced python highlighting
Plug 'wookayin/semshi', {'do': ':UpdateRemotePlugins'}
"Plug 'wookayin/semshi', {'do': ':UpdateRemotePlugins'}
" --- For golang
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
@ -93,6 +93,9 @@ Plug 'wakatime/vim-wakatime'
Plug 'GutenYe/json5.vim'
" --- Project Fluent support
Plug 'projectfluent/fluent.vim'
call plug#end()
" ======================

View file

@ -94,7 +94,7 @@ autocmd BufEnter *.py set ai sw=4 ts=4 sta et fo=croql
autocmd BufEnter *.c set ai sw=4 ts=4 sta noet fo=croql
autocmd BufEnter *.md set ai sw=3 ts=3 sta et fo=croql
autocmd Filetype html* set ai sw=4 ts=4 sta et fo=croql
autocmd Filetype css set ai sw=4 ts=4 sta et fo=croql
autocmd Filetype *css set ai sw=4 ts=4 sta et fo=croql
autocmd Filetype javascript set ai sw=4 ts=4 sta et fo=croql
autocmd Filetype vue set ai sw=4 ts=4 sta et fo=croql
autocmd Filetype php set ai sw=4 ts=4 sta et fo=croql

View file

@ -13,7 +13,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
if [[ "1$(pidof dwm)" == "1" ]]; then
echo ""
echo
else
# Autostarts for DWM
# fcitx5 -d &