diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..a9ade3b --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,218 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# term=foot-extra +term=xterm-256color +# login-shell=no + +# app-id=foot +# title=foot +# locked-title=no + +font=FiraCode Nerd Font Mono:size=11 +#font=Iosevka Nerd Font Mono:size=11 +# font-bold= +# font-italic= +# font-bold-italic= +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# box-drawings-uses-font-glyphs=no +# dpi-aware=auto + +initial-window-size-pixels=900x600 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +pad=20x20 # optionally append 'center' +# resize-delay-ms=100 + +# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# command= +# command-focused=no + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format= + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color= +# blink=no +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + + +[colors] +foreground=cad3f5 # Text +background=24273a # Base +regular0=494d64 # Surface 1 +regular1=ed8796 # red +regular2=a6da95 # green +regular3=eed49f # yellow +regular4=8aadf4 # blue +regular5=f5bde6 # pink +regular6=8bd5ca # teal +regular7=b8c0e0 # Subtext 1 +bright0=5b6078 # Surface 2 +bright1=ed8796 # red +bright2=a6da95 # green +bright3=eed49f # yellow +bright4=8aadf4 # blue +bright5=f5bde6 # pink +bright6=8bd5ca # teal +bright7=a5adcb # Subtext 0 + +# alpha=1.0 +# foreground=dcdccc +# background=111111 + +## Normal/regular colors (color palette 0-7) +# regular0=222222 # black +# regular1=cc9393 # red +# regular2=7f9f7f # green +# regular3=d0bf8f # yellow +# regular4=6ca0a3 # blue +# regular5=dc8cc3 # magenta +# regular6=93e0e3 # cyan +# regular7=dcdccc # white + +## Bright colors (color palette 8-15) +# bright0=666666 # bright black +# bright1=dca3a3 # bright red +# bright2=bfebbf # bright green +# bright3=f0dfaf # bright yellow +# bright4=8cd0d3 # bright blue +# bright5=fcace3 # bright magenta +# bright6=b3ffff # bright cyan +# bright7=ffffff # bright white + +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= + +[csd] +# preferred=server +size=0 +# font= +# color= +# hide-when-typing=no +border-width=2 +border-color=fff4dbd6 +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# show-urls-launch=Control+Shift+u +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=none +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-to-word-boundary=Control+w +# extend-to-next-whitespace=Control+Shift+w +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-row=BTN_LEFT-3 + +# vim: ft=dosini diff --git a/.config/hypr/bsplock b/.config/hypr/bsplock new file mode 100755 index 0000000..4a7a831 --- /dev/null +++ b/.config/hypr/bsplock @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +## Copyright (C) 2020-2021 Aditya Shakya +## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 + +## i3lock for bspwm for Archcraft OS. + +## Get colors ----------------- +FG="#CDD6F4" +BG="#1E1E2E" + +BLACK="#45475A" +RED="#F38BA8" +GREEN="#A6E3A1" +YELLOW="#F9E2AF" +BLUE="#89B4FA" +MAGENTA="#F5C2E7" +CYAN="#94E2D5" +WHITE="#BAC2DE" + +TOTD=`fortune -n 90 -s | head -n 1` + +## Exec ----------------- + +#betterlockscreen --lock \ +#-- \ +#--{time,date,layout,verif,wrong,greeter}-font="Iosevka" \ +swaylock \ +-f \ +--color="${BG}FF" \ +\ +--inside-ver-color=${GREEN} \ +--inside-wrong-color=${RED} \ +--inside-color="${BG}00" \ +\ +--ring-ver-color=${GREEN} \ +--ring-wrong-color=${RED} \ +--ring-color="#f5e0dc" \ +\ +--line-color=${BG} \ +--separator-color=${BG} \ +\ +--key-hl-color=${YELLOW} \ +--bs-hl-color=${RED} \ +\ +--font="Iosevka" \ +--font-size=18 \ +\ +--indicator-radius 120 \ +--indicator-thickness 8 + +# swaylock-effects +#--screenshots \ +#--effect-blur 7x16 \ +#--effect-vignette 0.5:0.2 \ + +# swayidle -w \ +# timeout 10 \ + +# hyprctl dispatch dpms off +# systemctl suspend diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..e387e36 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,477 @@ +################ +### MONITORS ### +################ + +monitor = DP-1, 1920x1080@144, 0x0, 1 +monitor = HDMI-A-1, 1920x1080, 1920x0, 1 + +# Default + +#workspace = 1, monitor:DP-1, default:true +#workspace = 2, monitor:DP-1 +#workspace = 3, monitor:DP-1 +#workspace = 4, monitor:DP-1 +#workspace = 5, monitor:HDMI-A-1 +#workspace = 6, monitor:HDMI-A-1 +#workspace = 7, monitor:HDMI-A-1 +#workspace = 8, monitor:HDMI-A-1 + +# With split plugins + +workspace = 1, default:true +workspace = 2 +workspace = 3 +workspace = 4 +workspace = 5 +workspace = 6 +workspace = 7 +workspace = 8 + +input { + kb_file = + kb_layout = + kb_variant = + kb_model = + kb_options = compose:ralt #,caps:escape + kb_rules = + + repeat_delay = 200 + repeat_rate = 50 + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + force_no_accel = true +} + + +##################### +### LOOK AND FEEL ### +##################### + +general { + gaps_in = 4 + gaps_out = 8 + border_size = 2 + col.active_border = 0xfff4dbd6 + col.inactive_border = 0x001e1e2e + apply_sens_to_raw = 0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) + resize_on_border = true + # no_border_on_floating = true + + layout = master + + allow_tearing = true +} + +group { + col.border_inactive = 0x33f4dbd6 + col.border_active = 0xeef4dbd6 + groupbar { + gradients = false + text_color = 0xf4dbd6ff + render_titles = false + col.inactive = 0x33f4dbd6 + col.active = 0xeef4dbd6 + } +} + +# Tearing +env = WLR_DRM_NO_ATOMIC,1 +windowrulev2 = immediate, class:^(cs2|osu\!|love)$ + +decoration { + rounding = 10 + + blur { + enabled = true + xray = false + size = 12 + passes = 4 + new_optimizations = on + + noise = 0.05 + contrast = 1.3 + brightness = 0.95 + special = true + } + active_opacity = 1.00 + inactive_opacity = 1.00 + + drop_shadow = 1 + # shadow_range = 20 + # shadow_render_power = 2 + # shadow_ignore_window = 1 + # shadow_offset = 8 8 + + # dim_inactive = true + dim_strength = 0.1 + dim_special = 0 + blurls = waybar + blurls = launcher + blurls = lockscreen + # blurls = swayosd + # blurls = gtk-layer-shell + + shadow_range = 10 + shadow_render_power = 2 + shadow_ignore_window = 1 + col.shadow = 0x66000000 + col.shadow_inactive = 0x00000000 +} + +animations { + enabled = true + bezier = overshot, 0.13, 0.99, 0.29, 1.1 + bezier = strongOvershot, 0.13, 0.99, 0.29, 1.3 + bezier = easeOutExpo, 0.16, 1, 0.3, 1 + bezier = easeInOutBack, 0.68, -0.6, 0.32, 1.6 + animation = windows, 1, 4, easeOutExpo, popin + animation = border, 1, 4, easeOutExpo + animation = borderangle, 1, 8, default + animation = layers, 1, 3, overshot, fade + animation = fadeIn, 1, 1, easeOutExpo + animation = fadeOut, 1, 1, easeOutExpo + animation = fadeSwitch, 1, 6, easeOutExpo + animation = fadeShadow, 1, 6, easeOutExpo + animation = fadeDim, 1, 6, easeOutExpo + animation = fadeLayers, 1, 2, easeOutExpo + animation = workspaces, 1, 6, easeOutExpo, slide + animation = specialWorkspace, 1, 1, easeOutExpo, fade +} + +dwindle { + pseudotile = true # enable pseudotiling on dwindle +} + +master { + always_center_master = true + mfact = 0.60 +} + +misc { + disable_hyprland_logo = true + disable_splash_rendering = true +# force_hypr_chan = true + vrr = 2 +# vfr = true + +# animate_mouse_windowdragging = true + focus_on_activate = false + + mouse_move_enables_dpms = true + key_press_enables_dpms = true + + + enable_swallow = false + swallow_regex = ^(foot|kitty)$ +} + +# plugin { +# hyprbars { +# # example config +# bar_height = 20 +# bar_color = rgb(24273a) +# bar_text_size = 8 +# bar_text_font = "UbuntuMono Nerd Font" +# +# # example buttons (R -> L) +# # hyprbars-button = color, size, on-click +# # hyprbars-button = rgb(ff4040), 10, 󰖭, hyprctl dispatch killactive +# # hyprbars-button = rgb(eeee11), 10, , hyprctl dispatch fullscreen 1 +# } +# } + + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# window rules +# for windows named/classed as abc and xyz +windowrulev2 = float, class:^(floating-foot)$ +windowrulev2 = float, class:^(.*nextcloud.*)$ +windowrulev2 = float, class:^(org.kde.ark)$ +windowrulev2 = stayfocused, class:^(.*nextcloud.*)$ +windowrulev2 = center, class:^(floating-foot)$ +windowrulev2 = pin, class:^(floating-foot)$ +windowrulev2 = float, title:^(Move files)$ +windowrulev2 = center, title:^(Move files)$ +# windowrulev2 = stayfocused, title:^()$,class:^(steam)$ +# windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$ +# windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + +# transparency +windowrulev2 = opacity 1.0 override 0.9 override, class:^(kitty|foot|footclient|floating-foot|VSCodium|Code)$ + +# games +# windowrulev2 = workspace 4, class:^(steam_app_*|osu\!|org.prismlauncher.PrismLauncher|steam_app_671860|com.usebottles.bottles|moe.launcher.an-anime-game-launcher|moe.launcher.the-honkers-railway-launcher|genshinimpact.exe|starrail.exe|trackma-*|cs2|csgo_linux64)$ + + +#################### +### KEYBINDINGSS ### +#################### +# +# binds +$mod = SUPER + +# mouse +bindm = $mod, mouse:272, movewindow +bindm = $mod, mouse:273, resizewindow + +# hyprctl / misc dispatchers +bind = $mod SHIFT, R, exec, hyprctl reload +bind = $mod SHIFT, Q, exit, +bind = $mod, Q, exec, rofi -show power-menu -modi power-menu:rofi-power-menu +bind = $mod, C, killactive, + +# screenshot +bind = $mod SHIFT, S, exec, hyprshot -m region +bind = $mod CONTROL SHIFT, S, exec, grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied '{}'" +bind = $mod, Print, exec, hyprshot -m window + +# apps +bind = $mod, Return, exec, footclient +bind = $mod SHIFT, Return, exec, footclient -F +bind = $mod SHIFT, E, exec, xdg-open . +# bind = $mod, E, exec, footclient -a "fm-term" tmux new-session -A -s filemanager 'nnn -da -P p' +bind = $mod, E, exec, kitty --class="fm-term" nnn -a -P p +bind = $mod, Space, togglefloating, +bind = $mod, T, exec, swaync-client --toggle-panel +# bind = $mod SHIFT, D, exec, tofi-drun --drun-launch=true +bind = $mod, D, exec, rofi -show drun -theme catppuccin-macchiato +# bind = $mod, D, exec, anyrun +bind = $mod, W, exec, rofi -show window -theme catppuccin-macchiato +# bind = ALT_L, Tab, exec, rofi -show window -theme catppuccin-macchiato +# bind = ALT_L, Tab, exec, eww open overview +# bind = ALT_L, Tab, exec, killall -SIGUSR1 sfwbar +bind = $mod, P, pseudo, # dwindle only +# bind = $mod SHIFT, P, exec, hyprctl dispatch dpms off +# bind = $mod SHIFT, L, exec, ~/.config/hypr/bsplock +bind = $mod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy +bind = $mod, N, exec, networkmanager_dmenu +bind = CAPS, , exec, swayosd-client --caps-lock-led + +# Scratch pad + +bind = $mod CONTROL, Return, exec, footclient -a "floating-foot" + +# audio +# bind = , 123, exec, pactl set-sink-volume @DEFAULT_SINK@ +2% +# bind = , 122, exec, pactl set-sink-volume @DEFAULT_SINK@ -2% +# bind = , 121, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle +bind = , 123, exec, swayosd-client --output-volume raise || pactl set-sink-volume @DEFAULT_SINK@ +5% +bind = , 122, exec, swayosd-client --output-volume lower || pactl set-sink-volume @DEFAULT_SINK@ -5% +bind = , 121, exec, swayosd-client --output-volume mute-toggle || pactl set-sink-mute @DEFAULT_SINK@ toggle +bind = , 171, exec, playerctl next +bind = , 172, exec, playerctl play-pause +bind = , 173, exec, playerctl previous + +# pass +# bind = , mouse:275, pass, ^(discord|WebCord)$ + +# window +bind = $mod, U, focusurgentorlast, +bind = $mod CONTROL, Tab, movewindow, mon:+1 +bind = $mod, Escape, cyclenext +bind = $mod, S, togglesplit + +bind = $mod, F, fullscreen +bind = $mod SHIFT, F, fullscreen, 1 +# bind = $mod, M, fakefullscreen + +bind = $mod, left, movefocus, l +bind = $mod, right, movefocus, r +bind = $mod, up, movefocus, u +bind = $mod, down, movefocus, d + +bind = $mod, h, movefocus, l +bind = $mod, l, movefocus, r +bind = $mod, k, movefocus, u +bind = $mod, j, movefocus, d + +bind = $mod SHIFT, left, movewindow, l +bind = $mod SHIFT, right, movewindow, r +bind = $mod SHIFT, up, movewindow, u +bind = $mod SHIFT, down, movewindow, d +bind = $mod SHIFT, h, movewindow, l +bind = $mod SHIFT, l, movewindow, r +bind = $mod SHIFT, k, movewindow, u +bind = $mod SHIFT, j, movewindow, d + +# master layout +bind = $mod, x, layoutmsg, swapwithmaster +bind = $mod CONTROL, left , layoutmsg, orientationleft +bind = $mod CONTROL, right, layoutmsg, orientationright +bind = $mod CONTROL, up , layoutmsg, orientationtop +bind = $mod CONTROL, down , layoutmsg, orientationbottom +bind = $mod CONTROL, c , layoutmsg, orientationcenter + +# workspace +# bind = $mod, 1, workspace, 1 +# bind = $mod, 2, workspace, 2 +# bind = $mod, 3, workspace, 3 +# bind = $mod, 4, workspace, 4 +# bind = $mod, 5, workspace, 5 +# bind = $mod, 6, workspace, 6 +# bind = $mod, 7, workspace, 7 +# bind = $mod, 8, workspace, 8 + +bind = $mod, 1, split-workspace, 1 +bind = $mod, 2, split-workspace, 2 +bind = $mod, 3, split-workspace, 3 +bind = $mod, 4, split-workspace, 4 +bind = $mod, 5, split-workspace, 5 +bind = $mod, 6, split-workspace, 6 +bind = $mod, 7, split-workspace, 7 +bind = $mod, 8, split-workspace, 8 + +bind = $mod, A, togglespecialworkspace +bind = $mod SHIFT, A, movetoworkspace, special + +# bind = $mod SHIFT, 1, movetoworkspace, 1 +# bind = $mod SHIFT, 2, movetoworkspace, 2 +# bind = $mod SHIFT, 3, movetoworkspace, 3 +# bind = $mod SHIFT, 4, movetoworkspace, 4 +# bind = $mod SHIFT, 5, movetoworkspace, 5 +# bind = $mod SHIFT, 6, movetoworkspace, 6 +# bind = $mod SHIFT, 7, movetoworkspace, 7 +# bind = $mod SHIFT, 8, movetoworkspace, 8 + +bind = $mod SHIFT, 1, split-movetoworkspace, 1 +bind = $mod SHIFT, 2, split-movetoworkspace, 2 +bind = $mod SHIFT, 3, split-movetoworkspace, 3 +bind = $mod SHIFT, 4, split-movetoworkspace, 4 +bind = $mod SHIFT, 5, split-movetoworkspace, 5 +bind = $mod SHIFT, 6, split-movetoworkspace, 6 +bind = $mod SHIFT, 7, split-movetoworkspace, 7 +bind = $mod SHIFT, 8, split-movetoworkspace, 8 + +bind = $mod, B, exec, killall -SIGUSR1 waybar + +bind = $mod, mouse_down, workspace, e-1 +bind = $mod, mouse_up, workspace, e+1 +bind = $mod SHIFT CONTROL, left, swapactiveworkspaces, current -1 +bind = $mod SHIFT CONTROL, right, swapactiveworkspaces, current +1 + +# Groups + +bind = $mod, g, togglegroup +bind = $mod SHIFT, g, moveoutofgroup +bind = $mod CONTROL, Space, changegroupactive + +# Monitors + +bind = $mod, comma, focusmonitor, -1 +bind = $mod, period, focusmonitor, +1 +bind = $mod SHIFT, comma, movewindow, mon:-1 +bind = $mod SHIFT, period, movewindow, mon:+1 + +# pyprland + +# bind = $mod, M, exec, /home/eric/.local/bin/pypr toggle_minimized +# bind = $mod SHIFT, M, togglespecialworkspace, minimized + +# bind = $mod, Tab, exec, /home/eric/.local/bin/pypr expose +# bind = $mod SHIFT, W, togglespecialworkspace, exposed + +# hycov + +# bind = $mod, Tab, hycov:toggleoverview +# bind = $mod, W, hycov:toggleoverview +# bind = $mod SHIFT, Tab,hycov:toggleoverview,forceall #grave key is the '~' key +# bind = $mod CONTROL, Tab, hycov:toggleoverview,forceallinone +# bind = ALT_L, Escape, hycov:toggleoverview +# +# bind = $mod, left, hycov:movefocus,l +# bind = $mod, down, hycov:movefocus,d +# bind = $mod, up, hycov:movefocus,u +# bind = $mod, right, hycov:movefocus,r + +# bind = $mod, h, hycov:movefocus,l +# bind = $mod, j, hycov:movefocus,d +# bind = $mod, k, hycov:movefocus,u +# bind = $mod, l, hycov:movefocus,r + +# hyprexpo + +# bind = $mod SHIFT, W, hyprexpo:expo, toggle # can be: toggle, off/disable or on/enable + +plugin { + hycov { + overview_gappo = 60 # gaps width from screen edge + overview_gappi = 24 # gaps width from clients + enable_hotarea = 0 # enable mouse cursor hotarea + hotarea_monitor = all # monitor name which hotarea is in, default is all + hotarea_pos = 3 # position of hotarea (1: bottom left, 2: bottom right, 3: top left, 4: top right) + hotarea_size = 3 # hotarea size, 10x10 + swipe_fingers = 4 # finger number of gesture,move any directory + move_focus_distance = 100 # distance for movefocus,only can use 3 finger to move + enable_gesture = 0 # enable gesture + disable_workspace_change = 0 # disable workspace change when in overview mode + disable_spawn = 0 # disable bind exec when in overview mode + auto_exit = 1 # enable auto exit when no client in overview + auto_fullscreen = 0 # auto make active window maximize after exit overview + only_active_workspace = 0 # only overview the active workspace + only_active_monitor = 0 # only overview the active monitor + enable_alt_release_exit = 0 # alt swith mode arg,see readme for detail + alt_replace_key = Alt_L # alt swith mode arg,see readme for detail + alt_toggle_auto_next = 0 # auto focus next window when toggle overview in alt swith mode + click_in_cursor = 1 # when click to jump,the target windwo is find by cursor, not the current foucus window. + hight_of_titlebar = 0 # height deviation of title bar hight + } + + hyprexpo { + columns = 2 + gap_size = 5 + bg_col = rgb(111111) + workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1 + + enable_gesture = true # laptop touchpad, 4 fingers + gesture_distance = 300 # how far is the "max" + gesture_positive = true # positive = swipe down. Negative = swipe up. + } +} + +debug:disable_logs = false + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +env = QT_QPA_PLATFORMTHEME,qt6ct +env = HYPRCURSOR_SIZE,24 +env = XCURSOR_SIZE,24 +#env = HYPRCURSOR_THEME,qogir_hl +#env = XCURSOR_THEME,Qogir +#env = WLR_NO_HARDWARE_CURSORS,1 + + +################# +### AUTOSTART ### +################# + +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = hyprpaper & +exec-once = waybar & +exec-once = swaync & +# exec-once = transmission-daemon +# exec-once = fcitx5 +exec-once = /usr/lib/kdeconnectd & +exec-once = kdeconnect-indicator & +# exec-once = /home/eric/.local/bin/pypr & +exec-once = swayosd-server & +# exec-once = eww daemon +exec-once = nm-applet + +exec-once = swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock' +exec-once = wl-paste --type text --watch cliphist store #Stores only text data +exec-once = wl-paste --type image --watch cliphist store #Stores only image data +exec-once = systemctl start --user foot-server +exec-once = systemctl start --user sunshine +exec-once = flatpak run me.kozec.syncthingtk -m & +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +exec-once = hyprpm reload -n diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..9523e4e --- /dev/null +++ b/.config/hypr/hyprpaper.conf @@ -0,0 +1,5 @@ +preload = ./wallpapers/ayaka.png + +wallpaper = DP-1,./wallpapers/ayaka.png +wallpaper = HDMI-A-1,./wallpapers/ayaka.png + diff --git a/.config/hypr/wallpapers/ayaka.png b/.config/hypr/wallpapers/ayaka.png new file mode 100644 index 0000000..7212597 --- /dev/null +++ b/.config/hypr/wallpapers/ayaka.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0115987146ad717abe8d3cd0e8420bd1f27108a86781793ce65a866c76bbf14e +size 69123211 diff --git a/.config/river/init b/.config/river/init new file mode 100755 index 0000000..946d496 --- /dev/null +++ b/.config/river/init @@ -0,0 +1,288 @@ +#!/bin/bash + +############ +# Keybinding +############ + +# Super+Return to start an instance of foot (https://codeberg.org/dnkl/foot) +riverctl map normal Super Return spawn footclient + +# Super+C to close the focused view +riverctl map normal Super C close + +# Super+Shift+Q to exit river +riverctl map normal Super+Shift Q exit + +# Reload +riverctl map normal Super+Shift R spawn "$HOME/.config/river/init" + +# Rofi menu +riverctl map normal Super Q spawn 'rofi -show power-menu -modi power-menu:rofi-power-menu' + +# Super+J and Super+K to focus the next/previous view in the layout stack +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous +riverctl map normal Super H focus-view left +riverctl map normal Super L focus-view right + +# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous +# view in the layout stack +riverctl map normal Super+Shift J swap next +riverctl map normal Super+Shift K swap previous +riverctl map normal Super+Shift H swap left +riverctl map normal Super+Shift L swap right + +# Super+Period and Super+Comma to focus the next/previous output +riverctl map normal Super Period focus-output next +riverctl map normal Super Comma focus-output previous + +# Super+Shift+{Period,Comma} to send the focused view to the next/previous output +riverctl map normal Super+Shift Period send-to-output next +riverctl map normal Super+Shift Comma send-to-output previous + +# Super+Return to bump the focused view to the top of the layout stack +riverctl map normal Super+Shift Return zoom +riverctl map normal Super X zoom + +# Super+H and Super+L to decrease/increase the main ratio of rivertile(1) +riverctl map normal Super+Control H send-layout-cmd rivertile "main-ratio -0.05" +riverctl map normal Super+Control L send-layout-cmd rivertile "main-ratio +0.05" + +# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1) +riverctl map normal Super+Shift+Control H send-layout-cmd rivertile "main-count +1" +riverctl map normal Super+Shift+Control L send-layout-cmd rivertile "main-count -1" + +# Super+Alt+{H,J,K,L} to move views +riverctl map normal Super+Alt H move left 100 +riverctl map normal Super+Alt J move down 100 +riverctl map normal Super+Alt K move up 100 +riverctl map normal Super+Alt L move right 100 + +# Super+Alt+Control+{H,J,K,L} to snap views to screen edges +riverctl map normal Super+Alt+Control H snap left +riverctl map normal Super+Alt+Control J snap down +riverctl map normal Super+Alt+Control K snap up +riverctl map normal Super+Alt+Control L snap right + +# Super+Alt+Shift+{H,J,K,L} to resize views +riverctl map normal Super+Alt+Shift H resize horizontal -100 +riverctl map normal Super+Alt+Shift J resize vertical 100 +riverctl map normal Super+Alt+Shift K resize vertical -100 +riverctl map normal Super+Alt+Shift L resize horizontal 100 + +# Super + Left Mouse Button to move views +riverctl map-pointer normal Super BTN_LEFT move-view + +# Super + Right Mouse Button to resize views +riverctl map-pointer normal Super BTN_RIGHT resize-view + +# Super + Middle Mouse Button to toggle float +riverctl map-pointer normal Super BTN_MIDDLE toggle-float + +for i in $(seq 1 9) +do + tags=$((1 << (i - 1))) + + # Super+[1-9] to focus tag [0-8] + riverctl map normal Super "$i" set-focused-tags $tags + + # Super+Shift+[1-9] to tag focused view with tag [0-8] + riverctl map normal Super+Shift "$i" set-view-tags $tags + + # Super+Control+[1-9] to toggle focus of tag [0-8] + riverctl map normal Super+Control "$i" toggle-focused-tags $tags + + # Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view + riverctl map normal Super+Shift+Control "$i" toggle-view-tags $tags +done + +# Super+0 to focus all tags +# Super+Shift+0 to tag focused view with all tags +all_tags=$(((1 << 32) - 1)) +riverctl map normal Super 0 set-focused-tags $all_tags +riverctl map normal Super+Shift 0 set-view-tags $all_tags +riverctl map normal Super A set-focused-tags $all_tags +riverctl map normal Super+Shift A set-view-tags $all_tags + +# Super+Space to toggle float +riverctl map normal Super Space toggle-float + +# Super+F to toggle fullscreen +riverctl map normal Super F toggle-fullscreen + +# Super+{Up,Right,Down,Left} to change layout orientation +riverctl map normal Super+Shift Up send-layout-cmd rivertile "main-location top" +riverctl map normal Super+Shift Right send-layout-cmd rivertile "main-location right" +riverctl map normal Super+Shift Down send-layout-cmd rivertile "main-location bottom" +riverctl map normal Super+Shift Left send-layout-cmd rivertile "main-location left" + +# Declare a passthrough mode. This mode has only a single mapping to return to +# normal mode. This makes it useful for testing a nested wayland compositor +riverctl declare-mode passthrough + +# Super+F11 to enter passthrough mode +riverctl map normal Super F11 enter-mode passthrough + +# Super+F11 to return to normal mode +riverctl map passthrough Super F11 enter-mode normal + +# Various media key mapping examples for both normal and locked mode which do +# not have a modifier +for mode in normal locked +do + # Eject the optical drive (well if you still have one that is) + riverctl map $mode None XF86Eject spawn 'eject -T' + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + riverctl map $mode None XF86AudioRaiseVolume spawn 'swayosd-client --output-volume raise || pactl set-sink-volume @DEFAULT_SINK@ +5%' + riverctl map $mode None XF86AudioLowerVolume spawn 'swayosd-client --output-volume lower || pactl set-sink-volume @DEFAULT_SINK@ -5%' + riverctl map $mode None XF86AudioMute spawn 'swayosd-client --output-volume mute-toggle || pactl set-sink-mute @DEFAULT_SINK@ toggle' + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' + riverctl map $mode None XF86AudioNext spawn 'playerctl next' + + # Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl) + riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%' + riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-' +done + + +############## +# Applications +############## + +riverctl map normal Super D spawn "rofi -show drun -theme catppuccin-macchiato" +riverctl map normal Super W spawn "rofi -show window -theme catppuccin-macchiato" +riverctl map normal Super E spawn "kitty --class='fm-term' nnn -da -P p" +riverctl map normal Super+Shift E spawn "xdg-open $HOME" +riverctl map normal Super+Shift S spawn "hyprshot -m region" +riverctl map normal Super+Control+Shift S spawn 'grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied {}"' +riverctl map normal Super Print spawn "hyprshot -m window" + + +############ +# Appearence +############ + +# Set background and border color +riverctl background-color 0x1e1e2e +riverctl border-color-focused 0xfff4dbd6 +riverctl border-color-unfocused 0x001e1e2e +riverctl border-width 2 + +# Set the default layout generator to be rivertile and start it. +# River will send the process group of the init executable SIGTERM on exit. +riverctl default-layout rivertile +rivertile -view-padding 4 -outer-padding 8 & + +# cursor +riverctl set-cursor-warp on-focus-change +riverctl xcursor-theme Adwaita 24 +riverctl focus-follows-cursor always + + +######## +# Inputs +######## + +# keyboard +riverctl keyboard-layout -options "compose:ralt" us +# +# Set keyboard repeat rate +riverctl set-repeat 50 200 + +# mouse +riverctl input pointer-13159-6403-EndGameGear_XM1_Gaming_Mouse accel-profile flat + +# Clipboard +riverctl map normal Super V spawn 'bash -c "cliphist list | rofi -dmenu | cliphist decode | wl-copy"' + + +########## +# Monitors +########## + +# wlr-randr +wlr-randr --output HDMI-A-1 --on --mode 1920x1080@60Hz --pos 1920,0 --output DP-1 --on --mode 1920x1080@144.001007Hz --pos 0,0 + + +####### +# Rules +####### + +# ssd +riverctl rule-add ssd + +# output +riverctl rule-add -app-id 'cs2' output DP-1 +riverctl rule-add -app-id 'starrail.exe' output DP-1 +riverctl rule-add -app-id 'genshinimpact.exe' output DP-1 + +# tags +declare -a rule_sets + +rule_sets[1]="footclient kitty foot" +rule_sets[2]="LibreWolf firefox" +rule_sets[3]="org.gnome.Nautilus fm-term org.qbittorrent.qBittorrent syncplay" +rule_sets[4]="com.usebottles.bottles cs2 org.prismlauncher.PrismLauncher moe.launcher.an-anime-game-launcher moe.launcher.the-honkers-railway-launcher genshinimpact.exe starrail.exe steam" +rule_sets[5]="org.remmina.Remmina Code VSCodium" +rule_sets[6]="io.github.celluloid_player.Celluloid mpv Spotify" +rule_sets[7]="discord vesktop teams-for-linux 'Microsoft Teams - Preview'" + +for index in "${!rule_sets[@]}"; do + tags=$((1 << (index - 1))) + read -r -a elements <<< "${rule_sets[index]}" + for element in "${elements[@]}"; do + riverctl rule-add -app-id "$element" tags "$tags" + done +done + +# tags+ + + +######### +# Wayland +######### + +dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + + +########### +# Autostart +########### + +## background +hyprpaper --no-fractional & + +## bar +waybar & + +## notification daemon +swaync & + +## kdeconnect +/usr/lib/kdeconnectd & +kdeconnect-indicator & + +## osd +swayosd-server & + +# syncthing +flatpak run me.kozec.syncthingtk -m & + +# systemctl restarts +systemctl start --user foot-server +systemctl start --user sunshine + +# polkit +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & + +## lock +swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock' + +## cliphist +wl-paste --type text --watch cliphist store & #Stores only text data +wl-paste --type image --watch cliphist store & #Stores only image data diff --git a/.config/sway/catppuccin-macchiato b/.config/sway/catppuccin-macchiato new file mode 100644 index 0000000..2029be9 --- /dev/null +++ b/.config/sway/catppuccin-macchiato @@ -0,0 +1,34 @@ +set $rosewater #f4dbd6 +set $flamingo #f0c6c6 +set $pink #f5bde6 +set $mauve #c6a0f6 +set $red #ed8796 +set $maroon #ee99a0 +set $peach #f5a97f +set $green #a6da95 +set $teal #8bd5ca +set $sky #91d7e3 +set $sapphire #7dc4e4 +set $blue #8aadf4 +set $lavender #b7bdf8 +set $text #cad3f5 +set $subtext1 #b8c0e0 +set $subtext0 #a5adcb +set $overlay2 #939ab7 +set $overlay1 #8087a2 +set $overlay0 #6e738d +set $surface2 #5b6078 +set $surface1 #494d64 +set $surface0 #363a4f +set $base #24273a +set $mantle #1e2030 +set $crust #181926 + + +# target title bg text indicator border +client.focused $lavender $base $text $rosewater $lavender +client.focused_inactive $overlay0 $base $text $rosewater $overlay0 +client.unfocused $overlay0 $base $text $rosewater $overlay0 +client.urgent $peach $base $peach $overlay0 $peach +client.placeholder $overlay0 $base $text $overlay0 $overlay0 +client.background $base diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..8f3f890 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,455 @@ + +########### +# Variables +########### + +# Logo key. Use Mod1 for Alt. +set $mod Mod4 +set $left h +set $down j +set $up k +set $right l +set $term footclient + +# set $menu dmenu_path | dmenu | xargs swaymsg exec -- +set $menu rofi -show drun -theme catppuccin-macchiato +# set $menu tofi-run | xargs swaymsg exec -- + +###################### +# Output configuration +###################### +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill +# +# Example configuration: +# +# output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +output * bg /home/eric/Pictures/wallpapers/FpJR73waUAAdFOr_upscayl_4x_realesrgan-x4plus.png fill + +output DP-1 { + position 0 0 + mode 1920x1080@144.001hz + adaptive_sync off +} + +output HDMI-A-1 { + position 1920 0 + adaptive_sync off +} + +exec "~/.config/sway/scripts/vrr_fullscreen.sh" + +### Idle configuration +# +# Example configuration: +# +# exec swayidle -w \ +# timeout 300 'swaylock -f -c 000000' \ +# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ +# before-sleep 'swaylock -f -c 000000' +# +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. + +##################### +# Input configuration +##################### + +# Example configuration: +# +# input "2:14:SynPS/2_Synaptics_TouchPad" { +# dwt enabled +# tap enabled +# natural_scroll enabled +# middle_emulation enabled +# } + +input * { + xkb_layout "us" + xkb_variant "" + xkb_options "compose:ralt" +} + +input "13159:6403:EndGameGear_XM1_Gaming_Mouse" accel_profile "flat" + +input * repeat_delay 200 +input * repeat_rate 50 + +# +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. + +### Key bindings +# +# Basics: +# +# Start a terminal +bindsym $mod+Return exec $term + +# Kill focused window +bindsym $mod+c kill + +# Start your launcher +bindsym $mod+d exec $menu +bindsym $mod+w exec rofi -show window -theme catppuccin-macchiato + +bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy +bindsym $mod+Control+Shift+s exec grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied '{}'" +bindsym $mod+P exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy +bindsym $mod+Shift+P exec grim - | wl-copy + +# Drag floating windows by holding down $mod and left mouse button. +# Resize them with right mouse button + $mod. +# Despite the name, also works for non-floating windows. +# Change normal to inverse to use left mouse button for resizing and right +# mouse button for dragging. +floating_modifier $mod normal + +# Reload the configuration file +bindsym $mod+Shift+r reload + +# Exit sway (logs you out of your Wayland session) +bindsym $mod+q exec rofi -show power-menu -modi power-menu:rofi-power-menu +bindsym $mod+Shift+q exec 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' 'swaymsg exit' + +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +############# +# Workspaces +############# +set $ws1 1 +set $ws2 2 +set $ws3 3 +set $ws4 4 +set $ws5 5 +set $ws6 6 +set $ws7 7 +set $ws8 8 +set $ws9 9 +set $ws10 10 + +workspace $ws1 output DP-1 +workspace $ws2 output DP-1 +workspace $ws3 output DP-1 +workspace $ws4 output DP-1 +workspace $ws5 output DP-1 +workspace $ws6 output HDMI-A-1 +workspace $ws7 output HDMI-A-1 +workspace $ws8 output HDMI-A-1 +workspace $ws9 output HDMI-A-1 +workspace $ws10 output HDMI-A-1 + +# Switch to workspace +# bindsym $mod+1 workspace number $ws1 +# bindsym $mod+2 workspace number $ws2 +# bindsym $mod+3 workspace number $ws3 +# bindsym $mod+4 workspace number $ws4 +# bindsym $mod+5 workspace number $ws5 +# bindsym $mod+6 workspace number $ws6 +# bindsym $mod+7 workspace number $ws7 +# bindsym $mod+8 workspace number $ws8 +# bindsym $mod+9 workspace number $ws9 +# bindsym $mod+0 workspace number $ws10 + +bindsym --no-repeat $mod+1 workspace number $ws1; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+2 workspace number $ws2; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+3 workspace number $ws3; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+4 workspace number $ws4; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+5 workspace number $ws5; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+6 workspace number $ws6; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+7 workspace number $ws7; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+8 workspace number $ws8; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+9 workspace number $ws9; exec "echo 1 > /tmp/sovpipe" +bindsym --no-repeat $mod+0 workspace number $ws10; exec "echo 1 > /tmp/sovpipe" + +bindsym --release $mod+1 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+2 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+3 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+4 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+5 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+6 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+7 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+8 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+9 exec "echo 0 > /tmp/sovpipe" +bindsym --release $mod+0 exec "echo 0 > /tmp/sovpipe" + +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10 + +bindsym $mod+Tab move workspace to output right +bindsym $mod+Control+Shift+Right move workspace to output right +bindsym $mod+Control+Shift+Left move workspace to output left +bindsym $mod+Control+Shift+Down move workspace to output down +bindsym $mod+Control+Shift+Up move workspace to output up + +############## +# Layout stuff +############## + +# You can "split" the current object of your focus with +# $mod+b or $mod+v, for horizontal and vertical splits +# respectively. +# bindsym $mod+b splith +# bindsym $mod+v splitv + +# Switch the current container between different layout styles +# bindsym $mod+s layout stacking +bindsym $mod+t layout tabbed +bindsym $mod+s layout toggle split + +# Make the current focus fullscreen +bindsym $mod+f fullscreen + +# Toggle the current focus between tiling and floating mode +bindsym $mod+space floating toggle + +# Swap focus between the tiling area and the floating area +bindsym $mod+Shift+space focus mode_toggle + +# Move focus to the parent container +bindsym $mod+a focus parent + +bindsym $mod+Escape focus next + +# focus_wrapping workspace + +############ +# Scratchpad +############ + +# Move the currently focused window to the scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym $mod+minus scratchpad show + +############## +# Applications +############## + +bindsym $mod+Shift+e exec xdg-open $HOME +bindsym $mod+e exec kitty --class="fm-term" nnn -da -P p +bindsym $mod+v exec cliphist list | rofi -dmenu | cliphist decode | wl-copy + +######## +# Volume +######## + +bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise +bindsym XF86AudioLowerVolume exec swayosd-client --output-volume lower +bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle + +##################### +# Resizing containers +##################### + +# mode "resize" { +# bindsym $left resize shrink width 10px +# bindsym $down resize grow height 10px +# bindsym $up resize shrink height 10px +# bindsym $right resize grow width 10px +# bindsym Left resize shrink width 10px +# bindsym Down resize grow height 10px +# bindsym Up resize shrink height 10px +# bindsym Right resize grow width 10px +# +# # Return to default mode +# bindsym Return mode "default" +# bindsym Escape mode "default" +# } +# bindsym $mod+r mode "resize" + +bindsym $mod+Control+$left resize shrink width 10px +bindsym $mod+Control+$down resize grow height 10px +bindsym $mod+Control+$up resize shrink height 10px +bindsym $mod+Control+$right resize grow width 10px +bindsym $mod+Control+Left resize shrink width 10px +bindsym $mod+Control+Down resize grow height 10px +bindsym $mod+Control+Up resize shrink height 10px +bindsym $mod+Control+Right resize grow width 10px + +############ +# Catppuccin +############ + +set $rosewater #f4dbd6 +set $flamingo #f0c6c6 +set $pink #f5bde6 +set $mauve #c6a0f6 +set $red #ed8796 +set $maroon #ee99a0 +set $peach #f5a97f +set $green #a6da95 +set $teal #8bd5ca +set $sky #91d7e3 +set $sapphire #7dc4e4 +set $blue #8aadf4 +set $lavender #b7bdf8 +set $text #cad3f5 +set $subtext1 #b8c0e0 +set $subtext0 #a5adcb +set $overlay2 #939ab7 +set $overlay1 #8087a2 +set $overlay0 #6e738d +set $surface2 #5b6078 +set $surface1 #494d64 +set $surface0 #363a4f +set $base #24273a +set $mantle #1e2030 +set $crust #181926 +set $base_alpha #f4dbd600 +set $invisible #00000000 + +# target title bg text indicator border +client.focused $rosewater $base $text $rosewater $rosewater +client.focused_tab_title $rosewater $base $text $rosewater $rosewater +client.focused_inactive $overlay0 $base $text $base_alpha $base_alpha +client.unfocused $overlay0 $base $text $base_alpha $base_alpha +client.urgent $peach $base $peach $peach $peach +client.placeholder $overlay0 $base $text $overlay0 $base +client.background $base + + +########### +# Titlebars +########### + +default_border none +default_floating_border none +hide_edge_borders none +titlebar_border_thickness 2 + +###### +# Gaps +###### + +gaps inner 4 +gaps outer 8 +smart_gaps off + +######### +# Borders +######### + +default_border pixel + +focus_on_window_activation smart +focus_follows_mouse yes +mouse_warping container + +# Swayfx + +# blur enable +# blur_xray disable +# blur_passes 2 +# blur_radius 5 +# +# corner_radius 10 +# +# shadows enable +# shadows_on_csd enable +# shadow_blur_radius 10 +# shadow_color #000000AF +# shadow_inactive_color #0000001F +# shadow_offset 0 0 +# +# titlebar_separator disable +# layer_effects 'waybar' 'blur enable' +# layer_effects 'swayosd' 'blur enable; shadows enable; corner_radius 30' + +# cursor + +# set $my_cursor Qogir +set $my_cursor_size 24 + +seat seat0 xcursor_theme $my_cursor $my_cursor_size + +# include + +include /etc/sway/config.d/* + +# Assigns + +set $ws1ids "footclient|kitty|foot" +for_window [app_id=$ws1ids] workspace $ws1 +assign [app_id=$ws1ids] $ws1 + +set $ws2ids "LibreWolf|firefox" +for_window [app_id=$ws2ids] workspace $ws2 +assign [app_id=$ws2ids] $ws2 + + +set $ws3ids "org.gnome.Nautilus|fm-term|org.qbittorrent.qBittorrent" +for_window [app_id=$ws3ids] workspace $ws3 +assign [app_id=$ws3ids] $ws3 + +set $ws4ids "com.usebottles.bottles" +set $ws4classes "cs2" +for_window [app_id=$ws4ids] workspace $ws4 +for_window [class=$ws4classes] workspace $ws4 +assign [app_id=$ws4ids] $ws4 +assign [class=$ws4classes] $ws4 + +set $ws5ids "org.remmina.Remmina" +for_window [app_id=$ws5ids] workspace $ws5 +assign [app_id=$ws5ids] $ws5 + +set $ws6ids "io.github.celluloid_player.Celluloid|mpv" +set $ws6classes "mpv|Spotify" +for_window [app_id=$ws6ids] workspace $ws6 +for_window [class=$ws6classes] workspace $ws6 +assign [app_id=$ws6ids] $ws6 +assign [class=$ws6classes] $ws6 + +set $ws7classes "discord|vesktop|teams-for-linux|Microsoft Teams - Preview" +for_window [class=$ws7classes] workspace $ws7 +assign [class=$ws7classes] $ws7 + +# Autostart + +exec waybar & +exec swaync & +exec swayosd-server & +exec /usr/lib/kdeconnectd & +exec kdeconnect-indicator & +exec_always autotiling +exec flatpak run me.kozec.syncthingtk -m & +exec systemctl start --user foot-server +exec systemctl start --user sunshine +exec wl-paste --type text --watch cliphist store +exec wl-paste --type image --watch cliphist store +exec swayidle before-sleep 'loginctl lock-session' lock '/home/eric/.config/hypr/bsplock' +exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov -t 200 -n -c 1 -s $HOME/.config/sov +exec nm-applet +exec dbus-update-activation-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP diff --git a/.config/sway/scripts/vrr_fullscreen.sh b/.config/sway/scripts/vrr_fullscreen.sh new file mode 100755 index 0000000..036ef67 --- /dev/null +++ b/.config/sway/scripts/vrr_fullscreen.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# List of supported outputs for VRR +output_vrr_whitelist=( + "DP-1" +) + +# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop +swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do + window_event=$(echo ${window_json} | jq -r '.change') + + # Process only focus change and fullscreen toggle + if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then + output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)') + output_name=$(echo ${output_json} | jq -r '.name') + + # Use only VRR in whitelisted outputs + if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then + output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status') + window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode') + + # Only update output if nesseccary to avoid flickering + [[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1 + [[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0 + fi + fi +done diff --git a/.config/swaync/config.json b/.config/swaync/config.json new file mode 100644 index 0000000..1ea33a6 --- /dev/null +++ b/.config/swaync/config.json @@ -0,0 +1,82 @@ +{ + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "control-center-margin-top": 5, + "control-center-margin-bottom": 0, + "control-center-margin-right": 5, + "control-center-margin-left": 0, + "notification-icon-size": 64, + "notification-body-image-height": 100, + "notification-body-image-width": 200, + "timeout": 10, + "timeout-low": 5, + "timeout-critical": 0, + "fit-to-screen": false, + "control-center-width": 600, + "control-center-height": 800, + "notification-window-width": 500, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 100, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "scripts": { + "example-script": { + "exec": "echo 'Do something...'", + "urgency": "Normal" + } + }, + "notification-visibility": { + "Spotify": { + "state": "muted", + "urgency": "Low", + "app-name": "Spotify" + } + }, + "widgets": [ + "inhibitors", + "title", + "dnd", + "notifications", + "mpris", + "volume" + ], + "widget-config": { + "inhibitors": { + "text": "Inhibitors", + "button-text": "Clear All", + "clear-all-button": true + }, + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "label": { + "max-lines": 5, + "text": "Label Text" + }, + "mpris": { + "image-size": 96, + "image-radius": 12 + }, + "buttons-grid": { + "actions": [ + { + "label": "1" + }, + { + "label": "2" + }, + { + "label": "3" + } + ] + } + } +} diff --git a/.config/swaync/style.css b/.config/swaync/style.css new file mode 100644 index 0000000..bb0db7c --- /dev/null +++ b/.config/swaync/style.css @@ -0,0 +1,333 @@ +/* + * vim: ft=less + */ + +@define-color cc-bg rgb(24, 25, 38); + +@define-color noti-border-color rgba(255, 255, 255, 0.15); +@define-color noti-bg rgb(36, 39, 58); +@define-color noti-bg-hover #363a4f; +@define-color noti-bg-focus rgba(36, 39, 58, 0.5); +@define-color noti-close-bg rgba(255, 255, 255, 0.1); +@define-color noti-close-bg-hover rgba(255, 255, 255, 0.20); + +@define-color bg-selected rgb(244, 219, 214); + +.notification-row { + outline: none; + border-radius: 4px; + margin: 0px; +} + +.notification-row:focus, +.notification-row:hover { + background: @noti-bg-focus; +} + +.notification { + border-radius: 20px; + margin: 18px 10px; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); + padding: 0px; + font-family: Ubuntu; +} + +.critical { + background: #ed8796; + padding: 2px; + border-radius: 20px; +} + +.notification-content { + background: transparent; + padding: 16px; + border-radius: 20px; +} + +.close-button { + background: @noti-close-bg; + color: #cad3f5; + text-shadow: none; + padding: 0; + border-radius: 100%; + margin-top: 24px; + margin-right: 16px; + box-shadow: none; + border: none; + min-width: 24px; + min-height: 24px; +} + +.close-button:hover { + box-shadow: none; + background: @noti-close-bg-hover; + transition: all 0.15s ease-in-out; + border: none; +} + +.notification-default-action, +.notification-action { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), + 0 1px 3px 1px rgba(0, 0, 0, 0.1), + 0 2px 6px 2px rgba(0, 0, 0, 0.1); + padding: 4px; + margin: 0; + box-shadow: none; + background: @noti-bg; + border: none; + color: #cad3f5; +} + +.notification-default-action:hover, +.notification-action:hover { + -gtk-icon-effect: none; + background: @noti-bg-hover; +} + +.notification-default-action { + border-radius: 20px; +} + +/* When alternative actions are visible */ +.notification-default-action:not(:only-child) { + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; +} + +.notification-action { + border-radius: 0px; + border-top: none; + border-right: none; +} + +/* add bottom border radius to eliminate clipping */ +.notification-action:first-child { + border-bottom-left-radius: 20px; +} + +.notification-action:last-child { + border-bottom-right-radius: 20px; + border-right: 1px solid @noti-border-color; +} + +.image { + border-radius: 12px; +} + +.body-image { + margin-top: 6px; + background-color: #cad3f5; + border-radius: 12px; +} + +.summary { + color: #cad3f5; + text-shadow: none; +} + +.time { + color: #cad3f5; + text-shadow: none; + margin-right: 18px; +} + +.body { + background: transparent; + color: #cad3f5; + text-shadow: none; + padding: 4px; +} + +/* The "Notifications" and "Do Not Disturb" text widget */ +.top-action-title { + color: #cad3f5; + text-shadow: none; +} + +.control-center-clear-all { + color: #cad3f5; + text-shadow: none; + background: @noti-bg; + border: none; + box-shadow: none; + border-radius: 9999px; +} + +.control-center-clear-all:hover { + background: @noti-bg-hover; +} + +.control-center-dnd { + border-radius: 9999px; + background: @noti-bg; + box-shadow: none; + border: none; +} + +.control-center-dnd:checked { + background: @bg-selected; +} + +.control-center-dnd slider { + background: @noti-bg-hover; + border-radius: 12px; +} + +/* The .control-center Window. + * Can't apply padding and margin so may be easier to use "> box" instead + */ +.control-center { + background: @cc-bg; + border-radius: 20px; + font-family: Ubuntu; +} + +/* The first control-center child. May be easier to style this than .control-center */ +.control-center>box { + margin: 15px; +} + +.control-center-list { + background: transparent; +} + +.floating-notifications { + background: transparent; +} + +/* Window behind control center and on all other monitors */ +.blank-window { + background: alpha(black, 0); +} + +/* Title widget */ +.widget-title { + margin: 8px; + font-size: 1.5rem; +} + +.widget-title>button { + font-size: initial; + color: #cad3f5; + text-shadow: none; + background: @noti-bg; + border: none; + box-shadow: none; + border-radius: 9999px; +} + +.widget-title>button:hover { + background: @noti-bg-hover; +} + +/* DND widget */ +.widget-dnd { + margin: 8px; + font-size: 1.1rem; +} + +.widget-dnd>switch { + font-size: initial; + border-radius: 9999px; + background: @noti-bg; + box-shadow: none; + border: none; +} + +.widget-dnd>switch:checked { + background: @bg-selected; +} + +.widget-dnd>switch slider { + background: @noti-bg-hover; + border-radius: 12px; +} + +/* Label widget */ +.widget-label { + margin: 8px; +} + +.widget-label>label { + font-size: 1.1rem; +} + +/* Mpris widget */ +.widget-mpris { + /* The parent to all players */ + /* background-color: @noti-bg; */ + border-radius: 20px; +} + +.widget-mpris-player { + padding: 8px; + margin: 8px; +} + +.widget-mpris-title { + font-weight: bold; + font-size: 1.25rem; +} + +.widget-mpris-subtitle { + font-size: 1.1rem; +} + +/* Buttons widget */ +.widget-buttons-grid { + padding: 8px; + margin: 8px; + border-radius: 12px; + background-color: @noti-bg; +} + +.widget-buttons-grid>flowbox>flowboxchild>button { + background: @noti-bg; + border-radius: 12px; +} + +.widget-buttons-grid>flowbox>flowboxchild>button:hover { + background: @noti-bg-hover; +} + +/* Menubar widget */ +.widget-menubar>box>.menu-button-bar>button { + border: none; + background: transparent; +} + +.topbar-buttons>button { + /* Name defined in config after # */ + border: none; + background: transparent; +} + +/* Volume widget */ + +.widget-volume { + /* background-color: @noti-bg; */ + background: transparent; + padding: 8px; + margin: 8px; + border-radius: 12px; +} + +.widget-volume>box>button { + background: transparent; + border: none; +} + +.per-app-volume { + background-color: @noti-bg-alt; + padding: 4px 8px 8px 8px; + margin: 0px 8px 8px 8px; + border-radius: 12px; +} + +/* Backlight widget */ +.widget-backlight { + background-color: @noti-bg; + padding: 8px; + margin: 8px; + border-radius: 12px; +}