diff options
Diffstat (limited to '')
| -rw-r--r-- | README.md | 56 | ||||
| -rw-r--r-- | fetcha/Makefile | 2 | ||||
| -rw-r--r-- | fetcha/fetcha.c | 2 | ||||
| -rwxr-xr-x | install | 32 | ||||
| -rwxr-xr-x | install.sh | 41 | ||||
| -rw-r--r-- | tmux/tmux.conf | 63 | ||||
| -rw-r--r-- | vis/colors/rose-pine | 6 | ||||
| -rw-r--r-- | vis/config | 3 |
8 files changed, 55 insertions, 150 deletions
@@ -2,41 +2,38 @@ My personal suckless setup. -- Rosé Pine color scheme and JetBrainsMono Nerd Font by default (colors from [Rosé Pine for st](https://github.com/rose-pine/st)) -- General purpose keybindings: - - Alt+Shift+D: Opens Discord - - Alt+Shift+F: Opens Firefox - - PrtScr: Opens Flameshot - ## Dependencies + Install necessary packages (Arch Linux specific, other distros will differ) ```sh -sudo pacman -S picom feh flameshot ttf-jetbrains-mono-nerd libqalculate +sudo pacman -S ttf-jetbrains-mono-nerd libqalculate ``` +It's also recommended to start dwm and other related software through xinit, my main [dotfiles repo](https://git.sr.ht/~pml68/dotfiles) contains the needed configurations. + +### Optional dependencies + +- `feh` and `picom`: for the wallpaper and compositing, respectively. The install script will detect their availability and install configurations accordingly. +- `firefox`, `simplemoji`, `flameshot`, `discord`, `pulsemixer`, `adb`: some keybinds launch these programs. + ## Installation -### Manual +### Automated Clone the repo ```sh git clone https://git.sr.ht/~pml68/suckless-setup -cd suckless-setup/ +cd suckless-setup ``` -Replace config files +Simply run the included script with root permissions. ```sh -sudo cp picom.conf /etc/xdg/picom.conf - -# optional -cp vis -r ~/.config/ # for https://github.com/dpayne/cli-visualizer - -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -cp tmux -r ~/.config - -# Start tmux, and install necessary plugins with C-a I +chmod +x install +sudo ./install ``` +### Manual + Build and install each suckless program ```sh cd dwm @@ -45,30 +42,21 @@ cd .. cd dmenu sudo make clean install +cd .. + # ... ``` +#### Optional + Set the background ```sh feh --bg-fill wallpaper.jpg ``` -Update your .xinitrc file +Copy over the picom configuration ```sh -# ... -~/.fehbg & -picom & -flameshot & -slstatus & -exec dwm -``` - -### Automated - -Simply run the included script -```sh -chmod +x install.sh -./install.sh +sudo cp picom.conf /etc/xdg/picom.conf ``` # Screenshot: diff --git a/fetcha/Makefile b/fetcha/Makefile index d4e13c2..95b2464 100644 --- a/fetcha/Makefile +++ b/fetcha/Makefile @@ -5,7 +5,7 @@ VERSION = 1.0.0 CC = cc CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" -CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -MMD ${CPPFLAGS} +CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Wno-format-truncation -Os -MMD ${CPPFLAGS} LDFLAGS = -lX11 SRC = fetcha.c modules.c diff --git a/fetcha/fetcha.c b/fetcha/fetcha.c index 12b80ce..2466b71 100644 --- a/fetcha/fetcha.c +++ b/fetcha/fetcha.c @@ -517,6 +517,4 @@ main(void) free_ascii(&art); return 0; - - } @@ -0,0 +1,32 @@ +#!/bin/sh +programs="dwm dmenu slstatus st fetcha" + +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +if [ "$(id -u)" -eq 0 ] || [ -n "$SUDO_UID" ]; then + read -p "Install laptop configuration instead of desktop? [y/N] " laptop + if [ "$laptop" = "y" ] || [ "$laptop" = "Y" ]; then + git apply laptop.diff + fi + + for program in $programs; do + (cd "$program" && echo "Starting $program installation" && make -s clean install && echo "$program installation complete" && make -s clean) + done + + if command_exists picom; then + echo "Copying picom configuration" + cp picom.conf /etc/xdg/picom.conf + fi +else + echo "No root permissions, skipping installation of suckless programs and picom config" +fi + + +if command_exists feh; then + echo "Creating ~/.fehbg" + echo '#!/bin/sh' > ~/.fehbg + echo "feh --no-fehbg --bg-fill $(pwd)/wallpaper.jpg" >> ~/.fehbg + chmod 755 ~/.fehbg +fi diff --git a/install.sh b/install.sh deleted file mode 100755 index 5b071b5..0000000 --- a/install.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -programs="dwm dmenu slstatus st fetcha" - -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -has_root_perms() { - [ "$(id -u)" -eq 0 ] || [ -n "$SUDO_UID" ] -} - -for program in $programs; do - has_root_perms && (cd "$program" && echo "starting $program installation" && make clean install && echo "$program installation complete") || echo "Can't install $program: you must run the script as root or with sudo." -done - -if command_exists picom; then - if ! has_root_perms; then - echo "Can't install picom configuration: you must run the script as root or with sudo." - exit 1 - fi - - cp picom.conf /etc/xdg/picom.conf - echo "picom &" >>~/.xinitrc -fi - -if command_exists feh; then - feh --bg-fill wallpaper.jpg - echo "~/.fehbg &" >>~/.xinitrc -fi - -command_exists flameshot && echo "flameshot &" >>~/.xinitrc - -command_exists vis && cp vis -r ~/.config/ - -if command_exists tmux; then - git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - cp tmux -r ~/.config/ -fi - -echo "slstatus &" >>~/.xinitrc -echo "exec dwm" >>~/.xinitrc diff --git a/tmux/tmux.conf b/tmux/tmux.conf deleted file mode 100644 index f172bd2..0000000 --- a/tmux/tmux.conf +++ /dev/null @@ -1,63 +0,0 @@ -set -g default-terminal "tmux-256color" -set -ga terminal-features "*:hyperlinks" -set -g prefix C-a -unbind C-b - -bind -r n next-window -bind -r p previous-window -bind -r C-n switch-client -n -bind -r C-p switch-client -p -bind Q confirm-before -p "Kill session #S? (y/n)" kill-session - -unbind % -bind v split-window -h -c "#{pane_current_path}" -unbind '"' -bind - split-window -v -c "#{pane_current_path}" - -bind R source-file ~/.config/tmux/tmux.conf - -bind -r j resize-pane -D 5 -bind -r k resize-pane -U 5 -bind -r l resize-pane -R 5 -bind -r h resize-pane -L 5 -bind -r m resize-pane -Z - -set -g mouse on -set-option -g focus-events on - -set-window-option -g mode-keys vi -bind P paste-buffer -bind-key -T copy-mode-vi 'v' send-keys -X begin-selection -bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle -bind-key -T copy-mode-vi 'y' send-keys -X copy-selection -bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i' - -unbind -T copy-mode-vi MouseDragEnd1Pane - -bind-key -r C-c copy-mode - -bind-key -r i run-shell "tmux neww /usr/local/bin/cht.sh" -bind-key -n C-f run-shell "tmux neww /usr/local/bin/tmus" -bind-key -n C-t run-shell "tmux neww /usr/local/bin/check_todo.sh" - -set -gq allow-passthrough on - -set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-sensible' -set -g @plugin 'christoomey/vim-tmux-navigator' -set -g @plugin 'rose-pine/tmux' - -set -g @rose_pine_variant 'main' - -set -g @rose_pine_host 'on' -set -g @rose_pine_date_time '' -set -g @rose_pine_user 'on' -set -g @rose_pine_directory 'on' -set -g @rose_pine_bar_bg_disable 'on' - -set -g @rose_pine_bar_bg_disabled_color_option 'default' - -set -g @rose_pine_width_to_hide '80' -set -g @rose_pine_window_count '5' - -run '~/.tmux/plugins/tpm/tpm' diff --git a/vis/colors/rose-pine b/vis/colors/rose-pine deleted file mode 100644 index 1195d37..0000000 --- a/vis/colors/rose-pine +++ /dev/null @@ -1,6 +0,0 @@ -#31748f -#9ccfd8 -#c4a7e7 -#ebbcba -#f6c177 -#eb6f92 diff --git a/vis/config b/vis/config deleted file mode 100644 index e0fcb3f..0000000 --- a/vis/config +++ /dev/null @@ -1,3 +0,0 @@ -visualizer.spectrum.bar.width=1 -audio.stereo.enabled=false -colors.scheme=rose-pine |
