complete restructure of hyprland config and some other shit

This commit is contained in:
2026-02-28 17:00:52 +00:00
parent 1425aaa27d
commit 98d5d2a812
16 changed files with 267 additions and 185 deletions

View File

@@ -1,35 +1,23 @@
# Main modifier
$mainMod = mod1 # super / meta / windows key
$submod = super
# Script Path
$scrPath = ~/.config/scripts
# Assign apps
$term = kitty
$editor = kitty -e nvim
$file = thunar
$browser = firefox
$launcher = $scrPath/otter-launch.sh
# Window/Session actions
bind = $mainMod, backspace, exec, $scrPath/dontkillsteam.sh # close focused window
bind = $mainMod, F, fullscreen # toggle the window between focus and fullscreen
bind = $mainMod, e, exec, wlogout -b 5 # Wlogout menu
bind = $mainMod, d, exec, walker # Launcher
# Application shortcuts
bind = $mainMod, return, exec, $term # launch terminal emulator
bind = $mainMod, i, exec, $editor # launch text editor
bind = $mainMod, o, exec, $browser # launch web browser
bind = $mainMod, d, exec, $launcher
# Super key to drag windows
binds {
drag_threshold = 10
scroll_event_delay = 0
}
bindm = Super, mouse:272, movewindow
bindc = SUPER, mouse:272, togglefloating
bindm = $submod, mouse:272, movewindow
bindc = $submod, mouse:272, togglefloating
# Resize floating window with scrollwheels
bind = $submod, mouse_down, resizeactive, 0 -30
@@ -47,34 +35,12 @@ bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Switch workspaces
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 focused window to a workspace
bind = $mainMod+Shift, 1, movetoworkspacesilent, 1
bind = $mainMod+Shift, 2, movetoworkspacesilent, 2
bind = $mainMod+Shift, 3, movetoworkspacesilent, 3
bind = $mainMod+Shift, 4, movetoworkspacesilent, 4
bind = $mainMod+Shift, 5, movetoworkspacesilent, 5
bind = $mainMod+Shift, 6, movetoworkspacesilent, 6
bind = $mainMod+Shift, 7, movetoworkspacesilent, 7
bind = $mainMod+Shift, 8, movetoworkspacesilent, 8
bind = $mainMod+Shift, 9, movetoworkspacesilent, 9
bind = $mainMod+Shift, 0, movetoworkspacesilent, 10
# Move/Switch to special workspace (scratchpad)
bind = $mainMod, MINUS, togglespecialworkspace, scratch
bind = $mainMod SHIFT, MINUS, movetoworkspacesilent, special:scratch
bind = $mainMod, m, togglespecialworkspace, music
# Resize floating windows with keyboard
bind = $submod, left, resizeactive, -50 0
bind = $submod, right, resizeactive, 50 0
@@ -95,3 +61,4 @@ bind = $mainMod SHIFT, L, swapwindow, r
bind = $mainMod SHIFT, K, swapwindow, u
bind = $mainMod SHIFT, J, swapwindow, d
source = ~/.config/hypr/binds-local.conf

View File

@@ -1,7 +1,7 @@
source = ~/.config/hypr/local.conf
source = ~/.config/hypr/binds.conf
source = ~/.config/hypr/style.conf
source = ~/.config/hypr/input.conf
source = ~/.config/hypr/rules.conf
source = ~/.config/hypr/windows.conf
source = ~/.config/hypr/startup.conf
source = ~/.config/hypr/local.conf

View File

@@ -87,6 +87,14 @@ windowrule {
match:title = ^(.*Save.*)
}
windowrule {
name = otter-launcher-initial
size = 420 220
float = on
animation = popin 50%
match:class = ^(otter)$
}
windowrule {
name = nodim-fullscreen
match:fullscreen = 1
@@ -118,7 +126,7 @@ layerrule {
ignore_alpha = 0
blur = on
animation = popin 70%
match:namespace = walker
match:namespace = otter-panel
}
layerrule {

View File

@@ -30,6 +30,9 @@ dwindle {
preserve_split = true # You probably want this
permanent_direction_override = true
}
scrolling {
}
# GTK shennanigans
exec = gsettings set org.gnome.desktop.interface icon-theme 'BeautyDream'
@@ -43,7 +46,7 @@ general {
border_size = 2
col.active_border = rgba(cba6f7ff) rgba(cba6f7ff) 45deg
col.inactive_border = rgba(45475acc) rgba(45475acc) 45deg
layout = dwindle
layout = scrolling
resize_on_border = true
}
@@ -54,18 +57,20 @@ group {
col.border_locked_inactive = rgba(b4befecc) rgba(6c7086cc) 45deg
}
scrolling {
column_width = 0.6
focus_fit_method = 1
}
decoration {
rounding = 10
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 0.8
dim_inactive = true
dim_strength = 0.3
blur {
enabled = true
size = 1
@@ -93,8 +98,8 @@ animations {
bezier = smooth, 0.3,0,0.5,1
bezier = my, 0.34,0.77,0.74,1.47
animation = windows, 1, 2, smooth, slide
animation = windowsOut, 1, 2, smooth, slide
animation = windows, 1, 2, smooth, slide right
animation = windowsOut, 1, 2, smooth, slide right
animation = windowsMove, 1, 3, smooth, slide
animation = border, 1, 2, smooth
animation = borderangle, 1, 8, my

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View File

@@ -0,0 +1,152 @@
[general]
default_module = "app" # module to run when no prefix is matched
empty_module = "app" # run with an empty prompt
exec_cmd = "zsh -c" # exec command of your shell
vi_mode = false # set true to use vi keybinds, false emacs keybinds
esc_to_abort = true # useful for vi users
cheatsheet_entry = "?" # when prompted, will show a list of configured modules
cheatsheet_viewer = "less -R; clear" # command to show cheatsheet; through piping stdout
clear_screen_after_execution = false
loop_mode = false # don't quit after executing a module, useful with scratchpads; stderr is hidden in loop mode
external_editor = "nvim" # if set, press ctrl+x ctrl+ee (or v in vi normal mode) to edit prompt in the specified program
delay_startup = 0 # sometimes the otter runs too fast even before the terminal window is ready; this slows it down by milliseconds; useful when chafa image is skewed
# ANSI color codes are allowed. However, \x1b should be replaced with \u001B, because the rust toml crate cannot read \x as an escaped character
[interface]
# use three quotes to write longer codes
header = """
\u001B[1;36m$USER@nixos\u001B[0m \u001B[34m
"""
header_cmd = "" # run a command and print stdout above the header
header_cmd_trimmed_lines = 0 # remove trailing lines from header_cmd output, in case of some programs appending excessive empty lines
place_holder = "otterly awesome" # at the input field
suggestion_mode = "list" # available options: list, hint
footer = "" # add a line after suggestion list
suggestion_lines = 8 # 0 to disable suggestions and tab completion
list_prefix = " "
selection_prefix = "\u001B[31;1m "
prefix_padding = 3 # format prefixes to have a uniformed width
default_module_message = " \u001B[33mlaunch\u001B[0m app" # shown when the default module is in use
empty_module_message = "" # shown when the empty module is in use
customized_list_order = false # false to list modules alphabetically; true to list as per the configured order in the below [[modules]] section
indicator_with_arg_module = "* " # the sign showing whether a module should run with an argument
indicator_no_arg_module = ""
# below color options affect all modules; per-module coloring can be configured using ansi codes individually
prefix_color = "\u001B[33m"
description_color = "\u001B[39m"
place_holder_color = "\u001B[30m"
hint_color = "\u001B[30m" # suggestion color in hint mode
# move the interface rightward or downward
move_interface_right = 20
move_interface_down = 0
# overlay is a floating layer that can be printed with stdout and moved around; useful for integrating chafa images
[overlay]
overlay_cmd = """
chafa -s 20x20 ~/.config/otter-launcher/cat.png
"""
overlay_trimmed_lines = 1
# modules are defined as followed
[[modules]]
description = "google search"
prefix = "gg"
cmd = "firefox --new-window https://www.google.com/search?q='{}'"
with_argument = true # if true, {} in cmd will be replaced with user input. if not explicitly set, taken as false.
url_encode = true # should be true when calling webpages; this ensures special characters in url being readable to browsers; taken as false if not explicitly set
unbind_proc = true # run cmd in a forked shell as opposed to as a child process (simply by prepending setsid -f to the configured cmd); useful for launching gui programs; taken as false if not explicitly set
[[modules]]
description = "launch programs"
prefix = "app"
cmd = """
hyprctl dispatch resizeactive 300 500 &&
hyprctl dispatch centerwindow &
fsel -d
"""
[[modules]]
description = "nerd icons"
prefix = "nerd"
cmd = """
hyprctl dispatch resizeactive 300 500 &&
hyprctl dispatch centerwindow &
hyprctl dispatch exec wl-copy $(cat ~/.config/otter-launcher/icons.json | jq -r '. | to_entries[] | "\\(.value.char) \\(.key)"' | fzf | awk '{print $1}' | tr -d '\n')
"""
[[modules]]
description = "power menu (fzf)"
prefix = "po"
cmd = """
function power {
if [[ -n $1 ]]; then
case $1 in
"logout") session=`loginctl session-status | head -n 1 | awk '{print $1}'`; loginctl terminate-session $session ;;
"suspend") systemctl suspend ;;
"hibernate") systemctl hibernate ;;
"reboot") systemctl reboot ;;
"shutdown") systemctl poweroff ;;
esac fi }
power $(echo -e 'reboot\nshutdown\nlogout\nsuspend\nhibernate' | fzf --padding 1,2 --info-command 'printf " power menu ($FZF_POS/$FZF_TOTAL_COUNT)"' --cycle --gutter " " --pointer " " --color "bg+:-1,pointer:1,info:8,separator:8,scrollbar:0" --prompt ' ' | tail -1)
"""
[[modules]]
description = "run command"
prefix = "sh"
cmd = """
hyprctl dispatch exec 'kitty -e zsh -c "{}"'
"""
with_argument = true
unbind_proc = true
[[modules]]
description = "notes"
prefix = "n"
cmd = """
hyprctl dispatch exec "kitty -e nvim --cmd 'cd ~/Notes/'"
"""
[[modules]]
description = "nixos wiki"
prefix = "nw"
cmd = "firefox --new-window 'https://wiki.nixos.org/w/index.php?search={}'"
with_argument = true
url_encode = true
unbind_proc = true
[[modules]]
description = "search nixpkgs"
prefix = "nix"
cmd = "firefox --new-window 'https://search.nixos.org/packages?query={}'"
with_argument = true
url_encode = true
unbind_proc = true
[[modules]]
description = "cambridge dict"
prefix = "dc"
cmd = "firefox --new-window 'https://dictionary.cambridge.org/dictionary/english/{}'"
with_argument = true
url_encode = true
unbind_proc = true
[[modules]]
description = "open dirs (yazi)"
prefix = "path"
cmd = """
hyprctl dispatch resizeactive 300 500 &&
hyprctl dispatch centerwindow &
hyprctl dispatch exec thunar $(find . -maxdepth 2 -type d | fzf)
"""
[[modules]]
description = "run music"
prefix = "jf"
cmd = """
hyprctl dispatch resizeactive 300 500 &&
hyprctl dispatch centerwindow &
hyprctl dispatch exec thunar $(find . -maxdepth 2 -type d | fzf)
"""

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
if [ -z $(hyprctl clients | grep "class: otter") ];
then hyprctl dispatch exec "kitty --class otter --title otter-launcher -e sh -c 'sleep 0.05 && otter-launcher'";
else echo application_already_Running;
if [ -z $(hyprctl activewindow | grep "class: otter") ];
then hyprctl dispatch focuswindow class:otter
else hyprctl dispatch killactive none;
fi
fi

1
.zshrc
View File

@@ -10,6 +10,7 @@ eval "$(oh-my-posh init zsh --config $HOME/.config/oh-my-posh/zen.toml)"
# custom aliases
alias ls="lsd -l"
alias cat="bat"
alias v="nvim"
alias z="zellij"
alias lg="lazygit"

View File

@@ -0,0 +1,35 @@
# Main modifier
$mainMod = mod1
$submod = super
bind = $mainMod, f, fullscreen # toggle the window between focus and fullscreen
# Application shortcuts
bind = $mainMod, return, exec, $term # launch terminal emulator
bind = $mainMod, i, exec, $editor # launch text editor
bind = $mainMod, o, exec, $browser # launch web browser
# Switch workspaces
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 focused window to a workspace
bind = $mainMod+Shift, 1, movetoworkspacesilent, 1
bind = $mainMod+Shift, 2, movetoworkspacesilent, 2
bind = $mainMod+Shift, 3, movetoworkspacesilent, 3
bind = $mainMod+Shift, 4, movetoworkspacesilent, 4
bind = $mainMod+Shift, 5, movetoworkspacesilent, 5
bind = $mainMod+Shift, 6, movetoworkspacesilent, 6
bind = $mainMod+Shift, 7, movetoworkspacesilent, 7
bind = $mainMod+Shift, 8, movetoworkspacesilent, 8
bind = $mainMod+Shift, 9, movetoworkspacesilent, 9
bind = $mainMod+Shift, 0, movetoworkspacesilent, 10

View File

@@ -1,2 +1 @@
exec-once = "echo hi"
exec-once = xremap ~/.config/xremap/config.yml --device /dev/input/event0 # Remap Caps to esc so i can use nvim without losing it

View File

@@ -0,0 +1,36 @@
# Script Path
$scrPath = ~/.config/scripts
# Window/Session actions
bind = $mainMod, b, fullscreen # toggle the window between focus and fullscreen
bind = $mainMod, a, exec, wlogout -b 5 # Wlogout menu
bind = $mainMod, d, exec, $launcher
# Application shortcuts
bind = $mainMod, s, exec, $file # launch web browser
bind = $mainMod, return, exec, $term # launch terminal emulator
bind = $mainMod, f, exec, $browser # launch web browser
# Switch workspaces
bind = $mainMod, q, workspace, 1
bind = $mainMod, w, workspace, 2
bind = $mainMod, e, workspace, 3
bind = $mainMod, r, workspace, 4
bind = $mainMod, t, workspace, 5
bind = $mainMod, y, workspace, 6
bind = $mainMod, u, workspace, 7
bind = $mainMod, i, workspace, 8
bind = $mainMod, o, workspace, 9
bind = $mainMod, p, workspace, 10
bind = $mainMod+SHIFT, q, movetoworkspacesilent, 1
bind = $mainMod+SHIFT, w, movetoworkspacesilent, 2
bind = $mainMod+SHIFT, e, movetoworkspacesilent, 3
bind = $mainMod+SHIFT, r, movetoworkspacesilent, 4
bind = $mainMod+SHIFT, t, movetoworkspacesilent, 5
bind = $mainMod+SHIFT, y, movetoworkspacesilent, 6
bind = $mainMod+SHIFT, u, movetoworkspacesilent, 7
bind = $mainMod+SHIFT, i, movetoworkspacesilent, 8
bind = $mainMod+SHIFT, o, movetoworkspacesilent, 9
bind = $mainMod+SHIFT, p, movetoworkspacesilent, 10

View File

@@ -1,100 +0,0 @@
# Main modifier
$mainMod = super # super / meta / windows key
$submod = super
# Script Path
$scrPath = ~/.config/scripts
# Assign apps
$term = kitty
$file = thunar
$browser = firefox
# Window/Session actions
bind = $mainMod, backspace, exec, $scrPath/dontkillsteam.sh # close focused window
bind = $mainMod, b, fullscreen # toggle the window between focus and fullscreen
bind = $mainMod, a, exec, wlogout -b 5 # Wlogout menu
bind = $mainMod, d, exec, walker # Launcher
# Application shortcuts
bind = $mainMod, s, exec, $file # launch web browser
bind = $mainMod, return, exec, $term # launch terminal emulator
bind = $mainMod, f, exec, $browser # launch web browser
# Super key to drag windows
binds {
drag_threshold = 10
scroll_event_delay = 0
}
bindm = Super, mouse:272, movewindow
bindc = SUPER, mouse:272, togglefloating
# Resize floating window with scrollwheels
bind = $submod, mouse_down, resizeactive, 0 -30
bind = $submod, mouse_up, resizeactive, 0 30
bind = $submod, mouse_left, resizeactive, 30 0
bind = $submod, mouse_right, resizeactive, -30 0
bind = $submod, space, togglefloating, # toggle the window between focus and float
# Screenshot/Screencapture
bind = Super+SHIFT, S, exec, grimblast copy area
# Move/Change window focus
bind = $mainMod, h, movefocus, l
bind = $mainMod, l, movefocus, r
bind = $mainMod, k, movefocus, u
bind = $mainMod, j, movefocus, d
# Switch workspaces
bind = $mainMod, q, workspace, 1
bind = $mainMod, w, workspace, 2
bind = $mainMod, e, workspace, 3
bind = $mainMod, r, workspace, 4
bind = $mainMod, t, workspace, 5
bind = $mainMod, y, workspace, 6
bind = $mainMod, u, workspace, 7
bind = $mainMod, i, workspace, 8
bind = $mainMod, o, workspace, 9
bind = $mainMod, p, workspace, 10
bind = $mainMod+SHIFT, q, movetoworkspacesilent, 1
bind = $mainMod+SHIFT, w, movetoworkspacesilent, 2
bind = $mainMod+SHIFT, e, movetoworkspacesilent, 3
bind = $mainMod+SHIFT, r, movetoworkspacesilent, 4
bind = $mainMod+SHIFT, t, movetoworkspacesilent, 5
bind = $mainMod+SHIFT, y, movetoworkspacesilent, 6
bind = $mainMod+SHIFT, u, movetoworkspacesilent, 7
bind = $mainMod+SHIFT, i, movetoworkspacesilent, 8
bind = $mainMod+SHIFT, o, movetoworkspacesilent, 9
bind = $mainMod+SHIFT, p, movetoworkspacesilent, 10
# Move focused window to a workspace
# bind = $mainMod, 1, movetoworkspacesilent, 1
# bind = $mainMod, 2, movetoworkspacesilent, 2
# bind = $mainMod, 3, movetoworkspacesilent, 3
# bind = $mainMod, 4, movetoworkspacesilent, 4
# bind = $mainMod, 5, movetoworkspacesilent, 5
# bind = $mainMod, 6, movetoworkspacesilent, 6
# bind = $mainMod, 7, movetoworkspacesilent, 7
# bind = $mainMod, 8, movetoworkspacesilent, 8
# bind = $mainMod, 9, movetoworkspacesilent, 9
# bind = $mainMod, 0, movetoworkspacesilent, 10
# Move/Switch to special workspace (scratchpad)
bind = $mainMod, MINUS, togglespecialworkspace, scratch
bind = $mainMod SHIFT, MINUS, movetoworkspacesilent, special:scratch
# Resize floating windows with keyboard
# bind = $submod, left, resizeactive, -50 0
# bind = $submod, right, resizeactive, 50 0
# bind = $submod, down, resizeactive, 0 50
# bind = $submod, up, resizeactive, 0 -50
# bind = $submod SHIFT, left, moveactive, -50 0
# bind = $submod SHIFT, right, moveactive, 50 0
# bind = $submod SHIFT, down, moveactive, 0 50
# bind = $submod SHIFT, up, moveactive, 0 -50
# bind = $submod+ctrl , left, moveactive, -150 0
# bind = $submod+ctrl , right, moveactive, 150 0
# bind = $submod+ctrl , down, moveactive, 0 150
# bind = $submod+ctrl , up, moveactive, 0 -150

View File

@@ -1,4 +1,9 @@
# Main modifier
$mainMod = super # super / meta / windows key
$submod = super
#cool decorations
exec-once = kitten panel --edge=background -o background_opacity=0 --output-name HDMI-A-1 sh -c "cmatrix -b -C magenta -a -u 10"
exec-once = kitten panel --edge=background -o background_opacity=0 --output-name DP-2 sh -c "cava"
exec-once = kitten panel --edge=background -o background_opacity=0 --output-name DP-1 sh -c "fastfetch && tail -f /dev/null"

View File

@@ -1,35 +0,0 @@
{
"terminal_classes":[
"kitty",
"thunar"
],
"ignore_titles":[
"notificationtoasts_\\d+_desktop"
],
"monitors":{
"DP-1":{
"width":1364,
"height":767,
"offset":[
0,
0
]
},
"DP-2":{
"width":1364,
"height":767,
"offset":[
0,
0
]
},
"HDMI-A-1":{
"width":1364,
"height":767,
"offset":[
0,
0
]
}
}
}