added keybinding to i3 for starting pavucontrol

tinkering with neovim config, mainly 'lualine', 'lsp', and 'telescope'
This commit is contained in:
quak
2024-12-26 10:22:49 +01:00
parent dfa71aef13
commit c403f7edf3
4 changed files with 420 additions and 420 deletions

View File

@@ -13,9 +13,25 @@ set $Alt Mod1
set $Super Mod4
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:VictorMonoNerdFont SemiBold 12
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
###################################
@@ -42,38 +58,25 @@ exec --no-startup-id nm-applet
# configuring keybindings #
###########################
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# lock screen
# keymaps for i3 actions
## reload the i3 configuration file
bindsym $mod+Shift+c reload
## restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
## exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
## lock screen
bindsym $mod+Escape exec i3lock
## kill focused window
bindsym $mod+Shift+q kill
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start rofi (a program launcher with fuzzy finder functionality)
bindsym $mod+d exec --no-startup-id rofi -show combi
bindsym $mod+Shift+d exec --no-startup-id rofi -show run
# start a terminal
bindsym $mod+Return exec alacritty
bindsym $mod+t exec "alacritty -e tmux attach"
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id rofi -show combi
bindsym $mod+Shift+d exec --no-startup-id rofi -show run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+h focus left
@@ -108,19 +111,6 @@ bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
@@ -169,17 +159,20 @@ bindsym $mod+i move workspace to output down
bindsym $mod+o move workspace to output up
bindsym $mod+p move workspace to output right
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# take screenshots
bindsym $mod+s exec --no-startup-id maim -su | xclip -selection clipboard -t image/png
bindsym $mod+Shift+s exec --no-startup-id maim -su "/home/${USER}/Pictures/screenshots/$(date '+%Y%m%d_%H%M%S').png"
# open pavucontrol
bindsym $mod+a exec --no-startup-id pavucontrol
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
#########################
# configuring behaviour #
@@ -203,6 +196,10 @@ for_window [class=".*"] border pixel 1
# gaps between windows and screen border
gaps inner 12 px
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:VictorMonoNerdFont SemiBold 12
# defining colors
set $cyan #15d7e5
set $magenta #e02482

View File

@@ -5,6 +5,9 @@ return {
"nvimtools/none-ls-extras.nvim",
"jayp0521/mason-null-ls.nvim", -- ensure dependencies are installed
},
-- keys = {
-- { "<leader>f", "vim.lsp.buf.format({async = false})", silent = true, desc = "manually run [F]ormatter" },
-- },
config = function()
local null_ls = require("null-ls")
local formatting = null_ls.builtins.formatting -- to setup formatters

View File

@@ -2,7 +2,7 @@
return {
"nvim-lualine/lualine.nvim",
config = function()
-- Adapted from: https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/themes/onedark.lua
-- adapted from zegonix' alacritty theme, apart from the grays, which have been copied from wegmanma's config
local colors = {
black = "#181820",
red = "#E00010",

View File

@@ -26,10 +26,10 @@ return {
})
end,
keys = {
{ "<leader>w", ":Neotree toggle float<CR>", silent = true, desc = "Popup File Explorer" },
{ "<leader>e", ":Neotree toggle float<CR>", silent = true, desc = "Popup File Explorer" },
-- { '<leader>e', ':Neotree toggle position=left<CR>', silent = true, desc = 'Left File Explorer' },
{
"<leader>ngs",
"<leader>gs",
":Neotree float git_status<CR>",
silent = true,
desc = "Neotree Open Git Status Window",