diff options
author | Rafael Marçalo <raroma09@gmail.com> | 2023-09-10 23:41:32 +0100 |
---|---|---|
committer | Rafael Marçalo <raroma09@gmail.com> | 2023-09-10 23:41:32 +0100 |
commit | 91bc2fd5602cbf2a52c85ad657d5709c0deabf10 (patch) | |
tree | fd8b0d0b2f274f8219defa32526c3894045ea847 | |
parent | f2f62795c6bab466b9354bc417c123bf5f39db5f (diff) |
Started working on OpenBSD support
-rw-r--r-- | INSTALL/openbsd-install | 12 | ||||
-rwxr-xr-x | shell/.config/shell/env | 27 | ||||
-rwxr-xr-x | suckless/.local/src/compileSource | 62 | ||||
-rw-r--r-- | xenodm/.xsession | 8 |
4 files changed, 76 insertions, 33 deletions
diff --git a/INSTALL/openbsd-install b/INSTALL/openbsd-install index d7d64fd..a687cad 100644 --- a/INSTALL/openbsd-install +++ b/INSTALL/openbsd-install @@ -6,6 +6,7 @@ cd .. || exit CURDIR=$(pwd) +USERNAME=$(whoami) echo "######################" echo "# dotfiles Installer #" @@ -15,8 +16,13 @@ echo "######################" doas cp -rf ROOT/doas/doas.conf /etc doas cp -rf ROOT/hosts/hosts /etc +# Root Configurations +doas fw_update +doas syspatch +doas usermod -G operator,staff "$USERNAME" + # Install Required Programs -doas pkg_add git neovim stow zsh ncmpcpp xwallpaper newsboat zathura maim texlive_base ntp ffmpeg redshift htop xclip imageMagick transmission-gtk mpv mpd mpc nsxiv zathura zathura-pdf-mupdf zathura-ps yt-dlp automake lzop curl gimp kdenlive inkscape arandr unoconv node p7zip valgrind gdb universal-ctags gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-libav hplip cups simple-scan system-config-printer clang ffmpegthumbnailer neofetch cmatrix py3-pip password-store screenkey qemu virt-manager picom firefox go farbfeld keepassxc lf +doas pkg_add git neovim stow zsh ncmpcpp xwallpaper newsboat zathura maim texlive_base ntp ffmpeg redshift htop xclip imageMagick transmission-gtk mpv mpd mpc nsxiv zathura zathura-pdf-mupdf zathura-ps yt-dlp automake lzop curl gimp kdenlive inkscape arandr unoconv node p7zip gdb universal-ctags gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-libav hplip cups simple-scan system-config-printer ffmpegthumbnailer neofetch cmatrix py3-pip password-store screenkey qemu virt-manager picom firefox go farbfeld keepassxc vifm doas rcctl enable xenodm doas rcctl enable apmd @@ -25,9 +31,9 @@ doas rcctl enable apmd mkdir -p ~/Documents/PDF ~/Documents/Text ~/Documents/Disks ~/Documents/Archives ~/Documents/VMs ~/Downloads ~/Pictures/Screenshots ~/Pictures/GIMP ~/Videos/Recordings ~/Code ~/.config/git ~/.config/wallpaper ~/.local/share/gnupg ~/.local/share/pass # Deploy Dots -stow --target="$HOME" fonts man misc mpd ncmpcpp newsboat neovim npm picom shell scripts suckless sxiv X11 zathura zsh +stow --target="$HOME" fonts man misc mpd ncmpcpp newsboat neovim npm picom shell scripts suckless sxiv xenodm zathura zsh touch ~/.config/mpd/database ~/.config/mpd/log ~/.config/mpd/pid ~/.config/mpd/state ~/.config/mpd/sticker.sql -chsh -s /bin/zsh +chsh -s /usr/local/bin/zsh cd ~/.local/src && sh compileSource && cd "$CURDIR" || exit diff --git a/shell/.config/shell/env b/shell/.config/shell/env index 037b290..efc0556 100755 --- a/shell/.config/shell/env +++ b/shell/.config/shell/env @@ -1,6 +1,9 @@ #!/bin/sh # Profile file. Runs on login. Environmental variables are set here. +# Detecting Kernel Type +KERNEL=$(uname) + # Default programs export EDITOR="nvim" export TERMINAL="st" @@ -19,15 +22,12 @@ export LESSHISTFILE="-" export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc-2.0 export ELECTRUMDIR="$XDG_DATA_HOME"/electrum export ZDOTDIR="$XDG_CONFIG_HOME"/zsh -export XAUTHORITY="$XDG_CONFIG_HOME"/X11/Xauthority export GNUPGHOME="$XDG_DATA_HOME"/gnupg export WINEPREFIX="$HOME"/Games/WINEPREFIX export ANDROID_SDK_ROOT="$XDG_DATA_HOME"/android-sdk export ANDROID_HOME="$XDG_DATA_HOME"/android-sdk -export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass export FFMPEG_DATADIR="$XDG_CONFIG_HOME"/ffmpeg -export KBCONFIG="$XDG_CONFIG_HOME"/X11/xkbconfig # Programming related export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java @@ -60,16 +60,21 @@ export VSCODE_PORTABLE="$XDG_DATA_HOME"/vscode export SUDO_ASKPASS="$HOME"/.local/bin/askpass export WALLPAPER="$XDG_CONFIG_HOME"/wallpaper/wallpaper.png export QT_QPA_PLATFORMTHEME=qt5ct -#export "$(dbus-launch)" # $PATH update export PATH="$HOME/.local/bin:$XDG_DATA_HOME/android-sdk:$XDG_DATA_HOME/npm/bin:$PATH" -# Shell daemons -pipewire & -pipewire-pulse & -# tor -f "$XDG_CONFIG_HOME"/tor/torrc & +# Linux specific settings +if [ "$KERNEL" = "Linux" ]; then + export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc + export XAUTHORITY="$XDG_CONFIG_HOME"/X11/Xauthority + + # Shell daemons + pipewire & + pipewire-pulse & + # tor -f "$XDG_CONFIG_HOME"/tor/torrc & -# Initializing Session if Xorg not Running Already -export SESSION=dwm -exec startx "$XINITRC" + # Initializing Session if Xorg not Running Already + export SESSION=dwm + exec startx "$XINITRC" +fi diff --git a/suckless/.local/src/compileSource b/suckless/.local/src/compileSource index ae288aa..f9595ab 100755 --- a/suckless/.local/src/compileSource +++ b/suckless/.local/src/compileSource @@ -5,6 +5,7 @@ ################### SRC=$(pwd) +KERNEL=$(uname) ################################# # Cloning and Cleaning Programs # @@ -12,26 +13,33 @@ SRC=$(pwd) git clone git@github.com:rafa-99/dmenu.git git clone git@github.com:rafa-99/dwm.git -git clone git@github.com:rafa-99/farbfeld.git -git clone git@github.com:rafa-99/neovimb.git git clone git@github.com:rafa-99/pkg.git git clone git@github.com:rafa-99/queryt.git -git clone git@github.com:rafa-99/sent.git git clone git@github.com:rafa-99/slock.git -git clone git@github.com:rafa-99/slstatus.git git clone git@github.com:rafa-99/st.git -git clone git@github.com:rafa-99/xmouseless.git + +if [ "$KERNEL" = "Linux" ]; then + git clone git@github.com:rafa-99/farbfeld.git + git clone git@github.com:rafa-99/neovimb.git + git clone git@github.com:rafa-99/sent.git + git clone git@github.com:rafa-99/slstatus.git + git clone git@github.com:rafa-99/xmouseless.git +fi + cd "$SRC"/dmenu && git pull ; cd "$SRC"/dwm && git pull ; -cd "$SRC"/farbfeld && git pull ; -cd "$SRC"/neovimb && git pull ; cd "$SRC"/pkg && git pull ; cd "$SRC"/queryt && git pull ; -cd "$SRC"/sent && git pull ; cd "$SRC"/slock && git pull ; -cd "$SRC"/slstatus && git pull ; cd "$SRC"/st && git pull ; -cd "$SRC"/xmouseless && git pull ; + +if [ "$KERNEL" = "Linux" ]; then + cd "$SRC"/farbfeld && git pull ; + cd "$SRC"/neovimb && git pull ; + cd "$SRC"/sent && git pull ; + cd "$SRC"/slstatus && git pull ; + cd "$SRC"/xmouseless && git pull ; +fi ########################## # Setting Configurations # @@ -39,12 +47,25 @@ cd "$SRC"/xmouseless && git pull ; [ ! -f "$SRC"/dmenu/config.h ] && cp -rf "$HOME"/.config/suckless/dmenu/config.h "$SRC"/dmenu/ ; [ ! -f "$SRC"/dwm/config.h ] && cp -rf "$HOME"/.config/suckless/dwm/config.h "$SRC"/dwm/ ; -[ ! -f "$SRC"/neovimb/src/config.h ] && cp -rf "$HOME"/.config/suckless/neovimb/config.h "$SRC"/neovimb/src ; -[ ! -f "$SRC"/sent/config.h ] && cp -rf "$HOME"/.config/suckless/sent/config.h "$SRC"/sent/ ; [ ! -f "$SRC"/slock/config.h ] && cp -rf "$HOME"/.config/suckless/slock/config.h "$SRC"/slock/ ; -[ ! -f "$SRC"/slstatus/config.h ] && cp -rf "$HOME"/.config/suckless/slstatus/config.h "$SRC"/slstatus/ ; [ ! -f "$SRC"/st/config.h ] && cp -rf "$HOME"/.config/suckless/st/config.h "$SRC"/st/ ; -[ ! -f "$SRC"/xmouseless/config.h ] && cp -rf "$HOME"/.config/suckless/xmouseless/config.h "$SRC"/xmouseless/ ; + +if [ "$KERNEL" = "Linux" ]; then + [ ! -f "$SRC"/neovimb/src/config.h ] && cp -rf "$HOME"/.config/suckless/neovimb/config.h "$SRC"/neovimb/src ; + [ ! -f "$SRC"/sent/config.h ] && cp -rf "$HOME"/.config/suckless/sent/config.h "$SRC"/sent/ ; + [ ! -f "$SRC"/slstatus/config.h ] && cp -rf "$HOME"/.config/suckless/slstatus/config.h "$SRC"/slstatus/ ; + [ ! -f "$SRC"/xmouseless/config.h ] && cp -rf "$HOME"/.config/suckless/xmouseless/config.h "$SRC"/xmouseless/ ; +else + ################# + # Apply Patches # + ################# + + cd "$SRC"/dwm && cat "$HOME"/.config/suckless/patches/dwm-openbsd.patch | patch -p1 + cd "$SRC"/dmenu && cat "$HOME"/.config/suckless/patches/dmenu-openbsd.patch | patch -p1 + cd "$SRC"/queryt && cat "$HOME"/.config/suckless/patches/queryt-openbsd.patch | patch -p1 + cd "$SRC"/slock && cat "$HOME"/.config/suckless/patches/slock-openbsd.patch | patch -p1 + cd "$SRC"/st && cat "$HOME"/.config/suckless/patches/st-openbsd.patch | patch -p1 +fi ######################## # Recompiling Programs # @@ -52,12 +73,15 @@ cd "$SRC"/xmouseless && git pull ; cd "$SRC"/dwm && git pull ; doas make clean install ; make clean cd "$SRC"/dmenu && git pull ; doas make clean install ; make clean -cd "$SRC"/farbfeld && git pull ; doas make clean install ; make clean -cd "$SRC"/neovimb && git pull ; doas make clean install ; make clean cd "$SRC"/pkg && git pull ; doas make clean install ; make clean cd "$SRC"/queryt && git pull ; doas make clean install ; make clean -cd "$SRC"/sent && git pull ; doas make clean install ; make clean cd "$SRC"/slock && git pull ; doas make clean install ; make clean -cd "$SRC"/slstatus && git pull ; doas make clean install ; make clean cd "$SRC"/st && git pull ; doas make clean install ; make clean -cd "$SRC"/xmouseless && git pull ; doas make clean install ; make clean + +if [ "$KERNEL" = "Linux" ]; then + cd "$SRC"/farbfeld && git pull ; doas make clean install ; make clean + cd "$SRC"/neovimb && git pull ; doas make clean install ; make clean + cd "$SRC"/sent && git pull ; doas make clean install ; make clean + cd "$SRC"/slstatus && git pull ; doas make clean install ; make clean + cd "$SRC"/xmouseless && git pull ; doas make clean install ; make clean +fi diff --git a/xenodm/.xsession b/xenodm/.xsession new file mode 100644 index 0000000..e2ddbf0 --- /dev/null +++ b/xenodm/.xsession @@ -0,0 +1,8 @@ +#!/bin/sh + +. "$HOME"/.config/shell/env +slstatus & +xwallpaper --stretch "$WALLPAPER" & +setxkbmap -option caps:super & +picom & +dwm |