From: Christian Heller Date: Sun, 7 Apr 2019 19:11:00 +0000 (+0200) Subject: Split up home files to also allow root some. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/cards/%7B%7Bcard_id%7D%7D/%7B%7Btodo.date%7D%7D?a=commitdiff_plain;h=8c9fd1d36d516e83d34cf18b9ac79a6d9c517ede;p=config Split up home files to also allow root some. --- diff --git a/buster/home_files/eeepc/.Xresources b/buster/home_files/eeepc/.Xresources deleted file mode 100644 index 45b10af..0000000 --- a/buster/home_files/eeepc/.Xresources +++ /dev/null @@ -1,56 +0,0 @@ -! otherwise various applications will assume merely 8 colors -XTerm.termName: xterm-256color - -! font -! actually, "mono" is already the default for faceName (it will -! pick whatever fc-match mono delivers), but we need to set _some_ -! faceName to trigger XTerm activating TrueType fonts -! (XTerm*fontRender by itself won't do the trick), and we want -! TrueType fonts because, well, they scale better, and XTerm lets them -! fall back on alternatives (hi there ttf-unifont) when a Unicode -! glyph is not found -XTerm*faceName: mono - -! white on black -XTerm*reverseVideo: on - -! blink screen instead of sound -XTerm*visualBell: on - -! proper ALT as META key treatment -XTerm*eightBitInput: false - -! font sizes -XTerm*faceSize: 8 -XTerm*faceSize1: 4 -XTerm*faceSize2: 5 -XTerm*faceSize3: 6 -XTerm*faceSize4: 8 -XTerm*faceSize5: 14 -XTerm*faceSize6: 25 - -! colors -! black -XTerm*color0: #202020 -XTerm*color8: #3F3F3F -! red -XTerm*color1: #A82020 -XTerm*color9: #E82020 -! green -XTerm*color2: #20A820 -XTerm*color10: #20E820 -! yellow -XTerm*color3: #A8A820 -XTerm*color11: #E8E820 -! blue -XTerm*color4: #3F3FFF -XTerm*color12: #9F9FFF -! magenta -XTerm*color5: #A83FFF -XTerm*color13: #E89FFF -! cyan -XTerm*color6: #3FA8FF -XTerm*color14: #9FE8FF -! white -XTerm*color7: #A8A8A8 -XTerm*color15: #E8E8E8 diff --git a/buster/home_files/eeepc/.bashrc b/buster/home_files/eeepc/.bashrc deleted file mode 100644 index 85c2e22..0000000 --- a/buster/home_files/eeepc/.bashrc +++ /dev/null @@ -1,26 +0,0 @@ -# Settings for interactive shells. - -# Fancy colors for ls. -alias ls="ls --color=auto" - -# Use vim as default editor for anything. -export VISUAL=vim -export EDITOR=$VISUAL - -# Colored prompt with username, hostname, date/time, directory. -colornumber=7 # Default to white if no color set via colornumber dotfile. -colornumber_file=~/.shell_prompt_color -if [ -f $colornumber_file ]; then - colornumber=`cat $colornumber_file` -fi -tput_color="$(tput setaf $colornumber)$(tput bold)" -tput_reset="$(tput sgr0)" -# Bash confuses the line length when not told to not count escape sequences. -if [ ! "$BASH" = "" ]; then - tput_color="\[$tput_color\]" - tput_reset="\[$tput_reset\]" -fi -PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $USER@$(hostname):"\$\(pwd\)"]$ $tput_reset" -PS2="${tput_color}> $tput_reset" -PS3="${tput_color}select: $tput_reset" -PS4="${tput_color}+ $tput_reset" diff --git a/buster/home_files/eeepc/.config/i3/config b/buster/home_files/eeepc/.config/i3/config deleted file mode 100644 index 19c654e..0000000 --- a/buster/home_files/eeepc/.config/i3/config +++ /dev/null @@ -1,83 +0,0 @@ -# plomlompom's i3-wm configuration - -# Font for i3 text -font pango:Terminus 8px - -# Force "tabbed" as default layout for new windows. -workspace_layout tabbed - -# Make the Windows key the modifier key for all i3-wm actions. -set $mod Mod4 -floating_modifier $mod - -# Launch xterm. -bindsym $mod+Return exec xterm - -# Launch programs via dmenu. -bindsym $mod+d exec dmenu_run -bindsym $mod+x exec dmenu_run - -# Kill window. -bindsym $mod+Shift+Q kill - -# Move focus between windows. -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# Don't move focus with mouse. -focus_follows_mouse no - -# Move windows. -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# Resize windows -bindsym $mod+h resize shrink width 1 px or 1 ppt -bindsym $mod+l resize grow width 1 px or 1 ppt -bindsym $mod+j resize shrink height -bindsym $mod+k resize grow height - -# Toggle fullscreen for focused window. -bindsym $mod+f fullscreen - -# Toggle floating of window, focus on floating or tabbed windows. -bindsym $mod+Shift+space floating toggle -bindsym $mod+space focus mode_toggle - -# Switch to workspace x. -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 - -# Move window to workspace x. -bindsym $mod+Shift+exclam move workspace 1 -bindsym $mod+Shift+quotedbl move workspace 2 -bindsym $mod+Shift+section move workspace 3 -bindsym $mod+Shift+dollar move workspace 4 -bindsym $mod+Shift+percent move workspace 5 -bindsym $mod+Shift+ampersand move workspace 6 -bindsym $mod+Shift+slash move workspace 7 -bindsym $mod+Shift+parenleft move workspace 8 -bindsym $mod+Shift+parenright move workspace 9 -bindsym $mod+Shift+equal move workspace 10 - -# Reload i3 config file, restart (keeping sesion) i3, exit i3. -bindsym $mod+Shift+C reload -bindsym $mod+Shift+R restart -bindsym $mod+Shift+P exit - -# Select "i3status" as i3 status bar. -bar { - status_command i3status -} diff --git a/buster/home_files/eeepc/.config/i3status/config b/buster/home_files/eeepc/.config/i3status/config deleted file mode 100644 index 0acc8c9..0000000 --- a/buster/home_files/eeepc/.config/i3status/config +++ /dev/null @@ -1,75 +0,0 @@ -# plomlompom's i3 status bar configuration - -# Activate colors; set update interval of one second. -general { - colors = true - interval = 1 -} - -# Selection / order of status elements. -order += "disk /" -order += "wireless wlp2s0" -order += "ethernet enp1s0" -order += "battery 0" -order += "cpu_usage" -order += "load" -order += "cpu_temperature 0" -order += "time" -order += "volume master" - -# How much space is left in / ? -disk "/" { - format = "/: %avail available of %total" - separator_block_width = 25 -} - -# WLAN status: show IP and connection quality or "down". -wireless wlp2s0 { - format_up = "w: (%quality at %essid) %ip" - format_down = "w: down" - separator_block_width = 10 -} - -# Ethernet status: show IP or "down". -ethernet enp1s0 { - format_up = "e: %ip" - format_down = "e: down" - separator_block_width = 25 -} - -# Battery status: show FULL/CHARGING/BATTERY, storage, time left. -battery 0 { - format = "b: %status %percentage %remaining" - separator_block_width = 25 -} - -# Show CPU usage. -cpu_usage { - format = "cpu: %usage" - separator_block_width = 10 -} - -# Show system load during last 1/5/15 minutes. -load { - format = "%1min %5min %15min" - separator_block_width = 25 -} - -# Show CPU temperature in degrees of celsius. -cpu_temperature 0 { - format = "%degrees °C" - separator_block_width = 25 -} - -# Show date/time/timezone as "year-month-day hour:minute:second -# timezone_numeric/timezone_alphabetic". -time { - format = "%Y-%m-%d %H:%M:%S %z/%Z" - separator_block_width = 25 -} - -volume master { - format = "♪: %volume" - format_muted = "♪: muted (%volume)" - separator_block_width = 25 -} diff --git a/buster/home_files/eeepc/.xinitrc b/buster/home_files/eeepc/.xinitrc deleted file mode 100644 index 250fd77..0000000 --- a/buster/home_files/eeepc/.xinitrc +++ /dev/null @@ -1,13 +0,0 @@ -# X init configuration - -# Set keymap. -setxkbmap de - -# Load xterm settings -xrdb -merge ~/.Xresources - -# Redshift to Berlin, Germany. -redshift -rl 53:13 & - -# Launch window manager. -i3 diff --git a/buster/home_files/minimal/.bashrc b/buster/home_files/minimal/.bashrc new file mode 100644 index 0000000..5ee9ad8 --- /dev/null +++ b/buster/home_files/minimal/.bashrc @@ -0,0 +1,26 @@ +# Settings for interactive shells. + +# Fancy colors for ls. +alias ls="ls --color=auto" + +# Use vim as default editor for anything. +export VISUAL=vim +export EDITOR=$VISUAL + +# Colored prompt with username, hostname, date/time, directory. +colornumber=7 # Default to white if no color set via colornumber dotfile. +colornumber_file=~/.shell_prompt_color +if [ -f $colornumber_file ]; then + colornumber=`cat $colornumber_file` +fi +tput_color="$(tput setaf $colornumber)$(tput bold)" +tput_reset="$(tput sgr0)" +# Bash confuses the line length when not told to not count escape sequences. +if [ ! "$BASH" = "" ]; then + tput_color="\[$tput_color\]" + tput_reset="\[$tput_reset\]" +fi +PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ $tput_reset" +PS2="${tput_color}> $tput_reset" +PS3="${tput_color}select: $tput_reset" +PS4="${tput_color}+ $tput_reset" diff --git a/buster/home_files/root/.shell_prompt_color b/buster/home_files/root/.shell_prompt_color new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/buster/home_files/root/.shell_prompt_color @@ -0,0 +1 @@ +9 diff --git a/buster/home_files/user_eeepc/.Xresources b/buster/home_files/user_eeepc/.Xresources new file mode 100644 index 0000000..45b10af --- /dev/null +++ b/buster/home_files/user_eeepc/.Xresources @@ -0,0 +1,56 @@ +! otherwise various applications will assume merely 8 colors +XTerm.termName: xterm-256color + +! font +! actually, "mono" is already the default for faceName (it will +! pick whatever fc-match mono delivers), but we need to set _some_ +! faceName to trigger XTerm activating TrueType fonts +! (XTerm*fontRender by itself won't do the trick), and we want +! TrueType fonts because, well, they scale better, and XTerm lets them +! fall back on alternatives (hi there ttf-unifont) when a Unicode +! glyph is not found +XTerm*faceName: mono + +! white on black +XTerm*reverseVideo: on + +! blink screen instead of sound +XTerm*visualBell: on + +! proper ALT as META key treatment +XTerm*eightBitInput: false + +! font sizes +XTerm*faceSize: 8 +XTerm*faceSize1: 4 +XTerm*faceSize2: 5 +XTerm*faceSize3: 6 +XTerm*faceSize4: 8 +XTerm*faceSize5: 14 +XTerm*faceSize6: 25 + +! colors +! black +XTerm*color0: #202020 +XTerm*color8: #3F3F3F +! red +XTerm*color1: #A82020 +XTerm*color9: #E82020 +! green +XTerm*color2: #20A820 +XTerm*color10: #20E820 +! yellow +XTerm*color3: #A8A820 +XTerm*color11: #E8E820 +! blue +XTerm*color4: #3F3FFF +XTerm*color12: #9F9FFF +! magenta +XTerm*color5: #A83FFF +XTerm*color13: #E89FFF +! cyan +XTerm*color6: #3FA8FF +XTerm*color14: #9FE8FF +! white +XTerm*color7: #A8A8A8 +XTerm*color15: #E8E8E8 diff --git a/buster/home_files/user_eeepc/.config/i3/config b/buster/home_files/user_eeepc/.config/i3/config new file mode 100644 index 0000000..19c654e --- /dev/null +++ b/buster/home_files/user_eeepc/.config/i3/config @@ -0,0 +1,83 @@ +# plomlompom's i3-wm configuration + +# Font for i3 text +font pango:Terminus 8px + +# Force "tabbed" as default layout for new windows. +workspace_layout tabbed + +# Make the Windows key the modifier key for all i3-wm actions. +set $mod Mod4 +floating_modifier $mod + +# Launch xterm. +bindsym $mod+Return exec xterm + +# Launch programs via dmenu. +bindsym $mod+d exec dmenu_run +bindsym $mod+x exec dmenu_run + +# Kill window. +bindsym $mod+Shift+Q kill + +# Move focus between windows. +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Don't move focus with mouse. +focus_follows_mouse no + +# Move windows. +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Resize windows +bindsym $mod+h resize shrink width 1 px or 1 ppt +bindsym $mod+l resize grow width 1 px or 1 ppt +bindsym $mod+j resize shrink height +bindsym $mod+k resize grow height + +# Toggle fullscreen for focused window. +bindsym $mod+f fullscreen + +# Toggle floating of window, focus on floating or tabbed windows. +bindsym $mod+Shift+space floating toggle +bindsym $mod+space focus mode_toggle + +# Switch to workspace x. +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# Move window to workspace x. +bindsym $mod+Shift+exclam move workspace 1 +bindsym $mod+Shift+quotedbl move workspace 2 +bindsym $mod+Shift+section move workspace 3 +bindsym $mod+Shift+dollar move workspace 4 +bindsym $mod+Shift+percent move workspace 5 +bindsym $mod+Shift+ampersand move workspace 6 +bindsym $mod+Shift+slash move workspace 7 +bindsym $mod+Shift+parenleft move workspace 8 +bindsym $mod+Shift+parenright move workspace 9 +bindsym $mod+Shift+equal move workspace 10 + +# Reload i3 config file, restart (keeping sesion) i3, exit i3. +bindsym $mod+Shift+C reload +bindsym $mod+Shift+R restart +bindsym $mod+Shift+P exit + +# Select "i3status" as i3 status bar. +bar { + status_command i3status +} diff --git a/buster/home_files/user_eeepc/.config/i3status/config b/buster/home_files/user_eeepc/.config/i3status/config new file mode 100644 index 0000000..0acc8c9 --- /dev/null +++ b/buster/home_files/user_eeepc/.config/i3status/config @@ -0,0 +1,75 @@ +# plomlompom's i3 status bar configuration + +# Activate colors; set update interval of one second. +general { + colors = true + interval = 1 +} + +# Selection / order of status elements. +order += "disk /" +order += "wireless wlp2s0" +order += "ethernet enp1s0" +order += "battery 0" +order += "cpu_usage" +order += "load" +order += "cpu_temperature 0" +order += "time" +order += "volume master" + +# How much space is left in / ? +disk "/" { + format = "/: %avail available of %total" + separator_block_width = 25 +} + +# WLAN status: show IP and connection quality or "down". +wireless wlp2s0 { + format_up = "w: (%quality at %essid) %ip" + format_down = "w: down" + separator_block_width = 10 +} + +# Ethernet status: show IP or "down". +ethernet enp1s0 { + format_up = "e: %ip" + format_down = "e: down" + separator_block_width = 25 +} + +# Battery status: show FULL/CHARGING/BATTERY, storage, time left. +battery 0 { + format = "b: %status %percentage %remaining" + separator_block_width = 25 +} + +# Show CPU usage. +cpu_usage { + format = "cpu: %usage" + separator_block_width = 10 +} + +# Show system load during last 1/5/15 minutes. +load { + format = "%1min %5min %15min" + separator_block_width = 25 +} + +# Show CPU temperature in degrees of celsius. +cpu_temperature 0 { + format = "%degrees °C" + separator_block_width = 25 +} + +# Show date/time/timezone as "year-month-day hour:minute:second +# timezone_numeric/timezone_alphabetic". +time { + format = "%Y-%m-%d %H:%M:%S %z/%Z" + separator_block_width = 25 +} + +volume master { + format = "♪: %volume" + format_muted = "♪: muted (%volume)" + separator_block_width = 25 +} diff --git a/buster/home_files/user_eeepc/.shell_prompt_color b/buster/home_files/user_eeepc/.shell_prompt_color new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/buster/home_files/user_eeepc/.shell_prompt_color @@ -0,0 +1 @@ +2 diff --git a/buster/home_files/user_eeepc/.xinitrc b/buster/home_files/user_eeepc/.xinitrc new file mode 100644 index 0000000..250fd77 --- /dev/null +++ b/buster/home_files/user_eeepc/.xinitrc @@ -0,0 +1,13 @@ +# X init configuration + +# Set keymap. +setxkbmap de + +# Load xterm settings +xrdb -merge ~/.Xresources + +# Redshift to Berlin, Germany. +redshift -rl 53:13 & + +# Launch window manager. +i3 diff --git a/buster/setup_scripts/setup_eeepc.sh b/buster/setup_scripts/setup_eeepc.sh index 74efe1c..e37d4c7 100755 --- a/buster/setup_scripts/setup_eeepc.sh +++ b/buster/setup_scripts/setup_eeepc.sh @@ -14,10 +14,11 @@ cd "${setup_scripts_dir}" ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" eeepc ./install_for_target.sh eeepc +./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root if [ ! -d "/home/plom" ]; then adduser --disabled-password --gecos "" plom usermod -a -G sudo plom su -c "cd && git clone https://plomlompom.com/repos/clone/config" plom - su -c "~/config/buster/setup_scripts/copy_dirtree.sh ~/config/buster/home_files ~ eeepc" plom - su -c "echo 2 > ~/.shell_prompt_color" plom + su -c "~/config/buster/setup_scripts/copy_dirtree.sh ~/config/buster/home_files ~ minimal user_eeepc" plom + passwd plom fi