diff options
| -rw-r--r-- | .bashrc | 60 | ||||
| -rw-r--r-- | bash/.bash_profile | 2 | ||||
| -rw-r--r-- | doom/config.el | 10 | ||||
| -rw-r--r-- | doom/packages.el | 1 | ||||
| -rw-r--r-- | hypr/hypridle.conf | 16 | ||||
| -rw-r--r-- | hypr/hyprland.lua | 210 | ||||
| -rw-r--r-- | hypr/hyprlock.conf | 66 | ||||
| -rw-r--r-- | mako/config | 15 | ||||
| -rw-r--r-- | tmux/tmux.conf | 57 | ||||
| -rw-r--r-- | waybar/config.jsonc | 81 | ||||
| -rw-r--r-- | waybar/style.css | 122 | ||||
| -rw-r--r-- | zsh/.zshenv | 1 | ||||
| -rw-r--r-- | zsh/.zshrc | 24 |
13 files changed, 522 insertions, 143 deletions
diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 0b4c41e..0000000 --- a/.bashrc +++ /dev/null @@ -1,60 +0,0 @@ -# .bashrc - -# Custom prompt with directory in #afd7ff -PS1='[\u@\h \[\e[38;2;175;215;255m\]\w\[\e[0m\]]\$ ' - -# Aliases -alias python=python3 -alias ls='ls -larth' -alias e='emacsclient -nc -a ""' -alias ke='emacsclient -e "(kill-emacs)"' -alias copy='xclip -selection clipboard' -alias paste='xclip -o -selection clipboard' - -# bun completions -[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun" - -# bun -export BUN_INSTALL="$HOME/.bun" -export PATH="$BUN_INSTALL/bin:$PATH" - -# Local bins -export PATH="$HOME/.local/bin:$PATH" -# Doom Emacs CLI -export PATH="$HOME/.config/emacs/bin:$PATH" - -# Auto-attach or create tmux session on shell start -if [ -z "$TMUX" ]; then - tmux attach 2>/dev/null || tmux new -s main -fi - -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi - -# User specific environment -if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then - PATH="$HOME/.local/bin:$HOME/bin:$PATH" -fi -export PATH - -# User specific aliases and functions -if [ -d ~/.bashrc.d ]; then - for rc in ~/.bashrc.d/*; do - if [ -f "$rc" ]; then - . "$rc" - fi - done -fi -unset rc - -[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" - -# pnpm -export PNPM_HOME="/home/yousefjan/.local/share/pnpm" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac -# pnpm end diff --git a/bash/.bash_profile b/bash/.bash_profile index f015706..0a85221 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -6,4 +6,4 @@ if [ -f ~/.bashrc ]; then fi # User specific environment and startup programs -. "$HOME/.cargo/env" +[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" diff --git a/doom/config.el b/doom/config.el index f9a039b..49b1e4e 100644 --- a/doom/config.el +++ b/doom/config.el @@ -304,6 +304,9 @@ (add-hook 'find-file-hook #'my/open-pdf-in-sioyek) ;; Move visual-line selection up/down with J/K; preserve original behavior in other visual modes +(use-package! drag-stuff + :commands (drag-stuff-up drag-stuff-down)) + (map! :v "J" (cmd! (if (eq evil-visual-selection 'line) (drag-stuff-down 1) (evil-join (region-beginning) (region-end)))) @@ -318,6 +321,13 @@ "--compile-commands-dir=."))) +;;; ============================================================================ +;;; Imported from Josh Blais' Doom config — FUNCTIONALITY ONLY (my styling kept). +;;; Phase 1: IDE core — LSP, tree-sitter, vterm, magit, project, tramp, emmet. +;;; Adapted for Fedora + corfu (his company-specific bits dropped). +;;; ============================================================================ + +;;; --- LSP tuning ----------------------------------------------------------- (after! lsp-mode (setq lsp-idle-delay 0.5 lsp-log-io nil diff --git a/doom/packages.el b/doom/packages.el index de9ded0..b804831 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -55,3 +55,4 @@ (package! org-roam-ui) (package! calfw) (package! calfw-org) +(package! drag-stuff) diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf new file mode 100644 index 0000000..9f6cc4b --- /dev/null +++ b/hypr/hypridle.conf @@ -0,0 +1,16 @@ +general { + lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + after_sleep_cmd = hyprctl dispatch 'hl.dsp.dpms({action = "on"})' +} + +listener { + timeout = 600 # 10 min - lock the session + on-timeout = loginctl lock-session +} + +listener { + timeout = 720 # 12 min - blank the display + on-timeout = hyprctl dispatch 'hl.dsp.dpms({action = "off"})' + on-resume = hyprctl dispatch 'hl.dsp.dpms({action = "on"})' +} diff --git a/hypr/hyprland.lua b/hypr/hyprland.lua new file mode 100644 index 0000000..5ea8ec0 --- /dev/null +++ b/hypr/hyprland.lua @@ -0,0 +1,210 @@ +local terminal = "ghostty" +local fileManager = "dolphin" + +local menu = "wofi -G -I -i -n --show drun" + +local wallpaper = os.getenv("HOME") .. "/Pictures/wallhaven-8gdrq2_2560x1440.png" + +local font = "FiraCode Nerd Font" + + +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = "auto", +}) + + +hl.on("hyprland.start", function() + hl.exec_cmd("waybar") + hl.exec_cmd("mako") + hl.exec_cmd("swaybg -m fill -i " .. wallpaper) + hl.exec_cmd("hypridle") + hl.exec_cmd("/usr/libexec/kf6/polkit-kde-authentication-agent-1") +end) + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") + +hl.env("QT_QPA_PLATFORM", "wayland") +hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1") +hl.env("MOZ_ENABLE_WAYLAND", "1") + +hl.config({ + general = { + gaps_in = 5, + gaps_out = 0, + + border_size = 2, + + col = { + active_border = "rgba(f4bb82ff)", + inactive_border = "rgba(575757ff)", + }, + + resize_on_border = false, + allow_tearing = false, + layout = "dwindle", + }, + + decoration = { + rounding = 0, + + active_opacity = 1.0, + inactive_opacity = 1.0, + + shadow = { enabled = false }, + blur = { enabled = false }, + }, + + animations = { + enabled = true, + }, + + binds = { + workspace_back_and_forth = true, + }, + + dwindle = { + preserve_split = true, + }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + }, +}) + +hl.config({ + group = { + col = { + border_active = "rgba(f4bb82ff)", + border_inactive = "rgba(575757ff)", + }, + groupbar = { + enabled = true, + font_family = font, + font_size = 11, + col = { + active = "rgba(2f337fff)", + inactive = "rgba(575757ff)", + }, + }, + }, +}) + +hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } }) + +hl.animation({ leaf = "global", enabled = true, speed = 8, bezier = "easeOutQuint" }) +hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 4, bezier = "easeOutQuint", style = "slide" }) + +hl.config({ + input = { + kb_layout = "us", + + follow_mouse = 1, + + sensitivity = 0, + }, +}) + + +local mod = "SUPER" + +local left, down, up, right = "H", "J", "K", "L" + +hl.bind(mod .. " + Return", hl.dsp.exec_cmd(terminal)) +hl.bind(mod .. " + Q", hl.dsp.window.close()) +hl.bind(mod .. " + D", hl.dsp.exec_cmd(menu)) +hl.bind(mod .. " + E", hl.dsp.exec_cmd(fileManager)) +hl.bind(mod .. " + SHIFT + C", hl.dsp.exec_cmd("hyprctl reload")) + +hl.bind(mod .. " + SHIFT + E", hl.dsp.exit()) + +hl.bind(mod .. " + Escape", hl.dsp.exec_cmd("hyprlock")) + +hl.bind(mod .. " + " .. left, hl.dsp.focus({ direction = "left" })) +hl.bind(mod .. " + " .. down, hl.dsp.focus({ direction = "down" })) +hl.bind(mod .. " + " .. up, hl.dsp.focus({ direction = "up" })) +hl.bind(mod .. " + " .. right, hl.dsp.focus({ direction = "right" })) +hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" })) +hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" })) +hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" })) +hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" })) + +hl.bind(mod .. " + SHIFT + " .. left, hl.dsp.window.move({ direction = "left" })) +hl.bind(mod .. " + SHIFT + " .. down, hl.dsp.window.move({ direction = "down" })) +hl.bind(mod .. " + SHIFT + " .. up, hl.dsp.window.move({ direction = "up" })) +hl.bind(mod .. " + SHIFT + " .. right, hl.dsp.window.move({ direction = "right" })) +hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" })) +hl.bind(mod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" })) +hl.bind(mod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" })) +hl.bind(mod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" })) + +for i = 1, 10 do + local key = i % 10 + hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i })) + hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i })) +end + +hl.bind(mod .. " + B", hl.dsp.layout("orientationright")) +hl.bind(mod .. " + V", hl.dsp.layout("orientationbottom")) + +hl.bind(mod .. " + S", hl.dsp.layout("togglesplit")) + +hl.bind(mod .. " + T", hl.dsp.group.toggle()) + +hl.bind(mod .. " + Tab", hl.dsp.group.next()) +hl.bind(mod .. " + SHIFT + Tab", hl.dsp.group.prev()) + +hl.bind(mod .. " + F", hl.dsp.window.fullscreen()) +hl.bind(mod .. " + SHIFT + space", hl.dsp.window.float({ action = "toggle" })) + +hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +hl.bind("Print", hl.dsp.exec_cmd("grim - | wl-copy")) +hl.bind("SHIFT + Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy")) + +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true }) +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + + +hl.window_rule({ + name = "suppress-maximize-events", + match = { class = ".*" }, + suppress_event = "maximize", +}) + +hl.window_rule({ + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + no_focus = true, +}) + +hl.window_rule({ + name = "float-pavucontrol", + match = { class = "^(pavucontrol)$" }, + float = true, +}) + +hl.window_rule({ + name = "float-polkit-agent", + match = { class = "^(org\\.kde\\.polkit-kde-authentication-agent-1)$" }, + float = true, +}) diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf new file mode 100644 index 0000000..2732dc6 --- /dev/null +++ b/hypr/hyprlock.conf @@ -0,0 +1,66 @@ +$font = FiraCode Nerd Font + +general { + hide_cursor = false +} + +animations { + enabled = true + bezier = linear, 1, 1, 0, 0 + animation = fadeIn, 1, 5, linear + animation = fadeOut, 1, 5, linear + animation = inputFieldDots, 1, 2, linear +} + +background { + monitor = + path = screenshot + blur_passes = 3 +} + +input-field { + monitor = + size = 20%, 5% + outline_thickness = 3 + inner_color = rgba(0, 0, 0, 0.0) # no fill + + outer_color = rgba(79a8ffff) + check_color = rgba(f78fe7ff) + fail_color = rgba(a60000ff) + + font_color = rgb(255, 255, 255) + fade_on_empty = false + rounding = 0 + + font_family = $font + placeholder_text = Input password... + fail_text = $PAMFAIL$FPRINTFAIL + + dots_spacing = 0.3 + + position = 0, -20 + halign = center + valign = center +} + +label { + monitor = + text = $TIME # https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90 + font_family = $font + + position = -30, 0 + halign = right + valign = top +} + + monitor = + text = cmd[update:60000] date +"%A, %d %B %Y" # update every 60 seconds + font_size = 25 + font_family = $font + + position = -30, -150 + halign = right + valign = top +} + diff --git a/mako/config b/mako/config new file mode 100644 index 0000000..4ab5753 --- /dev/null +++ b/mako/config @@ -0,0 +1,15 @@ +font=FiraCode Nerd Font 10 +background-color=#000000e6 +text-color=#ffffff +border-color=#79a8ff +border-size=3 +border-radius=0 +padding=8 +margin=8 +default-timeout=5000 +anchor=top-right +max-visible=5 + +[urgency=critical] +border-color=#a60000 +default-timeout=0 diff --git a/tmux/tmux.conf b/tmux/tmux.conf deleted file mode 100644 index 7409ac4..0000000 --- a/tmux/tmux.conf +++ /dev/null @@ -1,57 +0,0 @@ -set -g status-position bottom -set -g status-style "bg=default,fg=#fcfcfc" -set -g status 2 - -# Row 0: top divider -set -g status-format[0] "#[fg=#444444,bg=default,fill=─]" - -# Row 1: content — session | windows | host -set -g status-format[1] "#[align=left,bg=default]#{E:status-left}#[list=on]#{W:#{E:window-status-format},#{E:window-status-current-format}}#[list=off,align=right]#{E:status-right}" -set -g message-style "bg=default,fg=#fcfcfc" -set -g message-command-style "bg=default,fg=#fcfcfc" - -# Copy mode / scroll indicator -set -g mode-style "bg=default,fg=#fcfcfc,reverse" - -# Left: session name -set -g status-left " #[fg=#fcfcfc]#S #[fg=#555555]│ " -set -g status-left-length 30 - -# Right: host -set -g status-right "#[fg=#555555]│ #[fg=#fcfcfc]#h " -set -g status-right-length 50 - -set -g window-status-format " #[fg=#888888]#I #W " -set -g window-status-current-format " #[fg=#fcfcfc]#I #W " -set -g window-status-separator "" - -set -g pane-border-style "fg=#444444" -set -g pane-active-border-style "fg=#fcfcfc" - -unbind C-b -set -g prefix C-a -bind C-a send-prefix - -set -g status-interval 5 -set -sg escape-time 10 -set -g base-index 1 - -set -g mouse on - -# Smooth scrolling (1 line per tick) -bind -T copy-mode WheelUpPane send-keys -X scroll-up -bind -T copy-mode WheelDownPane send-keys -X scroll-down -bind -T copy-mode-vi WheelUpPane send-keys -X scroll-up -bind -T copy-mode-vi WheelDownPane send-keys -X scroll-down - -# Keep selection highlighted after mouse drag -bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "pbcopy" -bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "pbcopy" - -# Prevent click from passing through to terminal (causes jump-to-bottom) -bind -T copy-mode MouseDown1Pane select-pane -bind -T copy-mode-vi MouseDown1Pane select-pane - - - - diff --git a/waybar/config.jsonc b/waybar/config.jsonc new file mode 100644 index 0000000..3375d07 --- /dev/null +++ b/waybar/config.jsonc @@ -0,0 +1,81 @@ +// -*- mode: js-json; -*- +{ + "position": "top", + "height": 18, + "spacing": 4, + + "modules-left": ["hyprland/workspaces", "hyprland/submap"], + "modules-center": ["hyprland/window"], + "modules-right": ["keyboard-state", "pulseaudio", "cpu", "memory", "temperature", "clock", "tray"], + + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + + "hyprland/submap": { + "format": "<span style=\"italic\">{}</span>" + }, + + "hyprland/window": { + "separate-outputs": true + }, + + "tray": { + "spacing": 10 + }, + + "clock": { + "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", + "format": "{:%A %e %B, %H:%M}", + "format-alt": "{:%Y-%m-%d}" + }, + + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + + "memory": { + "format": "{}% " + }, + + "temperature": { + "critical-threshold": 80, + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + + "network": { + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + + "pulseaudio": { + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + } +} diff --git a/waybar/style.css b/waybar/style.css new file mode 100644 index 0000000..12ddd42 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,122 @@ +/* Ported from Protesilaos Stavrou's waybar style.css: + * https://github.com/protesilaos/dotfiles/tree/master/wayland-tc/.config/waybar + * + * SUBSTITUTION: Prot sets `font-family: FontAwesome, sans-serif`. Replaced + * with FiraCode Nerd Font, which carries the FontAwesome glyphs his module + * formats rely on, so the icons still render. + * + * SUBSTITUTION: Sway's workspace buttons get the `.focused` class; the + * Hyprland module uses `.active`. Both are styled below so this survives + * either way. */ + +* { + font-family: "FiraCode Nerd Font", sans-serif; + font-size: 1rem; +} + +/* Colour is scoped to the bar on purpose. A bare `* { color: #ffffff }` also + * matches the label inside the tooltip window (a separate GTK toplevel), and a + * direct match beats the colour a widget inherits from Breeze's `tooltip` node + * -- so tooltips rendered white text on Breeze's #f7f7f7 background. Scoping it + * here leaves tooltips with the GTK theme's own colours. */ +window#waybar * { + color: #ffffff; +} + +window#waybar { + background-color: rgba(0,0,0, 0.7); + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.2; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: inset 0 -3px transparent; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: inherit; +} + +#workspaces button { + padding: 0 1px; + background-color: transparent; + color: #787878; +} + +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); +} + +#workspaces button.focused, +#workspaces button.active { + background-color: #383838; + color: #ffffff; + font-weight: bold; + box-shadow: inset 0 -1px #ffffff; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#submap { + background-color: #64727D; + border-bottom: 3px solid #ffffff; +} + +#clock, +#cpu, +#memory, +#disk, +#temperature, +#network, +#pulseaudio, +#wireplumber, +#tray, +#submap, +#idle_inhibitor, +#scratchpad { + padding: 0 3px; +} + +#window, +#workspaces { + margin: 0 1px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +label:focus { + background-color: #000000; +} + +#tray { + background-color: #2980b9; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} diff --git a/zsh/.zshenv b/zsh/.zshenv deleted file mode 100644 index c2f3182..0000000 --- a/zsh/.zshenv +++ /dev/null @@ -1 +0,0 @@ -. "$HOME/.cargo/env" diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index 3520e12..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,24 +0,0 @@ -eval "$(/opt/homebrew/bin/brew shellenv)" - -PROMPT='[%n@%m %F{#afd7ff}%~%f]%# ' -alias python=python3 -alias ls='ls -larth' -alias e='emacsclient -nc -a ""' -alias copy=pbcopy -alias paste=pbpaste - -# bun completions -[ -s "/Users/yousefjan/.bun/_bun" ] && source "/Users/yousefjan/.bun/_bun" - -# bun -export BUN_INSTALL="$HOME/.bun" -export PATH="$BUN_INSTALL/bin:$PATH" -export PATH="$HOME/.local/bin:$PATH" -export PATH="$HOME/.config/emacs/bin:$PATH" - -export PATH="$HOME/.local/bin:$PATH" - - -if [ -z "$TMUX" ]; then - tmux attach 2>/dev/null || tmux new -s main -fi |