Skip to content

Script to install and configure a complete workspace in a fully automated way

License

Notifications You must be signed in to change notification settings

procamora/custom_workspace

Repository files navigation

CircleCI license Maintenance GitHub last commit

custom_workspace

custom_workspace is a script to install and configure a complete workspace in a fully automated way. The utilities to be installed and configured are the following:

  • bspwm: It is a mosaic type window manager that works with shortcuts and that will be put as a desktop environment.
  • sxhkd: This is a shortcuts manager that we will use to control bspwm.
  • compton: This is the transparency manager that we will use to put transparencies to the windows.
  • dunst: notification daemon
  • feh: This is a lightweight, configurable and versatile image viewer that allows us to set up wallpapers.
  • rofi: it is a program launcher in the form of an interactive list.
  • Hack Nerd Font: These are the fonts we're going to use for the zsh Powerlevel10k theme.
  • polybar: It's a highly configurable taskbar builder.
  • i3-lock: It's a simple screen locker.
  • vim: Is the default text editor, it will put an advanced configuration with a series of plugins using the amix configuration.
  • zsh: It will put this shell by default, using the configuration of Oh My Zsh and the theme Powerlevel10k.

workspace

Getting Started

Requirements

Execute the script with a user with permissions to execute the sudo command and execute the script from bash to avoid problems when installing or reinstalling zsh

Recommendation:

  • Execute the script from a console other than konsole, so that the profile with the specific configuration of konsole can be applied correctly.

  • If it is done from konsole, later it can be executed from another console so that the profile is applied in the following way:

  • It is important to run the script with the user who is going to use the system. The script executes the commands with sudo when necessary so you should not execute the script with sudo.

./custom_workspace.sh _konsole

Basic Installation

To install the workspace it is necessary to download the project and run the script, which takes care of downloading and configuring all the tools:

git clone https://github.com/procamora/custom_workspace.git
cd custom_workspace/
chmod u+x custom_workspace.sh
./custom_workspace.sh all > output.log

Running the script again regenerates the default settings. You can also leave some parts as default:

./custom_workspace.sh all       # all packages
./custom_workspace.sh bspwm     # bspqm + polybar + i3lock
./custom_workspace.sh vim       # vim
./custom_workspace.sh zsh       # zsh
./custom_workspace.sh _polybar  # polybar

help

Compatibility

This script has been tested on the following Operating Systems

Tested Operating Systems

  • Fedora (33)
  • Ubuntu (19.04)
  • Debian (10)
  • Raspbian 10

Pending Operating Systems

  • Arch
  • OpenSUSE
  • Kali

Program requirements

  • Dolphin
  • Konsole
  • ksysguard
  • bat: alias to cat
  • lsd: alias to ls

Customization

The configuration files and/or directories of the different programs are as follows:

  • bspwm: ~/.config/bspwm/
  • sxhkd: ~/.config/sxhkd/
  • compton: ~/.config/compton/
  • polybar: ~/.config/polybar/
  • i3-lock: __
  • vim: /opt/vim_runtime/
  • zsh: ~/.zshrc y ~/.p10k.zsh

Shortcut

In case we don't know the name of the key we want to assign a shortcut to with sxhkd, we can use the xev utility to get the name of that key, we can see below an example for the PrtScn key:

sudo dnf install -y XBindKeys

# url: https://unix.stackexchange.com/questions/120199/how-to-detect-global-key-presses
xev | /bin/grep -A2 --line-buffered '^KeyRelease' \
    | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'

Getting the next output:

107 Print

So now we only need to indicate the shortcut in sxhkd so that when we press the PrtScn key we will have the desired screenshot utility:

Print
    spectacle

Backgroud

Replace image

~/.config/wallpaper.png

Debug mode

We can activate the uncommented debeg mode the third line (set -ex) of the script custom_workspace.sh or executing it with the command bash -x

bash -x  custom_workspace.sh

The output of the package download commands is redirected to a log file, we can see them with the command:

tail -f dnf.log
tail -f apt.log

The basic configuration used has been taken from the s4vitar video: Cómo configurar un buen entorno de trabajo en Linux.

About

Script to install and configure a complete workspace in a fully automated way

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published