diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf new file mode 100644 index 0000000..32cdc91 --- /dev/null +++ b/.config/kitty/kitty.conf @@ -0,0 +1,16 @@ +font_family 'JetBrainsMono NF' +font_size 10.5 + +text_composition_strategy legacy +modify_font cell_width 95% + +cursor_trail 10 +cursor_trail_start_threshold 0 +shell_integration no-cursor +cursor_trail_decay 0.01 0.15 +cursor_shape block +cursor_blink true + +map cmd+c copy_to_clipboard +map cmd+v paste_from_clipboard +map shift+insert paste_from_clipboard diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 35d6d25..c4dc500 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,29 +1,37 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end - -vim.opt.rtp:prepend(lazypath) -require('lazy').setup('plugins') - --- Settings -vim.cmd('source ~/.config/nvim/settings.vim') +require("config.lazy") -- colorscheme vim.o.termguicolors = true -vim.o.background = "dark" -- or "light" for light mode -vim.cmd("colorscheme gruvbox ") +--vim.opt.winborder = 'rounded' +--vim.o.background = "dark" -- or "light" for light mode +--vim.cmd("colorscheme gruvbox ") +--vim.cmd("colorscheme retrobox") + +vim.opt.clipboard = "unnamedplus" -- uses the clipboard register for all operations except yank. + +vim.cmd("set nocompatible") +vim.cmd("syntax on") +vim.cmd("filetype plugin indent on") +vim.cmd("set number") + +vim.cmd("set relativenumber") +vim.cmd("set expandtab") +vim.cmd("set shiftwidth=4") +vim.cmd("set softtabstop=4") +vim.cmd("set tabstop=4") +vim.cmd("set smartindent") + +vim.cmd("set backspace=indent,eol,start") +vim.cmd("set colorcolumn=81") +vim.cmd("set textwidth=80") +vim.cmd("set wrap") +vim.cmd("set linebreak") +vim.cmd("noswapfile") + +vim.cmd("set autoread") +vim.cmd("set complete-=i") + +vim.cmd("au FileType python set fileformat=unix encoding=utf-8") +vim.cmd("au FileType markdown,tex set spell spelllang=en_us") --- keymaps -vim.keymap.set('n', '/', ':nohlsearch') -vim.keymap.set('n', 'b', ':buffers') -vim.keymap.set('n', 'bp', ':bp') -vim.keymap.set('n', 'bn', ':bn') diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index ad37cfc..b131fa6 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,26 +1,14 @@ { - "LuaSnip": { "branch": "master", "commit": "8d7aa7a7b7c0875e4878d1d2590924bc1c229305" }, - "async.vim": { "branch": "master", "commit": "2082d13bb195f3203d41a308b89417426a7deca1" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "gruvbox.nvim": { "branch": "main", "commit": "49d9c0b150ba70efcd831ec7b3cb8ee740067045" }, + "black-metal-theme-neovim": { "branch": "main", "commit": "6d0207871387077f40d5396ab1ae90520e688d36" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, - "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, - "lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" }, - "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "0a8a1072137d916406507c941698a4bfa9dbbe7a" }, - "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, - "nvim-lspconfig": { "branch": "master", "commit": "54617a18f4cf46f0c2f6d024fa6feb7515fe036d" }, - "nvim-treesitter": { "branch": "master", "commit": "92d2501d698e0fe855bd222540f9648890fab6c7" }, - "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "render-markdown.nvim": { "branch": "main", "commit": "fc05fb7c56795f191b6800799a2ec6ea325ba715" }, - "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, - "vim-arsync": { "branch": "master", "commit": "dd5fd93182aafb67ede2ef465f379610980b52d3" } + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "80c0130c5f16b551865a69e832f1feadeedb5fbe" }, + "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, + "mini.completion": { "branch": "main", "commit": "4d451f82f193f6751719935a63d16ccb79a76e0b" }, + "mini.nvim": { "branch": "main", "commit": "8dccba88fc4dce006ca0ad668067c9e0d5ce7702" }, + "nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope.nvim": { "branch": "master", "commit": "84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9" }, + "vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" } } diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..205bc87 --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,35 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +--vim.g.mapleader = "/\" +--im.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + -- install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + -- checker = { enabled = true }, +}) diff --git a/.config/nvim/lua/plugins/colorscheme.lua b/.config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..83a3127 --- /dev/null +++ b/.config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,13 @@ +return { + "metalelf0/black-metal-theme-neovim", + lazy = false, + priority = 1000, + config = function() + require("black-metal").setup({ + -- optional configuration here + term_colors = true, + }) + + require("black-metal").load() + end, +} diff --git a/.config/nvim/lua/plugins/gruvbox.lua b/.config/nvim/lua/plugins/gruvbox.lua deleted file mode 100644 index 4fa0e95..0000000 --- a/.config/nvim/lua/plugins/gruvbox.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - "ellisonleao/gruvbox.nvim", - priority = 1000, - config = function () - require("gruvbox").setup({ - undercurl = true, - underline = true, - bold = true, - italic = { - strings = true, - comments = true, - operators = false, - folds = true, - }, - strikethrough = true, - invert_selection = false, - invert_signs = false, - invert_tabline = false, - invert_intend_guides = false, - inverse = true, -- invert background for search, diffs, statuslines and errors - contrast = "hard", -- can be "hard", "soft" or empty string - palette_overrides = {}, - overrides = {}, - dim_inactive = false, - transparent_mode = true, - }) - end -} - diff --git a/.config/nvim/lua/plugins/lsp-zero.lua b/.config/nvim/lua/plugins/lsp-zero.lua deleted file mode 100644 index 38faeb9..0000000 --- a/.config/nvim/lua/plugins/lsp-zero.lua +++ /dev/null @@ -1,81 +0,0 @@ -return { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v2.x', - dependencies = { - -- LSP Support - {'neovim/nvim-lspconfig'}, -- Required - {'williamboman/mason.nvim'}, -- Optional - {'williamboman/mason-lspconfig.nvim'}, -- Optional - - -- Autocompletion - {'hrsh7th/nvim-cmp'}, -- Required - {'hrsh7th/cmp-nvim-lsp'}, -- Required - {'hrsh7th/cmp-buffer'}, -- Optional - {'hrsh7th/cmp-path'}, -- Optional - {'saadparwaiz1/cmp_luasnip'}, -- Optional - {'hrsh7th/cmp-nvim-lua'}, -- Optional - - - -- snippets - {'L3MON4D3/LuaSnip'}, -- Required - {'rafamadriz/friendly-snippets'}, -- Optional - }, - - config = function() - local lsp = require('lsp-zero') - lsp.preset('recommended') - - lsp.on_attach(function(client, bufnr) - local opts = {buffer = bufnr, remap = false} - - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) - vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) - vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) - vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) - vim.keymap.set("n", "ca", function() vim.lsp.buf.code_action() end, opts) - vim.keymap.set("n", "rr", function() vim.lsp.buf.references() end, opts) - vim.keymap.set("n", "rn", function() vim.lsp.buf.rename() end, opts) - vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) - - end) - - local lspconfig = require('lspconfig') - local root_pattern = require('lspconfig.util').root_pattern - - lspconfig['jedi_language_server'].setup{ - root_dir = root_pattern('.git', 'setup.py') - } - - lspconfig['lua_ls'].setup{ - settings = { - Lua = { - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = {'vim'}, - }, - }, - }, - } - - local cmp = require('cmp') - local cmp_action = require('lsp-zero').cmp_action() - require('luasnip.loaders.from_vscode').lazy_load() - - cmp.setup({ - mapping = { - [''] = cmp.mapping.confirm({select = false}), - [''] = cmp_action.luasnip_jump_forward(), - [''] = cmp_action.luasnip_jump_backward(), - }, - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end - }, - }) - - lsp.setup() - end -} diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua deleted file mode 100644 index a633dd9..0000000 --- a/.config/nvim/lua/plugins/lualine.lua +++ /dev/null @@ -1,46 +0,0 @@ -return{ - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons', opt = true }, - config = function() - require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = {'filename'}, - lualine_x = {'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} - } - end -} diff --git a/.config/nvim/lua/plugins/mason.lua b/.config/nvim/lua/plugins/mason.lua new file mode 100644 index 0000000..cd7b751 --- /dev/null +++ b/.config/nvim/lua/plugins/mason.lua @@ -0,0 +1,54 @@ +return { + "mason-org/mason-lspconfig.nvim", + dependencies = { + {"mason-org/mason.nvim"}, + {'neovim/nvim-lspconfig'}, + + {'nvim-mini/mini.nvim'}, + {'nvim-mini/mini.completion'}, + }, + config = function() + require("mason").setup() + require("mason-lspconfig").setup {} + + -- NOTE: this is meant to be backwards compatible with Neovim v0.9 + --- + -- Autocompletion + --- + + require('mini.snippets').setup() + require('mini.completion').setup() + + --- + -- Language server configuration + --- + + -- These keymaps are the defaults in Neovim v0.10 + if vim.fn.has('nvim-0.11') == 0 then + -- NOTE: vim.diagnostic.goto_* methods are deprecated in v0.11 + -- that's why we put these under a conditional block + vim.keymap.set('n', '[d', 'lua vim.diagnostic.goto_prev()') + vim.keymap.set('n', ']d', 'lua vim.diagnostic.goto_next()') + vim.keymap.set('n', 'd', 'lua vim.diagnostic.open_float()') + vim.keymap.set('n', '', 'lua vim.diagnostic.open_float()') + end + + vim.api.nvim_create_autocmd('LspAttach', { + callback = function(event) + local bufmap = function(mode, rhs, lhs) + vim.keymap.set(mode, rhs, lhs, {buffer = event.buf}) + end + + -- These keymaps are the defaults in Neovim v0.11 + bufmap('n', 'K', 'lua vim.lsp.buf.hover()') + bufmap('n', 'grr', 'lua vim.lsp.buf.references()') + bufmap('n', 'gri', 'lua vim.lsp.buf.implementation()') + bufmap('n', 'grn', 'lua vim.lsp.buf.rename()') + bufmap('n', 'gra', 'lua vim.lsp.buf.code_action()') + bufmap('n', 'gO', 'lua vim.lsp.buf.document_symbol()') + bufmap({'i', 's'}, '', 'lua vim.lsp.buf.signature_help()') + end, + }) + + end +} diff --git a/.config/nvim/lua/plugins/render-makdown.lua b/.config/nvim/lua/plugins/render-makdown.lua deleted file mode 100644 index fc80960..0000000 --- a/.config/nvim/lua/plugins/render-makdown.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - 'MeanderingProgrammer/render-markdown.nvim', - dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons - ---@module 'render-markdown' - ---@type render.md.UserConfig - opts = {}, - - config = function() - require('render-markdown').setup({ - render_modes = true, - }) - end -} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index c28ed36..a459e4f 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -1,12 +1,13 @@ +-- plugins/telescope.lua: return { - 'nvim-telescope/telescope.nvim', tag = '0.1.2', + 'nvim-telescope/telescope.nvim', tag = 'v0.1.9', dependencies = { 'nvim-lua/plenary.nvim' }, config = function() - local builtin = require('telescope.builtin') - vim.keymap.set('n', 'ff', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - vim.keymap.set('n', 'fb', builtin.buffers, {}) - vim.keymap.set('n', 'fh', builtin.help_tags, {}) + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'ff', builtin.find_files, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + vim.keymap.set('n', 'fb', builtin.buffers, {}) + vim.keymap.set('n', 'fh', builtin.help_tags, {}) require('telescope').setup{ pickers = { diff --git a/.config/nvim/lua/plugins/vim-arsync.lua b/.config/nvim/lua/plugins/vim-arsync.lua deleted file mode 100644 index defbe37..0000000 --- a/.config/nvim/lua/plugins/vim-arsync.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - 'KenN7/vim-arsync', - dependencies = { 'prabirshrestha/async.vim' }, - config = function() - end -} - ---[[ ---Create a .vim-arsync file on the root of your project that contains the following: -remote_host example.com -remote_user john -remote_port 22 -remote_passwd secret -remote_path ~/temp/ -local_path /home/ken/temp/vuetest/ -ignore_path ["build/","test/"] -ignore_dotfiles 1 -auto_sync_up 0 -remote_or_local remote -sleep_before_sync 0 - ---]] diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..6c6707a --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,259 @@ +# Default config for sway +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + +font 'JetBrainsMono NF' 9 +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod4 +#set $mod Mod1 +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +set $term kitty +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +set $menu wofi -dGS drun + +include /etc/sway/config-vars.d/* + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +output * bg #000000 solid_color + +# Example configuration: +# + +output * scale 1.3 + +set $laptop eDP-1 +output $laptop scale 1.3 +#bindswitch --reload --locked lid:on output $laptop disable +#bindswitch --reload --locked lid:off output $laptop enable +#exec_always 'if grep -q open /proc/acpi/button/lid/LID0/state; then swaymsg output eDP-1 enable; else swaymsg output eDP-1 disable; fi' +#exec_always '/home/jozamudi/.config/sway/scripts/clamshell-mode.sh' + + +# You can get the names of your outputs by running: swaymsg -t get_outputs + +### Idle configuration +# +# Example configuration: + +exec swayidle -w \ + timeout 300 'swaylock -f -c 000000' \ + timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms 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. + +### Key bindings +# Sound: +# bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +# bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +# bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec $term + + # Kill focused window + bindsym $mod+Shift+q kill + + # Start your launcher + bindsym $mod+d exec $menu + + # 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 + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + 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' +# +# Moving around: +# + # Move your focus around + bindsym $mod+$left focus left + bindsym $mod+$down focus down + bindsym $mod+$up focus up + bindsym $mod+$right focus right + # Or use $mod+[up|down|left|right] + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+$left move left + bindsym $mod+Shift+$down move down + bindsym $mod+Shift+$up move up + bindsym $mod+Shift+$right move right + # Ditto, with arrow keys + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right +# +# Workspaces: +# + # Switch to workspace + bindsym $mod+1 workspace number 1 + bindsym $mod+2 workspace number 2 + bindsym $mod+3 workspace number 3 + bindsym $mod+4 workspace number 4 + bindsym $mod+5 workspace number 5 + bindsym $mod+6 workspace number 6 + bindsym $mod+7 workspace number 7 + bindsym $mod+8 workspace number 8 + bindsym $mod+9 workspace number 9 + bindsym $mod+0 workspace number 10 + # Move focused container to workspace + bindsym $mod+Shift+1 move container to workspace number 1 + bindsym $mod+Shift+2 move container to workspace number 2 + bindsym $mod+Shift+3 move container to workspace number 3 + bindsym $mod+Shift+4 move container to workspace number 4 + bindsym $mod+Shift+5 move container to workspace number 5 + bindsym $mod+Shift+6 move container to workspace number 6 + bindsym $mod+Shift+7 move container to workspace number 7 + bindsym $mod+Shift+8 move container to workspace number 8 + bindsym $mod+Shift+9 move container to workspace number 9 + bindsym $mod+Shift+0 move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + bindsym $mod+b splith + bindsym $mod+v splitv + + # Switch the current container between different layout styles + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+Shift+space floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# 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 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. + +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% \ + && pkill -RTMIN+10 i3blocks; + +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% \ + && pkill -RTMIN+10 i3blocks; + +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle \ + && pkill -RTMIN+10 i3blocks; + +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym XF86MonBrightnessDown exec brightnessctl set 10%- +bindsym XF86MonBrightnessUp exec brightnessctl set 10%+ + +bindsym $mod+Shift+p exec grimshot savecopy anything +bindsym $mod+Shift+s sticky toggle +bindsym $mod+m exec swaylock -c 0x000000 +bindsym $mod+Shift+m output eDP-1 toggle + +bindgesture swipe:right workspace prev +bindgesture swipe:left workspace next + + +exec waybar +exec swaync +exec nm-applet +exec blueman-applet +exec /home/jozamudi/.local/repos/shikane/target/release/shikane +exec wl-clipboard + +# Env Vars +export GDK_BACKEND=wayland +export QT_QPA_PLATFORM=wayland-egl +export MOZ_ENABLE_WAYLAND=1 + +# Enables inhibit_idle when playing audio +exec sway-audio-idle-inhibit + +include /etc/sway/config.d/* diff --git a/.config/sway/scripts/clamshell-mode.sh b/.config/sway/scripts/clamshell-mode.sh new file mode 100644 index 0000000..994d67d --- /dev/null +++ b/.config/sway/scripts/clamshell-mode.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +LAPTOP_OUTPUT="eDP-1" +LID_STATE_FILE="/proc/acpi/button/lid/LID0/state" + +read -r LS < "$LID_STATE_FILE" + +case "$LS" in +*open) swaymsg output "$LAPTOP_OUTPUT" enable ;; +*closed) swaymsg output "$LAPTOP_OUTPUT" disable ;; +*) echo "Could not get lid state" >&2 ; exit 1 ;; +esac