From 5887bb0d4d916215d29135567b0e75a011a30ed3 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Sun, 27 Jul 2025 22:37:30 -0500 Subject: [PATCH] changes - waybar rice - small edit to wezterm - fixed sway im emoji picker rule - made screenshot to file. will change later - added second monitor scale - added sway next - fixed dap --- env/.config/nvim/after/plugin/dap.lua | 65 ++++++--- env/.config/sway/config | 56 +------- env/.config/waybar/config.jsonc | 182 +++++++++++++++----------- env/.config/wezterm/wezterm.lua | 2 - 4 files changed, 159 insertions(+), 146 deletions(-) diff --git a/env/.config/nvim/after/plugin/dap.lua b/env/.config/nvim/after/plugin/dap.lua index 9e16f83..cad68fe 100644 --- a/env/.config/nvim/after/plugin/dap.lua +++ b/env/.config/nvim/after/plugin/dap.lua @@ -25,6 +25,40 @@ if ok then vim.fn.sign_define('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' }) + dap.configurations.rust = { + { + name = "Launch", + type = "codelldb", + request = "launch", + program = function() + --return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/", "file") + vim.fn.jobstart('cargo build') + if vim.fn.expand("%:t:r") == "main" then + return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnamemodify(vim.fn.getcwd(), ':t') + else + return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnameescape(vim.fn.expand("%:t:r")) + end + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + }, + } + + dap.configurations.c = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + --return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + return vim.fn.getcwd() .. "/" .. vim.fn.fnamemodify(vim.fn.getcwd(), ':t') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + }, + } + + local ok, dapui = pcall(require, 'dapui') if ok then dapui.setup() @@ -32,7 +66,17 @@ if ok then vim.keymap.set("n", "dl", function() dap.step_into() end) vim.keymap.set("n", "dj", function() dap.step_over() end) vim.keymap.set("n", "dk", function() dap.step_out() end) - vim.keymap.set("n", "dc", function() dap.run(dap.configurations.rust[1]) end) + --vim.keymap.set("n", "dc", function() dap.run(dap.configurations.rust[1]) end) + vim.keymap.set("n", "dc", function() + local ft = vim.bo.filetype + local configs = dap.configurations[ft] + + if type(configs) == "table" and configs[1] then + dap.run(configs[1]) + else + vim.notify("No DAP configuration found for filetype: " .. ft, vim.log.levels.ERROR) + end + end) vim.keymap.set("n", "dC", function() dap.continue() end) vim.keymap.set("n", "db", function() dap.toggle_breakpoint() end) vim.keymap.set("n", "dB", function() @@ -58,23 +102,4 @@ if ok then end ]]-- end - - dap.configurations.rust = { - { - name = "Launch", - type = "codelldb", - request = "launch", - program = function() - --return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/", "file") - vim.fn.jobstart('cargo build') - if vim.fn.expand("%:t:r") == "main" then - return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnamemodify(vim.fn.getcwd(), ':t') - else - return vim.fn.getcwd() .. "/target/debug/" .. vim.fn.fnameescape(vim.fn.expand("%:t:r")) - end - end, - cwd = "${workspaceFolder}", - stopOnEntry = false, - }, - } end diff --git a/env/.config/sway/config b/env/.config/sway/config index 22d3370..ff7979b 100644 --- a/env/.config/sway/config +++ b/env/.config/sway/config @@ -25,6 +25,7 @@ set $menu rofi -show drun ### Output configuration output "HDMI-A-1" scale 0.7 +output "DP-1" scale 0.7 workspace 1 output HDMI-A-1 workspace 2 output HDMI-A-1 @@ -48,33 +49,6 @@ workspace 18 output DP-1 workspace 19 output DP-1 workspace 20 output DP-1 -### 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 -# } -# -# 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. - # or input input "type:keyboard" { xkb_layout us,de @@ -82,26 +56,17 @@ input "type:keyboard" { xkb_options caps:swapescape } -### Key bindings # # Basics: # - # Start a terminal bindsym $mod+Return exec $term bindsym $mod+Shift+Return exec $term2 - # Kill focused window bindsym $mod+q kill - # Start your launcher bindsym $mod+d exec $menu bindsym $mod+SHIFT+D exec $HOME/.local/bin/system/rofi-search-web.sh - # 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 #toggle border @@ -114,6 +79,7 @@ input "type:keyboard" { bindsym $mod+Shift+e 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+Escape exec grim -g "$(slurp -b 00000088 -c cba6f7; sleep 0.5)" - | wl-copy + bindsym $mod+Print exec grim -g "$(slurp -b 00000088 -c cba6f7; sleep 0.5)" - > ~/out.png bindsym $mod+Shift+Escape exec grim -o HDMI-A-1 - | wl-copy # # Moving around: @@ -132,6 +98,9 @@ input "type:keyboard" { # # Workspaces: # + # cycle + bindsym $mod+n workspace next + bindsym $mod+b workspace prev # Switch to workspace bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 @@ -208,23 +177,13 @@ bindsym $mod+o mode "mon2" # # Scratchpad: # - # Sway has a "scratchpad", which is a bag of holding for windows. - # You can send windows there and get them back later. - - # 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 # # Resizing containers: # mode "resize" { - # left will shrink the containers width - # right will grow the containers width - # up will shrink the containers height - # down will grow the containers height bindsym $left resize shrink width 20px bindsym $down resize grow height 20px bindsym $up resize shrink height 20px @@ -266,7 +225,7 @@ for_window [class="vesktop"] \ floating enable, \ border none, \ move to workspace 11, \ - resize set 1500 900, \ + resize set 1800 1000, \ move position 0 0 # discord @@ -299,5 +258,4 @@ for_window [app_id="showmethekey-gtk"] \ resize set 1487 50, \ # im-emoji-picker window -for_window [title="im-emoji-picker"] \ - focus disable +no_focus [title="im-emoji-picker"] diff --git a/env/.config/waybar/config.jsonc b/env/.config/waybar/config.jsonc index 1947d1d..fda6a87 100644 --- a/env/.config/waybar/config.jsonc +++ b/env/.config/waybar/config.jsonc @@ -1,16 +1,15 @@ { "layer": "top", "position": "bottom", - // "modules-left": ["hyprland/workspaces"], - "modules-left": [ "sway/workspaces", "sway/mode" ], - - //"modules-center": ["clock", ], //"custom/weather"], + "modules-left": [ "hyprland/workspaces", "sway/workspaces", "custom/ws_end_arrow", "sway/mode" ], "modules-right": [ + "custom/mod_end_arrow", "custom/mic", "pulseaudio", //"backlight", "battery", + "custom/wifi", "network", "cpu", "memory", @@ -23,80 +22,119 @@ "custom/power" ], + "custom/ws_end_arrow":{ + "format": "", + "tooltip": false, + }, + + "custom/mod_end_arrow":{ + "format": "", + "tooltip": false, + }, + "hyprland/workspaces": { //"format": "{name}: {icon}", //"all-outputs":true, - "format": "{icon}", + "format": "{icon}", "format-icons": { /* "1": "", - "2": "", "3": "", "4": "", - "5": "" + "5":"  ", */ - "1":"  ", - "2":"  ", - "3":"  ", - "4":"  ", - "5":"  ", - "6":"  ", - "7":"  ", - "8":"  ", - "9":"  ", + "1":"  ", + "2":"  ", + "3":"  ", + "4":"  ", + "5": " ", + "6":"  ", + "7":"  ", + "8":"  ", + "9":"  ", "10":"  ", - "11":"  ", - "12":"  ", - "13":"  ", - "14":"  ", - "15":"  ", - "16":"  ", - "17":"  ", - "18":"  ", - "19":"  ", + "11":"  ", + "12":"  ", + "13":"  ", + "14":"  ", + "15":"  ", + "16":"  ", + "17":"  ", + "18":"  ", + "19":"  ", "20":"  " }, - /* "persistent-workspaces": { - "1": [], // Always show a workspace with name '3', on all outputs if it does not exists - "2": [], - "3": [], - "4": [], - "5": [], - "6": [], - "7": [], - "8": [], - "9": [], - "10": [] + "1": ["HDMI-A-1"], + "2": ["HDMI-A-1"], + "3": ["HDMI-A-1"], + "4": ["HDMI-A-1"], + "5": ["HDMI-A-1"], + "6": ["HDMI-A-1"], + "7": ["HDMI-A-1"], + "8": ["HDMI-A-1"], + "9": ["HDMI-A-1"], + "10": ["HDMI-A-1"], + "11": ["DP-1"], + "12": ["DP-1"], + "13": ["DP-1"], + "14": ["DP-1"], + "15": ["DP-1"], + "16": ["DP-1"], + "17": ["DP-1"], + "18": ["DP-1"], + "19": ["DP-1"], + "20": ["DP-1"], }, - */ "sort-by-name": true }, "sway/workspaces": { "format": "{icon}", "format-icons": { - "1":"  ", - "2":"  ", - "3":"  ", - "4":"  ", - "5":"  ", - "6":"  ", - "7":"  ", - "8":"  ", - "9":"  ", + "1":"  ", + "2":"  ", + "3":"  ", + "4":"  ", + "5":"  ", + "6":"  ", + "7":"  ", + "8":"  ", + "9":"  ", "10":"  ", - "11":"  ", - "12":"  ", - "13":"  ", - "14":"  ", - "15":"  ", - "16":"  ", - "17":"  ", - "18":"  ", - "19":"  ", + "11":"  ", + "12":"  ", + "13":"  ", + "14":"  ", + "15":"  ", + "16":"  ", + "17":"  ", + "18":"  ", + "19":"  ", "20":"  " }, + "persistent-workspaces": { + "1": ["HDMI-A-1"], + "2": ["HDMI-A-1"], + "3": ["HDMI-A-1"], + "4": ["HDMI-A-1"], + "5": ["HDMI-A-1"], + "6": ["HDMI-A-1"], + "7": ["HDMI-A-1"], + "8": ["HDMI-A-1"], + "9": ["HDMI-A-1"], + "10": ["HDMI-A-1"], + "11": ["DP-1"], + "12": ["DP-1"], + "13": ["DP-1"], + "14": ["DP-1"], + "15": ["DP-1"], + "16": ["DP-1"], + "17": ["DP-1"], + "18": ["DP-1"], + "19": ["DP-1"], + "20": ["DP-1"], + }, "sort-by-name": true }, @@ -118,15 +156,15 @@ "clock": { "timezone": "America/Chicago", "tooltip-format": "{:%Y %B}\n{calendar}", - "format": "{:%a %m/%d/%Y %I:%M:%S}", + "format": "  {:%a %m/%d/%Y %I:%M:%S}  ", "interval": 1 }, "network": { "interface": "wlan0", - "format-wifi": "󰤢 {bandwidthDownBits}", - "format-ethernet": "󰈀 {bandwidthDownBits}", - "format-disconnected": "󰤠 No Network", + "format-wifi": " 󰤢 {bandwidthDownBits}", + "format-ethernet": " 󰈀 {bandwidthDownBits}", + "format-disconnected": " 󰤠 No Network", "interval": 5, "tooltip": true, "tooltip-format-wifi": "{essid} ({signalStrength}%) ", @@ -136,26 +174,20 @@ "cpu": { "interval": 1, - "format": " {icon0}{icon1}{icon2}{icon3} {usage:>2}%", + "format": "   {icon0}{icon1}{icon2}{icon3} {usage:>2}%", "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"] }, "memory": { "interval": 30, - "format": " {used:0.1f}G/{total:0.1f}G" - }, - - "custom/uptime": { - "format": "{}", - "interval": 1600, - "exec": "sh -c '(uptime -p)'" + "format": "   {used:0.1f}G/{total:0.1f}G" }, "pulseaudio": { "format": "{icon} {volume}%", - "format-muted": "", + "format-muted": "  ", "format-icons": { - "default": ["", "", " "] + "default": ["  ", "  ", "   "] }, "on-click": "pavucontrol" }, @@ -167,7 +199,7 @@ }, "custom/lock": { - "format": "", + "format": "  ", "on-click": "hyprlock" }, @@ -180,7 +212,7 @@ }, "custom/weather": { - "format": "{}", + "format": "  {}", "tooltip": true, "interval": 1800, "exec": "$(pwd)/scripts/weather-stats/weather-stats", @@ -188,13 +220,13 @@ }, "custom/rss": { - "format": " {}", + "format": "   {}", "interval": 3, "exec": "/usr/bin/newsboat -x print-unread|sed 's/\\s.*//; s/Error:/E/'" }, "custom/disc": { - "format": " {}", + "format": "   {}", "interval": 20, "exec": "df -h -x=used /dev/mapper/artix-root | sed '1d' | awk '{print $4}'| sed 's/[^0-9]*//g'" }, @@ -206,8 +238,8 @@ }, "custom/wifi": { - "format": "{}", + "format": "  {}", "interval": 1000, - "exec": "sed \"s/down/\\:\\(/;s/up/\\:\\)/\" /sys/class/net/$wifi_device/operstate" + "exec": "sed 's/down/\\:\\(/;s/up/\\:\\)/' /sys/class/net/wlan0/operstate" } } diff --git a/env/.config/wezterm/wezterm.lua b/env/.config/wezterm/wezterm.lua index fcdba5b..48a053b 100755 --- a/env/.config/wezterm/wezterm.lua +++ b/env/.config/wezterm/wezterm.lua @@ -7,8 +7,6 @@ config.enable_tab_bar = false config.font = wezterm.font_with_fallback { 'B612 Mono', - --'Inconsolata', - -- 'CozetteVector', --has weird offset with japanese. きki becomes せse and vice versa 'JetBrainsMono', 'JetBrainsMono Nerd Font', 'JetBrainsMono Nerd Font Mono',