Compare commits

..

4 Commits

Author SHA1 Message Date
654a6f70a8 add keyring, seahorse and libsecret 2022-05-03 18:13:50 +02:00
de1577d420 add sddm, remove greenclip, add polkit 2022-05-03 18:11:25 +02:00
c574e4cba6 remove ranger 2022-05-03 14:43:02 +02:00
3768caaa76 switch to sddm 2022-05-03 14:41:51 +02:00
10 changed files with 325 additions and 467 deletions

View File

@ -7,8 +7,9 @@ root = true
[*] [*]
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
indent_size = 2
# Matches multiple files with brace expansion notation # Matches multiple files with brace expansion notation
[*.{sh,py,yml}] [*.{sh,py,yml}]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

View File

@ -9,6 +9,7 @@ New version as of dec 2021:
[![dotfiles](media/dotfiles4.jpg)](https://raw.githubusercontent.com/Mastermindzh/dotfiles/master/media/dotfiles4.jpg) [![dotfiles](media/dotfiles4.jpg)](https://raw.githubusercontent.com/Mastermindzh/dotfiles/master/media/dotfiles4.jpg)
Older versions: Older versions:
- [dotfiles](media/dotfiles3.png) - [dotfiles](media/dotfiles3.png)
- [dotfiles](media/dotfiles.png) - [dotfiles](media/dotfiles.png)
- [dotfiles2](media/dotfiles2.png) - [dotfiles2](media/dotfiles2.png)
@ -25,7 +26,7 @@ Older versions:
| Terminal | xfce4-terminal | | Terminal | xfce4-terminal |
| Editor | nano | | Editor | nano |
| Code editor | vscode / jetbrains stuff | | Code editor | vscode / jetbrains stuff |
| Browser | Chromium | | Browser | Firefox |
| File manager | If I have to use one ... Nautilus | | File manager | If I have to use one ... Nautilus |
| Music | Tidal through [Tidal-hifi](https://github.com/Mastermindzh/tidal-hifi) | | Music | Tidal through [Tidal-hifi](https://github.com/Mastermindzh/tidal-hifi) |
| | | | | |

View File

@ -1,32 +0,0 @@
set preview_images true
set confirm_on_delete true
set column_ratios 1,3,4
set viewmode miller
set unicode_ellipsis true
set preview_files true
set preview_directories true
set collapse_preview true
# git stuff
set vcs_aware false
set vcs_backend_git enabled
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
# Draw borders around columns? (separators, outline, both, or none)
# Separators are vertical lines between columns.
# Outline draws a box around all the columns.
# Both combines the two.
set draw_borders both
# KEY config
map <delete> delete
map <esc> quit
map <C-c> copy
map <C-x> cut
map <C-v> paste

View File

@ -1,84 +0,0 @@
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
# $1-$9 | The n-th selected file
# $@ | All selected files
#
# If you use the special command "ask", rifle will ask you what program to run.
#
# Prefixing a condition with "!" will negate its result.
# These conditions are currently supported:
# match <regexp> | The regexp matches $1
# ext <regexp> | The regexp matches the extension of $1
# mime <regexp> | The regexp matches the mime type of $1
# name <regexp> | The regexp matches the basename of $1
# path <regexp> | The regexp matches the absolute path of $1
# has <program> | The program is installed (i.e. located in $PATH)
# env <variable> | The environment variable "variable" is non-empty
# file | $1 is a file
# directory | $1 is a directory
# number <n> | change the number of this command to n
# terminal | stdin, stderr and stdout are connected to a terminal
# X | $DISPLAY is not empty (i.e. Xorg runs)
#
# There are also pseudo-conditions which have a "side effect":
# flag <flags> | Change how the program is run. See below.
# label <label> | Assign a label or name to the command so it can
# | be started with :open_with <label> in ranger
# | or `rifle -p <label>` in the standalone executable.
# else | Always true.
#
# Flags are single characters which slightly transform the command:
# f | Fork the program, make it run in the background.
# | New command = setsid $command >& /dev/null &
# r | Execute the command with root permissions
# | New command = sudo $command
# t | Run the program in a new terminal. If $TERMCMD is not defined,
# | rifle will attempt to extract it from $TERM.
# | New command = $TERMCMD -e $command
# Note: The "New command" serves only as an illustration, the exact
# implementation may differ.
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
#-------------------------------------------
# Websites
#-------------------------------------------
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
ext x?html?, has chromium, X, flag f = chromium -- "$@"
#--------------------------------------------
# Video/Audio with a GUI
#-------------------------------------------
mime ^video, has mpv, X, flag f = mpv -- "$@"
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has evince, X, flag f = evince -- "$@"
ext pdf, has mupdf, X, flag f = mupdf "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
#-------------------------------------------
# Image Viewing:
#-------------------------------------------
mime ^image, has eog, X, flag f = eog -- "$@"
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image, has gimp, X, flag f = gimp -- "$@"
#-------------------------------------------
# Text files
#-------------------------------------------
ext xml|json|csv|tex|py|pl|rb|js|sh|php|md|ovpn|txt|cfg|conf = nano -- "$@"
# The very last action, so that it's never triggered accidentally, is to execute a program:
mime application/x-executable = "$1"

View File

@ -1,159 +0,0 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
## If the option `use_preview_script` is set to `true`,
## then this script will be called and its output will be displayed in ranger.
## Meanings of exit codes:
## code | meaning | action of ranger
## -----+------------+-------------------------------------------
## 0 | success | Display stdout as preview
## 1 | no preview | Display no preview at all
## 2 | plain text | Display the plain content of the file
## 3 | fix width | Don't reload when width changes
## 4 | fix height | Don't reload when height changes
## 5 | fix both | Don't ever reload
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
## 7 | image | Display the file directly as an image
## Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
## Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
# ## Archive
# a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
# rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
# atool --list -- "${FILE_PATH}" && exit 5
# bsdtar --list --file "${FILE_PATH}" && exit 5
# exit 1;;
# rar)
# ## Avoid password prompt by providing empty password
# unrar lt -p- -- "${FILE_PATH}" && exit 5
# exit 1;;
# 7z)
# ## Avoid password prompt by providing empty password
# 7z l -p -- "${FILE_PATH}" && exit 5
# exit 1;;
## PDF
pdf)
## Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | fmt -w "${PV_WIDTH}" && exit 5
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## OpenDocument
odt|ods|odp|sxw)
## Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
exit 1;;
## HTML
htm|html|xhtml)
## Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
## JSON
json)
jq --color-output . "${FILE_PATH}" && exit 5
;;
esac
}
handle_image() {
## Size of the preview if there are multiple options or it has to be
## rendered from vector graphics. If the conversion program allows
## specifying only one dimension while keeping the aspect ratio, the width
## will be used.
local DEFAULT_SIZE="1920x1080"
local mimetype="${1}"
case "${mimetype}" in
## Image
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
## If orientation data is present and the image actually
## needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
## ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
## `w3mimgdisplay` will be called for all images (unless overriden
## as above), but might fail for unsupported types.
exit 7;;
esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
## Text
text/* | */xml)
## Syntax highlight
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$( tput colors )" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
--out-format="${highlight_format}" \
--force -- "${FILE_PATH}" && exit 5
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
-- "${FILE_PATH}" && exit 5
exit 2;;
## Image
image/*)
## Preview as text conversion
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Video and audio
video/* | audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

128
config/sddm/default.conf Normal file
View File

@ -0,0 +1,128 @@
[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false
# Name of session file for autologin session (if empty try last logged in)
#Session=
# Username for autologin session
#User=mastermindzh
[General]
# Halt command
HaltCommand=/usr/bin/systemctl poweroff
# Input method module
InputMethod=
# Comma-separated list of Linux namespaces for user session to enter
Namespaces=
# Initial NumLock state. Can be on, off or none.
# If property is set to none, numlock won't be changed
# NOTE: Currently ignored if autologin is enabled.
Numlock=none
# Reboot command
RebootCommand=/usr/bin/systemctl reboot
[Theme]
# Current theme name
Current=chili
# Cursor theme used in the greeter
CursorTheme=
# Number of users to use as threshold
# above which avatars are disabled
# unless explicitly enabled with EnableAvatars
DisableAvatarsThreshold=7
# Enable display of custom user avatars
EnableAvatars=true
# Global directory for user avatars
# The files should be named <username>.face.icon
FacesDir=/usr/share/sddm/faces
# Font used in the greeter
Font=
# Theme directory path
ThemeDir=/usr/share/sddm/themes
[Users]
# Default $PATH for logged in users
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
# Comma-separated list of shells.
# Users with these shells as their default won't be listed
HideShells=
# Comma-separated list of users that should not be listed
HideUsers=root
# Maximum user id for displayed users
MaximumUid=60513
# Minimum user id for displayed users
MinimumUid=1000
# Remember the session of the last successfully logged in user
RememberLastSession=true
# Remember the last successfully logged in user
RememberLastUser=true
# When logging in as the same user twice, restore the original session, rather than create a new one
ReuseSession=true
[Wayland]
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/wayland-session
# Directory containing available Wayland sessions
SessionDir=/usr/share/wayland-sessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/wayland-session.log
[X11]
# Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup
# Path to a script to execute when stopping the display server
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false
# The lowest virtual terminal number that will be used.
MinimumVT=1
# Arguments passed to the X server invocation
ServerArguments=-nolisten tcp
# Path to X server binary
ServerPath=/usr/bin/X
# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/Xsession
# Directory containing available X sessions
SessionDir=/usr/share/xsessions
# Path to the user session log file
SessionLogFile=.local/share/sddm/xorg-session.log
# Path to the Xauthority file
UserAuthFile=.Xauthority
# Path to xauth binary
XauthPath=/usr/bin/xauth
# Path to Xephyr binary
XephyrPath=/usr/bin/Xephyr

View File

@ -18,3 +18,4 @@ dotnet-host-bin
sysmontask sysmontask
keychain keychain
nomachine nomachine
chili-sddm-theme

View File

@ -24,7 +24,6 @@ networkmanager
eog eog
python python
python-pip python-pip
gdm
neofetch neofetch
git git
scrot scrot
@ -65,7 +64,6 @@ flameshot
otf-font-awesome otf-font-awesome
openvpn openvpn
networkmanager-openvpn networkmanager-openvpn
ranger
w3m w3m
system-config-printer system-config-printer
nautilus nautilus
@ -87,3 +85,8 @@ blueman
pulseaudio-bluetooth pulseaudio-bluetooth
bluez bluez
bluez-libs bluez-libs
sddm
polkit-gnome
gnome-keyring
libsecret
seahorse

110
i3/config
View File

@ -35,7 +35,7 @@ set $workspace7 "7: "
set $workspace8 "8: " set $workspace8 "8: "
set $workspace9 "9: " set $workspace9 "9: "
set $workspace10 "10: " set $workspace10 "10: "
set $workspace11 " VM/Remote" set $workspace11 " VM/Remote"
set $workspace12 " Enpass" set $workspace12 " Enpass"
# scripts # scripts
@ -96,15 +96,15 @@ bindsym $mod+shift+alt+p focus parent
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
mode "resize" { mode "resize" {
# These bindings trigger as soon as you enter the resize mode # These bindings trigger as soon as you enter the resize mode
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape # back to normal: Enter or Escape
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
@ -130,7 +130,6 @@ bindsym $mod+d exec "rofi -show run"
bindsym $mod+Tab exec "rofi -show" bindsym $mod+Tab exec "rofi -show"
bindsym $mod+s exec "rofi -show ssh" bindsym $mod+s exec "rofi -show ssh"
bindsym $mod+n exec $vpnmanager bindsym $mod+n exec $vpnmanager
bindsym $mod+shift+v exec "rofi -modi 'clipboard:greenclip print' -show clipboard -run-command '{cmd}'"
############################################ ############################################
# Media keys # # Media keys #
@ -193,19 +192,19 @@ font pango:Liberation sans 13
# Bar decoration # Bar decoration
bar { bar {
status_command i3blocks -c ~/.config/i3/i3blocks.conf status_command i3blocks -c ~/.config/i3/i3blocks.conf
position top position top
strip_workspace_numbers no strip_workspace_numbers no
tray_output primary tray_output primary
colors { colors {
separator $textColour separator $textColour
background $primaryBackgroundColour background $primaryBackgroundColour
statusline $statusLineColour statusline $statusLineColour
# border background text # border background text
focused_workspace $primaryBackgroundColour $primaryBackgroundColour $focusedTextColour focused_workspace $primaryBackgroundColour $primaryBackgroundColour $focusedTextColour
active_workspace $primaryBackgroundColour $secondaryBackgroundColour $textColour active_workspace $primaryBackgroundColour $secondaryBackgroundColour $textColour
inactive_workspace $primaryBackgroundColour $primaryBackgroundColour $textColour inactive_workspace $primaryBackgroundColour $primaryBackgroundColour $textColour
urgent_workspace $primaryBackgroundColour $primaryBackgroundColour $urgentTextColour urgent_workspace $primaryBackgroundColour $primaryBackgroundColour $urgentTextColour
} }
} }
@ -232,7 +231,6 @@ for_window [class="Sysmontask"] resize set 930 665
# Workspace specific tools # # Workspace specific tools #
# Use xprop to determine class # # Use xprop to determine class #
############################################ ############################################
assign [class="Franz"] $workspace9
assign [class="Enpass-Desktop"] $workspace12 assign [class="Enpass-Desktop"] $workspace12
assign [class="VirtualBox Machine"] $workspace11 assign [class="VirtualBox Machine"] $workspace11
@ -240,7 +238,8 @@ assign [class="VirtualBox Machine"] $workspace11
assign [class="MongoDB Compass"] $workspace8 assign [class="MongoDB Compass"] $workspace8
assign [class="robo3t"] $workspace8 assign [class="robo3t"] $workspace8
assign [class="Mysql-workbench-bin"] $workspace8 assign [class="Mysql-workbench-bin"] $workspace8
assign [class="sqlops"] $workspace8 assign [class="azuredatastudio"] $workspace8
assign [class="beekeeper"] $workspace8
############################################ ############################################
# i3-gaps # # i3-gaps #
@ -255,15 +254,16 @@ gaps inner 10
bindsym $mod+Shift+plus gaps inner all plus 5 bindsym $mod+Shift+plus gaps inner all plus 5
bindsym $mod+Shift+minus gaps inner all minus 5 bindsym $mod+Shift+minus gaps inner all minus 5
bindsym $mod+Shift+Home gaps inner all set 10 bindsym $mod+Shift+Home gaps inner all set 10
bindsym $mod+Shift+a border normal
# Smart borders (draw borders around container only if it is not the only container on this workspace) # Smart borders (draw borders around container only if it is not the only container on this workspace)
smart_borders on smart_borders on
# Smart gaps (gaps used if only more than one container on the workspace) # Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on smart_gaps on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. # Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps.
# Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). # Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace).
# If you also press Shift with these keys, the change will be global for all workspaces. # If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
@ -271,35 +271,35 @@ set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps" bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" { mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer" bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner" bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
mode "$mode_gaps_inner" { mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5 bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5 bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0 bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5 bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5 bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0 bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
mode "$mode_gaps_outer" { mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5 bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5 bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0 bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5 bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5 bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0 bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
############################################ ############################################
@ -307,10 +307,8 @@ mode "$mode_gaps_outer" {
############################################ ############################################
exec --no-startup-id i3-msg 'workspace $workspace2; exec xfce4-terminal' && i3-msg 'workspace $workspace1' exec --no-startup-id i3-msg 'workspace $workspace2; exec xfce4-terminal' && i3-msg 'workspace $workspace1'
exec --no-startup-id i3-msg 'workspace $workspace12; exec enpass' exec --no-startup-id i3-msg 'workspace $workspace12; exec enpass'
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec_always feh --bg-scale $(find ~/Pictures/wallpapers/ -type f -name "*" | shuf -n 1) exec_always feh --bg-scale $(find ~/Pictures/wallpapers/ -type f -name "*" | shuf -n 1)
exec /usr/bin/compton exec /usr/bin/compton
exec /bin/bash ~/.config/i3/scripts/startup.sh exec /bin/bash ~/.config/i3/scripts/startup.sh
exec --no-startup-id greenclip daemon
bindsym $mod+Shift+a border normal

View File

@ -6,52 +6,52 @@
# Ask a question and return true or false based on the users input # Ask a question and return true or false based on the users input
ask() { ask() {
# from https://djm.me/ask # from https://djm.me/ask
local prompt default reply local prompt default reply
while true; do while true; do
if [ "${2:-}" = "Y" ]; then if [ "${2:-}" = "Y" ]; then
prompt="Y/n" prompt="Y/n"
default=Y default=Y
elif [ "${2:-}" = "N" ]; then elif [ "${2:-}" = "N" ]; then
prompt="y/N" prompt="y/N"
default=N default=N
else else
prompt="y/n" prompt="y/n"
default= default=
fi fi
echo -n "$1 [$prompt] " echo -n "$1 [$prompt] "
read -r reply </dev/tty read -r reply </dev/tty
if [ -z "$reply" ]; then if [ -z "$reply" ]; then
reply=$default reply=$default
fi fi
case "$reply" in case "$reply" in
[Yy]*) return 0 ;; [Yy]*) return 0 ;;
[Nn]*) return 1 ;; [Nn]*) return 1 ;;
esac esac
done done
} }
# delete target, create dirs if they don't exist yet and finally symlink the dir # delete target, create dirs if they don't exist yet and finally symlink the dir
function linkDir { function linkDir {
rm -rf "$2"; rm -rf "$2"
mkdir -p "${2%/*}" mkdir -p "${2%/*}"
ln -sf "$1" "$2" ln -sf "$1" "$2"
} }
# replace line endings with a space (for use in package managers) # replace line endings with a space (for use in package managers)
function fileToList { function fileToList {
echo $(cat "$1" | sed ':a;N;$!ba;s/\n/ /g') echo $(cat "$1" | sed ':a;N;$!ba;s/\n/ /g')
} }
# create and copy files to directory # create and copy files to directory
function copyToDir { function copyToDir {
echo "$2" | sed 's%/[^/]*$%/%' | xargs mkdir -p echo "$2" | sed 's%/[^/]*$%/%' | xargs mkdir -p
cp "$1" "$2" cp "$1" "$2"
} }
# ======================================= # =======================================
@ -60,124 +60,121 @@ function copyToDir {
# moves all fonts into the fonts directories (overwriting existing files) # moves all fonts into the fonts directories (overwriting existing files)
function install_fonts { function install_fonts {
mkdir -p ~/.fonts mkdir -p ~/.fonts
mkdir -p ~/.local/share/fonts mkdir -p ~/.local/share/fonts
cp -rf ./fonts/* ~/.fonts cp -rf ./fonts/* ~/.fonts
cp -rf ./fonts/* ~/.local/share/fonts cp -rf ./fonts/* ~/.local/share/fonts
} }
# install trizen, a aur helper # install trizen, a aur helper
function install_trizen { function install_trizen {
git clone https://aur.archlinux.org/trizen.git git clone https://aur.archlinux.org/trizen.git
pushd trizen || return pushd trizen || return
makepkg -si makepkg -si
popd || return popd || return
sudo rm -dRf trizen/ sudo rm -dRf trizen/
} }
# install other configs # install other configs
function install_config { function install_config {
# link directories # link directories
linkDir "$PWD"/wallpapers/images ~/Pictures/wallpapers linkDir "$PWD"/wallpapers/images ~/Pictures/wallpapers
linkDir "$PWD"/i3 ~/.config/i3 linkDir "$PWD"/i3 ~/.config/i3
linkDir "$PWD"/config/notify-osd/notify-osd ~/.notify-osd linkDir "$PWD"/config/notify-osd/notify-osd ~/.notify-osd
linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal linkDir "$PWD"/config/terminal/xfce4-term ~/.config/xfce4/terminal
linkDir "$PWD"/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/.config linkDir "$PWD"/config/gtk-3.0/settings.ini ~/.config/gtk-3.0/.config
linkDir "$PWD"/config/ranger ~/.config/
# link user files # link user files
ln -sf "$PWD"/bash/.bashrc ~/.bashrc ln -sf "$PWD"/bash/.bashrc ~/.bashrc
ln -sf "$PWD"/bash/.dotnet-install.sh ~/.dotnet-install.sh ln -sf "$PWD"/bash/.dotnet-install.sh ~/.dotnet-install.sh
ln -sf "$PWD"/bash/.alias.sh ~/.alias ln -sf "$PWD"/bash/.alias.sh ~/.alias
ln -sf "$PWD"/config/nano/.nanorc ~/.nanorc ln -sf "$PWD"/config/nano/.nanorc ~/.nanorc
ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json ln -sf "$PWD"/bash/.powerline-shell.json ~/.powerline-shell.json
ln -sf "$PWD"/config/gtk-3.0/settings.ini ~/.gtkrc-2.0.mine ln -sf "$PWD"/config/gtk-3.0/settings.ini ~/.gtkrc-2.0.mine
ln -sf "$PWD"/config/mimeapps.list ~/.config/mimeapps.list ln -sf "$PWD"/config/mimeapps.list ~/.config/mimeapps.list
mkdir -p ~/.config/rofi
ln -sf "$PWD"/config/rofi/rofi.rasi ~/.config/rofi/config.rasi
ln -sf "$PWD"/config/rofi/mytheme.rasi ~/.config/rofi/mytheme.rasi
ln -sf "$PWD"/config/.gitconfig ~/.gitconfig mkdir -p ~/.config/rofi
ln -sf "$PWD"/config/.npmrc ~/.npmrc ln -sf "$PWD"/config/rofi/rofi.rasi ~/.config/rofi/config.rasi
ln -sf "$PWD"/config/user-dirs.dirs ~/.config/user-dirs.dirs ln -sf "$PWD"/config/rofi/mytheme.rasi ~/.config/rofi/mytheme.rasi
mkdir -p ~/.pulse
ln -sf "$PWD"/config/pulse/daemon.conf ~/.pulse/daemon.conf ln -sf "$PWD"/config/.gitconfig ~/.gitconfig
ln -sf "$PWD"/config/.npmrc ~/.npmrc
ln -sf "$PWD"/config/user-dirs.dirs ~/.config/user-dirs.dirs
mkdir -p ~/.pulse
ln -sf "$PWD"/config/pulse/daemon.conf ~/.pulse/daemon.conf
ln -sf "$PWD"/config/picom.conf ~/.config/picom.conf ln -sf "$PWD"/config/picom.conf ~/.config/picom.conf
# link system files / directories # link system files / directories
sudo ln -sf "$PWD"/config/package-managers/pacman.conf /etc/pacman.conf sudo ln -sf "$PWD"/config/package-managers/pacman.conf /etc/pacman.conf
sudo ln -sf "$PWD"/config/package-managers/makepkg.conf /etc/makepkg.conf sudo ln -sf "$PWD"/config/package-managers/makepkg.conf /etc/makepkg.conf
sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf
sudo ln -sf "$PWD"/bash/Completion /etc/bash_completion.d sudo ln -sf "$PWD"/bash/Completion/ /etc/bash_completion.d
# create empty .custom alias file # create empty .custom alias file
echo "" > ~/.custom echo "" >~/.custom
echo "" > ~/.variables echo "" >~/.variables
# system fixes # system fixes
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf && sudo sysctl --system
mkdir -p ~/Pictures/Screenshots mkdir -p ~/Pictures/Screenshots
} }
# Installs the dependencies on Arch Linux # Installs the dependencies on Arch Linux
function install_dependencies { function install_dependencies {
fileToList dependencies/pacman.txt | xargs sudo pacman --noconfirm -S fileToList dependencies/pacman.txt | xargs sudo pacman --noconfirm -S
install_trizen install_trizen
fileToList dependencies/aur.txt | xargs trizen --force -S --noconfirm fileToList dependencies/aur.txt | xargs trizen --force -S --noconfirm
fileToList dependencies/pip.txt | xargs sudo pip install fileToList dependencies/pip.txt | xargs sudo pip install
fileToList dependencies/npm.txt | xargs sudo npm install -g fileToList dependencies/npm.txt | xargs sudo npm install -g
} }
# ======================================= # =======================================
# User output functions # User output functions
# ======================================= # =======================================
# Run the intro bit # Run the intro bit
function intro { function intro {
echo "___ ___ _ _ _ _ _ " echo "___ ___ _ _ _ _ _ "
echo "| \/ | | | (_) | | | | ( )" echo "| \/ | | | (_) | | | | ( )"
echo "| . . | __ _ ___| |_ ___ _ __ _ __ ___ _ _ __ __| |___| |__ |/ " echo "| . . | __ _ ___| |_ ___ _ __ _ __ ___ _ _ __ __| |___| |__ |/ "
echo "| |\/| |/ _\` / __| __/ _ \ '__| '_ \` _ \| | '_ \ / _' |_ / '_ \ " echo "| |\/| |/ _\` / __| __/ _ \ '__| '_ \` _ \| | '_ \ / _' |_ / '_ \ "
echo "| | | | (_| \__ \ || __/ | | | | | | | | | | | (_| |/ /| | | | " echo "| | | | (_| \__ \ || __/ | | | | | | | | | | | (_| |/ /| | | | "
echo "\_| |_/\__,_|___/\__\___|_| |_| |_| |_|_|_| |_|\__,_/___|_| |_| " echo "\_| |_/\__,_|___/\__\___|_| |_| |_| |_|_|_| |_|\__,_/___|_| |_| "
echo " " echo " "
echo " " echo " "
echo " __ _ _ " echo " __ _ _ "
echo " / _(_) ___ (_) " echo " / _(_) ___ (_) "
echo " ___ ___ _ __ | |_ _ __ _ ( _ ) _ __ _ ___ ___ " echo " ___ ___ _ __ | |_ _ __ _ ( _ ) _ __ _ ___ ___ "
echo " / __/ _ \| '_ \| _| |/ _\` | / _ \/\ | '__| |/ __/ _ \ " echo " / __/ _ \| '_ \| _| |/ _\` | / _ \/\ | '__| |/ __/ _ \ "
echo "| (_| (_) | | | | | | | (_| | | (_> < | | | | (_| __/ " echo "| (_| (_) | | | | | | | (_| | | (_> < | | | | (_| __/ "
echo " \___\___/|_| |_|_| |_|\__, | \___/\/ |_| |_|\___\___| " echo " \___\___/|_| |_|_| |_|\__, | \___/\/ |_| |_|\___\___| "
echo " __/ | " echo " __/ | "
echo " |___/ " echo " |___/ "
echo "" echo ""
} }
function computer { function computer {
echo " /\ " echo " /\ "
echo " / \ " echo " / \ "
echo " /_ %%==O=% _____________ " echo " /_ %%==O=% _____________ "
echo " % - -% | '\\\\\\\\\\" echo " % - -% | '\\\\\\\\\\"
echo " _____c% > __ | ' ____|_ " echo " _____c% > __ | ' ____|_ "
echo " (_|. . % \` % .' | + '||:::::: " echo " (_|. . % \` % .' | + '||:::::: "
echo " ||. ___)%%%%_.' | '||_____| " echo " ||. ___)%%%%_.' | '||_____| "
echo " ||.( \ ~ / ,)' \'_______|_____| " echo " ||.( \ ~ / ,)' \'_______|_____| "
echo " || /| \'/ |\ ___/____|___\___ " echo " || /| \'/ |\ ___/____|___\___ "
echo " _,,,;!___*_____\_| _ ' <<<:| " echo " _,,,;!___*_____\_| _ ' <<<:| "
echo " / /| |_________'___o_o| " echo " / /| |_________'___o_o| "
echo " /_____/ / " echo " /_____/ / "
echo " |:____|/ \"Boy, I LOVE this stuff\". " echo " |:____|/ \"Boy, I LOVE this stuff\". "
echo "" echo ""
echo "" echo ""
} }
# ======================================= # =======================================
# Main loop # Main loop
# ======================================= # =======================================
@ -188,24 +185,28 @@ intro
ask "Do you want to continue installing my config and rice?" Y && ask "Do you want to continue installing my config and rice?" Y &&
# Ask for dependency installation # Ask for dependency installation
if ask "Do you want to install the applications listen in ./dependencies? (might prompt for password)" Y; then if ask "Do you want to install the applications listen in ./dependencies? (might prompt for password)" Y; then
install_dependencies install_dependencies
fi fi
# Ask for config installation # Ask for config installation
if ask "Do you want to install the config files?" Y; then if ask "Do you want to install the config files?" Y; then
install_config install_config
fi fi
# Ask for font installation # Ask for font installation
if ask "Do you want to install the fonts?" Y; then if ask "Do you want to install the fonts?" Y; then
install_fonts install_fonts
fi fi
# ask to enable gdm # ask to enable the display manager
if ask "Do you want to enable GDM?" Y; then if ask "Do you want to enable sddm?" Y; then
sudo systemctl enable gdm.service sudo systemctl set-default graphical.target
sudo systemctl enable sddm.service
sudo mkdir -p "/etc/sddm.conf.d/"
curl "http://gravatar.com/avatar/$(echo -n "info@rickvanlieshout.com" | md5sum - | cut -d' ' -f1)?s=1024" | sudo tee /usr/share/sddm/faces/mastermindzh.face.icon >/dev/null
sudo ln -sf "$PWD"/config/sddm/default.conf /etc/sddm.conf.d/
fi fi
clear clear
@ -214,17 +215,17 @@ computer
prompt=$(echo $'\n> ' "Please select a specific computer to install or q to finish the install") prompt=$(echo $'\n> ' "Please select a specific computer to install or q to finish the install")
PS3="$prompt: " PS3="$prompt: "
select opt in "$PWD/computers"/*; do select opt in "$PWD/computers"/*; do
if (( REPLY == "q" )) ; then if ((REPLY == "q")); then
break break
elif (( REPLY > 0 )) ; then
bash "$opt/install.sh"
break
else
echo "Invalid option. Try another one."
fi
done
clear
echo "Enjoy using my rice! Do not forget to select i3 in GDM :)" elif ((REPLY > 0)); then
bash "$opt/install.sh"
break
else
echo "Invalid option. Try another one."
fi
done
clear
echo "Enjoy using my rice! Do not forget to select i3 in sddm :)"