diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index aa8a315..062fd39 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -2,4 +2,23 @@ import = ["~/.config/alacritty/cyberdream.toml"] [window] -opacity = 0.95 +opacity = 0.90 + +[font] +size = 10.0 + +[font.bold] +family = "JetBrainsMono NerdFont" +style = "Bold" + +[font.bold_italic] +family = "JetBrainsMono NerdFont" +style = "Bold Italic" + +[font.italic] +family = "JetBrainsMono NerdFont" +style = "Italic" + +[font.normal] +family = "JetBrainsMono NerdFont" +style = "Regular" diff --git a/.config/hypr/hyprWorkspaceLayouts b/.config/hypr/hyprWorkspaceLayouts new file mode 160000 index 0000000..d74fa07 --- /dev/null +++ b/.config/hypr/hyprWorkspaceLayouts @@ -0,0 +1 @@ +Subproject commit d74fa07f4484e7934a26c26cdbe168533451935d diff --git a/.config/hypr/hypridle.conf b/.config/hypr/hypridle.conf index 1fca0ea..7621a1b 100644 --- a/.config/hypr/hypridle.conf +++ b/.config/hypr/hypridle.conf @@ -14,7 +14,7 @@ listener { on-timeout = hyprctl dispatch dpms off # turn off display 30 seconds after lock } -listener { - timeout = 1800 # 30 minutes - on-timeout = systemctl suspend # suspend system after 30 minutes -} +# listener { +# timeout = 1800 # 30 minutes +# on-timeout = systemctl suspend # suspend system after 30 minutes +# } diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index a474397..98dee67 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -5,9 +5,6 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,auto -monitor = DP-1-8, preferred, auto, 1 -monitor = DP-1-9, preferred, auto, 1 - ################### ### MY PROGRAMS ### @@ -27,7 +24,14 @@ $menu = wofi --show drun exec-once = waybar exec-once = hypridle exec-once = hyprpaper +# We want this to run every time the config is refreshed +exec-once = hyprctl plugin load /home/tovi/.config/hypr/hyprWorkspaceLayouts/workspaceLayoutPlugin.so +plugin { + wslayout { + default_layout=master + } +} ############################# ### ENVIRONMENT VARIABLES ### @@ -79,7 +83,7 @@ general { # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false - layout = master + layout=workspacelayout } # Master layout specific settings @@ -149,7 +153,8 @@ input { kb_layout = us kb_variant = kb_model = - kb_options = caps:swapescape + # kb_options = kb_options = caps:swapescape + kb_options = = kb_rules = follow_mouse = 1 @@ -191,11 +196,15 @@ bind = $mainMod, Q, killactive, bind = $mainMod SHIFT, Q, exec, uwsm stop bind = $mainMod, F, togglefloating, bind = $mainMod, P, exec, $menu -bind = $mainMod, S, togglesplit, # dwindle +bind = $mainMod, M, exec, ~/.local/bin/hyprland-monitor-switcher.sh +bind = $mainMod SHIFT, L, exec, hyprlock +bind = $mainMod, S, exec, hyprshot -m region --clipboard-only bind = $mainMod, Return, layoutmsg, swapwithmaster -bind = $mainMod, j, layoutmsg, swapnext -bind = $mainMod, k, layoutmsg, swapprev +bind = $mainMod, j, layoutmsg, cyclenext +bind = $mainMod, k, layoutmsg, cycleprev +bind = $mainMod, l, layoutmsg, mfact +0.05 +bind = $mainMod, h, layoutmsg, mfact -0.05 # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 diff --git a/.config/hypr/monitors.conf b/.config/hypr/monitors.conf index e69de29..0c91367 100644 --- a/.config/hypr/monitors.conf +++ b/.config/hypr/monitors.conf @@ -0,0 +1,5 @@ +# Generated by nwg-displays on 2025-07-07 at 07:57:10. Do not edit manually. + +monitor=eDP-1,1920x1080@60.0,1440x1080,1.0 +monitor=DP-3,1920x1080@60.0,1440x0,1.0 +monitor=DP-4,1920x1080@60.0,3360x0,1.0 diff --git a/.config/hypr/workspaces.conf b/.config/hypr/workspaces.conf index e69de29..0f65441 100644 --- a/.config/hypr/workspaces.conf +++ b/.config/hypr/workspaces.conf @@ -0,0 +1,4 @@ +# Generated by nwg-displays on 2025-07-07 at 07:57:09. Do not edit manually. + +workspace=1,monitor:DP-3,default:true +workspace=2,monitor:DP-4,default:true diff --git a/.config/nvim/lua/core/commands.lua b/.config/nvim/lua/core/commands.lua index 0cc56fc..345481e 100644 --- a/.config/nvim/lua/core/commands.lua +++ b/.config/nvim/lua/core/commands.lua @@ -27,3 +27,9 @@ end, {}) vim.api.nvim_create_user_command("CopyFilename", function() vim.cmd('let @+ = expand("%")') end, {}) + +vim.api.nvim_create_user_command("SnakeToCamel", function() + vim.cmd([[%s#\%($\%(\k\+\)\)\@<=_\(\k\)#\u\1#g]]) +end, {}) + + diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index e95d877..4314af3 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -16,6 +16,13 @@ return { local sorters = require("telescope.sorters") local builtin = require("telescope.builtin") + vim.api.nvim_create_autocmd('User', { + pattern = 'TelescopePreviewerLoaded', + callback = function(args) + vim.wo.number = true + end, + }) + local max_size = 100000 local truncate_large_files = function(filepath, bufnr, opts) opts = opts or {} @@ -35,13 +42,6 @@ return { end) end - vim.api.nvim_set_hl(0, 'TelescopePromptBorder', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'TelescopeResultsBorder', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'TelescopePreviewBorder', { bg = 'none' }) - vim.api.nvim_set_hl(0, 'TelescopePromptTitle', { bg = '#5ea1ff', fg = '#000000' }) - vim.api.nvim_set_hl(0, 'TelescopeResultsTitle', { bg = '#bd5eff', fg = '#000000' }) - vim.api.nvim_set_hl(0, 'TelescopePreviewTitle', { bg = '#5eff6c', fg = '#000000' }) - telescope.setup({ defaults = { file_sorter = sorters.get_fzy_sorter, diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 67bd731..3601351 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -17,7 +17,6 @@ "clock" ], "modules-right": [ - "custom/weather", "pulseaudio", "temperature", "network", @@ -141,12 +140,5 @@ "ignored-sinks": [ "Easy Effects Sink" ] - }, - "custom/weather": { - "format": "{}°C", - "tooltip": true, - "interval": 3600, - "exec": "wttrbar --date-format \"%d.%m.%Y\" -l de", - "return-type": "json" } } diff --git a/.config/waybar/style.css b/.config/waybar/style.css index f4fa344..4ccf423 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,7 +1,7 @@ * { border: none; border-radius: 0; - font-family: JetBrainsMono, Roboto, Helvetica, Arial, sans-serif; + font-family: JetBrainsMono NerdFont, Roboto, Helvetica, Arial, sans-serif; font-size: 14px; min-height: 0; } diff --git a/.local/bin/hyprland-monitor-switcher.sh b/.local/bin/hyprland-monitor-switcher.sh new file mode 100755 index 0000000..a8eb8cc --- /dev/null +++ b/.local/bin/hyprland-monitor-switcher.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +# Hyprland Monitor Management Script +# Disables eDP-1 when both DP-5 and DP-6 are connected + +# Function to check if a monitor is connected +check_monitor_connected() { + local monitor_name="$1" + hyprctl monitors -j | jq -r ".[].name" | grep -q "^${monitor_name}$" +} + +# Function to check if a monitor is disabled +check_monitor_disabled() { + local monitor_name="$1" + hyprctl monitors -j | jq -r ".[] | select(.name == \"${monitor_name}\") | .disabled" 2>/dev/null +} + +# Function to disable a monitor +disable_monitor() { + local monitor_name="$1" + echo "Disabling monitor: $monitor_name" + hyprctl keyword monitor "$monitor_name,disable" +} + +# Function to enable a monitor (you might want to customize the resolution/position) +enable_monitor() { + local monitor_name="$1" + echo "Enabling monitor: $monitor_name" + # Adjust the resolution and position as needed for your eDP-1 + hyprctl keyword monitor "$monitor_name,preferred,auto,1" +} + +# Main logic +main() { + # Check if both external monitors are connected + if check_monitor_connected "DP-5" && check_monitor_connected "DP-6"; then + echo "Both DP-5 and DP-6 are connected" + + # Check if eDP-1 is currently enabled + if check_monitor_connected "eDP-1"; then + local edp_disabled=$(check_monitor_disabled "eDP-1") + if [[ "$edp_disabled" == "false" ]]; then + echo "eDP-1 is enabled, disabling it..." + disable_monitor "eDP-1" + else + echo "eDP-1 is already disabled" + fi + else + echo "eDP-1 is not detected" + fi + + else + echo "Not both external monitors are connected" + + # Check if eDP-1 exists and is disabled, then enable it + if check_monitor_connected "eDP-1"; then + local edp_disabled=$(check_monitor_disabled "eDP-1") + if [[ "$edp_disabled" == "true" ]]; then + echo "eDP-1 is disabled, enabling it..." + enable_monitor "eDP-1" + else + echo "eDP-1 is already enabled" + fi + else + echo "eDP-1 is not detected" + fi + fi +} + +# Run the main function +main "$@" diff --git a/.tmux.conf b/.tmux.conf index ca29e0f..708c5ac 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -6,6 +6,9 @@ bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded." set-option -g status-position top +# Renumber windows on window close +set -g renumber-windows on + # set window split bind v split-window -h -c "#{pane_current_path}" bind b split-window -v -c "#{pane_current_path}" @@ -89,5 +92,8 @@ set -g @plugin 'catppuccin/tmux#v2.1.3' set -g @catppuccin_flavour "cyberdream" run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux +if "test ! -d ~/.tmux/plugins/tpm" \ + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" + # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '~/.tmux/plugins/tpm/tpm'