From 65eff4395dfd2fc51a59fc37c67019bf9a500017 Mon Sep 17 00:00:00 2001 From: Jay Ta'ala Date: Sat, 28 Apr 2018 16:48:01 +1000 Subject: [PATCH] Restructure to be repo for various config files. Added config files for compton, dmenurc, dunst, i3exit, i3status, and rofi (theme) - mostly origs (for init). --- compton/compton.conf | 107 ++++++++++++++ dmenu/.dmenurc | 24 +++ dunst/dunstrc | 302 ++++++++++++++++++++++++++++++++++++++ config => i3/config | 0 i3exit/i3exit | 35 +++++ i3status/.i3status.conf | 116 +++++++++++++++ rofi/themes/lb-numix.rasi | 143 ++++++++++++++++++ 7 files changed, 727 insertions(+) create mode 100644 compton/compton.conf create mode 100755 dmenu/.dmenurc create mode 100644 dunst/dunstrc rename config => i3/config (100%) create mode 100755 i3exit/i3exit create mode 100644 i3status/.i3status.conf create mode 100644 rofi/themes/lb-numix.rasi diff --git a/compton/compton.conf b/compton/compton.conf new file mode 100644 index 0000000..12e994d --- /dev/null +++ b/compton/compton.conf @@ -0,0 +1,107 @@ +# Shadow +shadow = true; +# no-dnd-shadow = true; +# no-dock-shadow = true; +clear-shadow = true; +detect-rounded-corners = true; +shadow-radius = 5; +shadow-offset-x = 1; +shadow-offset-y = 1; +shadow-opacity = .3; +shadow-ignore-shaped = false; +shadow-exclude = [ + "name = 'Notification'", +# workaround for conky until it provides window properties: + "override_redirect = 1 && !WM_CLASS@:s", + "class_g ?= 'Dmenu'", +# "class_g ?= 'Dunst'", +# disable shadows for hidden windows: + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", + "_GTK_FRAME_EXTENTS@:c", +# disables shadows on sticky windows: +# "_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'", +# disables shadows on i3 frames + "class_g ?= 'i3-frame'" +]; + +# shadow-exclude-reg = "x10+0+0"; +# xinerama-shadow-crop = true; + +menu-opacity = 0.95; +inactive-opacity = 0.93; +active-opacity = 1; +alpha-step = 0.01; +inactive-dim = 0.0; +blur-background = false; +blur-kern = "3x3box"; + +fading = false; +fade-delta = 1; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-exclude = [ ]; + +backend = "xrender"; +mark-wmwin-focused = true; +mark-ovredir-focused = true; +detect-client-opacity = true; +unredir-if-possible = true; +refresh-rate = 0; +vsync = "none"; +dbe = false; +paint-on-overlay = true; +focus-exclude = [ "class_g = 'Cairo-clock'" ]; +detect-transient = true; +detect-client-leader = true; +invert-color-include = [ ]; +glx-copy-from-front = false; +glx-swap-method = "undefined"; + +opacity-rule = [ +"99:name *?= 'Call'", +"99:class_g = 'Chromium'", +"99:name *?= 'Conky'", +"99:class_g = 'Darktable'", +"50:class_g = 'Dmenu'", +"99:name *?= 'Event'", +"99:class_g = 'Firefox'", +"99:class_g = 'GIMP'", +"99:name *?= 'Image'", +"99:class_g = 'Lazpaint'", +"99:class_g = 'Midori'", +"99:name *?= 'Minitube'", +"99:class_g = 'Mousepad'", +"99:name *?= 'MuseScore'", +"90:name *?= 'Page Info'", +"99:name *?= 'Pale Moon'", +"90:name *?= 'Panel'", +"99:class_g = 'Pinta'", +"90:name *?= 'Restart'", +"99:name *?= 'sudo'", +"99:name *?= 'Screenshot'", +"99:class_g = 'Viewnior'", +"99:class_g = 'VirtualBox'", +"99:name *?= 'VLC'", +"99:name *?= 'Write'", +"93:class_g = 'URxvt' && !_NET_WM_STATE@:32a", +"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", +"96:_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'" +]; + +wintypes : +{ + tooltip : + { + fade = true; + shadow = false; + opacity = 0.85; + focus = true; + }; + fullscreen : + { + fade = true; + shadow = false; + opacity = 1; + focus = true; + }; +}; diff --git a/dmenu/.dmenurc b/dmenu/.dmenurc new file mode 100755 index 0000000..097c70c --- /dev/null +++ b/dmenu/.dmenurc @@ -0,0 +1,24 @@ +# +# ~/.dmenurc +# + +## define the font for dmenu to be used +DMENU_FN="Noto-10.5" + +## background colour for unselected menu-items +DMENU_NB="#4a4a4a" + +## textcolour for unselected menu-items +DMENU_NF="#F9FAF9" + +## background colour for selected menu-items +DMENU_SB="#eb564d" + +## textcolour for selected menu-items +DMENU_SF="#F9FAF9" + +## command for the terminal application to be used: +TERMINAL_CMD="terminal -e" + +## export our variables +DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB" \ No newline at end of file diff --git a/dunst/dunstrc b/dunst/dunstrc new file mode 100644 index 0000000..c2d242e --- /dev/null +++ b/dunst/dunstrc @@ -0,0 +1,302 @@ +[global] + frame_width = 1 + frame_color = "#788388" + + font = Noto Sans 10 + + # Allow a small subset of html markup: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # If markup is not allowed, those tags will be stripped out of the + # message. + markup = yes + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # Markup is allowed + format = "%s %p\n%b" + + # Sort messages by urgency. + sort = yes + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # The frequency with wich text that is longer than the notification + # window allows bounces back and forth. + # This option conflicts with "word_wrap". + # Set to 0 to disable. + bounce_freq = 5 + + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = no + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectevly. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "0x4-25+25" + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing windowmanager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 15 + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # default 120 + idle_threshold = 120 + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a windowmanager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern windowmanagers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + # The height of a single line. If the height is smaller than the + # font height, it will get raised to the font height. + # This adds empty space above and under the text. + line_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 1 + + # Padding between text and separator. + # padding = 8 + padding = 8 + + # Horizontal padding. + horizontal_padding = 10 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = #263238 + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = palemoon + + # Align icons left/right/off + icon_position = left + + # Paths to default icons. + icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + + # Limit icons size. + max_icon_size=128 + +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = mod1+space + + # Close all notifications. + # close_all = ctrl+shift+space + close_all = ctrl+mod1+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". + history = ctrl+mod4+h + + # Context menu. + context = ctrl+mod1+c + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#263238" + foreground = "#556064" + timeout = 10 + +[urgency_normal] + background = "#263238" + foreground = "#F9FAF9" + timeout = 10 + +[urgency_critical] + background = "#D62929" + foreground = "#F9FAF9" + timeout = 0 + + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# Messages can be matched by "appname", "summary", "body", "icon", "category", +# "msg_urgency" and you can override the "timeout", "urgency", "foreground", +# "background", "new_icon" and "format". +# Shell-like globbing will get expanded. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[Claws Mail] +# appname = claws-mail +# category = email.arrived +# urgency = normal +# background = "#2F899E" +# foreground = "#FFA247" +# +#[mute.sh] +# appname = mute +# category = mute.sound +# script = mute.sh +# +#[JDownloader] +# appname = JDownloader +# category = JD +# background = "#FFA247" +# foreground = "#FFFFFF" +# +#[newsbeuter] +# summary = *Feeds* +# background = "#A8EB41" +# foreground = "#FFFFFF" +# +[irc] + appname = weechat + timeout = 0 + background = "#0033bb" + foreground = "#dddddd" +# +[weechat hl] + appname = weechat + category = weechat.HL + background = "#FF5C47" + foreground = "#FFFFFF" +# +[weechat pn] + appname = weechat + category = weechat.PM + background = "#D53B84" + foreground = "#FFFFFF" +# +#[CMUS] +# appname = CMUS +# category = cmus +# background = "#6C4AB7" +# foreground = "#FFE756" +# +# +# background = "#30AB70" +# foreground = "#F67245" +# +# vim: ft=cfg diff --git a/config b/i3/config similarity index 100% rename from config rename to i3/config diff --git a/i3exit/i3exit b/i3exit/i3exit new file mode 100755 index 0000000..67e19e1 --- /dev/null +++ b/i3exit/i3exit @@ -0,0 +1,35 @@ +#!/bin/sh +# /usr/bin/i3exit + +# with openrc use loginctl +[[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl + +case "$1" in + lock) + blurlock + ;; + logout) + i3-msg exit + ;; + switch_user) + dm-tool switch-to-greeter + ;; + suspend) + blurlock && $logind suspend + ;; + hibernate) + blurlock && $logind hibernate + ;; + reboot) + $logind reboot + ;; + shutdown) + $logind poweroff + ;; + *) + echo "== ! i3exit: missing or invalid argument ! ==" + echo "Try again with: lock | logout | switch_user | suspend | hibernate | reboot | shutdown" + exit 2 +esac + +exit 0 diff --git a/i3status/.i3status.conf b/i3status/.i3status.conf new file mode 100644 index 0000000..f7cb8ca --- /dev/null +++ b/i3status/.i3status.conf @@ -0,0 +1,116 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 + color_good = "#F9FAF9" + color_bad = "#F9FAF9" + color_degraded = "#DC322F" +} + +order += "spotify" +order += "net_rate" +order += "whatismyip" +order += "wireless _first_" +order += "ethernet _first_" +# order += "load" +order += "cpu_usage" +order += "disk /" +# order += "disk /home" +# order += "battery all" +order += "battery_level" +# order += "load" +order += "timer" +order += "tztime local" +# order += "ipv6" + +spotify { + format = "( {artist} : {title})" + format_down = "" + format_stopped = "" +} + +timer { + format = ":{timer}" + time = 3600 +} + +cpu_usage { + format = " cpu %usage " +} + +load { + format = " load %1min " + # max_threshold = 0.3 +} + +disk "/" { + # format = " hdd %avail " + # prefix_type = decimal + # format = " ⛁ %used / %total (%percentage_used)" + format = " ⛁ %percentage_used " +} + +whatismyip { + format = "  {isp}\|{city}\|{countryCode} ({ip}) " + icon_on = "" + hide_when_offline = True + url_geo = "http://ip-api.com/json" +} + +wireless _first_ { +# if you use %speed, i3status requires root privileges + format_up = "  %essid (%ip) " + format_down = "" +} + +ethernet _first_ { +# if you use %speed, i3status requires root privileges + format_up = "  eth (%ip) " + format_down = "" +} + +net_rate { + format_value = "[\?min_length=10 {value:.1f} {unit}]" + si_units = "True" + format = "{down}⇣ {up}⇡" +} + +battery all { + # format = "%status %percentage %remaining %emptytime" + format = " %status %percentage %remaining " + format_down = "No battery" + last_full_capacity = true + integer_battery_capacity = true + # status_chr = "" + status_chr = "⚡" + # status_bat = "bat" + # status_bat = "☉" + status_bat = "" + # status_unk = "?" + status_unk = "" + # status_full = "" + status_full = "☻" + low_threshold = 15 + threshold_type = time +} + +battery_level { + cache_timeout = 10 + hide_when_full = "True" + hide_seconds = "True" + blocks = "" + color_charging = "#00ff00" + format = " {icon} {percent}% {time_remaining} " +} + +tztime local { + # format = "%Y-%m-%d %H:%M:%S" + format = " %d/%m %H:%M " +} diff --git a/rofi/themes/lb-numix.rasi b/rofi/themes/lb-numix.rasi new file mode 100644 index 0000000..b782694 --- /dev/null +++ b/rofi/themes/lb-numix.rasi @@ -0,0 +1,143 @@ +/** + * ROFI Color theme + * User: JT (adpated from lb by Qball) + * Copyright: Dave Davenport + */ + +* { + selected-normal-foreground: @foreground; + foreground: #FFFFFF; + normal-foreground: @foreground; + alternate-normal-background: rgba ( 255, 255, 255, 7 % ); + red: rgba ( 220, 50, 47, 100 % ); + selected-urgent-foreground: rgba ( 51, 51, 51, 100 % ); + blue: rgba ( 38, 139, 210, 100 % ); + urgent-foreground: rgba ( 255, 153, 153, 100 % ); + alternate-urgent-background: rgba ( 255, 255, 255, 7 % ); + active-foreground: @bordercolor; + lightbg: rgba ( 238, 232, 213, 100 % ); + selected-active-foreground: @foreground; + alternate-active-background: rgba ( 255, 255, 255, 7 % ); + background: rgba ( 51, 51, 51, 93 % ); + bordercolor: rgba ( 235, 86, 77, 100 % ); + alternate-normal-foreground: @foreground; + normal-background: rgba ( 0, 0, 0, 0 % ); + lightfg: rgba ( 88, 104, 117, 100 % ); + selected-normal-background: @bordercolor; + border-color: @bordercolor; + spacing: 2; + separatorcolor: @bordercolor; + urgent-background: rgba ( 0, 0, 0, 0 % ); + selected-urgent-background: rgba ( 255, 153, 153, 100 % ); + alternate-urgent-foreground: @urgent-foreground; + background-color: rgba ( 0, 0, 0, 0 % ); + alternate-active-foreground: @active-foreground; + active-background: rgba ( 0, 0, 0, 0 % ); + selected-active-background: @bordercolor; +} +#window { + background-color: @background; + border: 1; + padding: 5; +} +#mainbox { + border: 0; + padding: 0; +} +#message { + border: 1px dash 0px 0px ; + border-color: @separatorcolor; + padding: 1px ; +} +#textbox { + text-color: @foreground; +} +#listview { + fixed-height: 0; + border: 2px solid 0px 0px ; + border-color: @separatorcolor; + spacing: 2px ; + scrollbar: true; + padding: 2px 0px 0px ; +} +#element { + border: 0; + padding: 1px; +} +#element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +#element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +#element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +#element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +#element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +#element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +#element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +#element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +#element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +#scrollbar { + width: 4px ; + border: 0; + handle-width: 8px ; + padding: 0; + handle-color: @bordercolor; +} +#sidebar { + border: 2px dash 0px 0px ; + border-color: @separatorcolor; +} +#button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +#inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px ; +} +#case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +#entry { + spacing: 0; + text-color: @normal-foreground; +} +#prompt { + spacing: 0; + text-color: @normal-foreground; +} +#inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +#textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em ; + text-color: @normal-foreground; +} -- GitLab