diff options
-rw-r--r-- | fish/config.fish | 34 | ||||
-rw-r--r-- | fish/functions/fish_prompt.fish | 6 | ||||
-rw-r--r-- | fish/functions/fish_right_prompt.fish | 3 | ||||
-rw-r--r-- | jwmrc | 138 | ||||
-rw-r--r-- | xdm/README | 1 | ||||
-rw-r--r-- | xdm/Xresources | 23 | ||||
-rwxr-xr-x | xdm/Xsession | 131 | ||||
-rwxr-xr-x | xdm/Xsetup | 6 | ||||
-rw-r--r-- | xmodmap | 14 | ||||
-rwxr-xr-x | xsession | 9 |
10 files changed, 365 insertions, 0 deletions
diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..2f110c6 --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,34 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end + +set fish_greeting + +fish_add_path $HOME/Scripts + +# unset most of the colours +set fish_color_normal normal +set fish_color_autosuggestion --underline +set fish_color_cancel --reverse +set fish_color_command +set fish_color_comment +set fish_color_cwd +set fish_color_cwd_root +set fish_color_end +set fish_color_error +set fish_color_escape +set fish_color_history_current --underline +set fish_color_host +set fish_color_host_remote +set fish_color_keyword +set fish_color_match --background=red +set fish_color_operator +set fish_color_option +set fish_color_param +set fish_color_quote +set fish_color_redirection +set fish_color_search_match --reverse +set fish_color_selection --background=green +set fish_color_status +set fish_color_user +set fish_color_valid_path diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..eeec7d8 --- /dev/null +++ b/fish/functions/fish_prompt.fish @@ -0,0 +1,6 @@ +function fish_prompt + #set_color $fish_color_cwd + echo -n (basename $PWD) + #set_color normal + echo -n ' ) ' +end diff --git a/fish/functions/fish_right_prompt.fish b/fish/functions/fish_right_prompt.fish new file mode 100644 index 0000000..c3235a5 --- /dev/null +++ b/fish/functions/fish_right_prompt.fish @@ -0,0 +1,3 @@ +function fish_right_prompt + date '+%H:%M' +end diff --git a/jwmrc b/jwmrc new file mode 100644 index 0000000..801f3e6 --- /dev/null +++ b/jwmrc @@ -0,0 +1,138 @@ +<?xml version="1.0"?> +<JWM> + <Group> + <Option>tiled</Option> + <Option>aerosnap</Option> + </Group> + + <RootMenu> + <Restart label="Restart" /> + <Exit label="Exit" confirm="true" /> + </RootMenu> + + <Tray x="0" y="-1" autohide="off"> + <TrayButton label="Run">exec:rofi -show combi -modes combi -combi-modes "window,drun,run"</TrayButton> + <Spacer width="2" /> + <TaskList maxwidth="256"/> + <Dock/> + <Clock format="%H:%M"></Clock> + <Spacer width="2" /> + <TrayButton label="System">root:1</TrayButton> + </Tray> + + <!-- Visual Styles --> + <WindowStyle decorations="flat"> + <Font>Noto Sans CJK SC-16</Font> + <Width>4</Width> + <!--<Height>32</Height>--> + <Corner>0</Corner> + + <Foreground>#000000</Foreground> + <Background>#ffffe8</Background> + <Outline>#000000</Outline> + <Opacity>1.0</Opacity> + + <Active> + <Foreground>#000000</Foreground> + <Background>#e5e5d0</Background> + <Outline>#000000</Outline> + </Active> + </WindowStyle> + + <MenuStyle> + <Background>#ffffe8</Background> + <Foreground>#000000</Foreground> + </MenuStyle> + + <TrayStyle group="true" list="all"> + <Font>Noto Sans CJK SC-16</Font> + <Background>#ffffe8</Background> + <Foreground>#000000</Foreground> + <Outline>#000000</Outline> + <Opacity>1</Opacity> + </TrayStyle> + + <TaskListStyle> + <Font>Sans-9</Font> + <Active> + <Foreground>#000000</Foreground> + <Background>#e5e5d8</Background> + </Active> + <Foreground>#000000</Foreground> + <Background>#ffffe8</Background> + </TaskListStyle> + + <PopupStyle> + <Font>Sans-9</Font> + <Foreground>#000000</Foreground> + <Background>#ffffe8</Background> + </PopupStyle> + + <!-- Path where icons can be found. + IconPath can be listed multiple times to allow searching + for icons in multiple paths. + --> + <IconPath> + /usr/share/icons/wm-icons/32x32-aquafusion + </IconPath> + <IconPath> + /usr/local/share/jwm + </IconPath> + + <!-- Virtual Desktops --> + <Desktops width="1" height="1"> + <Background type="solid">#ffffe8</Background> + </Desktops> + + <!-- Double click speed (in milliseconds) --> + <DoubleClickSpeed>400</DoubleClickSpeed> + + <!-- Double click delta (in pixels) --> + <DoubleClickDelta>2</DoubleClickDelta> + + <!-- The focus model (sloppy or click) --> + <FocusModel>sloppy</FocusModel> + + <!-- The snap mode (none, screen, or border) --> + <SnapMode distance="10">border</SnapMode> + + <!-- The move mode (outline or opaque) --> + <MoveMode>opaque</MoveMode> + + <!-- The resize mode (outline or opaque) --> + <ResizeMode>opaque</ResizeMode> + + <!-- Key bindings --> + <Key key="Up">up</Key> + <Key key="Down">down</Key> + <Key key="Right">right</Key> + <Key key="Left">left</Key> + <Key key="h">left</Key> + <Key key="j">down</Key> + <Key key="k">up</Key> + <Key key="l">right</Key> + <Key key="Return">select</Key> + <Key key="Escape">escape</Key> + + <Key key="XF86Search">exec:rofi -show combi -modes combi -combi-modes "window,drun,run"</Key> + <Key mask="A" key="d">exec:rofi -show combi -modes combi -combi-modes "window,drun,run"</Key> + + <Key key="XF86MonBrightnessDown">exec:brightnessctl -d intel_backlight set 5%-</Key> + <Key key="XF86MonBrightnessUp">exec:brightnessctl -d intel_backlight set 5%+</Key> + <Key key="XF86AudioRaiseVolume">exec:amixer -D pulse sset Master 5%+</Key> + <Key key="XF86AudioLowerVolume">exec:amixer -D pulse sset Master 5%-</Key> + <Key key="XF86AudioMute">exec:amixer -D pulse sset Master toggle</Key> + + <Key mask="A" key="q">restart</Key> + + <Key mask="A" key="Tab">nextstacked</Key> + <Key mask="A" key="F4">close</Key> + <Key mask="A" key="#">desktop#</Key> + <Key mask="A" key="F2">window</Key> + <Key mask="A" key="F10">maximize</Key> + <Key mask="A" key="Right">rdesktop</Key> + <Key mask="A" key="Left">ldesktop</Key> + <Key mask="A" key="Up">udesktop</Key> + <Key mask="A" key="Down">ddesktop</Key> + +</JWM> diff --git a/xdm/README b/xdm/README new file mode 100644 index 0000000..3f5b24b --- /dev/null +++ b/xdm/README @@ -0,0 +1 @@ +The files in this directory should be copied to /etc/X11/xdm/ diff --git a/xdm/Xresources b/xdm/Xresources new file mode 100644 index 0000000..4d7126d --- /dev/null +++ b/xdm/Xresources @@ -0,0 +1,23 @@ +Xcursor.theme: whiteglass + +xlogin.Login.greeting: +xlogin.Login.fail: Incorrect +xlogin.Login.namePrompt: Username: +xlogin.Login.passwdPrompt: Password: +xlogin.Login.echoPasswd: true + +xlogin.Login.face: Noto sans cjk sc-18 +xlogin.Login.greetFace: Noto sans cjk sc-18 +xlogin.Login.greetColor: black +xlogin.Login.promptFace: Noto sans cjk sc-18 +xlogin.Login.failFace: Noto sans cjk sc-18 +xlogin.Login.failColor: black + +! user input colours +xlogin.Login.background: #ffffe8 +xlogin.Login.foreground: #000000 + +xlogin.Login.borderWidth: 1 +xlogin.Login.frameWidth: 0 +xlogin.Login.innerFramesWidth: 0 +xlogin.Login.sepWidth: 0 diff --git a/xdm/Xsession b/xdm/Xsession new file mode 100755 index 0000000..a564fb0 --- /dev/null +++ b/xdm/Xsession @@ -0,0 +1,131 @@ +#!/bin/sh +# +# /etc/X11/Xsession +# +# global Xsession file -- used by display managers and xinit (startx) + +# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $ + +set -e + +PROGNAME=Xsession + +message () { + # pretty-print messages of arbitrary length; use xmessage if it + # is available and $DISPLAY is set + MESSAGE="$PROGNAME: $*" + echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2 + if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then + echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file - + fi +} + +message_nonl () { + # pretty-print messages of arbitrary length (no trailing newline); use + # xmessage if it is available and $DISPLAY is set + MESSAGE="$PROGNAME: $*" + echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2; + if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then + echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file - + fi +} + +errormsg () { + # exit script with error + message "$*" + exit 1 +} + +internal_errormsg () { + # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message + # One big call to message() for the sake of xmessage; if we had two then + # the user would have dismissed the error we want reported before seeing the + # request to report it. + errormsg "$*" \ + "Please report the installed version of the \"x11-common\"" \ + "package and the complete text of this error message to" \ + "<debian-x@lists.debian.org>." +} + +# initialize variables for use by all session scripts + +OPTIONFILE=/etc/X11/Xsession.options + +SYSRESOURCES=/etc/X11/Xresources +USRRESOURCES=$HOME/.Xresources + +SYSSESSIONDIR=/etc/X11/Xsession.d +USERXSESSION=$HOME/.config/xsession +USERXSESSIONRC=$HOME/.xsessionrc +ALTUSERXSESSION=$HOME/.Xsession +ERRFILE=$HOME/.local/share/xsession-errors + +OPTIONS="$( + if [ -r "$OPTIONFILE" ]; then + cat "$OPTIONFILE" + fi + if [ -d /etc/X11/Xsession.options.d ]; then + run-parts --list --regex '\.conf$' /etc/X11/Xsession.options.d | xargs -d '\n' cat + fi +)" + +has_option() { + # Ensure that a later no-foo overrides an earlier foo + if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" = "$1" ]; then + return 0 + else + return 1 + fi +} + +# attempt to create an error file; abort if we cannot +if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] && + [ ! -L "$ERRFILE" ]; then + chmod 600 "$ERRFILE" +elif ERRFILE=$(mktemp 2> /dev/null); then + if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then + message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \ + "\"$ERRFILE\"; look for session log/errors in" \ + "\"$TMPDIR/xsession-$USER\"." + fi +else + errormsg "unable to create X session log/error file; aborting." +fi + +exec >>"$ERRFILE" 2>&1 + +echo "$PROGNAME: X session started for $LOGNAME at $(date)" + +# sanity check; is our session script directory present? +if [ ! -d "$SYSSESSIONDIR" ]; then + errormsg "no \"$SYSSESSIONDIR\" directory found; aborting." +fi + +# Attempt to create a file of non-zero length in /tmp; a full filesystem can +# cause mysterious X session failures. We do not use touch, :, or test -w +# because they won't actually create a file with contents. We also let standard +# error from mktemp and echo go to the error file to aid the user in +# determining what went wrong. +WRITE_TEST=$(mktemp) +if ! echo "*" >>"$WRITE_TEST"; then + message "warning: unable to write to ${WRITE_TEST%/*}; X session may exit" \ + "with an error" +fi +rm -f "$WRITE_TEST" + +# use run-parts to source every file in the session directory; we source +# instead of executing so that the variables and functions defined above +# are available to the scripts, and so that they can pass variables to each +# other +SESSIONFILES=$(run-parts --list $SYSSESSIONDIR) +if [ -n "$SESSIONFILES" ]; then + set +e + for SESSIONFILE in $SESSIONFILES; do + . $SESSIONFILE + done + set -e +fi + +exit 0 + +# vim:set ai et sts=2 sw=2 tw=80: diff --git a/xdm/Xsetup b/xdm/Xsetup new file mode 100755 index 0000000..6db7807 --- /dev/null +++ b/xdm/Xsetup @@ -0,0 +1,6 @@ +#!/bin/sh +# +# This script is run as root before showing login widget. + +xsetroot -solid "#ffffe8" +# picom -b --config /home/noa/.config/picom/picom.conf diff --git a/xmodmap b/xmodmap new file mode 100644 index 0000000..b4ab7b2 --- /dev/null +++ b/xmodmap @@ -0,0 +1,14 @@ +clear lock +clear mod1 +clear control + +! Set key left of spacebar to control +keycode 64 = Control_L +add control = Control_L + +! Set key right of spacebar to alt +keycode 108 = Alt_L +add mod1 = Alt_L + +! Set caps lock to search +keycode 66 = XF86Search diff --git a/xsession b/xsession new file mode 100755 index 0000000..5ff0783 --- /dev/null +++ b/xsession @@ -0,0 +1,9 @@ +xmodmap ~/.config/xmodmap +brightnessctl -d intel_backlight set 25% + +cbatticon & +pnmixer & +picom -b + +# exec startfluxbox +exec jwm -f ~/.config/jwmrc |