From f6cce8f1ae6361117e8689001dc0344e0d3b9b77 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 22:19:29 +0200 Subject: eww: Fixs because they broke JQ --- .config/eww/scripts/active-workspace-listener | 20 +++++++++++--------- .config/eww/scripts/workspace-list-listener | 14 ++++++++------ 2 files changed, 19 insertions(+), 15 deletions(-) (limited to '.config') diff --git a/.config/eww/scripts/active-workspace-listener b/.config/eww/scripts/active-workspace-listener index f8704b8..108c08a 100755 --- a/.config/eww/scripts/active-workspace-listener +++ b/.config/eww/scripts/active-workspace-listener @@ -2,13 +2,15 @@ readonly IPC="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" -{ - hyprctl -j monitors - socat -u UNIX-CONNECT:"$IPC" - | while read -r _ - do - case "${_%>>*}" in +report() { + hyprctl -j monitors | jq -cr '[.[] | .activeWorkspace.id % 10]' +} + +report +socat -u UNIX-CONNECT:"$IPC" - | while read -r _ +do + case "${_%>>*}" in workspace|moveworkspace) - hyprctl -j monitors - esac - done -} | jq -cr '[.[] | .activeWorkspace.id % 10]' + report + esac +done diff --git a/.config/eww/scripts/workspace-list-listener b/.config/eww/scripts/workspace-list-listener index c7ff7fb..6dc3e4b 100755 --- a/.config/eww/scripts/workspace-list-listener +++ b/.config/eww/scripts/workspace-list-listener @@ -10,9 +10,11 @@ hyprctl -j workspaces | jq -cr ' socat -u UNIX-CONNECT:"$IPC" - \ | stdbuf -oL grep -E '^(create|destroy)workspace>>' \ - | while read -r _; do hyprctl -j workspaces; done \ - | jq -cr ' - [.[].id] - | group_by(. / 10 | floor) - | [.[] | map(. % 10) | sort_by(.)] - ' + | while read -r _ + do + hyprctl -j workspaces | jq -cr ' + [.[].id] + | group_by(. / 10 | floor) + | [.[] | map(. % 10) | sort_by(.)] + ' + done -- cgit v1.2.3 From e4ee5b68af2ac10b8bf3aa33aeafb1f98c5ab5d9 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 22:19:47 +0200 Subject: nvim: Don’t pass ‘-’ to clang-format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/after/ftplugin/c.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config') diff --git a/.config/nvim/after/ftplugin/c.lua b/.config/nvim/after/ftplugin/c.lua index 2c378f4..23262f2 100644 --- a/.config/nvim/after/ftplugin/c.lua +++ b/.config/nvim/after/ftplugin/c.lua @@ -1,6 +1,6 @@ vim.bo.commentstring = '/* %s */' -vim.keymap.set('v', '=', ":'<'>!clang-format -style=file -", { +vim.keymap.set('v', '=', ":'<'>!clang-format -style=file", { desc = 'Format the current selection with Clang Format', }) -- cgit v1.2.3 From 22f4bdbe08a6d7514171ad4650d5a9a69db664a9 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 22:20:09 +0200 Subject: nvim: Add a text-object for the whole buffer --- .config/nvim/init.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.config') diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index a11639f..c0709dc 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -50,6 +50,10 @@ function mk_scratch_buffer() ]] end +vim.keymap.set('x', 'a', 'gg0oG$', + { desc = 'Select the [A]ll of the buffer' }) +vim.keymap.set('o', 'a', ':normal! ggVG', + { desc = 'Text object of [A]ll of the buffer' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) vim.keymap.set('n', '', '', -- cgit v1.2.3 From 1f04bef2db25bb386c70fa3b63bb73cedb07f9a9 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 22:20:31 +0200 Subject: nvim: Remap in visual- but not select mode --- .config/nvim/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.config') diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index c0709dc..49d7165 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -72,9 +72,9 @@ vim.keymap.set('n', 'M', ':make', { desc = 'Run the configured compiler' }) vim.keymap.set('n', 'V', '', { desc = 'Enter visual-block mode' }) -vim.keymap.set('v', '', ":m '>+1gv=gv", +vim.keymap.set('x', '', ":m '>+1gv=gv", { desc = 'Move a selection down a line' }) -vim.keymap.set('v', '', ":m '<-2gv=gv", +vim.keymap.set('x', '', ":m '<-2gv=gv", { desc = 'Move a selection up a line' }) vim.keymap.set({ 'n', 'o', 'x' }, '€', '$', { desc = 'Go to end of the line' }) -- cgit v1.2.3 From 4d587b5882c4af02cfbbf4ee1352f79fba08235e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 11 Jun 2024 22:20:48 +0200 Subject: nvim: Save the buffer before building --- .config/nvim/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config') diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 49d7165..fe7ed8f 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -68,7 +68,7 @@ vim.keymap.set('n', 'h', function() vim.cmd 'split' end, { desc = 'Open a [H]orizontal split' }) vim.keymap.set('n', 'v', function() vim.cmd 'vsplit' end, { desc = 'Open a [V]ertical split' }) -vim.keymap.set('n', 'M', ':make', +vim.keymap.set('n', 'M', ':w! | make', { desc = 'Run the configured compiler' }) vim.keymap.set('n', 'V', '', { desc = 'Enter visual-block mode' }) -- cgit v1.2.3 From 4fd37182076c2be406a7841a005323198f19be9c Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 12 Jun 2024 18:52:07 +0200 Subject: Hyprland: Fix option for new version --- .config/hypr/hyprland.conf.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.config') diff --git a/.config/hypr/hyprland.conf.in b/.config/hypr/hyprland.conf.in index e588455..745673d 100644 --- a/.config/hypr/hyprland.conf.in +++ b/.config/hypr/hyprland.conf.in @@ -32,7 +32,10 @@ general { col.inactive_border = rgba(64727D7F) gaps_in = 5 gaps_out = 10 - cursor_inactive_timeout = 3 +} + +cursor { + inactive_timeout = 3 } decoration { -- cgit v1.2.3 From 3224937ddcbe6a316dbf919d585ccb16c6ff7355 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 12 Jun 2024 18:52:34 +0200 Subject: Hyprland: Formatting --- .config/hypr/hyprland.conf.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '.config') diff --git a/.config/hypr/hyprland.conf.in b/.config/hypr/hyprland.conf.in index 745673d..df2bc7f 100644 --- a/.config/hypr/hyprland.conf.in +++ b/.config/hypr/hyprland.conf.in @@ -27,11 +27,11 @@ input { } general { - border_size = 3 - col.active_border = rgb(FAA14F) - col.inactive_border = rgba(64727D7F) - gaps_in = 5 - gaps_out = 10 + border_size = 3 + col.active_border = rgb(FAA14F) + col.inactive_border = rgba(64727D7F) + gaps_in = 5 + gaps_out = 10 } cursor { -- cgit v1.2.3