1
0
Fork 0

Remove .local/src

This commit is contained in:
Luca Bilke 2022-07-09 10:52:35 +02:00
parent 98522b7c12
commit 4dd43759fa
75 changed files with 399 additions and 459 deletions

View File

@ -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 {{{

View File

@ -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 = {
["<c-s>"] = ":w<CR>",
["<c-q>"] = ":bd<CR>"
["<c-q>"] = ":bd<CR>",
}
lvim.keys.term_mode = {
["<c-q>"] = ":bd<CR>"
@ -127,6 +128,8 @@ lvim.builtin.which_key.mappings = {
j = { "<cmd>BufferLinePick<cr>", "Jump" },
f = { "<cmd>Telescope buffers<cr>", "Find" },
b = { "<cmd>BufferLineCyclePrev<cr>", "Previous" },
n = { "<cmd>BufferLineCycleNext<cr>", "Next" },
-- w = { "<cmd>BufferWipeout<cr>", "Wipeout" }, -- TODO: implement this for bufferline
e = {
"<cmd>BufferLinePickClose<cr>",

View File

@ -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

Binary file not shown.

Binary file not shown.

View File

@ -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

View File

@ -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

46
.local/src2/dwm/PKGBUILD Normal file
View File

@ -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"
}

View File

@ -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 <kbd>super+F1</kbd> 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 <kbd>mod+shift+enter</kbd>.
- New layouts: bstack, fibonacci, deck, centered master and more. All bound to keys <kbd>super+(shift+)t/y/u/i</kbd>.
- True fullscreen (<kbd>super+f</kbd>) and prevents focus shifting.
- Windows can be made sticky (<kbd>super+s</kbd>).
- [stacker](https://dwm.suckless.org/patches/stacker/): Move windows up the stack manually (<kbd>super-K/J</kbd>).
- [shiftview](https://dwm.suckless.org/patches/nextprev/): Cycle through tags (<kbd>super+g/;</kbd>).
- [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.

View File

@ -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"
}
]

View File

@ -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 } },
*/

BIN
.local/src2/dwm/dwm Executable file

Binary file not shown.

View File

@ -35,6 +35,7 @@
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xresource.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#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;
}

BIN
.local/src2/dwm/dwm.o Normal file

Binary file not shown.