1
0
forked from extern/nix-config
Commit Graph

526 Commits

Author SHA1 Message Date
Donovan Glover
700d99ae7c
docs: Update README
Fixed some typos and decreased the amount of repetitive information.
2018-10-30 11:24:23 -04:00
Donovan Glover
082f64f763
Makefile: Add systemd-enable-now target 2018-10-27 18:37:47 -04:00
Donovan Glover
6d4c594b1a
docs: Add ssh-agent instructions 2018-10-27 16:03:11 -04:00
Donovan Glover
80ca00bbae
vim: Add .gitkeep for undo directory
Instead of remembering to create the undo directory every time I use
vim on a different machine, stow can do that instead.
2018-10-27 16:00:01 -04:00
Donovan Glover
73e6cfec28
misc: Update dotfiles
lium and lfox are not needed anymore since I use rofi.
2018-10-27 15:48:08 -04:00
Donovan Glover
d773743979
docs: Fix some typos and missing instructions 2018-10-27 15:44:59 -04:00
Donovan Glover
eff7623a9a
Makefile: Don't repeat yourself
Instead of writing the same if conditional in three different places,
I can set a variable based on the conditional and use that instead.
2018-10-23 23:15:43 -04:00
Donovan Glover
21814cda7f
docs: Add READMEs for bspwm and extras
Now that all the READMEs have been added, all that's left is to polish
them as time goes on. It may be useful to add images to each of the
package directories to show visually what each contain.
2018-10-23 22:19:36 -04:00
Donovan Glover
19b91ec9ce
docs: Add READMEs for wal, term, and editorconfig
Also, after some testing, it turns out that my previous assumption about
systemd was wrong. Placing a service in default.target.wants directly
will cause the service to instead not be recognized by systemd.
2018-10-23 21:22:05 -04:00
Donovan Glover
1b0097ebc6
docs: Add READMEs for code, gpg, and systemd
Note that systemd usage information needs to be revised since systemd
user units appear to be enabled by default, and may be started by
default when placed in the default.target.wants directory.
2018-10-23 16:25:45 -04:00
Donovan Glover
43e79e2914
docs: Add READMEs for git, plasma, and tmux
Whether or not Plasma-specific dotfiles are still needed is
questionable, but I will keep this directory for now.
2018-10-23 14:25:45 -04:00
Donovan Glover
c3f85fc871
docs: Add READMEs for fish, vim, and xmodmap
Since I'd like other people to try my dotfiles, I will be writing
READMEs for each package directory, which should hopefully cover
anything a user needs to do in order to use the package.
2018-10-23 13:01:16 -04:00
Donovan Glover
ccf3623f2c
Update README
Since it is now possible (once more) to stow individual packages (this
time with make), the README has been updated to reflect that.
2018-10-22 23:37:39 -04:00
Donovan Glover
08334b59ed
stow: Split desktop package into term and xmodmap
"Desktop" was a really generic package name that didn't describe the
contents of what it contained. Since we already have a catch-all
directory (extras), I separated "desktop" into what it actually was:
settings for urxvt/termite and settings for xmodmap.

Some other programs may also use xrdb. The only reason the term files
are not in the bspwm directory instead is because it may be useful to
use urxvt or termite in non-bspwm environments.
2018-10-22 23:26:25 -04:00
Donovan Glover
20de137550
Update Makefile to support multiple package directories
It is now possible to install only a specific set of dotfiles instead
of everything at once. To do this, simply run make and set the "package"
variable from the shell. For example, to only stow my vim config, use
`make package=vim`.
2018-10-22 19:42:00 -04:00
Donovan Glover
b85f938296
stow: Add directories for vim, wal, and extras
The extras directory contains lesser-known programs that may
not be commonly stowed.
2018-10-22 17:09:28 -04:00
Donovan Glover
5de5e51398
stow: Add directories for code, desktop, and editorconfig
The desktop directory is used for desktop-related things that may be
useful outside of bspwm (such as caps lock functioning as ctrl +
escape). Whether or not this is needed is questionable, but it is an
option for now.

It may be better to further split these directories and avoid the
generic word "desktop" altogether.
2018-10-22 15:24:53 -04:00
Donovan Glover
3d541e96fd
stow: Add directories for fish, gpg, and tmux
Note that all these new directories are spread across multiple commits
since I don't want any one commit to be *too* big.
2018-10-22 15:17:19 -04:00
Donovan Glover
ea351fef7e
stow: Add directories for git, plasma, and systemd
Since these config files are specific enough, they warrant their own
package directories.
2018-10-22 15:09:58 -04:00
Donovan Glover
a0e535b2b5
stow: Move bspwm-specific dotfiles to separate directory
Previously I wanted to stow everything at once, but now that I know how
to use Makefiles a bit more, I can still stow everything at once with
multiple directories. Additionally, this allows people (myself included)
to only stow the dotfiles they want, such as only vim or only fish.

Instead of separating *every* file into its own directory, I've opted
instead to group common configs together and only use separate
directories where they make sense (e.g. a vim config).
2018-10-22 15:03:01 -04:00
Donovan Glover
c931883f52
Use urxvtc instead of urxvtcd
Since urxvtd is now managed with systemd, starting an init script like
urxvtcd is no longer necessary.
2018-10-22 01:02:06 -04:00
Donovan Glover
b9ea57bc2d
polybar: Slight refactor to config file
Since padding-left and padding-right will always be the same in this
case, I've gone ahead and made it simply "padding".

Since keys can use the values from other keys, some duplication in the
module sections can be avoided.
2018-10-21 22:10:13 -04:00
Donovan Glover
92adb1f1bb
bspwm: Don't use single_monocle by default
Having a monocle-like layout on a tiled desktop layout is more
confusing than it needs to be. If single_monocle is ever needed,
it can be manually set on-demand instead.
2018-10-21 21:58:03 -04:00
Donovan Glover
fd7033e670
rofi: Change vim:ft to vim:syn
Setting the file type of a file is different than simply changing its
syntax. In this case, the rofi config was treated as a real .java file.
By setting syntax explicitly, we avoid re-declaring the filetype.
2018-10-21 21:51:01 -04:00
Donovan Glover
2af72a066c
sxhkd: Clean up config
I don't need to query the current node's state anymore since I now
understand the differences between each node state and desktop layout
in bspwm.
2018-10-21 21:39:08 -04:00
Donovan Glover
2f4aa0e865
sxhkd: Simplify terminal options
Since urxvt and termite now look very similar to each other (except for
transparency), and since images do not play nicely in tmux / transparent
windows, it makes sense to separate tasks between the two.
2018-10-21 21:36:08 -04:00
Donovan Glover
d97175b059
Add code config
Sometimes you may want to use an editor that is Not Vim. Although such
an editor may be feasible for the majority of users, an editor that is
Not Vim will not behave exactly like Vim, even with plugins.

Existing Vim users should not try to use Code as an editor. It is
instead a useful editor for when someone needs to use a Non Vim editor
on your machine (although you certainly should *not* condone this).

Code does, however, feature a useful file explorer that requires no
configuration nor maintenance to use. It just works.
2018-10-21 14:29:34 -04:00
Donovan Glover
59dc5d1b3a
sxhkd: Don't hardcode top_padding for polybar
Since launch.sh calculates all the bar values for us (as well as bspwm
settings), we can simply store the top_padding value in the user's cache
directory, then reference that number within sxhkd.

This way, if the top_padding value is changed through launch.sh, editing
sxhkdrc manually isn't needed, and the config file doesn't need to be
reloaded.
2018-10-21 11:33:54 -04:00
Donovan Glover
14fa7d6c52
polybar: Get host width from bspc
Although width can also be found through xrandr, it felt a bit messy to
parse output that wasn't meant to be parsed by other programs.

Since I can guarantee that the user will have bspwm (and not xrandr)
installed, I decided to use bspc instead. The current setup only works
for one monitor, but it should be relatively painless to setup multiple
monitors in the future (assuming they share the same dpi).
2018-10-21 11:21:32 -04:00
Donovan Glover
22a4e548d1
bspwm: Update polybar command
Since passing no options is the equivalent of not wanting to use
a bar, we pass "main" here instead.
2018-10-21 10:57:53 -04:00
Donovan Glover
41f46f38f2
polybar: Handle dynamic settings through launch.sh
Since polybar supports include files, we can generate part of the bar
config with launch.sh and store it in $HOME/.cache. Since launch.sh is
a shell script, and since bspc is an interface to bspwm, we can also
change the necessary window manager settings required for different
bars, or even configure the settings for no bar at all.

A future implementation of launch.sh may allow us to change polybar
dimensions based on current resolution and whether the screen is HiDPI
or not, although it probably won't be *too* fancy since I don't need to
support every potential DPI a user may have.

Alternatively, someone could submit a patch for polybar to make it
DPI-aware. This is the ideal solution since the bar would be scaled
naturally based on dpi, instead of having to manually halve things
ourselves.
2018-10-20 20:39:02 -04:00
Donovan Glover
b6f1aeb619
bspwm: Remove polybar-specific styles
I used to not know much about shell scripting, but now that I do,
polybar-specific bspc commands can be handled through the launch.sh
shell script instead of directly from bspwmrc.

This lets us launch different bar styles with different bspc options, or
even set styles for no bar at all.
2018-10-20 20:05:35 -04:00
Donovan Glover
29d6a73d75
polybar: Use inheritance for bars
Maybe this is a new feature of polybar, or maybe I've never read the
documentation thoroughly enough. This commit adds inheritance for my
floating bar and top bar, so that duplication isn't necessary.

This makes things a lot easier to see and understand. There is also a
way to include other files, which may be useful for automatically
generating key value pairs for polybar based on screen resolution.

It may also be used to set different variables (i.e. colors) based on
which bar is used. Pretty handy.
2018-10-20 14:19:22 -04:00
Donovan Glover
7b7d69cffb
polybar: Space out the config file
The added spacing here helps to differentiate between keys, values, and
sections.
2018-10-20 13:41:56 -04:00
Donovan Glover
cc7a249fae
polybar: Add labels for bspwm status
Now that I understand the difference between the monocle desktop
layout and the fullscreen state of a node, it became clear that I
would probably use both.

Since I use the single_monocle config option, desktops with the
tiled layout may contain a monocle node, so I needed a way to tell
which layout a desktop was running.

I initially thought about using sxhkd to send a notification with
the layout portion of bspc query -T -d, however polybar supports
showing the layout natively, so I don't need to use a keybind.

The layout portion of the polybar config may not be needed if, for
example, you decide to disable single_monocle and there is no ambiguity
between fullscreen nodes and monocle desktops.
2018-10-20 13:04:39 -04:00
Donovan Glover
b4b86215b5
sxhkd: Remove resize keybinds
I don't think I've ever used these keybinds after I learned about
holding the left mouse button to move windows and holding the right
mouse button to resize them.

If you don't have access to a mouse, you probably don't need to resize
windows anyway, and certainly not float them. tmux is still an option,
and the preselect ratio option of bspc is still there.

Ultimately, since sxhkd just runs shell commands, you can resize windows
through a terminal or shell script as well.
2018-10-20 10:30:58 -04:00
Donovan Glover
9595c8093d
sxhkd: Refactor bspc keybinds
This commit also removes the "switch to previous node" keybind, since
an option like that changes often and may behave unexpectedly if
another node is focused with the cursor.
2018-10-20 10:20:37 -04:00
Donovan Glover
3b8b3bece4
sxhkd: Move non-bspc commands to the top
The sxhkdrc becomes much easier to manage when all the window manager
commands are at the bottom together.
2018-10-20 03:02:52 -04:00
Donovan Glover
4dfdc10f53
sxhkd: Properly toggle polybar visibility
I tried to do this before, but couldn't figure it out. Now that I
understand more about how windows in X11 work, and now that I know more
about shell scripting, writing this functionality became trivial to do.
2018-10-19 17:33:36 -04:00
Donovan Glover
dfe0e61daf
sxhkd: Combine similar keybindings
There is a shorthand syntax offered by sxhkd that helps us make our
config files more compact. I avoided this syntax at first since I was
new to the software, but now that I've used bspc, sxhkd, and the shell
enough, the shorthand syntax is more concise and easier to read.
2018-10-19 17:17:31 -04:00
Donovan Glover
09e8c16489
Fix bspwm terminology in sxhkdrc
I once tried to simplify bspwm terminology back when I started using the
WM. Although it helped me use bspwm in the short term, there were some
things I was still confused about (for example, I did not know the
difference between a node with the fullscreen state and desktop with the
monocle layout).

This commit fixes that.
2018-10-19 15:11:49 -04:00
Donovan Glover
d42738f4b9
Toggle node modes natively with bspc
There is no need to check for whether or not a certain mode is set,
since bspc has a feature that automatically uses the previous mode if
the same mode was detected.

Also, "monocle" is a desktop layout, not a node mode. And modes are
states, not modes. I confused the terminology quite a bit when I was
starting out with bspwm (maybe to make the transition easier?) but now
that I've used it long enough, I feel comfortable using the proper
terminology. All future bspwm-related commits should (hopefully) contain
the proper wording.
2018-10-19 13:55:31 -04:00
Donovan Glover
a4982e767b
Truly toggle between tiled and fullscreen
I don't know why I couldn't implement it before, but now that I know
more about shell scripting, I know that this works. There's an even
better solution I found in the bspc man pages, which will be covered
in the next commit.
2018-10-19 13:27:48 -04:00
Donovan Glover
30b1f57ebf
Add keybind for current node's mode
This is an example of how to use dunst with sxhkd to show notifications
on demand.
2018-10-19 11:25:53 -04:00
Donovan Glover
fdad3fe1fa
Change default cursor shape to pointer in bspwm
This is required if you want to get rid of the X shaped cursor that
shows by default for programs that don't specify a specific cursor.
2018-10-19 11:08:07 -04:00
Donovan Glover
193a152ff6
Set default cursor theme to breeze_cursors
This sets the cursor to breeze_cursors by default in our window manager.
Now we have a universal theme cursor for both the window manager and
GTK / KDE applications.
2018-10-19 11:01:39 -04:00
Donovan Glover
9e5450f25b
Update lightline config in .vimrc
wal.vim includes a color scheme for lightline, but it only plays nicely
with neovim. This commit conditionally loads the wal color scheme since
using it in vim will throw multiple errors.
2018-10-19 10:55:37 -04:00
Donovan Glover
96c3cc949f
Fix termite padding to support changing color schemes
The solution I used previously for padding in termite did not change the
padding color when other software such as pywal changed the color scheme.

This fixes that, so now it is possible to change color schemes
fully in termite without having to spawn a new terminal. This is
very nice, and also works well with termite's transparency feature.
2018-10-18 14:39:58 -04:00
Donovan Glover
18082b5ddc
Add git checkout abbreviation 2018-10-18 14:18:29 -04:00
Donovan Glover
5e1de9b170
Add netrw config to .vimrc
netrw is the default file browser in vim. It works exceptionally well,
so I use it over other plugins that provide the same functionality.
2018-10-18 14:14:58 -04:00