parent
ae2484d8fe
commit
b6e9c35ec4
@ -0,0 +1,169 @@
|
|||||||
|
---
|
||||||
|
- name: Set up my computer
|
||||||
|
hosts: localhost
|
||||||
|
vars:
|
||||||
|
uid: micke
|
||||||
|
LV_BRANCH: release-1.3/neovim-0.9
|
||||||
|
connection: local
|
||||||
|
become: false
|
||||||
|
tasks:
|
||||||
|
- name: Install apt packages
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
autoclean: true
|
||||||
|
autoremove: true
|
||||||
|
install_recommends: true
|
||||||
|
pkg:
|
||||||
|
- curl
|
||||||
|
- fcitx5
|
||||||
|
- foot
|
||||||
|
- git
|
||||||
|
- grimshot
|
||||||
|
- lxpolkit
|
||||||
|
- network-manager-gnome
|
||||||
|
- nextcloud-desktop
|
||||||
|
- npm
|
||||||
|
- pipx
|
||||||
|
- python3-yamlfix
|
||||||
|
- sway
|
||||||
|
- sway-backgrounds
|
||||||
|
- sway-notification-center
|
||||||
|
- swayidle
|
||||||
|
- swaylock
|
||||||
|
- swaylock
|
||||||
|
- waybar
|
||||||
|
- wget
|
||||||
|
- wl-clipboard
|
||||||
|
- wofi
|
||||||
|
- yq
|
||||||
|
- zsh
|
||||||
|
state: latest
|
||||||
|
update_cache: true
|
||||||
|
- name: Remove apt packages
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
autoclean: true
|
||||||
|
autoremove: true
|
||||||
|
install_recommends: true
|
||||||
|
pkg:
|
||||||
|
- nano
|
||||||
|
state: absent
|
||||||
|
update_cache: true
|
||||||
|
- name: Set zsh as default shell
|
||||||
|
become: true
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: chsh -s /usr/bin/zsh {{ uid }}
|
||||||
|
- name: Get Oh my zsh
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
|
||||||
|
creates: /tmp/install.sh
|
||||||
|
- name: Install Oh my zsh
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: bash /tmp/install.sh
|
||||||
|
creates: /home/{{ uid }}/.oh-my-zsh
|
||||||
|
- name: Remove Oh my zsh install script
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: rm /tmp/install.sh
|
||||||
|
removes: /tmp/install.sh
|
||||||
|
- name: Get neovim
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: wget https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
|
||||||
|
creates: /tmp/nvim-linux64.tar.gz
|
||||||
|
- name: Unpack neovim
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: tar xf nvim-linux64.tar.gz
|
||||||
|
creates: /tmp/nvim-linux64
|
||||||
|
- name: Install neovim
|
||||||
|
become: true
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp/nvim-linux64
|
||||||
|
cmd: cp -a bin/ lib/ share/ /usr/local/
|
||||||
|
creates: [/usr/local/bin/nvim]
|
||||||
|
- name: Install neovim man pages
|
||||||
|
become: true
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp/nvim-linux64
|
||||||
|
cmd: cp -a man/ /usr/local/share/
|
||||||
|
creates: [/usr/local/share/man/man1/nvim.1]
|
||||||
|
- name: Remove neovim tar ball
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: rm nvim-linux64.tar.gz
|
||||||
|
removes: /tmp/nvim-linux64.tar.gz
|
||||||
|
- name: Remove neovim install files
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: rm -rf nvim-linux64/
|
||||||
|
removes: /tmp/nvim-linux64
|
||||||
|
- name: Get lunarvim
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: /tmp
|
||||||
|
cmd: wget https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh
|
||||||
|
creates: /tmp/install.sh
|
||||||
|
- name: Install lunarvim
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: bash /tmp/install.sh
|
||||||
|
creates: /home/{{ uid }}/.local/bin/lvim
|
||||||
|
- name: Remove lunarvim install script
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: rm /tmp/install.sh
|
||||||
|
removes: /tmp/install.sh
|
||||||
|
- name: Make my lvim real vim
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: "/home/{{ uid }}/.local/bin/lvim"
|
||||||
|
dest: /usr/local/bin/vim
|
||||||
|
state: link
|
||||||
|
- name: Install zshrc
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: zshrc.j2
|
||||||
|
dest: "/home/{{ uid }}/.zshrc"
|
||||||
|
owner: "{{ uid }}"
|
||||||
|
group: "{{ uid }}"
|
||||||
|
mode: '0644'
|
||||||
|
- name: Install lunarvim config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: config.lua.j2
|
||||||
|
dest: "/home/{{ uid }}/.config/lvim/config.lua"
|
||||||
|
owner: "{{ uid }}"
|
||||||
|
group: "{{ uid }}"
|
||||||
|
mode: '0644'
|
||||||
|
- name: Create sources dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
dest: "/home/{{ uid }}/sources"
|
||||||
|
state: directory
|
||||||
|
- name: Get tabby plugin
|
||||||
|
ansible.builtin.command:
|
||||||
|
chdir: "/home/{{ uid }}/sources/"
|
||||||
|
cmd: git clone https://github.com/TabbyML/tabby.git
|
||||||
|
creates: "/home/{{ uid }}/sources/tabby"
|
||||||
|
- name: Create ssh dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
dest: "/home/{{ uid }}/.ssh"
|
||||||
|
state: directory
|
||||||
|
- name: Install authorized keys
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: authorized_keys.j2
|
||||||
|
dest: "/home/{{ uid }}/.ssh/authorized_keys"
|
||||||
|
owner: "{{ uid }}"
|
||||||
|
group: "{{ uid }}"
|
||||||
|
mode: '0600'
|
||||||
|
- name: Install autotiling
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: pipx install autotiling
|
||||||
|
creates: "/home/{{ uid }}/.local/bin/autotiling"
|
||||||
|
- name: Create sway dir
|
||||||
|
ansible.builtin.file:
|
||||||
|
dest: "/home/{{ uid }}/.config/sway"
|
||||||
|
state: directory
|
||||||
|
- name: Install sway config
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: sway_config.j2
|
||||||
|
dest: "/home/{{ uid }}/.config/sway/config"
|
||||||
|
owner: "{{ uid }}"
|
||||||
|
group: "{{ uid }}"
|
||||||
|
mode: '0640'
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5Llc/yl585Uj1CcJPcImWKFRkLOL1OhHhIHcVgj90eqoYz0vtmaw+MzlAj7DgwdtXb1WRAjjoulLZhEkHQ6iL9VePMJFqxN+YKvl+YZnJuOIAoH0CvS8Ej0TzZV2wuhchrWo5YrhVqi9PfFEt5xSHq/B0EFl797R6bFF75g0OE0EdJxtd1UmKQLJxtn/6gZoa7Z4ZuZqm8lL8cpBdm4qWFUGaz8CpCVwuGK9mdoszU/74tWkEcKnYD2DEIC0B/lZ9BeluRgw3Qf1Grf8G9D44OjbB+QkuiO34ru2hVKjTrfCnDEq+pfPzoNXVVUIlAxvoOqjCAnKZv080cJq3fYwjMkMTfU4JaH9y+Byidft1wcgV0T2aayUBMEuF6FbblUhLfhi5C04IfnCWYarquNfLkGy1LnVcejDG17o77Vz8oLlJ8kThMPdOt8hbOZjrdO7y9+Olk0QPYme8AW0sQTthM4+5mlQ3bHIX40QRoA6xm4+gPISqZQhdEmHR9iialCsx4KV2qpBkeNsvnBuC54Ltwmr5/nNSpKkfPJ8t7wKe42DPhxvg1Tb+GV6YIhDYJaHzbT1OVLO9X9YsjKGxtF6kxo46+0rOx3FDfYfG77qKKc3XmDaJLUcwVHO+PlBAWnfvMuWzSLWFduOHvm9gb49jsxw4rAB8iYLO8YHv4eqkhw== cardno:7431462
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ+FeOKCRwbETqXoxawnfUSwarwJiYqt7oaUUqFOOwH40aS4dPEb6zwsoDQMPjlJmoNDrJmWqXip8tNzcBrwJgUq2Yx1e09F1c+6O+1GaWGV3Gf9BXcP1uoVzn+9ciAlPPtB+Cqc7BKas7aGp5DwUuJ5kmo/mVbaSe0WX1dMpRTFeUkzAoaRAXdmdWBknr3b+gdLwhDfKHIOiRyT/9i865SKbBDaTbC4yKUQ4U9/yD89tMqn+PPlo4uT0w0lWg/1lrujKReLFr0vDHD1ZbErJIfPWtnY3kEdmbUuWMGd98jqIneDT9WGTkdjZvhwSBiQ6x50KfnuDHa59xErvK+LaUWakw6S+qIUuAdkTVtXy/dcliJG4A9TbiUqVwcqDJa7ORfpZX8jzPf+CFbQDpaptmrzmv7nfDDpFCzQTYZkqcQj8pndWULs/h/12giU/Ge9yL4oOeL5MJxwbR0nZHYa3t5i1C+1J/HeP7DIdaes29zMQmG5OaB76aoLQDT0DWw7XdI77koBNjLgWJZ1ZQH7BX12sCQkEzN4cl/++how5lSGr8659ca3sh5aAZ9kTZq4SRAkkvkgqCFwLDzDZvPngqhtici5BpdT7sh44yhNCS+8udqQrg0sAjO5rkwojsXng/tvgEXWMoo+i4i8Q3dUrmy1tG6OoNFHpdGItqGwVAow== workthingie
|
@ -0,0 +1,204 @@
|
|||||||
|
-- Read the docs: https://www.lunarvim.org/docs/configuration
|
||||||
|
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
|
||||||
|
-- Forum: https://www.reddit.com/r/lunarvim/
|
||||||
|
-- Discord: https://discord.com/invite/Xb9B4Ny
|
||||||
|
|
||||||
|
--[[
|
||||||
|
THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
|
||||||
|
`lvim` is the global options object
|
||||||
|
]]
|
||||||
|
-- vim options
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- general
|
||||||
|
lvim.log.level = "info"
|
||||||
|
lvim.format_on_save = {
|
||||||
|
enabled = true,
|
||||||
|
pattern = "*.lua",
|
||||||
|
timeout = 1000,
|
||||||
|
}
|
||||||
|
-- to disable icons and use a minimalist setup, uncomment the following
|
||||||
|
-- lvim.use_icons = false
|
||||||
|
|
||||||
|
-- keymappings <https://www.lunarvim.org/docs/configuration/keybindings>
|
||||||
|
lvim.leader = "\\"
|
||||||
|
-- add your own keymapping
|
||||||
|
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
|
||||||
|
|
||||||
|
-- lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
|
||||||
|
-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
|
||||||
|
|
||||||
|
-- -- Use which-key to add extra bindings with the leader-key prefix
|
||||||
|
-- lvim.builtin.which_key.mappings["W"] = { "<cmd>noautocmd w<cr>", "Save without formatting" }
|
||||||
|
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
|
||||||
|
|
||||||
|
-- -- Change theme settings
|
||||||
|
-- lvim.colorscheme = "lunar"
|
||||||
|
|
||||||
|
lvim.builtin.alpha.active = true
|
||||||
|
lvim.builtin.alpha.mode = "dashboard"
|
||||||
|
lvim.builtin.terminal.active = true
|
||||||
|
lvim.builtin.nvimtree.setup.view.side = "left"
|
||||||
|
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
|
||||||
|
|
||||||
|
-- Automatically install missing parsers when entering buffer
|
||||||
|
lvim.builtin.treesitter.auto_install = true
|
||||||
|
|
||||||
|
-- lvim.builtin.treesitter.ignore_install = { "haskell" }
|
||||||
|
|
||||||
|
-- -- always installed on startup, useful for parsers without a strict filetype
|
||||||
|
lvim.builtin.treesitter.ensure_installed = { "comment", "markdown_inline", "regex" }
|
||||||
|
|
||||||
|
-- -- generic LSP settings <https://www.lunarvim.org/docs/languages#lsp-support>
|
||||||
|
|
||||||
|
-- --- disable automatic installation of servers
|
||||||
|
-- lvim.lsp.installer.setup.automatic_installation = false
|
||||||
|
|
||||||
|
-- ---configure a server manually. IMPORTANT: Requires `:LvimCacheReset` to take effect
|
||||||
|
-- ---see the full default list `:lua =lvim.lsp.automatic_configuration.skipped_servers`
|
||||||
|
-- add `pylyzer` to `skipped_servers` list
|
||||||
|
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pylyzer" })
|
||||||
|
-- remove `pyright` from `skipped_servers` list
|
||||||
|
lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
|
||||||
|
return server ~= "pyright"
|
||||||
|
end, lvim.lsp.automatic_configuration.skipped_servers)
|
||||||
|
require("mason-lspconfig").setup {
|
||||||
|
automatic_installation = { exclude = { "puppet", "pylyzer" } }
|
||||||
|
}
|
||||||
|
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
|
||||||
|
-- require("lvim.lsp.manager").setup("pyright", opts)
|
||||||
|
--require 'lspconfig'.puppet.setup {}
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.diagnostics.puppet_lint,
|
||||||
|
null_ls.builtins.formatting.puppet_lint,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. IMPORTANT: Requires `:LvimCacheReset` to take effect
|
||||||
|
-- ---`:LvimInfo` lists which server(s) are skipped for the current filetype
|
||||||
|
-- lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
|
||||||
|
-- return server ~= "emmet_ls"
|
||||||
|
-- end, lvim.lsp.automatic_configuration.skipped_servers)
|
||||||
|
|
||||||
|
-- -- you can set a custom on_attach function that will be used for all the language servers
|
||||||
|
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
|
||||||
|
-- lvim.lsp.on_attach_callback = function(client, bufnr)
|
||||||
|
-- local function buf_set_option(...)
|
||||||
|
-- vim.api.nvim_buf_set_option(bufnr, ...)
|
||||||
|
-- end
|
||||||
|
-- --Enable completion triggered by <c-x><c-o>
|
||||||
|
-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- -- linters, formatters and code actions <https://www.lunarvim.org/docs/languages#lintingformatting>
|
||||||
|
local formatters = require "lvim.lsp.null-ls.formatters"
|
||||||
|
formatters.setup {
|
||||||
|
{ command = "stylua" },
|
||||||
|
{
|
||||||
|
command = "prettier",
|
||||||
|
extra_args = { "--print-width", "100" },
|
||||||
|
filetypes = { "typescript", "typescriptreact" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
command = "yapf",
|
||||||
|
-- extra_args = { "-i" },
|
||||||
|
filetypes = { "python" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
command = "isort",
|
||||||
|
filetypes = { "python" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
command = "shfmt",
|
||||||
|
extra_args = { "-w" },
|
||||||
|
filetypes = { "sh" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
-- local linters = require "lvim.lsp.null-ls.linters"
|
||||||
|
-- linters.setup {
|
||||||
|
-- { command = "flake8", filetypes = { "python" } },
|
||||||
|
-- {
|
||||||
|
-- command = "shellcheck",
|
||||||
|
-- args = { "--severity", "warning" },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
-- local code_actions = require "lvim.lsp.null-ls.code_actions"
|
||||||
|
-- code_actions.setup {
|
||||||
|
-- {
|
||||||
|
-- exe = "eslint",
|
||||||
|
-- filetypes = { "typescript", "typescriptreact" },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
|
||||||
|
-- -- Additional Plugins <https://www.lunarvim.org/docs/plugins#user-plugins>
|
||||||
|
lvim.plugins = {
|
||||||
|
{
|
||||||
|
"rodjek/vim-puppet",
|
||||||
|
'tpope/vim-surround',
|
||||||
|
-- {
|
||||||
|
-- 'huggingface/llm.nvim',
|
||||||
|
-- opts = {
|
||||||
|
-- api_token = "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",
|
||||||
|
-- model = "bigcode/starcoder", -- can be a model ID or an http(s) endpoint
|
||||||
|
-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output
|
||||||
|
-- -- parameters that are added to the request body
|
||||||
|
-- query_params = {
|
||||||
|
-- max_new_tokens = 60,
|
||||||
|
-- temperature = 0.2,
|
||||||
|
-- top_p = 0.95,
|
||||||
|
-- stop_tokens = nil,
|
||||||
|
-- },
|
||||||
|
-- -- set this if the model supports fill in the middle
|
||||||
|
-- fim = {
|
||||||
|
-- enabled = true,
|
||||||
|
-- prefix = "<fim_prefix>",
|
||||||
|
-- middle = "<fim_middle>",
|
||||||
|
-- suffix = "<fim_suffix>",
|
||||||
|
-- },
|
||||||
|
-- debounce_ms = 150,
|
||||||
|
-- accept_keymap = "<Tab>",
|
||||||
|
-- dismiss_keymap = "<S-Tab>",
|
||||||
|
-- tls_skip_verify_insecure = false,
|
||||||
|
-- -- llm-ls configuration, cf llm-ls section
|
||||||
|
-- lsp = {
|
||||||
|
-- bin_path = nil,
|
||||||
|
-- version = "0.3.0",
|
||||||
|
-- },
|
||||||
|
-- tokenizer = nil, -- cf Tokenizer paragraph
|
||||||
|
-- context_window = 8192, -- max number of tokens for the context window
|
||||||
|
-- enable_suggestions_on_startup = true,
|
||||||
|
-- enable_suggestions_on_files = "*",
|
||||||
|
-- }
|
||||||
|
-- },
|
||||||
|
{ 'tabbyml/tabby', name = 'tabby', dir = '~/sources/tabby/clients/vim', enabled = true },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- -- Autocommands (`:help autocmd`) <https://neovim.io/doc/user/autocmd.html>
|
||||||
|
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||||
|
pattern = { "*" },
|
||||||
|
callback = function()
|
||||||
|
if vim.fn.line("'\"") > 1 and vim.fn.line("'\"") <= vim.fn.line("$") then
|
||||||
|
vim.api.nvim_exec("normal! g'\"", false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
-- vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
-- pattern = "zsh",
|
||||||
|
-- callback = function()
|
||||||
|
-- -- let treesitter use bash highlight for zsh files as well
|
||||||
|
-- require("nvim-treesitter.highlight").attach(0, "bash")
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
|
||||||
|
|
||||||
|
vim.g.tabby_server_url = 'https://tabby:BogMeempAldEttEndyoravatDadnitmusfuothOl@tabby-lab.sunet.se'
|
||||||
|
-- vim.g.tabby_server_url = 'https://tabby-test.sunet.se'
|
||||||
|
vim.g.tabby_accept_binding = '<C-Right>'
|
||||||
|
vim.g.tabby_dismiss_binding = '<C-Left>'
|
||||||
|
vim.g.tabby_suggestion_delay = 100
|
@ -0,0 +1,282 @@
|
|||||||
|
# Default config for sway
|
||||||
|
#
|
||||||
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||||
|
#
|
||||||
|
# Read `man 5 sway` for a complete reference.
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
#
|
||||||
|
# Logo key. Use Mod1 for Alt.
|
||||||
|
set $mod Mod4
|
||||||
|
# Home row direction keys, like vim
|
||||||
|
set $left h
|
||||||
|
set $down j
|
||||||
|
set $up k
|
||||||
|
set $right l
|
||||||
|
# Your preferred terminal emulator
|
||||||
|
set $term foot
|
||||||
|
# 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 -S drun | xargs swaymsg exec --
|
||||||
|
exec --no-startup-id nm-applet
|
||||||
|
exec --no-startup-id autotiling
|
||||||
|
exec --no-startup-id lxpolkit
|
||||||
|
exec --no-startup-id nextcloud
|
||||||
|
exec --no-startup-id fcitx5
|
||||||
|
|
||||||
|
include /etc/sway/config-vars.d/*
|
||||||
|
|
||||||
|
### Output configuration
|
||||||
|
#
|
||||||
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||||
|
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||||
|
#
|
||||||
|
# Example configuration:
|
||||||
|
#
|
||||||
|
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||||
|
# output eDP-1 resolution 1920x1080 position 2560,0
|
||||||
|
# output DP-1 resolution 2560x1440 position 0,0
|
||||||
|
output eDP-1 resolution 1920x1080 position 3440,0
|
||||||
|
output DP-1 resolution 3440x1440 position 0,0
|
||||||
|
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||||
|
# Gaps
|
||||||
|
smart_gaps on
|
||||||
|
gaps inner 3
|
||||||
|
gaps outer 2
|
||||||
|
|
||||||
|
### Idle configuration
|
||||||
|
#
|
||||||
|
# Example configuration:
|
||||||
|
#
|
||||||
|
set $lock 'swaylock -f -c 000000'
|
||||||
|
exec swayidle -w \
|
||||||
|
timeout 300 $lock \
|
||||||
|
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||||
|
before-sleep $lock
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
input type:keyboard {
|
||||||
|
xkb_layout se
|
||||||
|
xkb_variant us
|
||||||
|
xkb_options caps:escape
|
||||||
|
}
|
||||||
|
### Key bindings
|
||||||
|
#
|
||||||
|
# Basics:
|
||||||
|
#
|
||||||
|
# Start a terminal
|
||||||
|
bindsym $mod+Return exec $term
|
||||||
|
|
||||||
|
# Kill focused window
|
||||||
|
bindsym $mod+Shift+c 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+r 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
|
||||||
|
bindsym Mod1+m workspace mattermost
|
||||||
|
bindsym Mod1+s workspace slack
|
||||||
|
bindsym Mod1+t workspace thunderbird
|
||||||
|
bindsym Mod1+w workspace web
|
||||||
|
bindsym Mod1+z workspace zoom
|
||||||
|
# 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
|
||||||
|
bindsym Mod1+Shift+m move container to workspace mattermost
|
||||||
|
bindsym Mod1+Shift+s move container to workspace slack
|
||||||
|
bindsym Mod1+Shift+t move container to workspace thunderbird
|
||||||
|
bindsym Mod1+Shift+w move container to workspace web
|
||||||
|
bindsym Mod1+Shift+z move container to workspace zoom
|
||||||
|
# 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+t 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"
|
||||||
|
set $power_mode "power"
|
||||||
|
bindsym $mod+Shift+q mode $power_mode
|
||||||
|
mode $power_mode {
|
||||||
|
bindsym p exec systemctl poweroff
|
||||||
|
bindsym r exec systemctl reboot
|
||||||
|
bindsym l exec $lock, mode "default"
|
||||||
|
bindsym q exec --no-startup-id swaymsg exit, mode "default"
|
||||||
|
bindsym h exec systemctl hibernate
|
||||||
|
bindsym s exec pm-suspend
|
||||||
|
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
set $gnome-schema org.gnome.desktop.interface
|
||||||
|
|
||||||
|
exec_always {
|
||||||
|
gsettings set $gnome-schema gtk-theme 'Adwaita:dark'
|
||||||
|
}
|
||||||
|
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||||
|
|
||||||
|
|
||||||
|
bindsym $mod+Shift+s mode $screenshot_mode
|
||||||
|
mode $screenshot_mode {
|
||||||
|
# Screenshots:
|
||||||
|
# Super+P: Current window
|
||||||
|
# Super+Shift+p: Select area
|
||||||
|
# Super+Alt+p Current output
|
||||||
|
# Super+Ctrl+p Select a window
|
||||||
|
|
||||||
|
bindsym s exec grimshot save active
|
||||||
|
bindsym a exec grimshot save area
|
||||||
|
bindsym o exec grimshot save output
|
||||||
|
bindsym w exec grimshot save window
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Status Bar:
|
||||||
|
#
|
||||||
|
# Read `man 5 sway-bar` for more information about this section.
|
||||||
|
bar {
|
||||||
|
position top
|
||||||
|
|
||||||
|
# When the status_command prints a new line to stdout, swaybar updates.
|
||||||
|
# The default just shows the current date and time.
|
||||||
|
#status_command while date +'%Y-%m-%d %H:%M:%S'; do sleep 1; done
|
||||||
|
swaybar_command waybar
|
||||||
|
|
||||||
|
colors {
|
||||||
|
statusline #ffffff
|
||||||
|
background #5c5c5c
|
||||||
|
active_workspace #5c5c5c00 #5c5c5c00 #323232
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
include /etc/sway/config.d/*
|
@ -0,0 +1,123 @@
|
|||||||
|
# If you come from bash you might have to change your $PATH.
|
||||||
|
export PATH=$HOME/.local/bin:/usr/local/bin:${HOME}/.cargo/bin:$PATH
|
||||||
|
sudo setupcon > /dev/null 2>&1
|
||||||
|
# Path to your oh-my-zsh installation.
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
export XDG_DATA_DIRS="${XDG_DATA_DIRS}:/var/lib/snapd/desktop/"
|
||||||
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
export GTK_IM_MODULE=ibus
|
||||||
|
export XMODIFIERS=@im=ibus
|
||||||
|
export QT_IM_module=ibus
|
||||||
|
export TERM=xterm-256color
|
||||||
|
export XDG_PICTURES_DIR=${HOME}/Pictures
|
||||||
|
# Set name of the theme to load --- if set to "random", it will
|
||||||
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
|
ZSH_THEME="agnoster"
|
||||||
|
|
||||||
|
# Set list of themes to pick from when loading at random
|
||||||
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
|
# a theme from this variable instead of looking in $ZSH/themes/
|
||||||
|
# If set to an empty array, this variable will have no effect.
|
||||||
|
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||||
|
|
||||||
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to use hyphen-insensitive completion.
|
||||||
|
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||||
|
# HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment one of the following lines to change the auto-update behavior
|
||||||
|
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||||
|
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||||
|
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||||
|
|
||||||
|
# Uncomment the following line to change how often to auto-update (in days).
|
||||||
|
# zstyle ':omz:update' frequency 13
|
||||||
|
|
||||||
|
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||||
|
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to disable colors in ls.
|
||||||
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to enable command auto-correction.
|
||||||
|
# ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
|
# You can also set it to another string to have that shown instead of the default red dots.
|
||||||
|
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||||
|
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||||
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to disable marking untracked files
|
||||||
|
# under VCS as dirty. This makes repository status check for large repositories
|
||||||
|
# much, much faster.
|
||||||
|
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to change the command execution time
|
||||||
|
# stamp shown in the history command output.
|
||||||
|
# You can set one of the optional three formats:
|
||||||
|
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
|
# or set a custom format using the strftime function format specifications,
|
||||||
|
# see 'man strftime' for details.
|
||||||
|
# HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
|
||||||
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||||
|
|
||||||
|
# Which plugins would you like to load?
|
||||||
|
# Standard plugins can be found in $ZSH/plugins/
|
||||||
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
|
plugins=(git)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
|
||||||
|
# export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
|
||||||
|
# You may need to manually set your language environment
|
||||||
|
# export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
# Preferred editor for local and remote sessions
|
||||||
|
# if [[ -n $SSH_CONNECTION ]]; then
|
||||||
|
# export EDITOR='vim'
|
||||||
|
# else
|
||||||
|
# export EDITOR='mvim'
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# Compilation flags
|
||||||
|
# export ARCHFLAGS="-arch x86_64"
|
||||||
|
|
||||||
|
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||||
|
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||||
|
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||||
|
# For a full list of active aliases, run `alias`.
|
||||||
|
#
|
||||||
|
# Example aliases
|
||||||
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
#
|
||||||
|
# GPG_TTY=$(tty)
|
||||||
|
export GPG_TTY
|
||||||
|
# Set up ssh-agent socket as specified in gpg-agent(1)
|
||||||
|
unset SSH_AGENT_PID
|
||||||
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
fi
|
||||||
|
h=( $(get_drive_servers) ) 2>/dev/null
|
||||||
|
if [[ $#h -gt 0 ]]; then
|
||||||
|
zstyle ':completion:*:ssh:*' hosts $h
|
||||||
|
zstyle ':completion:*:slogin:*' hosts $h
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the autocompletion
|
||||||
|
autoload -Uz compinit && compinit -i
|
Loading…
Reference in new issue