diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 8c8b514d9..39d42b36f 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -103,7 +103,7 @@ listen_on none #: OS specific tweaks {{{ linux_display_server x11 -confirm_os_window_close 0 +confirm_os_window_close 1 #: }}} #: Keyboard shortcuts {{{ diff --git a/.config/lvim/config.lua b/.config/lvim/config.lua index d10240946..5b2c45716 100644 --- a/.config/lvim/config.lua +++ b/.config/lvim/config.lua @@ -2,6 +2,7 @@ lvim.log.level = "warn" lvim.colorscheme = "tokyonight" vim.g.tokyonight_style = "night" +lvim.transparent_window = true vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo" vim.opt.undofile = true vim.opt.titlestring = "%t - vim" @@ -10,7 +11,7 @@ lvim.builtin.alpha.mode = "dashboard" lvim.builtin.terminal.active = true lvim.builtin.nvimtree.active = false lvim.builtin.treesitter.highlight.enabled = true -lvim.lsp.automatic_servers_installation = true +lvim.lsp.automatic_servers_installation = false vim.g.NERDTreeHijackNetrw = 0 vim.g.lf_replace_netrw = 1 @@ -97,7 +98,7 @@ lvim.keys.insert_mode = { } lvim.keys.normal_mode = { [""] = ":w", - [""] = ":bd" + [""] = ":bd", } lvim.keys.term_mode = { [""] = ":bd" @@ -127,6 +128,8 @@ lvim.builtin.which_key.mappings = { j = { "BufferLinePick", "Jump" }, f = { "Telescope buffers", "Find" }, b = { "BufferLineCyclePrev", "Previous" }, + n = { "BufferLineCycleNext", "Next" }, + -- w = { "BufferWipeout", "Wipeout" }, -- TODO: implement this for bufferline e = { "BufferLinePickClose", diff --git a/.config/lvim/plugin/packer_compiled.lua b/.config/lvim/plugin/packer_compiled.lua index 4590006a3..4422f2ce6 100644 --- a/.config/lvim/plugin/packer_compiled.lua +++ b/.config/lvim/plugin/packer_compiled.lua @@ -123,13 +123,6 @@ _G.packer_plugins = { path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, - ["diffview.nvim"] = { - loaded = false, - needs_bufread = false, - only_cond = false, - path = "/home/luca/.local/share/lunarvim/site/pack/packer/opt/diffview.nvim", - url = "https://github.com/sindrets/diffview.nvim" - }, ["friendly-snippets"] = { loaded = true, path = "/home/luca/.local/share/lunarvim/site/pack/packer/start/friendly-snippets", @@ -338,34 +331,34 @@ if not vim.g.packer_custom_loader_enabled then vim.g.packer_custom_loader_enabled = true end --- Config for: LuaSnip -time([[Config for LuaSnip]], true) -try_loadstring("\27LJ\2\nñ\3\0\0\v\0\23\00166\0\0\0'\2\1\0B\0\2\0024\1\0\0006\2\2\0009\2\3\0029\2\4\0029\2\5\0029\2\6\2\15\0\2\0X\3\f€\21\2\1\0\22\2\0\0029\3\a\0006\5\b\0B\5\1\2'\6\t\0'\a\n\0'\b\v\0'\t\f\0'\n\r\0B\3\a\2<\3\2\0019\2\a\0006\4\14\0B\4\1\2'\5\15\0B\2\3\0029\3\16\0\18\5\2\0B\3\2\2\15\0\3\0X\4\3€\21\3\1\0\22\3\0\3<\2\3\0016\3\0\0'\5\17\0B\3\2\0029\3\18\3B\3\1\0016\3\0\0'\5\19\0B\3\2\0029\3\18\0035\5\20\0=\1\21\5B\3\2\0016\3\0\0'\5\22\0B\3\2\0029\3\18\3B\3\1\1K\0\1\0\"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\22friendly_snippets\fsources\fluasnip\fbuiltin\tlvim\15lvim.utils\frequire\2\0", "config", "LuaSnip") -time([[Config for LuaSnip]], false) --- Config for: nvim-treesitter -time([[Config for nvim-treesitter]], true) -try_loadstring("\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.treesitter\frequire\0", "config", "nvim-treesitter") -time([[Config for nvim-treesitter]], false) --- Config for: telescope.nvim -time([[Config for telescope.nvim]], true) -try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.telescope\frequire\0", "config", "telescope.nvim") -time([[Config for telescope.nvim]], false) --- Config for: nvim-autopairs -time([[Config for nvim-autopairs]], true) -try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.autopairs\frequire\0", "config", "nvim-autopairs") -time([[Config for nvim-autopairs]], false) -- Config for: lualine.nvim time([[Config for lualine.nvim]], true) try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.lualine\frequire\0", "config", "lualine.nvim") time([[Config for lualine.nvim]], false) +-- Config for: nvim-treesitter +time([[Config for nvim-treesitter]], true) +try_loadstring("\27LJ\2\nB\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\25lvim.core.treesitter\frequire\0", "config", "nvim-treesitter") +time([[Config for nvim-treesitter]], false) -- Config for: alpha-nvim time([[Config for alpha-nvim]], true) try_loadstring("\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20lvim.core.alpha\frequire\0", "config", "alpha-nvim") time([[Config for alpha-nvim]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.autopairs\frequire\0", "config", "nvim-autopairs") +time([[Config for nvim-autopairs]], false) +-- Config for: telescope.nvim +time([[Config for telescope.nvim]], true) +try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\24lvim.core.telescope\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) -- Config for: nvim-cmp time([[Config for nvim-cmp]], true) try_loadstring("\27LJ\2\n`\0\0\3\0\6\0\v6\0\0\0009\0\1\0009\0\2\0\15\0\0\0X\1\5€6\0\3\0'\2\4\0B\0\2\0029\0\5\0B\0\1\1K\0\1\0\nsetup\18lvim.core.cmp\frequire\bcmp\fbuiltin\tlvim\0", "config", "nvim-cmp") time([[Config for nvim-cmp]], false) +-- Config for: LuaSnip +time([[Config for LuaSnip]], true) +try_loadstring("\27LJ\2\nñ\3\0\0\v\0\23\00166\0\0\0'\2\1\0B\0\2\0024\1\0\0006\2\2\0009\2\3\0029\2\4\0029\2\5\0029\2\6\2\15\0\2\0X\3\f€\21\2\1\0\22\2\0\0029\3\a\0006\5\b\0B\5\1\2'\6\t\0'\a\n\0'\b\v\0'\t\f\0'\n\r\0B\3\a\2<\3\2\0019\2\a\0006\4\14\0B\4\1\2'\5\15\0B\2\3\0029\3\16\0\18\5\2\0B\3\2\2\15\0\3\0X\4\3€\21\3\1\0\22\3\0\3<\2\3\0016\3\0\0'\5\17\0B\3\2\0029\3\18\3B\3\1\0016\3\0\0'\5\19\0B\3\2\0029\3\18\0035\5\20\0=\1\21\5B\3\2\0016\3\0\0'\5\22\0B\3\2\0029\3\18\3B\3\1\1K\0\1\0\"luasnip.loaders.from_snipmate\npaths\1\0\0 luasnip.loaders.from_vscode\14lazy_load\29luasnip.loaders.from_lua\17is_directory\rsnippets\19get_config_dir\22friendly-snippets\nstart\vpacker\tpack\tsite\20get_runtime_dir\15join_paths\22friendly_snippets\fsources\fluasnip\fbuiltin\tlvim\15lvim.utils\frequire\2\0", "config", "LuaSnip") +time([[Config for LuaSnip]], false) -- Config for: project.nvim time([[Config for project.nvim]], true) try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\22lvim.core.project\frequire\0", "config", "project.nvim") @@ -374,9 +367,9 @@ vim.cmd [[augroup packer_load_aucmds]] vim.cmd [[au!]] -- Event lazy-loads time([[Defining lazy-load event autocommands]], true) -vim.cmd [[au BufRead * ++once lua require("packer.load")({'vim-sanegx', 'gitsigns.nvim', 'Comment.nvim', 'diffview.nvim', 'todo-comments.nvim', 'numb.nvim'}, { event = "BufRead *" }, _G.packer_plugins)]] -vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'bufferline.nvim', 'which-key.nvim', 'toggleterm.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]] vim.cmd [[au BufReadPost * ++once lua require("packer.load")({'nvim-ts-context-commentstring'}, { event = "BufReadPost *" }, _G.packer_plugins)]] +vim.cmd [[au BufWinEnter * ++once lua require("packer.load")({'bufferline.nvim', 'toggleterm.nvim', 'which-key.nvim'}, { event = "BufWinEnter *" }, _G.packer_plugins)]] +vim.cmd [[au BufRead * ++once lua require("packer.load")({'numb.nvim', 'Comment.nvim', 'todo-comments.nvim', 'gitsigns.nvim', 'vim-sanegx'}, { event = "BufRead *" }, _G.packer_plugins)]] time([[Defining lazy-load event autocommands]], false) vim.cmd("augroup END") if should_profile then save_profiles() end diff --git a/.local/src/dwm/dwm b/.local/src/dwm/dwm deleted file mode 100755 index e5b95183a..000000000 Binary files a/.local/src/dwm/dwm and /dev/null differ diff --git a/.local/src/dwm/dwm.o b/.local/src/dwm/dwm.o deleted file mode 100644 index 956d5862a..000000000 Binary files a/.local/src/dwm/dwm.o and /dev/null differ diff --git a/.local/src/dwm/larbs.mom b/.local/src/dwm/larbs.mom deleted file mode 100644 index a1fa49ec3..000000000 --- a/.local/src/dwm/larbs.mom +++ /dev/null @@ -1,358 +0,0 @@ -.de LI -.LIST -.SHIFT_LIST 10p -.. -.PARA_SPACE 1m -.TITLE "\s+(10A Friendly Guide to LARBS!\s0" -.AUTHOR "\s+5Luke Smith\s0" -.DOCTYPE DEFAULT -.COPYSTYLE FINAL -.PRINTSTYLE TYPESET -.PT_SIZE 12 -.START -Use vim keys (\f(CWh/j/k/l\fP) to navigate this document. -Pressing \f(CWs\fP will fit it to window width (\f(CWa\fP to revert). -\f(CWK\fP and \f(CWJ\fP zoom in and out. -\f(CWSuper+f\fP to toggle fullscreen. -\f(CWq\fP to quit. -(These are general binds set for \fBzathura\fP, the pdf reader.) -.LI -.ITEM -\f(CWMod+F1\fP will show this document at any time. -.ITEM -By \f(CWMod\fP, I mean the Super Key, usually known as "the Windows Key." -.LIST OFF -.PP -FAQs are at the end of this document. -.HEADING 1 "Welcome!" -.HEADING 2 "Basic goals and principles of this system:" -.LI -.ITEM -\fBNaturalness\fP \(en -Remove the border between mind and matter: -everything important should be as few keypresses as possible away from you, -and you shouldn't have to think about what you're doing. -Immersion. -.ITEM -\fBEconomy\fP \(en -Programs should be simple and light on system resources and highly extensible. -Because of this, many are terminal or small ncurses programs that have all the magic inside of them. -.ITEM -\fBKeyboard/vim-centrality\fP \(en -All terminal programs (and other programs) use vim keys when possible. -Your hands never need leave the home row or thereabout. -.ITEM -\fBDecentralization\fP \(en -This system is a web of small, modifiable and replaceable programs that users can easily customize. -.LIST OFF -.HEADING 2 "General keyboard changes" -.LI -.ITEM -Capslock is a useless key in high quality space. -It's now remapped. -If you press it alone, it will function as escape, making vimcraft much more natural, -but you can also hold it down and it will act as another Windows/super/mod key. -.ITEM -The menu button (usually between the right Alt and Ctrl) is an alternative Super/Mod button. -This is to make one-handing on laptops easier. -.LIST OFF -.PP -If you'd like to change any of these keyboard changes, you need only open and change the \f(CWremaps\fP script. -All custom scripts in LARBS are located in \f(CW~/.local/bin/\fP. -Actually, this should go without saying, but \fIeverything\fP here can easily be changed. -Below in this document, there is information about where to change programs/components. -.PP -Additionally, while this isn't a part of the desktop environment, the default editing mode in the shell is using vi bindings. -If you want to learn more of this, run \f(CWMod+F2\fP and type and select the option for "vi mode in shell". -This setting can be changed if you don't like it by deleting or commenting out the contents of \f(CW~/.config/shell/inputrc\fP. -.HEADING 2 "The Status Bar" -.PP -To the left, you'll see the numbers of your current workspace/tag(s). -On the right, you'll see various system status notifiers, the date, volume, even music and local weather if possible, etc. -Each module on the right of the statusbar is a script located in \f(CW~/.local/bin/statusbar/\fP. -You can see what they do and modify them from there. -I'm sure you can figure it out. -You can also right click on the module to see what it does. -.PP -The program dwmblocks is what is run to generate the statusbar from those scripts. -You can edit its config/source code in \f(CW~/.local/src/dwmblocks/\fP to tell it what scripts/commands you want it to display. -.HEADING 2 "Deeper Tutorials" -.PP -Press \f(CWmod+F2\fP at any time to get a menu of programs to watch videos about streaming directly from YouTube. -You can also check the config files for programs which detail a lot of the specific bindings. -.HEADING 1 "Key Bindings" -.PP -The window manager dwm abstractly orders all of your windows into a stack from most important to least based on when you last manipulated it. -dwm is an easy to use window manager, but you should understand that it makes use of that stack layout. -If you're not familiar, I recommend you press \f(CWMod+F2\fP and select the "dwm" option to watch my brief tutorial (note that the bindings I discuss in the video are the default dwm binds, which are different (inferior) to those here). -.PP -Notice also the case sensitivity of the shortcuts\c -.FOOTNOTE -To type capital letters, hold down the \f(CWShift\fP key\(emthat might sound like an obvious and condescending thing to tell you, but there have literally been multiple people (Boomers) who have emailed me asking how to type a capital letter since caps lock isn't enabled. -.FOOTNOTE OFF - , Be sure you play around with these. Be flexible with the basic commands and the system will grow on you quick. -.LI -.ITEM -\f(CWMod+Enter\fP \(en Spawn terminal (the default terminal is \f(CWst\fP; run \f(CWman st\fP for more.) -.ITEM -\f(CWMod+q\fP \(en Close window -.ITEM -\f(CWMod+d\fP \(en dmenu (For running commands or programs without shortcuts) -.ITEM -\f(CWMod+j/k\fP \(en Cycle thru windows by their stack order -.ITEM -\f(CWMod+Space\fP \(en Make selected window the master (or switch master with 2nd) -.ITEM -\f(CWMod+h/l\fP \(en Change width of master window -.ITEM -\f(CWMod+z/x\fP \(en Increase/decrease gaps (may also hold \f(CWMod\fP and scroll mouse) -.ITEM -\f(CWMod+a\fP \(en Toggle gaps -.ITEM -\f(CWMod+A\fP \(en Gaps return to default values (may also hold \f(CWMod\fP and middle click) -.ITEM -\f(CWMod+Shift+Space\fP \(en Make a window float (move and resize with \f(CWMod+\fPleft/right click). -.ITEM -\f(CWMod+s\fP \(en Make/unmake a window "sticky" (follows you from tag to tag) -.ITEM -\f(CWMod+b\fP \(en Toggle statusbar (may also middle click on desktop) -.ITEM -\f(CWMod+v\fP \(en Jump to master window -.LIST OFF -.HEADING 2 "Window layouts" -.LI -.ITEM -\f(CWMod+t\fP \(en Tiling mode (active by default) -.ITEM -\f(CWMod+T\fP \(en Bottom stack mode (just like tiling, but master is on top) -.ITEM -\f(CWMod+f\fP \(en Fullscreen mode -.ITEM -\f(CWMod+F\fP \(en Floating (AKA normie) mode -.ITEM -\f(CWMod+y\fP \(en Fibbonacci spiral mode -.ITEM -\f(CWMod+Y\fP \(en Dwindle mode (similar to Fibonacci) -.ITEM -\f(CWMod+u\fP \(en Master on left, other windows in monocle mode -.ITEM -\f(CWMod+U\fP \(en Monocle mode (all windows fullscreen and cycle through) -.ITEM -\f(CWMod+i\fP \(en Center the master window -.ITEM -\f(CWMod+I\fP \(en Center and float the master window -.ITEM -\f(CWMod+o/O\fP \(en Increase/decrease the number of master windows -.LIST OFF -.HEADING 2 "Basic Programs" -.LI -.ITEM -\f(CWMod+r\fP \(en lf (file browser/manager) -.ITEM -\f(CWMod+R\fP \(en htop (task manager, system monitor that R*dditors use to look cool) -.ITEM -\f(CWMod+e\fP \(en neomutt (email) \(en Must be first configured by running \f(CWmw add\fP. -.ITEM -\f(CWMod+E\fP \(en abook (contacts, addressbook, emails) -.ITEM -\f(CWMod+m\fP \(en ncmpcpp (music player) -.ITEM -\f(CWMod+w\fP \(en Web browser (Brave by default) -.ITEM -\f(CWMod+W\fP \(en nmtui (for connecting to wireless internet) -.ITEM -\f(CWMod+n\fP \(en vimwiki (for notes) -.ITEM -\f(CWMod+N\fP \(en newsboat (RSS feed reader) -.ITEM -\f(CWMod+F4\fP \(en pulsemixer (audio system control) -.ITEM -\f(CWMod+Shift+Enter\fP \(en Show/hide dropdown terminal -.ITEM -\f(CWMod+'\fP \(en Show/hide dropdown calculator -.ITEM -\f(CWMod+D\fP \(en passmenu (password manager) -.LIST OFF -.HEADING 2 "Tags/Workspaces" -.PP -There are nine tags, active tags are highlighted in the top left. -.LI -.ITEM -\f(CWMod+(Number)\fP \(en Go to that number tag -.ITEM -\f(CWMod+Shift+(Number)\fP \(en Send window to that tag -.ITEM -\f(CWMod+Tab\fP \(en Go to previous tag (may also use \f(CW\\\fP for Tab) -.ITEM -\f(CWMod+g\fP \(en Go to left tag (hold shift to send window there) -.ITEM -\f(CWMod+;\fP \(en Go to right tag (hold shift to send window there) -.ITEM -\f(CWMod+Left/Right\fP \(en Go to another display -.ITEM -\f(CWMod+Shift+Left/+Right\fP \(en Move window to another display -.LIST OFF -.HEADING 2 "System" -.LI -.ITEM -\f(CWMod+BackSpace\fP \(enChoose to lock screen, logout, shutdown, reboot, etc. -.ITEM -\f(CWMod+F1\fP \(en Show this document -.ITEM -\f(CWMod+F2\fP \(en Watch tutorial videos on a subject -.ITEM -\f(CWMod+F3\fP \(en Select screen/display to use -.ITEM -\f(CWMod+F4\fP \(en pulsemixer (audio control) -.ITEM -\f(CWMod+F6\fP \(en Transmission torrent client (not installed by default) -.ITEM -\f(CWMod+F7\fP \(en Toggle on/off transmission client via dmenu -.ITEM -\f(CWMod+F8\fP \(en Check mail, if mutt-wizard is configured. (Run \f(CWmw add\fP to set up.) -.ITEM -\f(CWMod+F9\fP \(en Mount a USB drive/hard drive or Android -.ITEM -\f(CWMod+F10\fP \(en Unmount a non-essential drive or Android -.ITEM -\f(CWMod+F11\fP \(en View webcam -.ITEM -\f(CWMod+F12\fP \(en Rerun kayboard mapping scripts if new keyboard is attached -.ITEM -\f(CWMod+`\fP \(en Select an emoji to copy to clipboard -.ITEM -\f(CWMod+Insert\fP \(en Show contents of clipboard/primary selection -.LIST OFF -.HEADING 2 "Audio" -.PP -I use ncmpcpp as a music player, which is a front end for mpd. -.LI -.ITEM -\f(CWMod+m\fP \(en ncmpcpp, the music player -.ITEM -\f(CWMod+.\fP \(en Next track -.ITEM -\f(CWMod+,\fP \(en Previous track -.ITEM -\f(CWMod+<\fP \(en Restart track -.ITEM -\f(CWMod+>\fP \(en Toggle playlist looping -.ITEM -\f(CWMod+p\fP \(en Toggle pause -.ITEM -\f(CWMod+p\fP \(en Force pause music player daemon and all mpv videos -.ITEM -\f(CWMod+M\fP \(en Mute all audio -.ITEM -\f(CWMod+-\fP \(en Decrease volume (holding shift increases amount) -.ITEM -\f(CWMod++\fP \(en Increase volume (holding shift increases amount) -.ITEM -\f(CWMod+[\fP \(en Back 10 seconds (holding shift moves by one minute) -.ITEM -\f(CWMod+]\fP \(en Forward 10 seconds (holding shift moves by one minute) -.ITEM -\f(CWMod+F4\fP \(en pulsemixer (general audio/volume sink/source control) -.LIST OFF -.HEADING 2 "Recording" -.PP -I use maim and ffmpeg to make different recordings of the desktop and audio. -All of these recording shortcuts will output into \f(CW~\fP, and will not overwrite -previous recordings as their names are based on their exact times. -.LI -.ITEM -\f(CWPrintScreen\fP \(en Take a screenshot -.ITEM -\f(CWShift+PrintScreen\fP \(en Select area to screenshot -.ITEM -\f(CWMod+PrintScreen\fP \(en Opens dmenu menu to select kind of audio/video recording -.ITEM -\f(CWMod+Delete\fP \(en Kills any recording started in the above way. -.ITEM -\f(CWMod+Shift+c\fP \(en Toggles a webcam in the bottom right for screencasting. -.ITEM -\f(CWMod+ScrollLock\fP \(en Toggle screenkey (if installed) to show keypresses -.LIST OFF -.HEADING 2 "Other buttons" -.PP -I've mapped those extra buttons that some keyboards have (play and pause -buttons, screen brightness, email, web browsing buttons, etc.) to what you -would expect. -.HEADING 1 "Configuration" -.PP -Dotfiles/settings files are located in \f(CW~/.config/\fP. -.PP -Suckless programs, dwm (the window manager), st (the terminal) and dmenu among others do not have traditional config files, but have their source code location in \f(CW~/.local/src/\fP (press \f(CWrr\fP to jump to that directory). -There you can modify their \f(CWconfig.h\fP files or other source code, then \f(CWsudo make install\fP to reinstall. -.PP -vim is set to automatically recompile and install these programs whenever you save changes to any \f(CWconfig.h\fP file -(compilation will be nearly instantaneous). -You'll have to restart the program to see its effects obviously. -.HEADING 1 "Frequently Asked Questions (FAQs)" -.HEADING 2 "My keyboard isn't working as expected!" -.PP -As mentioned above, LARBS makes some keyboard changes with the \f(CWremaps\fP script. -These settings may override your preferred settings, so you should open this file and comment out troublesome lines if you have issues. -.HEADING 2 "My audio isn't working!" -.PP -On fresh install, the Linux audio system often mutes outputs. -You may also need to set your preferred default output sink which you can do by the command line, or by selecting one with \f(CWpulsemixer\fP (\f(CWMod+F4\fP). -.HEADING 2 "How do I copy and paste?" -.PP -Copying and pasting is always program-specific on any system. -In most graphical programs, copy and paste will be the same as they are on Windows: \f(CWctrl-c\fP and \f(CWctrl-v\fP. -In the Linux terminal, those binds have other more important purposes, so you can run \f(CWman st\fP to see how to copy and paste in my terminal build. -.PP -Additionally, I've set vim to use the clipboard as the default buffer, which means when you yank or delete something in vim, it will be in your system clipboard as well, so you can \f(CWctrl-v\fP it into your browser instance, etc. You can also paste material copied from other programs into vim with the typical vim bindings. -.HEADING 2 "How do I change the background/wallpaper?" -.PP -The system will always read the file \f(CW~/.config/wall.png\fP as the wallpaper. -The script \f(CWsetbg\fP, if run on an image will set it as the persistent background. -When using the file manager, you can simply hover over an image name and type \f(CWb\fP and this will run \f(CWsetbg\fP. -.HEADING 2 "How I change the colorscheme?" -.PP -LARBS no longer deploys Xresources by default, but check \f(CW~/.config/x11/xresources\fP for a list of color schemes you can activate or add your own. When you save the file, vim will automatically update the colorscheme. If you'd like these colors activated by default on login, there is a line in \f(CW~/.config/x11/xprofile\fP you can uncomment to allow that. -.PP -Or, if you want to use \f(CWwal\fP to automatically generate colorschemes from your wallpapers, just install it and \f(CWsetbg\fP will automatically detect and run it on startup and wallpaper change. -.HEADING 2 "How do I set up my email?" -.PP -LARBS comes with mutt-wizard, which gives the ability to receive and send all your email and keep an offline store of it all in your terminal, without the need for browser. -You can add email accounts by running \f(CWmw -a your@email.com\fP. -See \f(CWman mw\fP for all the information you need about mutt-wizard. -.PP -Once you have successfully added your email address(es), you can open your mail with \f(CWneomutt\fP which is also bound to \f(CWMod+e\fP. -You can sync your mail by pressing \f(CWMod+F8\fP and you can set a cronjob to sync mail every 10 minutes by running \f(CWmw -t 10\fP. -.PP -You may also want to install \f(CWpam-gnupg-git\fP, which can be set up to automatically unlock your GPG key on login, which will allow you avoid having put in a password to sync and send, all while keeping your password safe and encypted on your machine. -.HEADING 2 "How do I set up my music?" -.PP -By default, mpd, the music daemon assumes that \f(CW~/Music\fP is your music directory. -This can be changed in \f(CW~/.config/mpd/mpd.conf\fP. -When you add music to your music folder, you may have to run \f(CWmpc up\fP in the terminal to update the database. -mpd is controlled by ncmpcpp, which is accessible by \f(CWMod+m\fP. -.HEADING 2 "How do I update LARBS?" -.PP -LARBS is deployed as a git repository in your home directory. -You can use it as such to fetch, diff and merge changes from the remote repository. -If you don't want to do that or don't know how to use git, you can actually just rerun the script (as root) and reinstall LARBS and it will automatically update an existing install if you select the same username. -This will overwrite the original config files though, including changes you made for them, but this is an easier brute force approach that will also install any new dependencies. -.HEADING 1 "Important Links" -.PP -You can follow links via the keyboard in this pdf reader by pressing \f(CWf\fP followed by the number that appears on the desired link. -.LI -.ITEM -.PDF_WWW_LINK "mailto:luke@lukesmith.xyz" "luke@lukesmith.xyz" -\(en For questions! -.ITEM -.PDF_WWW_LINK "http://lukesmith.xyz" "https://lukesmith.xyz" -\(en For stalking! -.ITEM -.PDF_WWW_LINK "https://lukesmith.xyz/donate" "https://lukesmith.xyz/donate" -\(en To incentivize more development of LARBS! -.ITEM -.PDF_WWW_LINK "https://github.com/LukeSmithxyz" "My Github Page" -\(en For the code behind it! -.ITEM -.PDF_WWW_LINK "http://lukesmith.xyz/rss.xml" "RSS" -\(en For updates! -.LIST OFF diff --git a/.local/src/dmenu/FUNDING.yml b/.local/src2/dmenu/FUNDING.yml similarity index 100% rename from .local/src/dmenu/FUNDING.yml rename to .local/src2/dmenu/FUNDING.yml diff --git a/.local/src/dmenu/LICENSE b/.local/src2/dmenu/LICENSE similarity index 100% rename from .local/src/dmenu/LICENSE rename to .local/src2/dmenu/LICENSE diff --git a/.local/src/dmenu/Makefile b/.local/src2/dmenu/Makefile similarity index 100% rename from .local/src/dmenu/Makefile rename to .local/src2/dmenu/Makefile diff --git a/.local/src/dmenu/README.md b/.local/src2/dmenu/README.md similarity index 100% rename from .local/src/dmenu/README.md rename to .local/src2/dmenu/README.md diff --git a/.local/src/dmenu/arg.h b/.local/src2/dmenu/arg.h similarity index 100% rename from .local/src/dmenu/arg.h rename to .local/src2/dmenu/arg.h diff --git a/.local/src/dmenu/config.h b/.local/src2/dmenu/config.h similarity index 100% rename from .local/src/dmenu/config.h rename to .local/src2/dmenu/config.h diff --git a/.local/src/dmenu/config.mk b/.local/src2/dmenu/config.mk similarity index 100% rename from .local/src/dmenu/config.mk rename to .local/src2/dmenu/config.mk diff --git a/.local/src/dmenu/dmenu b/.local/src2/dmenu/dmenu similarity index 100% rename from .local/src/dmenu/dmenu rename to .local/src2/dmenu/dmenu diff --git a/.local/src/dmenu/dmenu.1 b/.local/src2/dmenu/dmenu.1 similarity index 100% rename from .local/src/dmenu/dmenu.1 rename to .local/src2/dmenu/dmenu.1 diff --git a/.local/src/dmenu/dmenu.c b/.local/src2/dmenu/dmenu.c similarity index 100% rename from .local/src/dmenu/dmenu.c rename to .local/src2/dmenu/dmenu.c diff --git a/.local/src/dmenu/dmenu.o b/.local/src2/dmenu/dmenu.o similarity index 100% rename from .local/src/dmenu/dmenu.o rename to .local/src2/dmenu/dmenu.o diff --git a/.local/src/dmenu/dmenu_path b/.local/src2/dmenu/dmenu_path similarity index 100% rename from .local/src/dmenu/dmenu_path rename to .local/src2/dmenu/dmenu_path diff --git a/.local/src/dmenu/dmenu_run b/.local/src2/dmenu/dmenu_run similarity index 100% rename from .local/src/dmenu/dmenu_run rename to .local/src2/dmenu/dmenu_run diff --git a/.local/src/dmenu/drw.c b/.local/src2/dmenu/drw.c similarity index 100% rename from .local/src/dmenu/drw.c rename to .local/src2/dmenu/drw.c diff --git a/.local/src/dmenu/drw.h b/.local/src2/dmenu/drw.h similarity index 100% rename from .local/src/dmenu/drw.h rename to .local/src2/dmenu/drw.h diff --git a/.local/src/dmenu/drw.o b/.local/src2/dmenu/drw.o similarity index 100% rename from .local/src/dmenu/drw.o rename to .local/src2/dmenu/drw.o diff --git a/.local/src/dmenu/stest b/.local/src2/dmenu/stest similarity index 100% rename from .local/src/dmenu/stest rename to .local/src2/dmenu/stest diff --git a/.local/src/dmenu/stest.1 b/.local/src2/dmenu/stest.1 similarity index 100% rename from .local/src/dmenu/stest.1 rename to .local/src2/dmenu/stest.1 diff --git a/.local/src/dmenu/stest.c b/.local/src2/dmenu/stest.c similarity index 100% rename from .local/src/dmenu/stest.c rename to .local/src2/dmenu/stest.c diff --git a/.local/src/dmenu/stest.o b/.local/src2/dmenu/stest.o similarity index 100% rename from .local/src/dmenu/stest.o rename to .local/src2/dmenu/stest.o diff --git a/.local/src/dmenu/util.c b/.local/src2/dmenu/util.c similarity index 100% rename from .local/src/dmenu/util.c rename to .local/src2/dmenu/util.c diff --git a/.local/src/dmenu/util.h b/.local/src2/dmenu/util.h similarity index 100% rename from .local/src/dmenu/util.h rename to .local/src2/dmenu/util.h diff --git a/.local/src/dmenu/util.o b/.local/src2/dmenu/util.o similarity index 100% rename from .local/src/dmenu/util.o rename to .local/src2/dmenu/util.o diff --git a/.local/src/dwm/FUNDING.yml b/.local/src2/dwm/FUNDING.yml similarity index 100% rename from .local/src/dwm/FUNDING.yml rename to .local/src2/dwm/FUNDING.yml diff --git a/.local/src/dwm/LICENSE b/.local/src2/dwm/LICENSE similarity index 100% rename from .local/src/dwm/LICENSE rename to .local/src2/dwm/LICENSE diff --git a/.local/src/dwm/Makefile b/.local/src2/dwm/Makefile similarity index 85% rename from .local/src/dwm/Makefile rename to .local/src2/dwm/Makefile index fe9df31df..ac1ca6349 100644 --- a/.local/src/dwm/Makefile +++ b/.local/src2/dwm/Makefile @@ -40,13 +40,13 @@ install: all mkdir -p ${DESTDIR}${MANPREFIX}/man1 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 - mkdir -p ${DESTDIR}${PREFIX}/share/dwm - cp -f larbs.mom ${DESTDIR}${PREFIX}/share/dwm - chmod 644 ${DESTDIR}${PREFIX}/share/dwm/larbs.mom + # mkdir -p ${DESTDIR}${PREFIX}/share/dwm + # cp -f larbs.mom ${DESTDIR}${PREFIX}/share/dwm + # chmod 644 ${DESTDIR}${PREFIX}/share/dwm/larbs.mom uninstall: rm -f ${DESTDIR}${PREFIX}/bin/dwm\ - ${DESTDIR}${PREFIX}/share/dwm/larbs.mom\ + # ${DESTDIR}${PREFIX}/share/dwm/larbs.mom\ ${DESTDIR}${MANPREFIX}/man1/dwm.1 .PHONY: all options clean dist install uninstall diff --git a/.local/src2/dwm/PKGBUILD b/.local/src2/dwm/PKGBUILD new file mode 100644 index 000000000..ba894886c --- /dev/null +++ b/.local/src2/dwm/PKGBUILD @@ -0,0 +1,46 @@ +_pkgname=dwm +pkgname=$_pkgname-larbs-git +pkgver=6.2.r1888.0ac09e0 +pkgrel=1 +pkgdesc="Luke's build of dwm" +url=https://github.com/LukeSmithxyz/dwm +arch=(i686 x86_64) +license=(MIT) +makedepends=(git) +depends=(freetype2 libx11 libxft) +optdepends=( + 'libxft-bgra: if dwm crashes when displaying emojis' + 'libxft-bgra-git: if dwm crashes when displaying emojis' + 'dmenu: program launcher' + 'st: terminal emulator') +provides=($_pkgname) +conflicts=($_pkgname) +source=(git+https://github.com/LukeSmithxyz/dwm) +sha256sums=('SKIP') + +pkgver() { + cd "$_pkgname" + echo "$(awk '/^VERSION =/ {print $3}' config.mk)".r"$(git rev-list --count HEAD)"."$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$_pkgname" + echo "CPPFLAGS+=${CPPFLAGS}" >> config.mk + echo "CFLAGS+=${CFLAGS}" >> config.mk + echo "LDFLAGS+=${LDFLAGS}" >> config.mk + # to use a custom config.h, place it in the package directory + if [[ -f ${SRCDEST}/config.h ]]; then + cp "${SRCDEST}/config.h" . + fi +} + +build() { + cd "$_pkgname" + make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 +} + +package() { + cd "$_pkgname" + make PREFIX=/usr DESTDIR="$pkgdir" install + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/.local/src/dwm/README.md b/.local/src2/dwm/README.md similarity index 60% rename from .local/src/dwm/README.md rename to .local/src2/dwm/README.md index cdc1ab46b..0dd4e321a 100644 --- a/.local/src/dwm/README.md +++ b/.local/src2/dwm/README.md @@ -7,30 +7,33 @@ This is suckless, mmmbud, the source code is the documentation! Check out [config.h](config.h). Okay, okay, actually I keep a readme in `larbs.mom` for my whole system, including the binds here. -Press `super+F1` to view it in dwm (zathura is required for that binding). +Press super+F1 to view it in dwm (zathura is required for that binding). I haven't kept `man dwm`/`dwm.1` updated though. PRs welcome on that, lol. ## Patches and features - [Clickable statusbar](https://dwm.suckless.org/patches/statuscmd/) with my build of [dwmblocks](https://github.com/lukesmithxyz/dwmblocks). - Reads [xresources](https://dwm.suckless.org/patches/xresources/) colors/variables (i.e. works with `pywal`, etc.). -- scratchpad: Accessible with mod+shift+enter. -- New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys `super+(shift+)t/y/u/i`. -- True fullscreen (`super+f`) and prevents focus shifting. -- Windows can be made sticky (`super+s`). -- [stacker](https://dwm.suckless.org/patches/stacker/): Move windows up the stack manually (`super-K/J`). -- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (`super+g/;`). +- scratchpad: Accessible with mod+shift+enter. +- New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys super+(shift+)t/y/u/i. +- True fullscreen (super+f) and prevents focus shifting. +- Windows can be made sticky (super+s). +- [stacker](https://dwm.suckless.org/patches/stacker/): Move windows up the stack manually (super-K/J). +- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (super+g/;). - [vanitygaps](https://dwm.suckless.org/patches/vanitygaps/): Gaps allowed across all layouts. - [swallow patch](https://dwm.suckless.org/patches/swallow/): if a program run from a terminal would make it inoperable, it temporarily takes its place to save space. + ## Installation for newbs -``` -git clone https://github.com/LukeSmithxyz/dwm +```bash +git clone https://github.com/LukeSmithxyz/dwm.git cd dwm sudo make install ``` -## Please install `libxft-bgra`! +There is also a `PKGBUILD` usable on distributions with pacman. Run `makepkg -si` instead of `sudo make install`. -This build of dwm does not block color emoji in the status/info bar, so you must install [libxft-bgra](https://aur.archlinux.org/packages/libxft-bgra/) from the AUR, which fixes a libxft color emoji rendering problem, otherwise dwm will crash upon trying to render one. Hopefully this fix will be in all libxft soon enough. +### You must also install `libxft-bgra`! + +This build of dwm does not block color emoji in the status/info bar, so you must install [libxft-bgra](https://aur.archlinux.org/packages/libxft-bgra/), which fixes a libxft color emoji rendering problem, otherwise dwm will crash upon trying to render one. Hopefully this fix will be in all libxft soon enough. diff --git a/.local/src2/dwm/compile_commands.json b/.local/src2/dwm/compile_commands.json new file mode 100644 index 000000000..a3cccb2ed --- /dev/null +++ b/.local/src2/dwm/compile_commands.json @@ -0,0 +1,65 @@ +[ + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-std=c99", + "-pedantic", + "-Wall", + "-Wno-deprecated-declarations", + "-Os", + "-I/usr/X11R6/include", + "-I/usr/include/freetype2", + "-D_DEFAULT_SOURCE", + "-D_BSD_SOURCE", + "-D_POSIX_C_SOURCE=200809L", + "-DVERSION=\"6.2\"", + "-DXINERAMA", + "drw.c" + ], + "directory": "/home/luca/.local/src/dwm", + "file": "/home/luca/.local/src/dwm/drw.c" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-std=c99", + "-pedantic", + "-Wall", + "-Wno-deprecated-declarations", + "-Os", + "-I/usr/X11R6/include", + "-I/usr/include/freetype2", + "-D_DEFAULT_SOURCE", + "-D_BSD_SOURCE", + "-D_POSIX_C_SOURCE=200809L", + "-DVERSION=\"6.2\"", + "-DXINERAMA", + "dwm.c" + ], + "directory": "/home/luca/.local/src/dwm", + "file": "/home/luca/.local/src/dwm/dwm.c" + }, + { + "arguments": [ + "/usr/bin/cc", + "-c", + "-std=c99", + "-pedantic", + "-Wall", + "-Wno-deprecated-declarations", + "-Os", + "-I/usr/X11R6/include", + "-I/usr/include/freetype2", + "-D_DEFAULT_SOURCE", + "-D_BSD_SOURCE", + "-D_POSIX_C_SOURCE=200809L", + "-DVERSION=\"6.2\"", + "-DXINERAMA", + "util.c" + ], + "directory": "/home/luca/.local/src/dwm", + "file": "/home/luca/.local/src/dwm/util.c" + } +] diff --git a/.local/src/dwm/config.h b/.local/src2/dwm/config.h similarity index 69% rename from .local/src/dwm/config.h rename to .local/src2/dwm/config.h index 4bea7198b..54b7b5ef7 100644 --- a/.local/src/dwm/config.h +++ b/.local/src2/dwm/config.h @@ -2,7 +2,8 @@ /* Constants */ #define TERMINAL "kitty" -#define TERMCLASS "Kitty" +#define TERMCLASS "kitty" +#define BROWSER "librewolf" /* appearance */ static unsigned int borderpx = 2; /* border pixel of windows */ @@ -37,9 +38,40 @@ typedef struct { const char *name; const void *cmd; } Sp; -const char *spcmd1[] = {TERMINAL, "-n", "spterm", "-g", "120x34", NULL}; -const char *spcmd2[] = {TERMINAL, "-n", "spcalc", "-f", "monospace:size=16", - "-g", "50x20", "-e", "bc", "-lq", +const char *spcmd1[] = {TERMINAL, + "--name", + "spterm", + "-o", + "initial_window_width=120c", + "-o", + "initial_window_height=34c", + "-o", + "remember_window_size=no", + "-o", + "background_opacity=0.8", + "-o", + "tab_bar_min_tabs=9001", + NULL}; +const char *spcmd2[] = {TERMINAL, + "--name", + "spcalc", + "-o", + "remember_window_size=no", + "-o", + "font_size=16", + "-o", + "initial_window_width=50c", + "-o", + "initial_window_height=20c", + "-o", + "background_opacity=0.8", + "-o", + "confirm_os_window_close=0", + "-o", + "tab_bar_min_tabs=9001", + "-e", + "bc", + "-lq", NULL}; static Sp scratchpads[] = { /* name cmd */ @@ -60,6 +92,7 @@ static const Rule rules[] = { {"Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1}, {TERMCLASS, NULL, NULL, 0, 0, 1, 0, -1}, {NULL, NULL, "Event Tester", 0, 0, 0, 1, -1}, + {NULL, "bg", NULL, 0, 0, 1, 1 << 7, -1}, {NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1}, {NULL, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1}, }; @@ -114,7 +147,14 @@ static const Layout layouts[] = { } /* commands */ -static const char *termcmd[] = {TERMINAL, NULL}; +static const char *termcmd[] = {TERMINAL, + "-o", + "background_opacity=0.8", + "-o", + "confirm_os_window_close=0", + "-o", + "tab_bar_min_tabs=9001", + NULL}; /* * Xresources preferences to load at startup @@ -148,7 +188,10 @@ static Key keys[] = { /* modifier key function argument */ STACKKEYS(MODKEY, focus) STACKKEYS(MODKEY | ShiftMask, push) /* { MODKEY|ShiftMask, XK_Escape, spawn, SHCMD("") }, */ - {MODKEY, XK_dead_circumflex, spawn, SHCMD("dmenuunicode")}, + {MODKEY, + XK_dead_circumflex, + spawn, + {.v = (const char *[]){"dmenuunicode", NULL}}}, /* { MODKEY|ShiftMask, XK_grave, togglescratch, * SHCMD("") * }, @@ -165,8 +208,11 @@ static Key keys[] = { SHCMD("pamixer --allow-boost -i 5; kill -44 $(pidof dwmblocks)")}, {MODKEY | ShiftMask, XK_dead_acute, spawn, SHCMD("pamixer --allow-boost -i 15; kill -44 $(pidof dwmblocks)")}, - {MODKEY, XK_BackSpace, spawn, SHCMD("sysact")}, - {MODKEY | ShiftMask, XK_BackSpace, spawn, SHCMD("sysact")}, + {MODKEY, XK_BackSpace, spawn, {.v = (const char *[]){"sysact", NULL}}}, + {MODKEY | ShiftMask, + XK_BackSpace, + spawn, + {.v = (const char *[]){"sysact", NULL}}}, {MODKEY, XK_Tab, view, {0}}, /* { MODKEY|ShiftMask, XK_Tab, spawn, @@ -174,9 +220,12 @@ static Key keys[] = { * }, */ {MODKEY, XK_q, killclient, {0}}, - {MODKEY | ShiftMask, XK_q, spawn, SHCMD("sysact")}, - {MODKEY, XK_w, spawn, SHCMD("$BROWSER")}, - {MODKEY | ShiftMask, XK_w, spawn, SHCMD(TERMINAL " -e sudo nmtui")}, + {MODKEY | ShiftMask, XK_q, spawn, {.v = (const char *[]){"sysact", NULL}}}, + {MODKEY, XK_w, spawn, {.v = (const char *[]){BROWSER, NULL}}}, + {MODKEY | ShiftMask, + XK_w, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "sudo", "nmtui", NULL}}}, {MODKEY, XK_e, spawn, SHCMD( TERMINAL @@ -184,8 +233,11 @@ static Key keys[] = { {MODKEY | ShiftMask, XK_e, spawn, SHCMD(TERMINAL " -e abook -C ~/.config/abook/abookrc --datafile " "~/.config/abook/addressbook")}, // REPLACE - {MODKEY, XK_r, spawn, SHCMD(TERMINAL " -e lf")}, - {MODKEY | ShiftMask, XK_r, spawn, SHCMD(TERMINAL " -e htop")}, + {MODKEY, XK_r, spawn, {.v = (const char *[]){TERMINAL, "-e", "lf", NULL}}}, + {MODKEY | ShiftMask, + XK_r, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "htop", NULL}}}, {MODKEY, XK_t, setlayout, {.v = &layouts[0]}}, /* tile */ {MODKEY | ShiftMask, XK_t, setlayout, {.v = &layouts[1]}}, /* bstack */ {MODKEY, XK_z, setlayout, {.v = &layouts[2]}}, /* spiral */ @@ -199,13 +251,28 @@ static Key keys[] = { {.v = &layouts[7]}}, /* centeredfloatingmaster */ {MODKEY, XK_o, incnmaster, {.i = +1}}, {MODKEY | ShiftMask, XK_o, incnmaster, {.i = -1}}, - {MODKEY, XK_p, spawn, SHCMD("mpc toggle")}, + {MODKEY, XK_p, spawn, {.v = (const char *[]){"mpc", "toggle", NULL}}}, {MODKEY | ShiftMask, XK_p, spawn, SHCMD("mpc pause ; pauseallmpv")}, - {MODKEY, XK_udiaeresis, spawn, SHCMD("mpc seek -10")}, - {MODKEY | ShiftMask, XK_udiaeresis, spawn, SHCMD("mpc seek -60")}, - {MODKEY, XK_plus, spawn, SHCMD("mpc seek +10")}, - {MODKEY | ShiftMask, XK_plus, spawn, SHCMD("mpc seek +60")}, - {MODKEY, XK_numbersign, spawn, SHCMD(TERMINAL " -e bc -l")}, + {MODKEY, + XK_udiaeresis, + spawn, + {.v = (const char *[]){"mpc", "seek", "-10", NULL}}}, + {MODKEY | ShiftMask, + XK_udiaeresis, + spawn, + {.v = (const char *[]){"mpc", "seek", "-60", NULL}}}, + {MODKEY, + XK_plus, + spawn, + {.v = (const char *[]){"mpc", "seek", "+10", NULL}}}, + {MODKEY | ShiftMask, + XK_plus, + spawn, + {.v = (const char *[]){"mpc", "seek", "+60", NULL}}}, + {MODKEY, + XK_numbersign, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "bc", "-l", NULL}}}, /* { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("") * }, */ @@ -217,8 +284,11 @@ static Key keys[] = { * SHCMD("") * }, */ - {MODKEY, XK_d, spawn, SHCMD("dmenu_run")}, - {MODKEY | ShiftMask, XK_d, spawn, SHCMD("passmenu")}, + {MODKEY, XK_d, spawn, {.v = (const char *[]){"dmenu_run", NULL}}}, + {MODKEY | ShiftMask, + XK_d, + spawn, + {.v = (const char *[]){"passmenu", NULL}}}, {MODKEY, XK_f, togglefullscr, {0}}, {MODKEY | ShiftMask, XK_f, setlayout, {.v = &layouts[8]}}, {MODKEY, XK_g, shiftview, {.i = -1}}, @@ -260,16 +330,29 @@ static Key keys[] = { * SHCMD("") * }, */ - {MODKEY, XK_n, spawn, SHCMD(TERMINAL " -e nvim -c VimwikiIndex")}, + {MODKEY, + XK_n, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "nvim", "-c", "VimwikiIndex", + NULL}}}, {MODKEY | ShiftMask, XK_n, spawn, - SHCMD(TERMINAL " -e newsboat; pkill -RTMIN+6 dwmblocks")}, // REPLACE - {MODKEY, XK_m, spawn, SHCMD(TERMINAL " -e ncmpcpp")}, + SHCMD(TERMINAL " -e newsboat; pkill -RTMIN+6 dwmblocks")}, // TODO: replace + {MODKEY, + XK_m, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "ncmpcpp", NULL}}}, {MODKEY | ShiftMask, XK_m, spawn, SHCMD("pamixer -t; kill -44 $(pidof dwmblocks)")}, - {MODKEY, XK_comma, spawn, SHCMD("mpc prev")}, - {MODKEY | ShiftMask, XK_comma, spawn, SHCMD("mpc seek 0%")}, - {MODKEY, XK_period, spawn, SHCMD("mpc next")}, - {MODKEY | ShiftMask, XK_period, spawn, SHCMD("mpc repeat")}, + {MODKEY, XK_comma, spawn, {.v = (const char *[]){"mpc", "prev", NULL}}}, + {MODKEY | ShiftMask, + XK_comma, + spawn, + {.v = (const char *[]){"mpc", "seek", "0%", NULL}}}, + {MODKEY, XK_period, spawn, {.v = (const char *[]){"mpc", "next", NULL}}}, + {MODKEY | ShiftMask, + XK_period, + spawn, + {.v = (const char *[]){"mpc", "repeat", NULL}}}, {MODKEY, XK_Left, focusmon, {.i = -1}}, {MODKEY | ShiftMask, XK_Left, tagmon, {.i = -1}}, @@ -287,7 +370,7 @@ static Key keys[] = { {MODKEY, XK_F1, spawn, SHCMD("groff -mom /usr/local/share/dwm/keybinds.mom -Tpdf | zathura -")}, {MODKEY, XK_F2, spawn, SHCMD("$TERMINAL -e deluge-gtk")}, - {MODKEY, XK_F3, spawn, SHCMD("librewolf")}, + {MODKEY, XK_F3, spawn, SHCMD("librewolf")}, // TODO: replace {MODKEY, XK_F4, spawn, SHCMD(TERMINAL " -e pulsemixer; kill -44 $(pidof dwmblocks)")}, {MODKEY, XK_F5, spawn, SHCMD("")}, @@ -295,20 +378,25 @@ static Key keys[] = { {MODKEY, XK_F7, spawn, SHCMD("")}, {MODKEY, XK_F8, spawn, SHCMD("")}, {MODKEY, XK_F9, spawn, SHCMD("")}, - {MODKEY, XK_F10, spawn, SHCMD("dmenumount")}, - {MODKEY, XK_F11, spawn, SHCMD("dmenuumount")}, + {MODKEY, XK_F10, spawn, {.v = (const char *[]){"dmenumount", NULL}}}, + {MODKEY, XK_F11, spawn, {.v = (const char *[]){"dmenuumount", NULL}}}, {MODKEY, XK_F12, spawn, - SHCMD( - "remaps & notify-send \\\"ï ‹ Keyboard remapping...\\\" \\\"Re-running " - "keyboard defaults for any newly plugged-in keyboards.\\\"")}, + SHCMD("remaps & notify-send \"âŒ¨ï¸ Keyboard remapping...\" \"Re-running " + "keyboard defaults for any newly plugged-in keyboards.\"")}, {MODKEY, XK_space, zoom, {0}}, {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, {0, XK_Print, spawn, SHCMD("maim pic-full-$(date '+%y%m%d-%H%M-%S').png")}, - {ShiftMask, XK_Print, spawn, SHCMD("maimpick")}, - {MODKEY, XK_Print, spawn, SHCMD("dmenurecord")}, - {MODKEY | ShiftMask, XK_Print, spawn, SHCMD("dmenurecord kill")}, - {MODKEY, XK_Delete, spawn, SHCMD("dmenurecord kill")}, + {ShiftMask, XK_Print, spawn, {.v = (const char *[]){"maimpick", NULL}}}, + {MODKEY, XK_Print, spawn, {.v = (const char *[]){"dmenurecord", NULL}}}, + {MODKEY | ShiftMask, + XK_Print, + spawn, + {.v = (const char *[]){"dmenurecord", "kill", NULL}}}, + {MODKEY, + XK_Delete, + spawn, + {.v = (const char *[]){"dmenurecord", "kill", NULL}}}, {MODKEY, XK_Scroll_Lock, spawn, SHCMD("killall screenkey || screenkey &")}, {0, XF86XK_AudioMute, spawn, @@ -317,39 +405,78 @@ static Key keys[] = { SHCMD("pamixer --allow-boost -i 3; kill -44 $(pidof dwmblocks)")}, {0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer --allow-boost -d 3; kill -44 $(pidof dwmblocks)")}, - {0, XF86XK_AudioPrev, spawn, SHCMD("mpc prev")}, - {0, XF86XK_AudioNext, spawn, SHCMD("mpc next")}, - {0, XF86XK_AudioPause, spawn, SHCMD("mpc pause")}, - {0, XF86XK_AudioPlay, spawn, SHCMD("mpc play")}, - {0, XF86XK_AudioStop, spawn, SHCMD("mpc stop")}, - {0, XF86XK_AudioRewind, spawn, SHCMD("mpc seek -10")}, - {0, XF86XK_AudioForward, spawn, SHCMD("mpc seek +10")}, - {0, XF86XK_AudioMedia, spawn, SHCMD(TERMINAL " -e ncmpcpp")}, + {0, XF86XK_AudioPrev, spawn, {.v = (const char *[]){"mpc", "prev", NULL}}}, + {0, XF86XK_AudioNext, spawn, {.v = (const char *[]){"mpc", "next", NULL}}}, + {0, + XF86XK_AudioPause, + spawn, + {.v = (const char *[]){"mpc", "pause", NULL}}}, + {0, XF86XK_AudioPlay, spawn, {.v = (const char *[]){"mpc", "play", NULL}}}, + {0, XF86XK_AudioStop, spawn, {.v = (const char *[]){"mpc", "stop", NULL}}}, + {0, + XF86XK_AudioRewind, + spawn, + {.v = (const char *[]){"mpc", "seek", "-10", NULL}}}, + {0, + XF86XK_AudioForward, + spawn, + {.v = (const char *[]){"mpc", "seek", "+10", NULL}}}, + {0, + XF86XK_AudioMedia, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "ncmpcpp", NULL}}}, {0, XF86XK_AudioMicMute, spawn, SHCMD("pactl set-source-mute @DEFAULT_SOURCE@ toggle")}, - {0, XF86XK_PowerOff, spawn, SHCMD("sysact")}, - {0, XF86XK_Calculator, spawn, SHCMD(TERMINAL " -e bc -l")}, - {0, XF86XK_Sleep, spawn, SHCMD("sudo -A zzz")}, - {0, XF86XK_WWW, spawn, SHCMD("$BROWSER")}, - {0, XF86XK_DOS, spawn, SHCMD(TERMINAL)}, + {0, XF86XK_PowerOff, spawn, {.v = (const char *[]){"sysact", NULL}}}, + {0, + XF86XK_Calculator, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "bc", "-l", NULL}}}, + {0, + XF86XK_Sleep, + spawn, + {.v = (const char *[]){"sudo", "-A", "zzz", NULL}}}, + {0, XF86XK_WWW, spawn, {.v = (const char *[]){BROWSER, NULL}}}, + {0, XF86XK_DOS, spawn, {.v = termcmd}}, {0, XF86XK_ScreenSaver, spawn, SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv")}, - {0, XF86XK_TaskPane, spawn, SHCMD(TERMINAL " -e htop")}, + {0, + XF86XK_TaskPane, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "htop", NULL}}}, {0, XF86XK_Mail, spawn, SHCMD(TERMINAL " -e neomutt ; pkill -RTMIN+12 dwmblocks")}, - {0, XF86XK_MyComputer, spawn, SHCMD(TERMINAL " -e lf /")}, + {0, + XF86XK_MyComputer, + spawn, + {.v = (const char *[]){TERMINAL, "-e", "lfub", "/", NULL}}}, /* { 0, XF86XK_Battery, spawn, * SHCMD("") * }, */ - {0, XF86XK_Launch1, spawn, SHCMD("xset dpms force off")}, + {0, + XF86XK_Launch1, + spawn, + {.v = (const char *[]){"xset", "dpms", "force", "off", NULL}}}, {0, XF86XK_TouchpadToggle, spawn, SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || " "synclient TouchpadOff=1")}, - {0, XF86XK_TouchpadOff, spawn, SHCMD("synclient TouchpadOff=1")}, - {0, XF86XK_TouchpadOn, spawn, SHCMD("synclient TouchpadOff=0")}, - {0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 15")}, - {0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 15")}, + {0, + XF86XK_TouchpadOff, + spawn, + {.v = (const char *[]){"synclient", "TouchpadOff=1", NULL}}}, + {0, + XF86XK_TouchpadOn, + spawn, + {.v = (const char *[]){"synclient", "TouchpadOff=0", NULL}}}, + {0, + XF86XK_MonBrightnessUp, + spawn, + {.v = (const char *[]){"xbacklight", "-inc", "15", NULL}}}, + {0, + XF86XK_MonBrightnessDown, + spawn, + {.v = (const char *[]){"xbacklight", "-dec", "15", NULL}}}, /* { MODKEY|Mod4Mask, XK_h, incrgaps, {.i = +1 } }, */ diff --git a/.local/src/dwm/config.mk b/.local/src2/dwm/config.mk similarity index 100% rename from .local/src/dwm/config.mk rename to .local/src2/dwm/config.mk diff --git a/.local/src/dwm/drw.c b/.local/src2/dwm/drw.c similarity index 100% rename from .local/src/dwm/drw.c rename to .local/src2/dwm/drw.c diff --git a/.local/src/dwm/drw.h b/.local/src2/dwm/drw.h similarity index 100% rename from .local/src/dwm/drw.h rename to .local/src2/dwm/drw.h diff --git a/.local/src/dwm/drw.o b/.local/src2/dwm/drw.o similarity index 100% rename from .local/src/dwm/drw.o rename to .local/src2/dwm/drw.o diff --git a/.local/src2/dwm/dwm b/.local/src2/dwm/dwm new file mode 100755 index 000000000..d81b7bc59 Binary files /dev/null and b/.local/src2/dwm/dwm differ diff --git a/.local/src/dwm/dwm.1 b/.local/src2/dwm/dwm.1 similarity index 100% rename from .local/src/dwm/dwm.1 rename to .local/src2/dwm/dwm.1 diff --git a/.local/src/dwm/dwm.c b/.local/src2/dwm/dwm.c similarity index 97% rename from .local/src/dwm/dwm.c rename to .local/src2/dwm/dwm.c index c0d141db0..4f3faff34 100644 --- a/.local/src/dwm/dwm.c +++ b/.local/src2/dwm/dwm.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #ifdef XINERAMA @@ -67,6 +68,21 @@ #define SPTAG(i) ((1 << LENGTH(tags)) << (i)) #define SPTAGMASK (((1 << LENGTH(scratchpads))-1) << LENGTH(tags)) #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) +#define XRDB_LOAD_COLOR(R,V) if (XrmGetResource(xrdb, R, NULL, &type, &value) == True) { \ + if (value.addr != NULL && strnlen(value.addr, 8) == 7 && value.addr[0] == '#') { \ + int i = 1; \ + for (; i <= 6; i++) { \ + if (value.addr[i] < 48) break; \ + if (value.addr[i] > 57 && value.addr[i] < 65) break; \ + if (value.addr[i] > 70 && value.addr[i] < 97) break; \ + if (value.addr[i] > 102) break; \ + } \ + if (i == 7) { \ + strncpy(V, value.addr, 7); \ + V[7] = '\0'; \ + } \ + } \ + } #define TRUNC(X,A,B) (MAX((A), MIN((X), (B)))) /* enums */ @@ -212,6 +228,7 @@ static void grabkeys(void); static void incnmaster(const Arg *arg); static void keypress(XEvent *e); static void killclient(const Arg *arg); +static void loadxrdb(void); static void manage(Window w, XWindowAttributes *wa); static void mappingnotify(XEvent *e); static void maprequest(XEvent *e); @@ -278,6 +295,7 @@ static Monitor *wintomon(Window w); static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); +static void xrdb(const Arg *arg); static void zoom(const Arg *arg); static void load_xresources(void); static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst); @@ -1190,6 +1208,37 @@ killclient(const Arg *arg) } } +void +loadxrdb() +{ + Display *display; + char * resm; + XrmDatabase xrdb; + char *type; + XrmValue value; + + display = XOpenDisplay(NULL); + + if (display != NULL) { + resm = XResourceManagerString(display); + + if (resm != NULL) { + xrdb = XrmGetStringDatabase(resm); + + if (xrdb != NULL) { + XRDB_LOAD_COLOR("dwm.color0", normbordercolor); + XRDB_LOAD_COLOR("dwm.color0", normbgcolor); + XRDB_LOAD_COLOR("dwm.color4", normfgcolor); + XRDB_LOAD_COLOR("dwm.color8", selbordercolor); + XRDB_LOAD_COLOR("dwm.color4", selbgcolor); + XRDB_LOAD_COLOR("dwm.color0", selfgcolor); + } + } + } + + XCloseDisplay(display); +} + void manage(Window w, XWindowAttributes *wa) { @@ -2530,6 +2579,17 @@ xerrorstart(Display *dpy, XErrorEvent *ee) return -1; } +void +xrdb(const Arg *arg) +{ + loadxrdb(); + int i; + for (i = 0; i < LENGTH(colors); i++) + scheme[i] = drw_scm_create(drw, colors[i], 3); + focus(NULL); + arrange(NULL); +} + void zoom(const Arg *arg) { @@ -2627,3 +2687,4 @@ main(int argc, char *argv[]) XCloseDisplay(dpy); return EXIT_SUCCESS; } + diff --git a/.local/src2/dwm/dwm.o b/.local/src2/dwm/dwm.o new file mode 100644 index 000000000..86866f27a Binary files /dev/null and b/.local/src2/dwm/dwm.o differ diff --git a/.local/src/dwm/shiftview.c b/.local/src2/dwm/shiftview.c similarity index 100% rename from .local/src/dwm/shiftview.c rename to .local/src2/dwm/shiftview.c diff --git a/.local/src/dwm/transient.c b/.local/src2/dwm/transient.c similarity index 100% rename from .local/src/dwm/transient.c rename to .local/src2/dwm/transient.c diff --git a/.local/src/dwm/util.c b/.local/src2/dwm/util.c similarity index 100% rename from .local/src/dwm/util.c rename to .local/src2/dwm/util.c diff --git a/.local/src/dwm/util.h b/.local/src2/dwm/util.h similarity index 100% rename from .local/src/dwm/util.h rename to .local/src2/dwm/util.h diff --git a/.local/src/dwm/util.o b/.local/src2/dwm/util.o similarity index 100% rename from .local/src/dwm/util.o rename to .local/src2/dwm/util.o diff --git a/.local/src/dwm/vanitygaps.c b/.local/src2/dwm/vanitygaps.c similarity index 100% rename from .local/src/dwm/vanitygaps.c rename to .local/src2/dwm/vanitygaps.c diff --git a/.local/src/dwmblocks/.gitignore b/.local/src2/dwmblocks/.gitignore similarity index 100% rename from .local/src/dwmblocks/.gitignore rename to .local/src2/dwmblocks/.gitignore diff --git a/.local/src/dwmblocks/FUNDING.yml b/.local/src2/dwmblocks/FUNDING.yml similarity index 100% rename from .local/src/dwmblocks/FUNDING.yml rename to .local/src2/dwmblocks/FUNDING.yml diff --git a/.local/src/dwmblocks/LICENSE b/.local/src2/dwmblocks/LICENSE similarity index 100% rename from .local/src/dwmblocks/LICENSE rename to .local/src2/dwmblocks/LICENSE diff --git a/.local/src/dwmblocks/Makefile b/.local/src2/dwmblocks/Makefile similarity index 100% rename from .local/src/dwmblocks/Makefile rename to .local/src2/dwmblocks/Makefile diff --git a/.local/src/dwmblocks/README.md b/.local/src2/dwmblocks/README.md similarity index 100% rename from .local/src/dwmblocks/README.md rename to .local/src2/dwmblocks/README.md diff --git a/.local/src/dwmblocks/config.h b/.local/src2/dwmblocks/config.h similarity index 100% rename from .local/src/dwmblocks/config.h rename to .local/src2/dwmblocks/config.h diff --git a/.local/src/dwmblocks/dwmblocks.c b/.local/src2/dwmblocks/dwmblocks.c similarity index 100% rename from .local/src/dwmblocks/dwmblocks.c rename to .local/src2/dwmblocks/dwmblocks.c diff --git a/.local/src/dwmblocks/patches/dwmblocks-statuscmd-fork.diff b/.local/src2/dwmblocks/patches/dwmblocks-statuscmd-fork.diff similarity index 100% rename from .local/src/dwmblocks/patches/dwmblocks-statuscmd-fork.diff rename to .local/src2/dwmblocks/patches/dwmblocks-statuscmd-fork.diff diff --git a/.local/src/dwmblocks/patches/dwmblocks-statuscmd-signal.diff b/.local/src2/dwmblocks/patches/dwmblocks-statuscmd-signal.diff similarity index 100% rename from .local/src/dwmblocks/patches/dwmblocks-statuscmd-signal.diff rename to .local/src2/dwmblocks/patches/dwmblocks-statuscmd-signal.diff diff --git a/.local/src/slock/LICENSE b/.local/src2/slock/LICENSE similarity index 100% rename from .local/src/slock/LICENSE rename to .local/src2/slock/LICENSE diff --git a/.local/src/slock/Makefile b/.local/src2/slock/Makefile similarity index 100% rename from .local/src/slock/Makefile rename to .local/src2/slock/Makefile diff --git a/.local/src/slock/README b/.local/src2/slock/README similarity index 100% rename from .local/src/slock/README rename to .local/src2/slock/README diff --git a/.local/src/slock/arg.h b/.local/src2/slock/arg.h similarity index 100% rename from .local/src/slock/arg.h rename to .local/src2/slock/arg.h diff --git a/.local/src/slock/config.h b/.local/src2/slock/config.h similarity index 100% rename from .local/src/slock/config.h rename to .local/src2/slock/config.h diff --git a/.local/src/slock/config.mk b/.local/src2/slock/config.mk similarity index 100% rename from .local/src/slock/config.mk rename to .local/src2/slock/config.mk diff --git a/.local/src/slock/explicit_bzero.c b/.local/src2/slock/explicit_bzero.c similarity index 100% rename from .local/src/slock/explicit_bzero.c rename to .local/src2/slock/explicit_bzero.c diff --git a/.local/src/slock/explicit_bzero.o b/.local/src2/slock/explicit_bzero.o similarity index 100% rename from .local/src/slock/explicit_bzero.o rename to .local/src2/slock/explicit_bzero.o diff --git a/.local/src/slock/slock b/.local/src2/slock/slock similarity index 100% rename from .local/src/slock/slock rename to .local/src2/slock/slock diff --git a/.local/src/slock/slock-colormessage-20200210-35633d4.diff b/.local/src2/slock/slock-colormessage-20200210-35633d4.diff similarity index 100% rename from .local/src/slock/slock-colormessage-20200210-35633d4.diff rename to .local/src2/slock/slock-colormessage-20200210-35633d4.diff diff --git a/.local/src/slock/slock-pam_auth-20190207-35633d4.diff b/.local/src2/slock/slock-pam_auth-20190207-35633d4.diff similarity index 100% rename from .local/src/slock/slock-pam_auth-20190207-35633d4.diff rename to .local/src2/slock/slock-pam_auth-20190207-35633d4.diff diff --git a/.local/src/slock/slock-xresources-20191126-53e56c7.diff b/.local/src2/slock/slock-xresources-20191126-53e56c7.diff similarity index 100% rename from .local/src/slock/slock-xresources-20191126-53e56c7.diff rename to .local/src2/slock/slock-xresources-20191126-53e56c7.diff diff --git a/.local/src/slock/slock.1 b/.local/src2/slock/slock.1 similarity index 100% rename from .local/src/slock/slock.1 rename to .local/src2/slock/slock.1 diff --git a/.local/src/slock/slock.c b/.local/src2/slock/slock.c similarity index 100% rename from .local/src/slock/slock.c rename to .local/src2/slock/slock.c diff --git a/.local/src/slock/slock.o b/.local/src2/slock/slock.o similarity index 100% rename from .local/src/slock/slock.o rename to .local/src2/slock/slock.o diff --git a/.local/src/slock/util.h b/.local/src2/slock/util.h similarity index 100% rename from .local/src/slock/util.h rename to .local/src2/slock/util.h