From 9c172ccd43eee346fdaea68a11d7fdcd26910727 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 6 Aug 2024 19:49:52 +0200 Subject: Updated alacritty config to use TOML --- config/alacritty/alacritty.linux.toml | 81 +++++++++++++++++++++++++++++++++++ config/alacritty/alacritty.linux.yml | 6 +-- 2 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 config/alacritty/alacritty.linux.toml diff --git a/config/alacritty/alacritty.linux.toml b/config/alacritty/alacritty.linux.toml new file mode 100644 index 0000000..7a2db84 --- /dev/null +++ b/config/alacritty/alacritty.linux.toml @@ -0,0 +1,81 @@ +[colors.bright] +black = "0x928374" +blue = "0x83a598" +cyan = "0x8ec07c" +green = "0xb8bb26" +magenta = "0xd3869b" +red = "0xfb4934" +white = "0xebdbb2" +yellow = "0xfabd2f" + +[colors.normal] +black = "0x282828" +blue = "0x458588" +cyan = "0x689d6a" +green = "0x98971a" +magenta = "0xb16286" +red = "0xcc241d" +white = "0xa89984" +yellow = "0xd79921" + +[colors.primary] +background = "0x282828" +foreground = "0xebdbb2" + +[env] +TERM = "xterm-256color" +WINIT_X11_SCALE_FACTOR = "1" + +[font] +size = 9.0 + +[font.bold] +family = "Fira Code" +style = "Bold" + +[font.italic] +family = "Fira Code" +style = "Light" + +[font.normal] +family = "Fira Code" +style = "Regular" + +[font.offset] +x = 0 +y = 0 + +[[keyboard.bindings]] +chars = "\u001B[B" +key = "J" +mods = "Alt" + +[[keyboard.bindings]] +chars = "\u001B[A" +key = "K" +mods = "Alt" + +[[keyboard.bindings]] +action = "ScrollHalfPageDown" +key = "J" +mods = "Alt|Shift" + +[[keyboard.bindings]] +action = "ScrollHalfPageUp" +key = "K" +mods = "Alt|Shift" + +[[keyboard.bindings]] +action = "IncreaseFontSize" +key = "Plus" +mods = "Alt|Shift" + +[[keyboard.bindings]] +action = "DecreaseFontSize" +key = "Minus" +mods = "Alt" + +[[keyboard.bindings]] +action = "ResetFontSize" +key = "Key0" +mods = "Alt" diff --git a/config/alacritty/alacritty.linux.yml b/config/alacritty/alacritty.linux.yml index 5a9140c..74111be 100644 --- a/config/alacritty/alacritty.linux.yml +++ b/config/alacritty/alacritty.linux.yml @@ -14,13 +14,13 @@ font: x: 0 y: 0 normal: - family: FiraCode + family: Fira Code style: Regular italic: - family: FiraCode + family: Fira Code style: Light bold: - family: FiraCode + family: Fira Code style: Bold -- cgit From bbdb6227cf78c8bebba721fae008caeefb9bc6da Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 6 Aug 2024 22:07:24 +0200 Subject: Update xmonad layout to change according to host --- config/fish/config.fish | 2 ++ config/xmonad/xmonad.hs | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/config/fish/config.fish b/config/fish/config.fish index ac67f57..7d34a17 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -94,6 +94,8 @@ set -gx GPG_TTY "$(tty)" # valgrind requires this to work on arch linux (from: https://bbs.archlinux.org/viewtopic.php?id=276422) set -gx DEBUGINFOD_URLS 'https://debuginfod.archlinux.org' +set -gx HOST "$(cat /etc/hostname)" # for compatibility with Xmonad.Layout.OnHost + if status is-interactive fish_vi_key_bindings diff --git a/config/xmonad/xmonad.hs b/config/xmonad/xmonad.hs index 57f8d74..7862565 100644 --- a/config/xmonad/xmonad.hs +++ b/config/xmonad/xmonad.hs @@ -19,6 +19,7 @@ import XMonad.Layout.Spacing (Border (..), spacingRaw) import XMonad.Layout.Grid (Grid (..)) import XMonad.Layout.ThreeColumns (ThreeCol (ThreeColMid)) import XMonad.Layout.CenteredIfSingle (centeredIfSingle) +import XMonad.Layout.OnHost (onHost) -- Hooks import XMonad.Hooks.InsertPosition (Focus (..), Position (..), @@ -33,9 +34,9 @@ import XMonad.StackSet (swapUp) import XMonad.Layout.LayoutScreens import XMonad.Layout.TwoPane - myTerminal = "alacritty" + -- xmonad :: XConfig -> IO () -- https://hackage.haskell.org/package/xmonad-0.15/docs/XMonad-Core.html#t:XConfig main = xmonad $ desktopConfig @@ -53,14 +54,15 @@ main = xmonad $ desktopConfig } `additionalKeysP` keys' -layoutHook' = spacing' 4 $ centeredIfSingle (1/2) (95/100) (ThreeColMid 1 (3/100) (1/2)) - ||| reflectHoriz tiledVerticalBigMaster -- main monitor is slighly to the left - ||| tiledVerticalBigMaster -- bigger master for code and smaller slave for compiling - ||| noBorders Full -- disable borders for fullscreen layout - ||| Mirror tiledHorizontalEven -- 50/50 horizontal split - ||| Grid - -- ||| layoutScreens 2 (TwoPane 0.5 0.5) - where tiledVerticalBigMaster = Tall 1 (3 / 100) (3 / 5) +layoutHook' = spacing' 4 $ onHost "charles-fractal" (threeColMid ||| commonLayout) commonLayout + where commonLayout = reflectHoriz tiledVerticalBigMaster -- main monitor is slighly to the left + ||| tiledVerticalBigMaster -- bigger master for code and smaller slave for compiling + ||| noBorders Full -- disable borders for fullscreen layout + ||| Mirror tiledHorizontalEven -- 50/50 horizontal split + ||| Grid + -- ||| layoutScreens 2 (TwoPane 0.5 0.5) + threeColMid = centeredIfSingle (1/2) (95/100) (ThreeColMid 1 (3/100) (1/2)) + tiledVerticalBigMaster = Tall 1 (3 / 100) (3 / 5) tiledHorizontalEven = Tall 1 (3 / 100) (1 / 2) spacing' x = spacingRaw True (Border x x x x) False (Border x x x x) True -- cgit From 322e916d3b46a0c2826c0831608e739efd325f8c Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 6 Aug 2024 22:17:43 +0200 Subject: Update rofi theme --- config/rofi/config.rasi | 3 ++- config/zsh/.zshenv | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/rofi/config.rasi b/config/rofi/config.rasi index e47b052..dd5755f 100644 --- a/config/rofi/config.rasi +++ b/config/rofi/config.rasi @@ -5,8 +5,9 @@ configuration { kb-row-up: "Control+k"; } -@theme "gruvbox-light" +//@theme "gruvbox-light" window { width: 900px; } +@theme "/usr/share/rofi/themes/gruvbox-dark.rasi" diff --git a/config/zsh/.zshenv b/config/zsh/.zshenv index 94910be..84286f0 100644 --- a/config/zsh/.zshenv +++ b/config/zsh/.zshenv @@ -1,6 +1,7 @@ if [ "$(uname)" = 'Linux' ] then export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:$HOME/.local/bin" + export PATH="$PATH:$HOME/.local/share/go/bin" export MAIL='me@cacharle.xyz' export SUDO='doas' elif [ "$(uname)" = 'Darwin' ] -- cgit From 14fd2b86e66bfc0fde741ed0c5b3cf1cdab9203b Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 6 Aug 2024 22:25:11 +0200 Subject: Fix alacritty config formatting --- config/alacritty/alacritty.linux.toml | 88 ++++++++++------------------------- 1 file changed, 25 insertions(+), 63 deletions(-) diff --git a/config/alacritty/alacritty.linux.toml b/config/alacritty/alacritty.linux.toml index 7a2db84..2bb62cb 100644 --- a/config/alacritty/alacritty.linux.toml +++ b/config/alacritty/alacritty.linux.toml @@ -1,3 +1,28 @@ +[env] +TERM = "xterm-256color" +WINIT_X11_SCALE_FACTOR = "1" + +[font] +size = 9.0 +offset = { x = 0, y = 0 } +normal = { family = "Fira Code", style = "Regular" } +bold = { family = "Fira Code", style = "Bold" } +italic = { family = "Fira Code", style = "Light" } + +[keyboard] +bindings = [ + { key = "J", mods = "Alt", chars = "\u001B[B" }, + { key = "K", mods = "Alt", chars = "\u001B[A" }, + { key = "J", mods = "Alt|Shift", action = "ScrollHalfPageDown" }, + { key = "K", mods = "Alt|Shift", action = "ScrollHalfPageUp" }, + { key = "Plus", mods = "Alt|Shift", action = "IncreaseFontSize" }, + { key = "Minus", mods = "Alt", action = "DecreaseFontSize" }, + { key = "Key0", mods = "Alt", action = "ResetFontSize" }, +] + +[colors.primary] +background = "0x282828" +foreground = "0xebdbb2" [colors.bright] black = "0x928374" blue = "0x83a598" @@ -7,7 +32,6 @@ magenta = "0xd3869b" red = "0xfb4934" white = "0xebdbb2" yellow = "0xfabd2f" - [colors.normal] black = "0x282828" blue = "0x458588" @@ -17,65 +41,3 @@ magenta = "0xb16286" red = "0xcc241d" white = "0xa89984" yellow = "0xd79921" - -[colors.primary] -background = "0x282828" -foreground = "0xebdbb2" - -[env] -TERM = "xterm-256color" -WINIT_X11_SCALE_FACTOR = "1" - -[font] -size = 9.0 - -[font.bold] -family = "Fira Code" -style = "Bold" - -[font.italic] -family = "Fira Code" -style = "Light" - -[font.normal] -family = "Fira Code" -style = "Regular" - -[font.offset] -x = 0 -y = 0 - -[[keyboard.bindings]] -chars = "\u001B[B" -key = "J" -mods = "Alt" - -[[keyboard.bindings]] -chars = "\u001B[A" -key = "K" -mods = "Alt" - -[[keyboard.bindings]] -action = "ScrollHalfPageDown" -key = "J" -mods = "Alt|Shift" - -[[keyboard.bindings]] -action = "ScrollHalfPageUp" -key = "K" -mods = "Alt|Shift" - -[[keyboard.bindings]] -action = "IncreaseFontSize" -key = "Plus" -mods = "Alt|Shift" - -[[keyboard.bindings]] -action = "DecreaseFontSize" -key = "Minus" -mods = "Alt" - -[[keyboard.bindings]] -action = "ResetFontSize" -key = "Key0" -mods = "Alt" -- cgit From ecc53220883bdfc6bab7e6500b52bf452085f4a7 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 7 Aug 2024 14:22:48 +0200 Subject: Update lualine to display relative path on active window --- config/nvim/lua/plugins.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index f5f22fc..697d8fe 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -379,7 +379,11 @@ return require("packer").startup(function() icons_enabled = true, section_separators = '', component_separators = '', - } + }, + sections = { + -- path=1 for Relative path (https://github.com/nvim-lualine/lualine.nvim?tab=readme-ov-file#filename-component-options) + lualine_c = {{'filename', path = 1}}, + }, } end } -- cgit From ce3c6a8d435272de5b549cd51c7f8fa915b64518 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 7 Aug 2024 17:31:24 +0200 Subject: Update telescope live_grep shortcut to avoid delay --- config/nvim/lua/plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 697d8fe..7741484 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -474,7 +474,7 @@ return require("packer").startup(function() map("n", "H", "Telescope help_tags", {}) map("n", ";", "Telescope commands", {}) -- map("n", "p", "Telescope tags", {}) - map("n", "g", "Telescope live_grep", {}) + map("n", "gg", "Telescope live_grep", { noremap = true, silent = true }) map("n", "G", "Telescope grep_string", {}) end } -- cgit