From 59aff43a2de2c8e91e60d8125fb0e14ecf69b73d Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Fri, 9 Mar 2018 23:04:29 -0500 Subject: [PATCH] initial commit --- .gitignore | 9 + .gitmodules | 16 + README.md | 18 + files/.Xresources | 150 +++++ files/.config/compton/compton.conf | 254 ++++++++ files/.config/dunst/dunstrc | 326 ++++++++++ files/.config/gtk-3.0/settings.ini | 16 + files/.config/i3/config | 232 +++++++ files/.config/i3/rofi.bash | 3 + files/.config/i3/startup.bash | 15 + files/.config/polybar/bluetooth.bash | 14 + files/.config/polybar/config | 262 ++++++++ files/.config/polybar/openvpn.bash | 7 + files/.config/polybar/redshift.bash | 24 + files/.config/polybar/wifi_toggle.bash | 8 + files/.config/ranger/commands.py | 61 ++ files/.config/ranger/rc.conf | 612 ++++++++++++++++++ files/.config/ranger/rifle.conf | 213 ++++++ files/.config/ranger/scope.sh | 121 ++++ files/.config/redshift.conf | 56 ++ files/.config/rofi-pass/config | 79 +++ files/.config/zsh/.@dir | 0 files/.config/zsh/custom/000-env.zsh | 27 + files/.config/zsh/custom/100-alias.zsh | 24 + files/.config/zsh/custom/101-function.zsh | 13 + .../.config/zsh/custom/102-autocompletion.zsh | 0 files/.config/zsh/custom/200-motd.zsh | 17 + .../zsh/custom/300-syntax-highlighting.zsh | 27 + .../.config/zsh/custom/301-autosuggestion.zsh | 7 + .../zsh/custom/config/neofetch-splash.bash | 13 + .../zsh/custom/themes/noglyph.zsh-theme | 131 ++++ files/.config/zsh/oh-my-zsh/cache/.gitkeep | 0 .../.config/zsh/oh-my-zsh/custom/example.zsh | 10 + .../custom/plugins/example/example.plugin.zsh | 2 + files/.config/zsh/oh-my-zsh/log/.gitkeep | 0 files/.gtkrc-2.0 | 18 + files/.icons/default/index.theme | 5 + files/.local/bin/apod | 27 + files/.local/bin/emp | 80 +++ files/.local/bin/lock | 24 + files/.local/bin/mvn-findclass | 29 + files/.local/bin/remmina-pretty | 7 + files/.local/bin/sshot | 54 ++ files/.local/bin/to7zip | 128 ++++ files/.profile | 66 ++ files/.tmux.conf | 54 ++ files/.vim/.@dir | 0 .../bundle/repos/github.com/Shougo/dein.vim | 1 + files/.vim/vimrc | 231 +++++++ files/.xbindkeysrc | 30 + files/.xinitrc | 3 + files/.xprofile | 29 + files/.zprofile | 3 + files/.zshrc | 92 +++ install.sh | 170 +++++ 55 files changed, 3818 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 README.md create mode 100644 files/.Xresources create mode 100644 files/.config/compton/compton.conf create mode 100644 files/.config/dunst/dunstrc create mode 100644 files/.config/gtk-3.0/settings.ini create mode 100644 files/.config/i3/config create mode 100755 files/.config/i3/rofi.bash create mode 100755 files/.config/i3/startup.bash create mode 100755 files/.config/polybar/bluetooth.bash create mode 100644 files/.config/polybar/config create mode 100755 files/.config/polybar/openvpn.bash create mode 100755 files/.config/polybar/redshift.bash create mode 100755 files/.config/polybar/wifi_toggle.bash create mode 100644 files/.config/ranger/commands.py create mode 100644 files/.config/ranger/rc.conf create mode 100644 files/.config/ranger/rifle.conf create mode 100755 files/.config/ranger/scope.sh create mode 100644 files/.config/redshift.conf create mode 100644 files/.config/rofi-pass/config create mode 100644 files/.config/zsh/.@dir create mode 100644 files/.config/zsh/custom/000-env.zsh create mode 100644 files/.config/zsh/custom/100-alias.zsh create mode 100644 files/.config/zsh/custom/101-function.zsh create mode 100644 files/.config/zsh/custom/102-autocompletion.zsh create mode 100644 files/.config/zsh/custom/200-motd.zsh create mode 100644 files/.config/zsh/custom/300-syntax-highlighting.zsh create mode 100644 files/.config/zsh/custom/301-autosuggestion.zsh create mode 100644 files/.config/zsh/custom/config/neofetch-splash.bash create mode 100644 files/.config/zsh/custom/themes/noglyph.zsh-theme create mode 100644 files/.config/zsh/oh-my-zsh/cache/.gitkeep create mode 100644 files/.config/zsh/oh-my-zsh/custom/example.zsh create mode 100644 files/.config/zsh/oh-my-zsh/custom/plugins/example/example.plugin.zsh create mode 100644 files/.config/zsh/oh-my-zsh/log/.gitkeep create mode 100644 files/.gtkrc-2.0 create mode 100644 files/.icons/default/index.theme create mode 100755 files/.local/bin/apod create mode 100755 files/.local/bin/emp create mode 100755 files/.local/bin/lock create mode 100755 files/.local/bin/mvn-findclass create mode 100755 files/.local/bin/remmina-pretty create mode 100755 files/.local/bin/sshot create mode 100755 files/.local/bin/to7zip create mode 100644 files/.profile create mode 100644 files/.tmux.conf create mode 100644 files/.vim/.@dir create mode 160000 files/.vim/bundle/repos/github.com/Shougo/dein.vim create mode 100644 files/.vim/vimrc create mode 100644 files/.xbindkeysrc create mode 100644 files/.xinitrc create mode 100644 files/.xprofile create mode 100644 files/.zprofile create mode 100644 files/.zshrc create mode 100755 install.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c86c59 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +files.local/ +scripts.local/ +.vagrant/ +*.swp + +files/.vim/swap/ +files/.vim/bundle/ +!files/.vim/bundle/repos/github.com/Shougo/dein.vim/ + diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0c121e2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,16 @@ +[submodule "files/.config/zsh/oh-my-zsh"] + path = files/.config/zsh/oh-my-zsh + url = https://github.com/robbyrussell/oh-my-zsh.git + branch = master +[submodule "files/.config/zsh/custom/plugins/zsh-syntax-highlighting"] + path = files/.config/zsh/custom/plugins/zsh-syntax-highlighting + url = https://github.com/zsh-users/zsh-syntax-highlighting.git + branch = master +[submodule "files/.config/zsh/custom/plugins/zsh-autosuggestions"] + path = files/.config/zsh/custom/plugins/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions.git + branch = master +[submodule "files/.vim/bundle/repos/github.com/Shougo/dein.vim"] + path = files/.vim/bundle/repos/github.com/Shougo/dein.vim + url = https://github.com/Shougo/dein.vim.git + branch = master diff --git a/README.md b/README.md new file mode 100644 index 0000000..52f8a73 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Dotfiles +![xkcd 1806](https://imgs.xkcd.com/comics/borrow_your_laptop.png) + +## Install +Clone the repository with the submodules and run the install script to symlink the files your `$HOME` directory: +``` +git clone --recurse-submodules https://github.com/badjware/dotfiles.git ~/.dotfiles +cd ~/.dotfiles +./install.sh +``` + +The install script supports some options. For exemple: + +* Don't ask for confirmation: `./install.sh --yes` +* Copy instead of creating symlinks: `./install.sh --copy` + +For a full list of options, run `./install.sh --help`. + diff --git a/files/.Xresources b/files/.Xresources new file mode 100644 index 0000000..4df9dec --- /dev/null +++ b/files/.Xresources @@ -0,0 +1,150 @@ +#define C_BACKGROUND #1c1c1c +#define C_FOREGROUND #B7BBB7 +#define C_BLACK #2C2F33 +#define C_RED #B04C50 +#define C_GREEN #919652 +#define C_YELLOW #E2995C +#define C_BLUE #66899D +#define C_MAGENTA #8D6494 +#define C_CYAN #527C77 +#define C_LIGHT_GREY #606360 +#define C_DARK_GREY #4B5056 +#define C_WHITE #DDE3DC + +#define C_PRIMARY C_YELLOW +#define C_SECONDARY C_MAGENTA +#define C_ERROR C_RED +#define C_FG C_FOREGROUND +#define C_FG_ENABLED C_WHITE +#define C_FG_DISABLED C_LIGHT_GREY +#define C_BG #111314 +#define C_BG_ENABLED #2c2f33 +#define C_BG_DISABLED C_BACKGROUND + + +! Fonts +#define F_MONO Knack Nerd Font +#define F_SANS Roboto +#define F_ICON_1 Material Icons +#define F_ICON_2 material\-wifi + +! Colors +*color.bg: C_BG +*color.bg-enabled: C_BG_ENABLED +*color.bg-disabled: C_BG_DISABLED +*color.fg: C_FG +*color.fg-enabled: C_FG_ENABLED +*color.fg-disabled: C_FG_DISABLED +*color.primary: C_PRIMARY +*color.secondary: C_SECONDARY +*color.error: C_ERROR + +! X +Xcursor.size: 16 + +! Rofi +! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg' +rofi.color-normal: C_BG, C_FG, C_BG_DISABLED, C_BG_ENABLED, C_FG_ENABLED +rofi.color-urgent: C_BG, C_SECONDARY, C_BG_DISABLED, C_BG_ENABLED, C_SECONDARY +rofi.color-active: C_BG, C_PRIMARY, C_BG_DISABLED, C_BG_ENABLED, C_PRIMARY + +! 'background', 'border', 'separator' +rofi.color-window: C_BG_DISABLED, C_FG_DISABLED, C_FG_DISABLED + +rofi.separator-style: none +rofi.bw: 0 +rofi.width: 40 +rofi.location: 0 +rofi.font: F_SANS 12 + +! i3 +i3wm*font: F_MONO + +! lock +lock.font: F_SANS + +! urxvt +Xft.dpi: 96 +Xft.antialias: true +Xft.hinting: full +urxvt.font: xft:F_MONO:size=11 +urxvt.cursorBlink: on + +urxvt.scrollBar: false +urxvt.scrollTtykeypress: true +urxvt.secondaryScreen: 1 +urxvt.secondaryWheel: 1 +urxvt.secondaryScroll: 0 + +!urxvt.transparent: true +!urxvt.shading: 20 +urxvt.depth: 32 +urxvt.background: rgba:0200/0200/0200/c800 + +!urxvt.background: C_BACKGROUND +urxvt.foreground: C_FOREGROUND +urxvt.color0: C_BLACK +urxvt.color8: C_DARK_GREY +urxvt.color1: C_RED +urxvt.color9: C_RED +urxvt.color2: C_GREEN +urxvt.color10: C_GREEN +urxvt.color3: C_YELLOW +urxvt.color11: C_YELLOW +urxvt.color4: C_CYAN +urxvt.color12: C_CYAN +urxvt.color5: C_MAGENTA +urxvt.color13: C_MAGENTA +urxvt.color6: C_BLUE +urxvt.color14: C_BLUE +urxvt.color7: C_LIGHT_GREY +urxvt.color15: C_WHITE + +! xterm +xterm.termName: xterm-256color +xterm.vt100.locale: true + +xterm*borderWidth: 0 + +! font +xterm*renderFont: true +xterm*faceName: F_MONO +xterm*faceSize: 11 + +! encoding +xterm.ttyModes: erase ^? +xterm.vt100.backarrowKey: false +xterm.vt100.metaSendsEscape: true +xterm.vt100.translations: #override \n\ + Ctrl minus: smaller-vt-font() \n\ + Ctrl plus: larger-vt-font() \n\ + Ctrl 0: set-vt-font(d) \n\ + Ctrl Shift C: copy-selection(CLIPBOARD) \n\ + Ctrl Shift V: insert-selection(CLIPBOARD) \n\ + Shift : exec-formatted("xdg-open '%t'", PRIMARY) + +! mouse selection +xterm*on3Clicks: regex ([[:alpha:]]+://)?([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+ +xterm*highlightSelection: true +xterm*trimSelection: true + +! color +xterm*background: C_BACKGROUND +xterm*foreground: C_FOREGROUND +xterm*color0: C_BLACK +xterm*color8: C_DARK_GREY +xterm*color1: C_RED +xterm*color9: C_RED +xterm*color2: C_GREEN +xterm*color10: C_GREEN +xterm*color3: C_YELLOW +xterm*color11: C_YELLOW +xterm*color4: C_CYAN +xterm*color12: C_CYAN +xterm*color5: C_MAGENTA +xterm*color13: C_MAGENTA +xterm*color6: C_BLUE +xterm*color14: C_BLUE +xterm*color7: C_LIGHT_GREY +xterm*color15: C_WHITE + diff --git a/files/.config/compton/compton.conf b/files/.config/compton/compton.conf new file mode 100644 index 0000000..9e115c0 --- /dev/null +++ b/files/.config/compton/compton.conf @@ -0,0 +1,254 @@ +# Thank you code_nomad: http://9m.no/ꪯ鵞 + +################################# +# +# Backend +# +################################# + +# Backend to use: "xrender" or "glx". +# GLX backend is typically much faster but depends on a sane driver. +backend = "glx"; + +################################# +# +# GLX backend +# +################################# + +glx-no-stencil = true; + +# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all. +# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified, +# but a 20% increase when only 1/4 is. +# My tests on nouveau show terrible slowdown. +# Useful with --glx-swap-method, as well. +glx-copy-from-front = false; + +# GLX backend: Use MESA_copy_sub_buffer to do partial screen update. +# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated. +# May break VSync and is not available on some drivers. +# Overrides --glx-copy-from-front. +glx-use-copysubbuffermesa = false; + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe). +# Recommended if it works. +glx-no-rebind-pixmap = true; + + +# GLX backend: GLX buffer swap method we assume. +# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1). +# undefined is the slowest and the safest, and the default value. +# copy is fastest, but may fail on some drivers, +# 2-6 are gradually slower but safer (6 is still faster than 0). +# Usually, double buffer means 2, triple buffer means 3. +# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers. +# Useless with --glx-use-copysubbuffermesa. +# Partially breaks --resize-damage. +# Defaults to undefined. +glx-swap-method ="-1"; + +################################# +# +# Shadows +# +################################# + +# Enabled client-side shadows on windows. +shadow = true; +# Don't draw shadows on DND windows. +no-dnd-shadow = true; +# Avoid drawing shadows on dock/panel windows. +no-dock-shadow = true; +# Zero the part of the shadow's mask behind the window. Fix some weirdness with ARGB windows. +clear-shadow = true; +# The blur radius for shadows. (default 12) +shadow-radius = 5; +# The left offset for shadows. (default -15) +shadow-offset-x = -5; +# The top offset for shadows. (default -15) +shadow-offset-y = -5; +# The translucency for shadows. (default .75) +shadow-opacity = 0.5; + +# Set if you want different colour shadows +# shadow-red = 0.0; +# shadow-green = 0.0; +# shadow-blue = 0.0; + +# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches +# (most applications are fine, only apps that do weird things with xshapes or argb are affected). +# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. +shadow-exclude = [ + "! name~=''", + "name = 'Notification'", + "name = 'Plank'", + "name = 'Docky'", + "name = 'Kupfer'", + "name = 'xfce4-notifyd'", + "name *= 'VLC'", + "name *= 'compton'", + "name *= 'Chromium'", + "name *= 'Chrome'", + "class_g = 'Conky'", + "class_g = 'Kupfer'", + "class_g = 'Synapse'", + "class_g ?= 'Notify-osd'", + "class_g ?= 'Cairo-dock'", + "class_g ?= 'Xfce4-notifyd'", + "class_g ?= 'Xfce4-power-manager'", + "_GTK_FRAME_EXTENTS@:c" +]; +# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) +shadow-ignore-shaped = false; + +################################# +# +# Opacity +# +################################# + +menu-opacity = 1; +inactive-opacity = 1; +active-opacity = 1; +frame-opacity = 1; +inactive-opacity-override = true; +alpha-step = 0.06; + +# Dim inactive windows. (0.0 - 1.0) +#inactive-dim = 0.3; +# Do not let dimness adjust based on window opacity. +# inactive-dim-fixed = true; +# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. +blur-background = false; +# Blur background of opaque windows with transparent frames as well. +blur-background-frame = false; +# Do not let blur radius adjust based on window opacity. +blur-background-fixed = false; + +blur-kern = "7x7box"; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + +opacity-rule = [ + "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", + + "90:class_g = 'UXTerm' && _NET_WM_STATE@:32a != '_NET_WM_STATE_HIDDEN' && _NET_WM_STATE@:32a != '_NET_WM_STATE_FULLSCREEN'" +] + +################################# +# +# Fading +# +################################# + +# Fade windows during opacity changes. +fading = true; +# The time between steps in a fade in milliseconds. (default 10). +fade-delta = 4; +# Opacity change between steps while fading in. (default 0.028). +fade-in-step = 0.03; +# Opacity change between steps while fading out. (default 0.03). +fade-out-step = 0.03; +# Fade windows in/out when opening/closing +# no-fading-openclose = true; + +# Specify a list of conditions of windows that should not be faded. +fade-exclude = [ +]; + +################################# +# +# Other +# +################################# + +# Try to detect WM windows and mark them as active. +mark-wmwin-focused = true; +# Mark all non-WM but override-redirect windows active (e.g. menus). +mark-ovredir-focused = true; +# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. +# Usually more reliable but depends on a EWMH-compliant WM. +use-ewmh-active-win = true; +# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. +detect-rounded-corners = true; + +# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows. +# This prevents opacity being ignored for some apps. +# For example without this enabled my xfce4-notifyd is 100% opacity no matter what. +detect-client-opacity = true; + +# Specify refresh rate of the screen. +# If not specified or 0, compton will try detecting this with X RandR extension. +refresh-rate = 0; + +# Set VSync method. VSync methods currently available: +# none: No VSync +# drm: VSync with DRM_IOCTL_WAIT_VBLANK. May only work on some drivers. +# opengl: Try to VSync with SGI_video_sync OpenGL extension. Only work on some drivers. +# opengl-oml: Try to VSync with OML_sync_control OpenGL extension. Only work on some drivers. +# opengl-swc: Try to VSync with SGI_swap_control OpenGL extension. Only work on some drivers. Works only with GLX backend. Known to be most effective on many drivers. Does not actually control paint timing, only buffer swap is affected, so it doesn’t have the effect of --sw-opti unlike other methods. Experimental. +# opengl-mswc: Try to VSync with MESA_swap_control OpenGL extension. Basically the same as opengl-swc above, except the extension we use. +# (Note some VSync methods may not be enabled at compile time.) +vsync = "none"; + +# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. +# Reported to have no effect, though. +dbe = false; + +# Painting on X Composite overlay window. Recommended. +paint-on-overlay = true; + +# Limit compton to repaint at most once every 1 / refresh_rate second to boost performance. +# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +sw-opti = true; + +# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games. +# Known to cause flickering when redirecting/unredirecting windows. +# paint-on-overlay may make the flickering less obvious. +unredir-if-possible = true; + +# Specify a list of conditions of windows that should always be considered focused. +focus-exclude = [ ]; + +# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time. +detect-transient = true; +# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time. +# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too. +detect-client-leader = true; + +################################# +# +# Window type settings +# +################################# + +wintypes: +{ + tooltip = + { + fade = true; + shadow = false; + opacity = 0.85; + focus = true; + }; + + dropdown_menu = + { + fade = false; + }; + + popup_menu = + { + fade = false; + }; + + combo = + { + fade = false; + }; +}; diff --git a/files/.config/dunst/dunstrc b/files/.config/dunst/dunstrc new file mode 100644 index 0000000..1aba318 --- /dev/null +++ b/files/.config/dunst/dunstrc @@ -0,0 +1,326 @@ +[global] + ### Display ### + + # 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 window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # 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 respectively. + # 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 = "300x5-30+20" + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # 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 = frame + + # Sort messages by urgency. + sort = yes + + # 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. + # Transient notifications ignore this setting. + idle_threshold = 120 + + ### Text ### + + font = Monospace 8 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # 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 + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # 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 = yes + + # When word_wrap is set to no, specify where to ellipsize long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Merge multiple notifications with the same content + stack_duplicates = true + + # Hide the count of merged notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = off + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 32 + + # Paths to default icons. + icon_path = /usr/share/icons/Vibrancy-Vibrancy-Colors/status/16/:/usr/share/icons/Vibrancy-Colors/devices/16 + + ### History ### + + # 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 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +[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 = ctrl+space + + # Close all notifications. + close_all = ctrl+shift+space + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". Make sure this key actually exists on your keyboard layout, + # e.g. check output of 'xmodmap -pke' + history = ctrl+grave + + # Context menu. + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 10 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + background = "#285577" + foreground = "#ffffff" + timeout = 10 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# 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 = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[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 +# +# vim: ft=cfg diff --git a/files/.config/gtk-3.0/settings.ini b/files/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..c2cbb31 --- /dev/null +++ b/files/.config/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-icon-theme-name=custom +gtk-theme-name=Vertex +gtk-application-prefer-dark-theme=0 +gtk-font-name=Cantarell 11 +gtk-cursor-theme-name=Breeze_Snow +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_TEXT +gtk-toolbar-icon-size=GTK_ICON_SIZE_MENU +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=0 +gtk-xft-hintstyle=hintfull diff --git a/files/.config/i3/config b/files/.config/i3/config new file mode 100644 index 0000000..ca8abbb --- /dev/null +++ b/files/.config/i3/config @@ -0,0 +1,232 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + + +# Set colors from Xresources +# Change 'color7' and 'color2' to whatever colors you want i3 to use +# from the generated scheme. +# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if +# it fails to get colors from Xresources for some reason. +set_from_resource $fg i3wm.color.fg #000000 +set_from_resource $fg_disabled i3wm.color.fg-disabled #000000 +set_from_resource $bg i3wm.color.bg #FFFFFF +set_from_resource $bg_enabled i3wm.color.bg-enabled #FFFFFF +set_from_resource $primary i3wm.color.primary #FF0000 +set_from_resource $secondary i3wm.color.secondary #FF0000 + +# class border backgr. text indicator child_border +client.focused $bg_enabled $bg_enabled $fg $secondary $primary +client.focused_inactive $bg $bg $fg $secondary $bg +client.unfocused $bg $bg $fg_disabled $secondary $bg +client.urgent $bg $bg $primary $secondary $bg +client.placeholder $bg $bg $fg_disabled $secondary $bg + +client.background $bg + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +set_from_resource $font i3wm.color.font monospace +font pango:$font 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# window title +for_window [class="^.*"] border pixel 1 title_format " %title" +for_window [floating] border pixel 2 +smart_borders on + +# Gaps +gaps inner 16 +gaps outer -8 +smart_gaps on + +# Floating mod +for_window [class="^Pavucontrol$"] floating enable +for_window [class="Remmina" title="Remmina Remote Desktop Client"] floating enable +for_window [class="feh" title="pinned screenshot"] floating enable sticky enable +for_window [class="TeamViewer" title="Computers & Contacts"] floating enable + +# https://github.com/ValveSoftware/steam-for-linux/issues/1040 +for_window [class="^Steam$" title="^Friends$"] floating enable +for_window [class="^Steam$" title="Steam - News"] floating enable +for_window [class="^Steam$" title=".* - Chat"] floating enable +for_window [class="^Steam$" title="^Settings$"] floating enable +for_window [class="^Steam$" title=".* - event started"] floating enable +for_window [class="^Steam$" title=".* CD key"] floating enable +for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable +for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable +for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable +for_window [title="^Steam Keyboard$"] floating enable + +# mod key +set $mod Mod4 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec i3-sensible-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# start rofi (a program launcher) +bindsym $mod+Control+Return exec /bin/bash ~/.config/i3/rofi.bash +# start rofi-pass for password autotype +bindsym $mod+Shift+Return exec rofi-pass + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor 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 + +# split in horizontal orientation +bindsym $mod+Shift+backslash split h # | +bindsym $mod+backslash split h + +# split in vertical orientation +bindsym $mod+minus split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +bindsym $mod+d focus child + +# switch to workspace +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 + +#bindsym $mod+Ctrl+Up workspace next +#bindsym $mod+Ctrl+Down workspace prev + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# Assignation +assign [class="^Slack$"] 1 +assign [class="^Discord$"] 1 +assign [class="^looking-glass-client$"] 3 + +# screen +workspace 1 output HDMI-2 +workspace 2 output HDMI-2 +workspace 3 output HDMI-1 +workspace 4 output HDMI-1 +workspace 5 output HDMI-1 +workspace 6 output HDMI-1 +workspace 7 output HDMI-1 +workspace 8 output HDMI-1 +workspace 9 output HDMI-1 +workspace 10 output HDMI-1 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" +# toggle compton +bindsym $mod+c exec --no-startup-id killall compton || compton --config ~/.config/compton/compton.conf +# lock the screen +bindsym $mod+Pause exec lock +# suspend +bindsym $mod+Shift+Pause exec systemctl suspend + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 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 Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +exec --no-startup-id compton --config ~/.config/compton/compton.conf +exec --no-startup-id polybar top +exec --no-startup-id /bin/bash ~/.config/i3/startup.bash + diff --git a/files/.config/i3/rofi.bash b/files/.config/i3/rofi.bash new file mode 100755 index 0000000..53625e6 --- /dev/null +++ b/files/.config/i3/rofi.bash @@ -0,0 +1,3 @@ +#!/bin/bash +rofi -combi drun -show drun -modi drun,window + diff --git a/files/.config/i3/startup.bash b/files/.config/i3/startup.bash new file mode 100755 index 0000000..ad3f445 --- /dev/null +++ b/files/.config/i3/startup.bash @@ -0,0 +1,15 @@ +#!/bin/bash + +# Set wallpaper +#wal -i "$(< "${HOME}/.cache/wal/wal")" + +# Initial workspace and startup app +i3-msg "workspace 2" +i3-sensible-terminal & + +# sleep a bit to allow polybar to fully load +sleep 3 +nextcloud & +remmina --icon & +slack & + diff --git a/files/.config/polybar/bluetooth.bash b/files/.config/polybar/bluetooth.bash new file mode 100755 index 0000000..eb68933 --- /dev/null +++ b/files/.config/polybar/bluetooth.bash @@ -0,0 +1,14 @@ +#!/bin/bash + +if rfkill list bluetooth | grep "yes" >/dev/null; then + if [[ "$1" == "toggle" ]]; then + rfkill unblock bluetooth + fi + echo "$ICO_BLU_OFF" +else + if [[ "$1" == "toggle" ]]; then + rfkill block bluetooth + fi + echo "$ICO_BLU_ON" +fi + diff --git a/files/.config/polybar/config b/files/.config/polybar/config new file mode 100644 index 0000000..9cebe0f --- /dev/null +++ b/files/.config/polybar/config @@ -0,0 +1,262 @@ +;===================================================== +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains alot of information +; +;===================================================== + +[colors] +bg = ${xrdb:polybar.color.bg} +bg-enabled = ${xrdb:polybar.color.bg-enabled} +fg = ${xrdb:polybar.color.fg} +fg-disabled = ${xrdb:polybar.color.fg-disabled} + +primary = ${xrdb:polybar.color.primary} +secondary = ${xrdb:polybar.color.secondary} + +[bar/top] +monitor = ${env:PRIMARY_MONITOR:HDMI-1} +width = 100% +height = 28 + +fixed-center = true + +background = ${colors.bg} +foreground = ${colors.fg} + +;line-size = 3 +;line-color = ${colors.background-highlight} + +;border-bottom-size = 2 +;border-color =${colors.bg} + +padding-left = 0 +padding-right = 0 + +module-margin-left = 0 +module-margin-right = 1 + +font-0 = Hack:pixelsize=10;3 +font-1 = FontAwesome:pixelsize=10;3 +font-2 = material\-wifi:pizelsize=10;3 +font-3 = Material Icons:pizelsize=11;4 + +modules-left = i3 +modules-center = title +modules-right = date memory cpu battery openvpn wireless-network bluetooth volume backlight + +tray-position = right +tray-padding = 7 +tray-maxsize = 16 + +tray-transparent = false +tray-background = ${colors.bg} + +;wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +scroll-up = i3wm-wsnext +scroll-down = i3wm-wsprev + +[module/base] +icon-foreground = ${colors.fg} + +[module/labeled-base] +label-margin = 1 +label-foreground = ${colors.fg} + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +pin-workspaces = false + +; ws-icon-default = ${env:ICO_WS2} + +label-mode-foreground = ${colors.primary} +label-mode-padding = 1 + +; unfocused = Inactive workspace on any monitor +label-unfocused = " %index% " +label-unfocused-foreground = ${colors.fg-disabled} +label-unfocused-padding = ${self.label-mode-padding} + +; focused = Active workspace on focused monitor +label-focused = ${self.label-unfocused} +label-focused-foreground = ${colors.fg} +label-focused-background = ${colors.bg-enabled} +label-focused-padding = ${self.label-mode-padding} + +label-visible = ${self.label-focused} +label-visible-foreground = ${module/labeled-base.label-foreground} +label-visible-padding = ${self.label-mode-padding} + +; urgent = Workspace with urgency hint set +label-urgent = ${self.label-unfocused} +label-urgent-foreground = ${colors.primary} +label-urgent-padding = ${self.label-mode-padding} + +[module/xbacklight] +type = internal/xbacklight +inherit = module/base + +format = + +ramp-0 = ${env:ICO_BL1} +ramp-1 = ${env:ICO_BL2} +ramp-2 = ${env:ICO_BL3} +ramp-3 = ${env:ICO_BL4} +ramp-4 = ${env:ICO_BL5} +ramp-5 = ${env:ICO_BL6} +ramp-6 = ${env:ICO_BL7} +ramp-foreground = ${colors.fg} + +[module/backlight] +type = internal/backlight +inherit = module/xbacklight +card = intel_backlight + +scroll-up = "brightnessctl set +5%" +scroll-down = "brightnessctl set 5%-" + +[module/cpu] +type = internal/cpu +inherit = module/labeled-base +interval = 5 +format-prefix = ${env:ICO_CPU} + +label-margin = 0 +label = "%percentage:3%% " + +[module/memory] +type = internal/memory +inherit = module/labeled-base +interval = 5 +format-prefix = ${env:ICO_MEM} + +label-margin = 0 +label = "%percentage_used:3%% " + +[module/wireless-network] +type = internal/network +interface = wlan0 +interval = 5 + +format-connected = +format-disconnected = + +label-connected-foreground = ${module/labeled-base.label-foreground} +label-connected-margin = ${module/labeled-base.label-margin} + +label-connected = %essid% +label-disconnected = ${env:ICO_WDC} +label-disconnected-foreground = ${colors.fg-disabled} + +ramp-signal-0 = ${env:ICO_WC1} +ramp-signal-1 = ${env:ICO_WC2} +ramp-signal-2 = ${env:ICO_WC3} +ramp-signal-3 = ${env:ICO_WC4} + +click-left = ~/.config/polybar/wifi_toggle.bash + +[module/date] +type = internal/date +inherit = module/labeled-base +interval = 1 +format-prefix = ${env:ICO_DATE} + +date = "%Y-%m-%d %H:%M" +label = "%date%" + +[module/title] +type = internal/xwindow + +label = %title% +label-maxlen = 50 + +[module/volume] +type = internal/volume +inherit = module/base + +format-muted-foreground = ${colors.fg-disabled} +format-volume = + +label-muted = ${env:ICO_MUTE} +ramp-volume-0 = ${env:ICO_VOL1} +ramp-volume-1 = ${env:ICO_VOL2} +ramp-volume-2 = ${env:ICO_VOL3} + +click-right = pavucontrol + +[module/battery] +type = internal/battery +inherit = module/labeled-base +battery = BAT0 +adapter = AC0 +full-at = 95 + +time-format = %H:%M + +label-charging-foreground = ${module/labeled-base.label-foreground} +label-charging-margin = 0 +label-charging = "%percentage:3%% " +#label-charging = %time% +format-charging = + +#label-discharging = %time% +label-discharging-foreground = ${module/labeled-base.label-foreground} +label-discharging-margin = 0 +label-discharging = "%percentage:3%% " +format-discharging = + +format-full-prefix = ${env:ICO_PLUG} +format-full-foreground-prefix = ${colors.fg} +label-full = " " + +ramp-capacity-0 = ${env:ICO_BAT1} +ramp-capacity-1 = ${env:ICO_BAT2} +ramp-capacity-2 = ${env:ICO_BAT3} +ramp-capacity-3 = ${env:ICO_BAT4} +ramp-capacity-4 = ${env:ICO_BAT5} +ramp-capacity-foreground = ${colors.fg} +ramp-capacity-0-foreground = ${colors.secondary} + +animation-charging-0 = ${env:ICO_BAT2} +animation-charging-1 = ${env:ICO_BAT3} +animation-charging-2 = ${env:ICO_BAT4} +animation-charging-3 = ${env:ICO_BAT5} +animation-charging-foreground = ${colors.fg} +animation-charging-framerate = 750 + +[module/redshift] +type = custom/script +inherit = module/base +interval = 1 +exec = ~/.config/polybar/redshift.bash status +click-left = ~/.config/polybar/redshift.bash toggle + +[module/bluetooth] +type = custom/script +inherit = module/base +interval = 1 +exec = ~/.config/polybar/bluetooth.bash +click-left = ~/.config/polybar/bluetooth.bash toggle + +[module/openvpn] +type = custom/script +inherit = module/base +interval = 1 +exec = /bin/bash ~/.config/polybar/openvpn.bash +click-left = sudo systemctl restart openvpn-client@vpn.massaki.ca + +; vim:ft=dosini diff --git a/files/.config/polybar/openvpn.bash b/files/.config/polybar/openvpn.bash new file mode 100755 index 0000000..2e1a779 --- /dev/null +++ b/files/.config/polybar/openvpn.bash @@ -0,0 +1,7 @@ +#!/bin/bash + +if ! pgrep "openvpn" &>/dev/null || ! ip link | grep -q tun; then + echo "$ICO_VPN_OFF " +else + echo "$ICO_VPN_ON " +fi diff --git a/files/.config/polybar/redshift.bash b/files/.config/polybar/redshift.bash new file mode 100755 index 0000000..c7a429d --- /dev/null +++ b/files/.config/polybar/redshift.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +systemctl --user status redshift >/dev/null +redshift_status=$? + +if [[ $1 = "toggle" ]]; then + if [[ redshift_status -eq 0 ]]; then + systemctl --user stop redshift & + redshift_status=1 + else + systemctl --user start redshift & + redshift_status=0 + fi +fi + +if [[ redshift_status -eq 0 ]]; then + #temp="$(redshift -p | egrep -o '[0-9]+K$')" + #echo "$STR_RED_ON $temp" + echo "$ICO_RED_ON" +else + #echo "$STR_RED_OFF ----k" + echo "$ICO_RED_OFF" +fi + diff --git a/files/.config/polybar/wifi_toggle.bash b/files/.config/polybar/wifi_toggle.bash new file mode 100755 index 0000000..499d792 --- /dev/null +++ b/files/.config/polybar/wifi_toggle.bash @@ -0,0 +1,8 @@ +#!/bin/bash + +if rfkill list wifi | grep "yes" >/dev/null; then + rfkill unblock wifi +else + rfkill block wifi +fi + diff --git a/files/.config/ranger/commands.py b/files/.config/ranger/commands.py new file mode 100644 index 0000000..1386e84 --- /dev/null +++ b/files/.config/ranger/commands.py @@ -0,0 +1,61 @@ +# This is a sample commands.py. You can add your own commands here. +# +# Please refer to commands_full.py for all the default commands and a complete +# documentation. Do NOT add them all here, or you may end up with defunct +# commands when upgrading ranger. + +# You always need to import ranger.api.commands here to get the Command class: +from ranger.api.commands import * + +# A simple command for demonstration purposes follows. +# ----------------------------------------------------------------------------- + +# You can import any python module as needed. +import os + +# Any class that is a subclass of "Command" will be integrated into ranger as a +# command. Try typing ":my_edit" in ranger! + + +class my_edit(Command): + # The so-called doc-string of the class will be visible in the built-in + # help that is accessible by typing "?c" inside ranger. + """:my_edit + + A sample command for demonstration purposes that opens a file in an editor. + """ + + # The execute method is called when you run this command in ranger. + def execute(self): + # self.arg(1) is the first (space-separated) argument to the function. + # This way you can write ":my_edit somefilename". + if self.arg(1): + # self.rest(1) contains self.arg(1) and everything that follows + target_filename = self.rest(1) + else: + # self.fm is a ranger.core.filemanager.FileManager object and gives + # you access to internals of ranger. + # self.fm.thisfile is a ranger.container.file.File object and is a + # reference to the currently selected file. + target_filename = self.fm.thisfile.path + + # This is a generic function to print text in ranger. + self.fm.notify("Let's edit the file " + target_filename + "!") + + # Using bad=True in fm.notify allows you to print error messages: + if not os.path.exists(target_filename): + self.fm.notify("The given file does not exist!", bad=True) + return + + # This executes a function from ranger.core.acitons, a module with a + # variety of subroutines that can help you construct commands. + # Check out the source, or run "pydoc ranger.core.actions" for a list. + self.fm.edit_file(target_filename) + + # The tab method is called when you press tab, and should return a list of + # suggestions that the user will tab through. + # tabnum is 1 for and -1 for by default + def tab(self, tabnum): + # This is a generic tab-completion function that iterates through the + # content of the current directory. + return self._tab_directory_content() diff --git a/files/.config/ranger/rc.conf b/files/.config/ranger/rc.conf new file mode 100644 index 0000000..a0453e7 --- /dev/null +++ b/files/.config/ranger/rc.conf @@ -0,0 +1,612 @@ +# =================================================================== +# This file contains the default startup commands for ranger. +# To change them, it is recommended to create the file +# ~/.config/ranger/rc.conf and add your custom commands there. +# +# If you copy this whole file there, you may want to set the environment +# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. +# +# The purpose of this file is mainly to define keybindings and settings. +# For running more complex python code, please create a plugin in "plugins/" or +# a command in "commands.py". +# +# Each line is a command that will be run before the user interface +# is initialized. As a result, you can not use commands which rely +# on the UI such as :delete or :mark. +# =================================================================== + +# =================================================================== +# == Options +# =================================================================== + +# Which viewmode should be used? Possible values are: +# miller: Use miller columns which show multiple levels of the hierarchy +# multipane: Midnight-commander like multipane view showing all tabs next +# to each other +#set viewmode miller +#set viewmode multipane + +# How many columns are there, and what are their relative widths? +#set column_ratios 1,3,4 + +# 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 + +# Ask for a confirmation when running the "delete" command? +# Valid values are "always", "never", "multiple" (default) +# With "multiple", ranger will ask only if you delete multiple files at once. +#set confirm_on_delete multiple + +# Which script is used to generate file previews? +# ranger ships with scope.sh, a script that calls external programs (see +# README.md for dependencies) to preview images, archives, etc. +#set preview_script ~/.config/ranger/scope.sh + +# Use the external preview script or display simple plain text or image previews? +#set use_preview_script true + +# Automatically count files in the directory, even before entering them? +#set automatically_count_files true + +# Open all images in this directory when running certain image viewers +# like feh or sxiv? You can still open selected files by marking them. +#set open_all_images true + +# Be aware of version control systems and display information. +#set vcs_aware false + +# State of the three backends git, hg, bzr. The possible states are +# disabled, local (only show local info), enabled (show local and remote +# information). +#set vcs_backend_git enabled +#set vcs_backend_hg disabled +#set vcs_backend_bzr disabled + +# Use one of the supported image preview protocols +set preview_images true + +# Set the preview image method. Supported methods: +# +# * w3m (default): +# Preview images in full color with the external command "w3mimgpreview"? +# This requires the console web browser "w3m" and a supported terminal. +# It has been successfully tested with "xterm" and "urxvt" without tmux. +# +# * iterm2: +# Preview images in full color using iTerm2 image previews +# (http://iterm2.com/images.html). This requires using iTerm2 compiled +# with image preview support. +# +# * urxvt: +# Preview images in full color using urxvt image backgrounds. This +# requires using urxvt compiled with pixbuf support. +# +# * urxvt-full: +# The same as urxvt but utilizing not only the preview pane but the +# whole terminal window. +#set preview_images_method w3m + +# Use a unicode "..." character to mark cut-off filenames? +#set unicode_ellipsis false + +# Show dotfiles in the bookmark preview box? +#set show_hidden_bookmarks true + +# Which colorscheme to use? These colorschemes are available by default: +# default, jungle, snow, solarized +#set colorscheme default + +# Preview files on the rightmost column? +# And collapse (shrink) the last column if there is nothing to preview? +#set preview_files true +#set preview_directories true +#set collapse_preview true + +# Save the console history on exit? +#set save_console_history true + +# Draw the status bar on top of the browser window (default: bottom) +#set status_bar_on_top false + +# Draw a progress bar in the status bar which displays the average state of all +# currently running tasks which support progress bars? +#set draw_progress_bar_in_status_bar true + +# Draw borders around columns? +#set draw_borders false + +# Display the directory name in tabs? +#set dirname_in_tabs false + +# Enable the mouse support? +#set mouse_enabled true + +# Display the file size in the main column or status bar? +#set display_size_in_main_column true +#set display_size_in_status_bar true + +# Display files tags in all columns or only in main column? +#set display_tags_in_all_columns true + +# Set a title for the window? +#set update_title false + +# Set the title to "ranger" in the tmux program? +#set update_tmux_title false + +# Shorten the title if it gets long? The number defines how many +# directories are displayed at once, 0 turns off this feature. +#set shorten_title 3 + +# Abbreviate $HOME with ~ in the titlebar (first line) of ranger? +#set tilde_in_titlebar false + +# How many directory-changes or console-commands should be kept in history? +#set max_history_size 20 +#set max_console_history_size 50 + +# Try to keep so much space between the top/bottom border when scrolling: +#set scroll_offset 8 + +# Flush the input after each key hit? (Noticeable when ranger lags) +#set flushinput true + +# Padding on the right when there's no preview? +# This allows you to click into the space to run the file. +#set padding_right true + +# Save bookmarks (used with mX and `X) instantly? +# This helps to synchronize bookmarks between multiple ranger +# instances but leads to *slight* performance loss. +# When false, bookmarks are saved when ranger is exited. +#set autosave_bookmarks true + +# You can display the "real" cumulative size of directories by using the +# command :get_cumulative_size or typing "dc". The size is expensive to +# calculate and will not be updated automatically. You can choose +# to update it automatically though by turning on this option: +#set autoupdate_cumulative_size false + +# Turning this on makes sense for screen readers: +#set show_cursor false + +# One of: size, natural, basename, atime, ctime, mtime, type, random +#set sort natural + +# Additional sorting options +#set sort_reverse false +#set sort_case_insensitive true +#set sort_directories_first true +#set sort_unicode false + +# Enable this if key combinations with the Alt Key don't work for you. +# (Especially on xterm) +#set xterm_alt_key false + +# Whether to include bookmarks in cd command +#set cd_bookmarks true + +# Avoid previewing files larger than this size, in bytes. Use a value of 0 to +# disable this feature. +#set preview_max_size 0 + +# Add the highlighted file to the path in the titlebar +#set show_selection_in_titlebar true + +# The delay that ranger idly waits for user input, in milliseconds, with a +# resolution of 100ms. Lower delay reduces lag between directory updates but +# increases CPU load. +#set idle_delay 2000 + +# When the metadata manager module looks for metadata, should it only look for +# a ".metadata.json" file in the current directory, or do a deep search and +# check all directories above the current one as well? +#set metadata_deep_search false + +# Clear all existing filters when leaving a directory +#set clear_filters_on_dir_change false + +# Disable displaying line numbers in main column +#set line_numbers false + +# =================================================================== +# == Local Options +# =================================================================== +# You can set local options that only affect a single directory. + +# Examples: +# setlocal path=~/downloads sort mtime + +# =================================================================== +# == Command Aliases in the Console +# =================================================================== + +#alias e edit +#alias q quit +#alias q! quitall +#alias qa quitall +#alias qall quitall +#alias setl setlocal + +#alias filter scout -prt +#alias find scout -aeit +#alias mark scout -mr +#alias unmark scout -Mr +#alias search scout -rs +#alias search_inc scout -rts +#alias travel scout -aefiklst + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +#map Q quit! +#map q quit +#copymap q ZZ ZQ + +#map R reload_cwd +#map reset +#map redraw_window +#map abort +#map change_mode normal +#map ~ set viewmode! + +#map i display_file +#map ? help +#map W display_log +#map w taskview_open +#map S shell $SHELL + +#map : console +#map ; console +#map ! console shell%space +#map @ console -p6 shell %%s +#map # console shell -p%space +#map s console shell%space +#map r chain draw_possible_programs; console open_with%%space +#map f console find%space +#map cd console cd%space + +# Change the line mode +#map Mf linemode filename +#map Mi linemode fileinfo +#map Mm linemode mtime +#map Mp linemode permissions +#map Ms linemode sizemtime +#map Mt linemode metatitle + +# Tagging / Marking +#map t tag_toggle +#map ut tag_remove +#map " tag_toggle tag=%any +#map mark_files toggle=True +#map v mark_files all=True toggle=True +#map uv mark_files all=True val=False +#map V toggle_visual_mode +#map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +#map help +#map display_file +#map edit +#map copy +#map cut +#map console mkdir%space +#map console delete +#map exit + +# In case you work on a keyboard with dvorak layout +#map move up=1 +#map move down=1 +#map move left=1 +#map move right=1 +#map move to=0 +#map move to=-1 +#map move down=1 pages=True +#map move up=1 pages=True +#map move right=1 +#map console delete +#map console touch%space + +# VIM-like +#copymap k +#copymap j +#copymap h +#copymap l +#copymap gg +#copymap G +#copymap +#copymap + +#map J move down=0.5 pages=True +#map K move up=0.5 pages=True +#copymap J +#copymap K + +# Jumping around +#map H history_go -1 +#map L history_go 1 +#map ] move_parent 1 +#map [ move_parent -1 +#map } traverse + +#map gh cd ~ +#map ge cd /etc +#map gu cd /usr +#map gd cd /dev +#map gl cd -r . +#map gL cd -r %f +#map go cd /opt +#map gv cd /var +#map gm cd /media +#map gM cd /mnt +#map gs cd /srv +#map gr cd / +#map gR eval fm.cd(ranger.RANGERDIR) +#map g/ cd / +#map g? cd /usr/share/doc/ranger + +# External Programs +#map E edit +#map du shell -p du --max-depth=1 -h --apparent-size +#map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +#map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b +#map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b +#map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b + +# Filesystem Operations +#map = chmod + +#map cw console rename%space +#map a rename_append +#map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) +#map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) + +#map pp paste +#map po paste overwrite=True +#map pP paste append=True +#map pO paste overwrite=True append=True +#map pl paste_symlink relative=False +#map pL paste_symlink relative=True +#map phl paste_hardlink +#map pht paste_hardlinked_subtree + +#map dD console delete + +#map dd cut +#map ud uncut +#map da cut mode=add +#map dr cut mode=remove +#map dt cut mode=toggle + +#map yy copy +#map uy uncut +#map ya copy mode=add +#map yr copy mode=remove +#map yt copy mode=toggle + +# Temporary workarounds +#map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +#map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +#map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +#map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +#map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +#map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +#map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +#map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + +# Searching +#map / console search%space +#map n search_next +#map N search_next forward=False +#map ct search_next order=tag +#map cs search_next order=size +#map ci search_next order=mimetype +#map cc search_next order=ctime +#map cm search_next order=mtime +#map ca search_next order=atime + +# Tabs +#map tab_new ~ +#map tab_close +#map tab_move 1 +#map tab_move -1 +#map tab_move 1 +#map tab_move -1 +#map gt tab_move 1 +#map gT tab_move -1 +#map gn tab_new ~ +#map gc tab_close +#map uq tab_restore +#map tab_open 1 +#map tab_open 2 +#map tab_open 3 +#map tab_open 4 +#map tab_open 5 +#map tab_open 6 +#map tab_open 7 +#map tab_open 8 +#map tab_open 9 + +# Sorting +#map or set sort_reverse! +#map oz set sort=random +#map os chain set sort=size; set sort_reverse=False +#map ob chain set sort=basename; set sort_reverse=False +#map on chain set sort=natural; set sort_reverse=False +#map om chain set sort=mtime; set sort_reverse=False +#map oc chain set sort=ctime; set sort_reverse=False +#map oa chain set sort=atime; set sort_reverse=False +#map ot chain set sort=type; set sort_reverse=False +#map oe chain set sort=extension; set sort_reverse=False + +#map oS chain set sort=size; set sort_reverse=True +#map oB chain set sort=basename; set sort_reverse=True +#map oN chain set sort=natural; set sort_reverse=True +#map oM chain set sort=mtime; set sort_reverse=True +#map oC chain set sort=ctime; set sort_reverse=True +#map oA chain set sort=atime; set sort_reverse=True +#map oT chain set sort=type; set sort_reverse=True +#map oE chain set sort=extension; set sort_reverse=True + +#map dc get_cumulative_size + +# Settings +#map zc set collapse_preview! +#map zd set sort_directories_first! +#map zh set show_hidden! +#map set show_hidden! +#map zI set flushinput! +#map zi set preview_images! +#map zm set mouse_enabled! +#map zp set preview_files! +#map zP set preview_directories! +#map zs set sort_case_insensitive! +#map zu set autoupdate_cumulative_size! +#map zv set use_preview_script! +#map zf console filter%space + +# Bookmarks +#map ` enter_bookmark %any +#map ' enter_bookmark %any +#map m set_bookmark %any +#map um unset_bookmark %any + +#map m draw_bookmarks +#copymap m um ` ' + +# Generate all the chmod bindings with some python help: +#eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) + +#eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) +#eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) + +# =================================================================== +# == Define keys for the console +# =================================================================== +# Note: Unmapped keys are passed directly to the console. + +# Basic +#cmap eval fm.ui.console.tab() +#cmap eval fm.ui.console.tab(-1) +#cmap eval fm.ui.console.close() +#cmap eval fm.ui.console.execute() +#cmap redraw_window + +#copycmap +#copycmap + +# Move around +#cmap eval fm.ui.console.history_move(-1) +#cmap eval fm.ui.console.history_move(1) +#cmap eval fm.ui.console.move(left=1) +#cmap eval fm.ui.console.move(right=1) +#cmap eval fm.ui.console.move(right=0, absolute=True) +#cmap eval fm.ui.console.move(right=-1, absolute=True) +#cmap eval fm.ui.console.move_word(left=1) +#cmap eval fm.ui.console.move_word(right=1) + +# Line Editing +#cmap eval fm.ui.console.delete(-1) +#cmap eval fm.ui.console.delete(0) +#cmap eval fm.ui.console.delete_word() +#cmap eval fm.ui.console.delete_word(backward=False) +#cmap eval fm.ui.console.delete_rest(1) +#cmap eval fm.ui.console.delete_rest(-1) +#cmap eval fm.ui.console.paste() + +# And of course the emacs way +#copycmap +#copycmap +#copycmap +#copycmap +#copycmap +#copycmap +#copycmap +#copycmap + +# Note: There are multiple ways to express backspaces. (code 263) +# and (code 127). To be sure, use both. +#copycmap + +# This special expression allows typing in numerals: +#cmap false + +# =================================================================== +# == Pager Keybindings +# =================================================================== + +# Movement +#pmap pager_move down=1 +#pmap pager_move up=1 +#pmap pager_move left=4 +#pmap pager_move right=4 +#pmap pager_move to=0 +#pmap pager_move to=-1 +#pmap pager_move down=1.0 pages=True +#pmap pager_move up=1.0 pages=True +#pmap pager_move down=0.5 pages=True +#pmap pager_move up=0.5 pages=True + +#copypmap k +#copypmap j +#copypmap h +#copypmap l +#copypmap g +#copypmap G +#copypmap d +#copypmap u +#copypmap n f +#copypmap p b + +# Basic +#pmap redraw_window +#pmap pager_close +#copypmap q Q i +#pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +#tmap taskview_move up=1 +#tmap taskview_move down=1 +#tmap taskview_move to=0 +#tmap taskview_move to=-1 +#tmap taskview_move down=1.0 pages=True +#tmap taskview_move up=1.0 pages=True +#tmap taskview_move down=0.5 pages=True +#tmap taskview_move up=0.5 pages=True + +#copytmap k +#copytmap j +#copytmap g +#copytmap G +#copytmap u +#copytmap n f +#copytmap p b + +# Changing priority and deleting tasks +#tmap J eval -q fm.ui.taskview.task_move(-1) +#tmap K eval -q fm.ui.taskview.task_move(0) +#tmap dd eval -q fm.ui.taskview.task_remove() +#tmap eval -q fm.ui.taskview.task_move(-1) +#tmap eval -q fm.ui.taskview.task_move(0) +#tmap eval -q fm.ui.taskview.task_remove() + +# Basic +#tmap redraw_window +#tmap taskview_close +#copytmap q Q w diff --git a/files/.config/ranger/rifle.conf b/files/.config/ranger/rifle.conf new file mode 100644 index 0000000..b2c34a5 --- /dev/null +++ b/files/.config/ranger/rifle.conf @@ -0,0 +1,213 @@ +# 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: +# , , ... = 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 | The regexp matches $1 +# ext | The regexp matches the extension of $1 +# mime | The regexp matches the mime type of $1 +# name | The regexp matches the basename of $1 +# path | The regexp matches the absolute path of $1 +# has | The program is installed (i.e. located in $PATH) +# env | The environment variable "variable" is non-empty +# file | $1 is a file +# directory | $1 is a directory +# number | 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 | Change how the program is run. See below. +# label