diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..bf991b1 --- /dev/null +++ b/.bashrc @@ -0,0 +1,89 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# variables +export PATH=$PATH:/usr/sbin:/sbin + +export LESSHISTFILE=- +export VIMINIT='source $HOME/.config/vim/vimrc' +export LC_COLLATE="C" + +export WLR_NO_HARDWARE_CURSORS=1 + +# aliases +alias config='/usr/bin/git --git-dir=$HOME/.config.remote/ --work-tree=$HOME' +alias poweroff='shutdown -h now' + +alias cls='clear' +alias ls='ls -laA --group-directories-first --color=auto' diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..b067d69 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,211 @@ +# Default config for sway +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + +### Variables +# +# Logo key. Use Mod1 for Alt. +set $mod Mod1 +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +set $term foot +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +set $menu dmenu_path | dmenu | xargs swaymsg exec -- + +include /etc/sway/config-vars.d/* + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) +output * background #282828 solid_color +# +# Example configuration: +# +# output HDMI-A-1 resolution 1920x1080 position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +### Idle configuration +# +# Example configuration: +# +# exec swayidle -w \ +# timeout 300 'swaylock -f -c 000000' \ +# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ +# before-sleep 'swaylock -f -c 000000' +# +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. + +### Input configuration +# +# Example configuration: +# +# input "2:14:SynPS/2_Synaptics_TouchPad" { +# dwt enabled +# tap enabled +# natural_scroll enabled +# middle_emulation enabled +# } +# +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+Return exec $term + + # Kill focused window + bindsym $mod+Shift+q kill + + # Start your launcher + bindsym $mod+d exec $menu + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' +# +# Moving around: +# + # Move your focus around + bindsym $mod+$left focus left + bindsym $mod+$down focus down + bindsym $mod+$up focus up + bindsym $mod+$right focus right + # Or use $mod+[up|down|left|right] + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+$left move left + bindsym $mod+Shift+$down move down + bindsym $mod+Shift+$up move up + bindsym $mod+Shift+$right move right + # Ditto, with arrow keys + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right +# +# Workspaces: +# + # Switch to workspace + bindsym $mod+1 workspace number 1 + bindsym $mod+2 workspace number 2 + bindsym $mod+3 workspace number 3 + bindsym $mod+4 workspace number 4 + bindsym $mod+5 workspace number 5 + bindsym $mod+6 workspace number 6 + bindsym $mod+7 workspace number 7 + bindsym $mod+8 workspace number 8 + bindsym $mod+9 workspace number 9 + bindsym $mod+0 workspace number 10 + # Move focused container to workspace + bindsym $mod+Shift+1 move container to workspace number 1 + bindsym $mod+Shift+2 move container to workspace number 2 + bindsym $mod+Shift+3 move container to workspace number 3 + bindsym $mod+Shift+4 move container to workspace number 4 + bindsym $mod+Shift+5 move container to workspace number 5 + bindsym $mod+Shift+6 move container to workspace number 6 + bindsym $mod+Shift+7 move container to workspace number 7 + bindsym $mod+Shift+8 move container to workspace number 8 + bindsym $mod+Shift+9 move container to workspace number 9 + bindsym $mod+Shift+0 move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + bindsym $mod+b splith + bindsym $mod+v splitv + + # Switch the current container between different layout styles + bindsym $mod+s layout stacking + bindsym $mod+w layout tabbed + bindsym $mod+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+Shift+space floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# Scratchpad: +# + # Sway has a "scratchpad", which is a bag of holding for windows. + # You can send windows there and get them back later. + + # Move the currently focused window to the scratchpad + bindsym $mod+Shift+minus move scratchpad + + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + bindsym $mod+minus scratchpad show +# +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +gaps outer 10 + +# +# Status Bar: +# +# Read `man 5 sway-bar` for more information about this section. +bar { + swaybar_command waybar +} + +include /etc/sway/config.d/* diff --git a/.config/vim/vimrc b/.config/vim/vimrc new file mode 100644 index 0000000..c3def96 --- /dev/null +++ b/.config/vim/vimrc @@ -0,0 +1,22 @@ +syntax on + +set encoding=utf8 +set nobackup nowb noswapfile + +set viminfo= +set runtimepath^=$HOME/.config/vim + +set relativenumber +set autoindent expandtab smarttab tabstop=2 shiftwidth=2 +set so=7 " keep up to 7 lines visible during scrolling. + +set incsearch hlsearch ignorecase + +set noerrorbells novisualbell + +"= netrw +let g:netrw_keepdir = 0 +let g:netrw_winsize = 20 +let g:netrw_banner = 0 + +let g:netrw_localcopydircmd = "cp -r" diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc new file mode 100644 index 0000000..e8fca53 --- /dev/null +++ b/.config/waybar/config.jsonc @@ -0,0 +1,32 @@ +{ + "layer": "top", + "position": "right", + "height": "100%", + "width": 30, + "margin-right": 10, + "margin-top": 10, + "margin-bottom": 10, + + "modules-left": [ + "sway/workspaces" + ], + + "modules-right": [ + "clock" + ], + + "sway/workspaces": { + "disable-scroll": true, + "persisten_workspace": { + "1": [], + "2": [], + "3": [] + } + }, + + "clock": { + "timezone": "Europe/Amsterdam", + "format": "{:%H\n%M\n%S}", + "interval": 1 + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..6c3ce83 --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,31 @@ +* { + border: none; + text-shadow: none; + box-shadow: none; + border-radius: 0; + font-weight: 600; + font-size: 12.7px; + margin: 0; + padding: 0; +} + +#waybar { + background-color: rgba(28, 28, 28, 1); + border-radius: 5px; +} + +#workspaces { + margin-top: 5px; + padding: 0; +} + +#workspaces button { + color: #FFFFFF; + margin: 0; + padding: 0; +} + +#clock { + margin-bottom: 5px; + color: #FFFFFF; +} diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..37eff21 --- /dev/null +++ b/install.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -xe + +## initial + +apt update +apt upgrade + +## rights +apt install -y sudo + +## group (sudo permissions) +# we create a new group to prevent the annoying .sudo_as_admin_succesfull. + +export PATH=$PATH:/usr/sbin + +groupadd -r wheel +usermod -aG wheel rhjr +usermod -aG input rhjr + +echo "%wheel ALL=(ALL:ALL) ALL" > /etc/sudoers +gpasswd --delete rhjr sudo +gpasswd --delete rhjr admin + +## workspace +mkdir -p /home/rhjr/devel +mkdir -p /home/rhjr/documents +mkdir -p /home/rhjr/downloads +mkdir -p /home/rhjr/programs +mkdir -p /home/rhjr/machines +mkdir -p /home/rhjr/scratch + +## environment +apt install -y \ + sway mesa-utils + +## development +apt install -y \ + git file \ + vim \ + build-essential + +## user +apt install -y neofetch + +apt install -y \ + sway \ + waybar