Commit c1bd0fd9 by Javi Fontan

Add i3, compton and dunst config and helpers

parent e7f8629f
[global]
font = Hack 13
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the
# message.
allow_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 = "<b>%s</b>\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 = 0
# 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
# 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 = "300x5-30+20"
# 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 windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 0
# 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.
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 "separatpr_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
# 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
# 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 = /usr/bin/firefox -new-tab
# Align icons left/right/off
icon_position = off
# Paths to default icons.
icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
[frame]
width = 3
color = "#aaaaaa"
[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".
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
[urgency_normal]
background = "#285577"
foreground = "#ffffff"
timeout = 10
[urgency_critical]
background = "#900000"
foreground = "#ffffff"
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
#
# vim: ft=cfg
# Shadow
shadow = false; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the
# window. Fix some weirdness with ARGB windows.
shadow-radius = 7; # The blur radius for shadows. (default 12)
shadow-offset-x = -7; # The left offset for shadows. (default -15)
shadow-offset-y = -7; # The top offset for shadows. (default -15)
shadow-opacity = 0.7; # The translucency for shadows. (default .75)
# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-exclude = [ "n:e:Notification" ]; # Exclude conditions for shadows.
# shadow-exclude = "n:e:Notification";
shadow-ignore-shaped = true; # Avoid drawing shadow on all shaped windows
# (see also: --detect-rounded-corners)
# Opacity
menu-opacity = 1.0; # The opacity for menus. (default 1.0)
inactive-opacity = 1.0; # Default opacity of inactive windows. (0.0 - 1.0)
# active-opacity = 0.8; # Default opacity for active windows. (0.0 - 1.0)
# frame-opacity = 0.8; # Opacity of window titlebars and borders. (0.1 - 1.0)
# inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
# value of _NET_WM_OPACITY. Bad choice.
alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
# it may result in less X resource usage,
# Yet fading may look bad.
# inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)
# inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
blur-background = true; # Blur background of transparent windows.
# Bad performance with X Render backend.
# GLX backend is preferred.
# blur-background-frame = true; # Blur background of opaque windows with transparent
# frames as well.
blur-background-fixed = false; # Do not let blur radius adjust based on window opacity.
blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
# Exclude conditions for background blur.
# Fading
fading = true; # Fade windows during opacity changes.
# fade-delta = 30; # The time between steps in a fade in milliseconds. (default 10).
fade-in-step = 0.08; # Opacity change between steps while fading in. (default 0.028).
fade-out-step = 0.08; # Opacity change between steps while fading out. (default 0.03).
# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
fade-exclude = [ ]; # Exclude conditions for fading.
# Other
backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically
# much faster but depends on a sane driver.
mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
use-ewmh-active-win = 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.
detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-client-opacity = false; # Detect _NET_WM_OPACITY on client windows, useful for window
# managers not passing _NET_WM_OPACITY of client windows to frame
# windows.
refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
vsync = "opengl"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
# See man page for more details.
dbe = false; # Enable DBE painting mode. Rarely needed.
paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
# Incompatible with certain VSync methods.
unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
# detected, to maximize performance for full-screen windows.
focus-exclude = [ ]; # A list of conditions of windows that should always be considered
# focused.
detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
# the same group focused at the same time.
detect-client-leader = false; # Use WM_CLIENT_LEADER to group windows.
invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
# GLX backend # GLX backend fine-tune options. See man page for more info.
# glx-no-stencil = true; # Recommended.
glx-copy-from-front = false; # Useful with --glx-swap-method,
# glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
# glx-no-rebind-pixmap = true; # Recommended if it works.
glx-swap-method = "undefined"; # See man page.
# Window type settings
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
# fade: Fade the particular type of windows.
# shadow: Give those windows shadow
# opacity: Default opacity for the type of windows.
# focus: Whether to always consider windows of this type focused.
};
# don't draw shadows for hidden tabs
shadow-exclude = [
"n:e:Notification",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
"class_g = 'i3-frame'"
];
# give urxvt 95% opacity, but make all hidden windows completely transparent
opacity-rule = [
"95:class_g = 'URxvt' && !_NET_WM_STATE@:32a",
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# 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 $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:monospace 8
font pango:Hack 15
#font pango:Hermit 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.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
#bindsym $mod+Return exec i3-sensible-terminal
#bindsym $mod+Shift+Return exec termite
# bindsym $mod+Return exec termite
bindsym $mod+Return exec gnome-terminal
bindsym $mod+Shift+Return exec sakura
# bindsym $mod+Return exec terminator
# bindsym $mod+Shift+Return exec --no-startup-id gnome-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
#bindsym $mod+d exec dmenu_run
#bindsym $mod+t exec i3-dmenu-desktop --dmenu='rofi -dmenu'
bindsym $mod+d exec i3-dmenu-desktop --dmenu='rofi -dmenu -i -font "hermit 30"'
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+ntilde 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+ntilde 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+h split h
# split in vertical orientation
bindsym $mod+v 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
set $wsp1 1:
#set $wsp1 1:navegador
set $wsp2 2:
set $wsp3 3:
set $wsp4 4:
set $wsp5 5:
set $wsp6 6:
set $wsp7 7:
set $wsp8 8:
set $wsp9 9:
set $wsp10 10:
# set $wsp1 1:
# #set $wsp1 1:navegador
# set $wsp2 2:
# set $wsp3 3
# set $wsp4 4
# set $wsp5 5
# set $wsp6 6
# set $wsp7 7
# set $wsp8 8:
# set $wsp9 9:
# set $wsp10 10:
set $wspmusic 
# set $musickey `
# set $musickey F1
set $musickey masculine
# switch to workspace
bindsym $mod+1 workspace $wsp1
bindsym $mod+2 workspace $wsp2
bindsym $mod+3 workspace $wsp3
bindsym $mod+4 workspace $wsp4
bindsym $mod+5 workspace $wsp5
bindsym $mod+6 workspace $wsp6
bindsym $mod+7 workspace $wsp7
bindsym $mod+8 workspace $wsp8
bindsym $mod+9 workspace $wsp9
bindsym $mod+0 workspace $wsp10
bindsym $mod+$musickey workspace $wspmusic
# bindsym $mod+1 exec ~/.config/i3/workspace_util focus 1
# bindsym $mod+2 exec ~/.config/i3/workspace_util focus 2
# bindsym $mod+3 exec ~/.config/i3/workspace_util focus 3
# bindsym $mod+4 exec ~/.config/i3/workspace_util focus 4
# bindsym $mod+5 exec ~/.config/i3/workspace_util focus 5
# bindsym $mod+6 exec ~/.config/i3/workspace_util focus 6
# bindsym $mod+7 exec ~/.config/i3/workspace_util focus 7
# bindsym $mod+8 exec ~/.config/i3/workspace_util focus 8
# bindsym $mod+9 exec ~/.config/i3/workspace_util focus 9
# bindsym $mod+0 exec ~/.config/i3/workspace_util focus 10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $wsp1
bindsym $mod+Shift+2 move container to workspace $wsp2
bindsym $mod+Shift+3 move container to workspace $wsp3
bindsym $mod+Shift+4 move container to workspace $wsp4
bindsym $mod+Shift+5 move container to workspace $wsp5
bindsym $mod+Shift+6 move container to workspace $wsp6
bindsym $mod+Shift+7 move container to workspace $wsp7
bindsym $mod+Shift+8 move container to workspace $wsp8
bindsym $mod+Shift+9 move container to workspace $wsp9
bindsym $mod+Shift+0 move container to workspace $wsp10
bindsym $mod+Shift+$musickey move container to workspace $wspmusic
# bindsym $mod+Shift+1 exec ~/.config/i3/workspace_util move 1
# bindsym $mod+Shift+2 exec ~/.config/i3/workspace_util move 2
# bindsym $mod+Shift+3 exec ~/.config/i3/workspace_util move 3
# bindsym $mod+Shift+4 exec ~/.config/i3/workspace_util move 4
# bindsym $mod+Shift+5 exec ~/.config/i3/workspace_util move 5
# bindsym $mod+Shift+6 exec ~/.config/i3/workspace_util move 6
# bindsym $mod+Shift+7 exec ~/.config/i3/workspace_util move 7
# bindsym $mod+Shift+8 exec ~/.config/i3/workspace_util move 8
# bindsym $mod+Shift+9 exec ~/.config/i3/workspace_util move 9
# bindsym $mod+Shift+0 exec ~/.config/i3/workspace_util move 10
# 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'"
# 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 ntilde 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
bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 5 px or 5 ppt
bindsym Right resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Pulse Audio controls
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
#exec /usr/libexec/gnome-settings-daemon
exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon
exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings
# exec --no-startup-id nm-applet
exec pa-applet --disable-notifications
exec dunst
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
# Touchpad controls
bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
# Media player controls
#bindsym XF86AudioPlay exec playerctl play
#bindsym XF86AudioPause exec playerctl pause
#bindsym XF86AudioNext exec playerctl next
#bindsym XF86AudioPrev exec playerctl previous
#bindsym $mod+m move workspace to output left
bindsym $mod+m move workspace to output down
#..........
# Look
#..........
new_window pixel 2
#new_float pixel 2
# Hybrid colors
set $back #1d1F21
set $black #282A2E
set $grey #373B41
set $lightgrey #707880
set $white #C5C8C6
set $yellow #F0C674
set $red #CC6666
set $darkred #A54242
set $green #B5BD56
#class border backgr. text split
client.background $back
# exec compton
# exec --no-startup-id compton -cCGb --backend glx --vsync opengl
# exec --no-startup-id compton -b --backend glx --vsync opengl # No shadow
exec --no-startup-id compton -b --config ~/.config/i3/compton
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
# bar {
# i3bar_command i3bar -t
# status_command i3status -c ~/.config/i3/i3status.conf
# #tray_output primary
# tray_output eDP1
# colors {
# separator #969896
# background #1d1f2100
# statusline #c5c8c6
# focused_workspace #81a2be #81a2be #1d1f21
# active_workspace #373b41 #373b41 #ffffff
# inactive_workspace #282a2e #282a2e #969896
# urgent_workspace #cc6666 #cc6666 #ffffff
# }
# }
# Move workspace to other display
bindsym $mod+Control+Left move workspace to output left
bindsym $mod+Control+Down move workspace to output down
bindsym $mod+Control+Up move workspace to output up
bindsym $mod+Control+Right move workspace to output right
#bindsym $mod+x move workspace to output right
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# System menu
bindsym $mod+Shift+s exec ~/.config/i3/system.sh
# Show the first scratchpad window
bindsym $mod+minus scratchpad show
# Swap workspace to work (2)
bindsym $mod+x exec ~/.config/i3/swap_workspace 2
exec_always feh --bg-fill ~/Pictures/orviz-background.jpg
#exec_always feh --bg-fill ~/Pictures/firewatch-orange.jpg
# exec_always feh --bg-fill ~/Pictures/wildlands_02.jpg
# exec_always feh --bg-fill ~/Pictures/mass_effect_andromeda.png
exec_always exec xrandr --dpi 220
#client.focused #81a2be #81a2be #1d1f21 #282a2e
client.focused #81a2be #81a2be #1d1f21 #a82aae
client.focused_inactive #373b41 #373b41 #969896 #282a2e
client.unfocused #282a2e #282a2e #969896 #282a2e
client.urgent #373b41 #fc6666 #ffffff #cc6666
## Base16 Flat
# Author: Chris Kempson (http://chriskempson.com)
#
# You can use these variables anywhere in the i3 configuration file.
set $base00 #2C3E50
set $base01 #34495E
set $base02 #7F8C8D
set $base03 #95A5A6
set $base04 #BDC3C7
set $base05 #e0e0e0
set $base06 #f5f5f5
set $base07 #ECF0F1
set $base08 #E74C3C
set $base09 #E67E22
set $base0A #F1C40F
set $base0B #2ECC71
set $base0C #1ABC9C
set $base0D #3498DB
set $base0E #9B59B6
set $base0F #be643c
# Basic color configuration using the Base16 variables for windows and borders.
# Property Name Border BG Text Indicator Child Border
# client.focused $base05 $base0D $base00 $base0D $base0D
# client.focused_inactive $base01 $base01 $base05 $base03 $base01
# client.unfocused $base01 $base00 $base05 $base01 $base01
# client.urgent $base08 $base08 $base00 $base08 $base08
# client.placeholder $base00 $base00 $base05 $base00 $base00
# client.background $base07
# gaps
# for_window [class="^.*"] border pixel 20
for_window [class="^.*"] border pixel 4
# for_window [class="^.*"] border pixel 0
gaps inner 0
# gaps inner 20
gaps outer 0
smart_gaps on
smart_borders on
# polybar
exec_always --no-startup-id /home/jfontan/.config/polybar/launch.sh
# mouse tap click
exec --no-startup-id xinput set-prop 'DLL060A:00 06CB:2734' 297 1
# multimedia keys
# Pulse Audio controls
# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
# bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Set keyboard layout
bindsym $mod+o exec setxkbmap us
bindsym $mod+p exec setxkbmap es
#!/usr/bin/env ruby
# Idea from https://faq.i3wm.org/question/6967/switch-all-windows-from-two-workspaces/
require 'rubygems'
require 'i3ipc'
workspace_number = ARGV[0]
if !workspace_number
STDERR.puts "I need a workspace number!"
exit -1
end
i3 = I3Ipc::Connection.new
workspaces = i3.workspaces
active = workspaces.select {|w| w.focused }.first
destination = workspaces.select {|w| w.num == workspace_number.to_i }.first
# Swap workspaces
i3.command("rename workspace \"#{destination.name}\" to temporary")
i3.command("rename workspace \"#{active.name}\" to \"#{destination.name}\"")
i3.command("rename workspace temporary to \"#{active.name}\"")
# Change workspaces output
#i3.command("workspace \"#{active.name}\"")
#i3.command("move workspace to output \"#{destination.output}\"")
#i3.command("workspace \"#{destination.name}\"")
#i3.command("move workspace to output \"#{active.output}\"")
#!/bin/bash
sound_internal_id="analog-stereo"
sound_monitor_id="hdmi-stereo"
sound_bar_id="SoundBar"
lock=" lock"
suspend=" suspend"
shutdown=" shutdown"
solo=" solo"
home=" home"
office=" office"
sound_internal=" internal audio"
sound_monitor=" monitor audio"
sound_bar=" bar audio"
options="$lock
$suspend
$shutdown
$solo
$office
$home
$sound_internal
$sound_monitor
$sound_bar"
opt=$(echo "$options" | rofi -dmenu -font "hermit 30" -sidebar-mode)
# opt=$(echo "$options" | rofi -dmenu -font "hack 30" -sidebar-mode)
[ $? = 1 ] && exit
case $opt in
$lock)
# i3lock
slock
;;
$suspend)
# i3lock
# systemctl suspend
slock systemctl suspend
;;
$shutdown)
systemctl poweroff
;;
$solo)
~/.screenlayout/solo.sh
i3-msg restart
;;
$home)
~/.screenlayout/home.sh
i3-msg restart
;;
$office)
~/.screenlayout/office.sh
i3-msg restart
;;
$sound_internal)
~/bin/change_sound_card "$sound_internal_id"
;;
$sound_monitor)
~/bin/change_sound_card "$sound_monitor_id"
;;
$sound_bar)
~/bin/change_sound_card "$sound_bar_id"
;;
esac
#!/usr/bin/env ruby
require 'rubygems'
require 'i3ipc'
class I3Utils
DEFAULT_NAMES = [
"", # 0
" ", # 1
" ", # 2
nil, # 3
nil, # 4
nil, # 5
nil, # 6
nil, # 7
"", # 8
"", # 9
" ", # 10
]
def initialize
@i3 = I3Ipc::Connection.new
end
def get_workspace(number)
@i3.workspaces.select {|w| w.num.to_s == number }.first
end
def get_focused
@i3.workspaces.select {|w| w.focused }.first
end
def get_name(number)
w = get_workspace(number)
name = number.to_s
if w
return w.name
else
if name=DEFAULT_NAMES[number.to_i]
"#{number}:#{name}"
else
number.to_s
end
end
end
def focus_workspace(name)
@i3.command("workspace #{get_name(name)}")
end
def rename(new_name)
name = new_name.gsub(/\s/, '_')
w = get_focused
number = w.num
@i3.command("rename workspace to #{number}:#{name}")
end
def move(number)
@i3.command("move container to workspace #{get_name(number)}")
end
end
if ARGV.length < 2
STDERR.puts "I need two parameters!"
STDERR.puts "command parameter"
exit -1
end
command = ARGV[0]
parameter = ARGV[1]
i3 = I3Utils.new
case command
when "focus"
i3.focus_workspace(parameter)
when "move"
i3.move(parameter)
when "rename"
i3.rename(parameter)
end
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
background = #222
background-alt = #444
foreground = #dfdfdf
foreground-alt = #55
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[global/wm]
margin-top = 5
margin-bottom = 5
[bar/laptop]
inherit = bar/main-config
monitor = ${env:MONITOR:eDP1}
modules-center = player-mpris-tail
modules-right = volume xkeyboard filesystem memory cpu wlan battery date
[bar/monitor]
inherit = bar/main-config
monitor = ${env:MONITOR:DP1}
;monitor = ${env:MONITOR:HDMI1}
modules-right = google_play deadbeef volume xkeyboard filesystem memory cpu wlan battery date
[bar/main-config]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
;height = 27
height = 40
offset-x = 0
offset-y = 0
;background = ${xrdb:color9}
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 2
overline-color = #f00
; underline-size = 2
underline-size = 0
underline-color = #00f
border-bottom-size = 2
border-bottom-color = #333
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = hack:pixelsize=18:weight=bold;+1
; font-0 = hermit:pixelsize=11:weight=bold;+3
font-1 = fontawesome:pixelsize=18;+2
font-2 = FontAwesome5Free
font-3 = FontAwesome5Free:style=Solid
font-4 = FontAwesome5Brands
; font-2 = meslo:pixelsize=11
; font-0 = fixed:pixelsize=10
; font-1 = unifont:fontformat=truetype:size=6:heavy;-2
; font-2 = siji:pixelsize=10
modules-left = i3 xwindow
modules-center =
; modules-right = deadbeef volume xkeyboard filesystem memory cpu wlan battery date
tray-position = right
tray-padding = 2
;tray-transparent = true
;tray-background = #0063ff
;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/xwindow]
type = internal/xwindow
label = %title:0:30:...%
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %{F#55}%{F-} %layout%
label-layout-underline = ${colors.secondary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem]
type = internal/fs
interval = 25
label-prefix=" "
label-prefix-foreground = ${colors.foreground-alt}
mount-0 = /
; mount-1 = /home
; mount-2 = /invalid/mountpoint
; label-mounted = %mountpoint%: %percentage_free%%
label-mounted = %{F#55}%{F-} %free%
label-mounted-underline = #4c4
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
label-focused = %index%
label-focused-background = ${colors.background-alt}
label-focused-underline= ${colors.primary}
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
pin-workspaces = true
strip-wsnumbers = true
label-mode = %mode%
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-focused = %name% %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
label-unfocused = %name% %index%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
label-urgent = %name% %index%!
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
label-visible = %name% %index%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
; ws-icon-0 = 1;
ws-icon-0 = 1;♚
ws-icon-1 = 2;♛
ws-icon-2 = 3;♜
ws-icon-3 = 4;♝
ws-icon-4 = 5;♞
ws-icon-default = ♟
[module/mpd]
type = internal/mpd
format-online = <label-song> <icon-prev> <icon-seekb> <icon-stop> <toggle> <icon-seekf> <icon-next> <icon-repeat> <icon-random>
label-song-maxlen = 25
label-song-ellipsis = true
icon-prev = 
icon-seekb = 
icon-stop = 
icon-play = 
icon-pause = 
icon-next = 
icon-seekf = 
icon-random = 
icon-repeat = 
toggle-on-foreground = ${colors.primary}
toggle-off-foreground = #66
[module/xbacklight]
type = internal/xbacklight
format = <label> <bar>
label = BL
bar-width = 10
bar-indicator = │
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
label = %percentage%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
type = internal/network
#interface = wlp2s0
interface = wlp58s0
interval = 3.0
; format-connected = <ramp-signal> <label-connected>
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = ${colors.foreground-alt}
format-connected-underline = #9f78e1
format-disconnected-underline = ${self.format-connected-underline}
label-connected = %local_ip% %essid%
; label-connected = %local_ip% %essid% u:%upspeed% d:%downspeed%
label-disconnected = %ifname% disconnected
label-disconnected-foreground = ${colors.foreground-alt}
ramp-signal-0 = 
; ramp-signal-0 = 
; ramp-signal-1 = 
; ramp-signal-2 = 
; ramp-signal-3 = 
; ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = virbr0
interval = 3.0
format-connected-underline = #55aa55
format-connected-prefix = " "
format-connected-foreground-foreground = ${colors.foreground-alt}
label-connected = %local_ip%
format-disconnected-underline = ${self.format-connected-underline}
label-disconnected = %ifname% disconnected
label-disconnected-foreground = ${colors.foreground-alt}
[module/date]
type = internal/date
interval = 5
date = " %d"
date-alt = " %Y-%m-%d"
time = %H:%M
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
#label = " "
label = %date% %time%
[module/volume]
type = internal/volume
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = │
bar-volume-indicator-font = 2
bar-volume-indicator-foreground = #ff
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = ADP0
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = #ffb52a
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
; ramp-capacity-0 = 
; ramp-capacity-1 = 
; ramp-capacity-2 = 
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${colors.foreground-alt}
; animation-charging-0 = 
; animation-charging-1 = 
; animation-charging-2 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
;animation-charging-0 = /
;animation-charging-1 = -
;animation-charging-2 = \
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/google_play]
type = custom/script
exec = "gpmdp-remote current 2>/dev/null"
label =  %output:0:50:...%
; format-underline = ${colors.dblue}
format-underline = #f56a4d
format-padding = 2
interval = 5
; format-background = ${colors.tblue}
exec-if = gpmdp-remote status | grep Playing
[module/deadbeef]
type = custom/script
exec = "/usr/bin/deadbeef --nowplaying '%a - %t' 2>/dev/null"
label =  %output:0:50:...%
; format-underline = ${colors.dblue}
format-underline = #f56a4d
format-padding = 2
interval = 5
; format-background = ${colors.tblue}
exec-if = pgrep deadbeef && ! (/usr/bin/deadbeef --nowplaying '' | grep '^nothing$')
[module/zendesk]
type = custom/script
exec = "/usr/bin/ruby /home/jfontan/projects/zendesk/test.rb"
label = "tickets: %output%"
interval = 120
[module/powermenu]
type = custom/menu
format-spacing = 1
label-open =  power
label-open-foreground = ${colors.secondary}
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = sudo poweroff
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
[module/player-mpris-tail]
type = custom/script
exec = "~/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py | cut -b 1-40"
tail = true
click-left = ~/polybar-scripts/polybar-scripts/player-mpris-tail/player-ctrl.sh previous
click-right = ~/polybar-scripts/polybar-scripts/player-mpris-tail/player-ctrl.sh next
click-middle = ~/polybar-scripts/polybar-scripts/player-mpris-tail/player-ctrl.sh play-pause
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
; vim:ft=dosini
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
polybar laptop &
polybar monitor &
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment