Browse Source

debian cwm config

master
Juni Kim 3 years ago
parent
commit
670160af4d
  1. 16
      dotfiles/.cwmrc
  2. 2
      dotfiles/.xinitrc
  3. 4
      dotfiles/cwm.sh
  4. 157
      user_debian.sh

16
dotfiles/.cwmrc

@ -0,0 +1,16 @@
command term kitty
bind-key 4-d dmenu_run
bind-key 4-f window-fullscreen
bind-key 4-Q window-close
bind-key 4-c window-cycle
bind-key 4-C window-rcycle
bind-key 4-h window-hide
bind-key 4-W firefox
bind-key 4-Return terminal
bind-key M-Up /usr/bin/pactl set-sink-volume 0 -5%
bind-key M-Down /usr/bin/pactl set-sink-volume 0 +5%
bind-key M-m /usr/bin/pactl set-sink-mute 0 toggle

2
dotfiles/.xinitrc

@ -0,0 +1,2 @@
xrandr -s 1440x900
exec dbus-run-session "$HOME/cwm.sh"

4
dotfiles/cwm.sh

@ -0,0 +1,4 @@
#!/bin/sh
nitrogen --restore &
openbsd-cwm

157
user_debian.sh

@ -0,0 +1,157 @@
#!/bin/sh
DIR="$(realpath "$(dirname "$0")")"
# script must start at home directory
cd "$HOME" || exit 1;
usertest() {
if test "$(id -u)" -eq 0; then
echo "You cannot run this script as root.";
exit 1;
fi
if ! (type sudo 2>&1) > /dev/null; then
echo "sudo is not installed.";
exit 1
fi
sudo apt install -y make curl
echo "Updating APT and adding PPA's"
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt update -y || exit 1
sudo apt upgrade -y || exit 1
}
dev() {
echo "Developer tools..."
sudo apt install -y libfuse2 fuse
# install neovim through appimage (no snaps)
sudo curl https://github.com/neovim/neovim/releases/download/v0.6.1/nvim.appimage -LJo "/usr/local/bin/nvim"
sudo chmod +x "/usr/local/bin/nvim"
# install nodejs (coc in neovim)
sudo apt-get update -y && sudo apt-get install -y nodejs
}
sysinfo() {
echo "Dylan Araps scripts"
cd "$HOME" || exit 1;
mkdir -p repos
git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch"
git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch"
git clone https://github.com/dylanaraps/fff "$HOME/repos/fff"
cd "$HOME/repos/pfetch" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/neofetch" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
cd "$HOME/repos/fff" || exit 1;
sudo make install || exit 2;
cd "$HOME" || exit 1;
}
shell() {
sudo apt install -y zsh
curl -sS https://starship.rs/install.sh | sh
}
browsers() {
sudo apt remove -y firefox
sudo snap remove firefox
# install brave
sudo apt install apt-transport-https -y
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update -y
sudo apt install brave-browser -y
}
torbrowser() {
sudo apt install -y torbrowser-launcher
}
popshell() {
mkdir -p "$HOME/repos"
sudo apt install git node-typescript make -y
git clone https://github.com/pop-os/shell.git "$HOME/repos/shell"
}
meetings() {
mkdir -p "$HOME/repos"
# install skype
curl https://go.skype.com/skypeforlinux-64.deb -LJo "$HOME/repos/skypeforlinux.deb"
sudo apt install "$HOME/repos/skypeforlinux.deb" -y
# install zoom
curl https://zoom.us/client/latest/zoom_amd64.deb -LJo "$HOME/repos/zoomus.deb"
sudo apt install "$HOME/repos/zoomus.deb" -y
# install mt
sudo curl -LJ https://github.com/junikimm717/mt/releases/download/33627ab/mt -o /usr/local/bin/mt
sudo chmod +x /usr/local/bin/mt
}
# neovim must be installed.
plugins() {
# install vim-plug, oh-my-zsh, and zsh-syntax-highlighting
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting"
}
dotfiles() {
echo "Adding vim and zsh configs"
if ! test -d "$DIR/dotfiles"; then
echo "$DIR/dotfiles folder not found.";
exit 1;
fi
mkdir -p "$HOME/.config/nvim"
cp "$DIR/dotfiles/.zshrc" "$HOME/.zshrc"
cp "$DIR/dotfiles/init.vim" "$HOME/.config/nvim/init.vim"
nvim --headless +PlugInstall +qa
}
competitiveprogramming() {
echo "CP Compilers..."
sudo apt install clang clang-tools-extra
cd "$HOME" || exit 1;
git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp"
}
graphical() {
sudo apt install -y xorg xclip cwm nitrogen dmenu
# copy over the dotfiles
cp "$DIR/.cwmrc" "$DIR/cwm.sh" "$DIR/.xinitrc" "$HOME"
mkdir -p "$HOME/wallpaper"
}
sound() {
sudo apt install -y pulseaudio pipewire pavucontrol
sudo touch /etc/pipewire/media-session.d/with-pulseaudio
sudo cp /usr/share/doc/pipewire/examples/systemd/user/pipewire-pulse.* /etc/systemd/user/
systemctl --user daemon-reload
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user --now enable pipewire pipewire-pulse
}
(usertest && dev && sysinfo && shell && browsers && torbrowser && meetings && plugins && dotfiles) || exit 1
(graphical && sound) || exit 1
#(popshell) || exit 1
cat <<EOF
Stuff to do:
- Install pop-shell (make local-install)
- Install the coc extensions
- Settle brave key stuff
- Copy over the mt config files
- Wallpapers from wallhaven.cc
EOF
Loading…
Cancel
Save