mirror of https://gitlab.com/meliurwen/dotfiles
commit
3bf9ee3c8e
@ -0,0 +1,160 @@ |
||||
################################# |
||||
# Backend |
||||
################################# |
||||
|
||||
backend = "glx"; |
||||
# backend = "glx"; |
||||
# glx-no-stencil = true; |
||||
# glx-copy-from-front = false; |
||||
|
||||
# GLX backend: Use MESA_copy_sub_buffer to do partial screen update. |
||||
# glx-use-copysubbuffermesa = true; |
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage. |
||||
# 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). |
||||
# glx-swap-method = "undefined"; |
||||
|
||||
################################# |
||||
# Shadows |
||||
################################# |
||||
|
||||
shadow = true; |
||||
no-dnd-shadow = true; |
||||
no-dock-shadow = true; |
||||
clear-shadow = true; |
||||
shadow-radius = 6; |
||||
shadow-offset-x = -1; |
||||
shadow-offset-y = -1; |
||||
shadow-opacity = 0.3; |
||||
|
||||
# Change shadows color |
||||
# shadow-red = 0.1; |
||||
# shadow-green = 0.4; |
||||
# shadow-blue = 0.4; |
||||
|
||||
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" |
||||
]; |
||||
|
||||
shadow-ignore-shaped = false; |
||||
|
||||
################################# |
||||
# Opacity |
||||
################################# |
||||
|
||||
menu-opacity = 1; |
||||
inactive-opacity = 1; |
||||
active-opacity = 1; |
||||
frame-opacity = 1; |
||||
inactive-opacity-override = false; |
||||
alpha-step = 0.06; |
||||
|
||||
# Dim inactive windows. (0.0 - 1.0) |
||||
# inactive-dim = 0.2; |
||||
|
||||
# Do not let dimness adjust based on window opacity |
||||
# inactive-dim-fixed = true; |
||||
|
||||
# Blur background of transparent windows |
||||
# blur-background = true; |
||||
|
||||
# Blur background of opaque windows with transparent frames as well |
||||
# blur-background-frame = true; |
||||
|
||||
# Do not let blur radius adjust based on window opacity |
||||
blur-background-fixed = false; |
||||
blur-background-exclude = [ |
||||
"window_type = 'dock'", |
||||
"window_type = 'desktop'" |
||||
]; |
||||
|
||||
opacity-rule = [ |
||||
"90:class_g = 'URxvt' && !_NET_WM_STATE@:32a", |
||||
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" |
||||
]; |
||||
|
||||
# Note: |
||||
# - Using xrender, opacity needs to be configured into ~/.Xresources, too. |
||||
# - Using glx, opacity will work getting the values from opacity-rule, |
||||
# however it causes a lot of lag into some terminals (urxvt and xterm). |
||||
|
||||
################################# |
||||
# Fading |
||||
################################# |
||||
|
||||
fading = true; |
||||
fade-delta = 4; |
||||
fade-in-step = 0.03; |
||||
fade-out-step = 0.03; |
||||
no-fading-openclose = false; |
||||
fade-exclude = [ ]; |
||||
|
||||
################################# |
||||
# Other |
||||
################################# |
||||
|
||||
mark-wmwin-focused = true; |
||||
mark-ovredir-focused = true; |
||||
use-ewmh-active-win = true; |
||||
detect-rounded-corners = true; |
||||
detect-client-opacity = true; |
||||
refresh-rate = 0; |
||||
|
||||
# VSync |
||||
# ----- |
||||
# 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. |
||||
vsync = "opengl-mswc"; |
||||
|
||||
dbe = false; |
||||
paint-on-overlay = true; |
||||
sw-opti = true; |
||||
unredir-if-possible = true; |
||||
focus-exclude = [ ]; |
||||
detect-transient = true; |
||||
detect-client-leader = true; |
||||
|
||||
################################# |
||||
# Window type settings |
||||
################################# |
||||
|
||||
wintypes: |
||||
{ |
||||
tooltip = |
||||
{ |
||||
fade = true; |
||||
shadow = false; |
||||
opacity = 0.85; |
||||
focus = true; |
||||
}; |
||||
}; |
||||
|
||||
# For more information about the settings, see /etc/xdg/compton.conf |
@ -0,0 +1,33 @@ |
||||
[arrow] |
||||
arrow_linewidth_index=0 |
||||
color_index=3 |
||||
is_straight=false |
||||
straightline_linewidth_index=0 |
||||
|
||||
[common] |
||||
color_index=3 |
||||
default_savepath=clipboard |
||||
|
||||
[effect] |
||||
is_blur=false |
||||
is_mosaic=false |
||||
|
||||
[line] |
||||
color_index=3 |
||||
linewidth_index=0 |
||||
|
||||
[oval] |
||||
color_index=3 |
||||
linewidth_index=1 |
||||
|
||||
[rectangle] |
||||
color_index=3 |
||||
linewidth_index=0 |
||||
|
||||
[save] |
||||
save_op=3 |
||||
save_quality=100 |
||||
|
||||
[text] |
||||
color_index=3 |
||||
fontsize=12 |
@ -0,0 +1,101 @@ |
||||
## Modified By Aditya Shakya ... |
||||
|
||||
[global] |
||||
|
||||
monitor = 0 |
||||
follow = mouse |
||||
geometry = "250x50-20+40" |
||||
indicate_hidden = yes |
||||
shrink = no |
||||
transparency = 0 |
||||
notification_height = 0 |
||||
separator_height = 4 |
||||
padding = 16 |
||||
horizontal_padding = 16 |
||||
frame_width = 2 |
||||
frame_color = "#43B581" |
||||
separator_color = frame |
||||
sort = yes |
||||
idle_threshold = 120 |
||||
font = "Ubuntu Nerd Font" 10 |
||||
line_height = 4 |
||||
markup = full |
||||
format = "<b>%s</b>\n%b" |
||||
alignment = left |
||||
show_age_threshold = 60 |
||||
word_wrap = yes |
||||
ignore_newline = no |
||||
stack_duplicates = false |
||||
hide_duplicate_count = false |
||||
show_indicators = yes |
||||
icon_position = left |
||||
max_icon_size = 32 |
||||
|
||||
## Paths to default icons. |
||||
icon_folders = /usr/share/icons/Adwaita/32x32/status/:/usr/share/icons/Adwaita/32x32/devices/ |
||||
sticky_history = yes |
||||
history_length = 20 |
||||
dmenu = /usr/bin/dmenu -p dunst: |
||||
browser = /usr/bin/firefox -new-tab |
||||
always_run_script = true |
||||
title = Dunst |
||||
class = Dunst |
||||
startup_notification = false |
||||
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 = "#262626" |
||||
foreground = "#BBA590" |
||||
timeout = 1 |
||||
# Icon for notifications with low urgency, uncomment to enable |
||||
#icon = /path/to/icon |
||||
|
||||
[urgency_normal] |
||||
background = "#262626" |
||||
foreground = "#BBA590" |
||||
timeout = 4 |
||||
# Icon for notifications with normal urgency, uncomment to enable |
||||
#icon = /path/to/icon |
||||
|
||||
[urgency_critical] |
||||
background = "#262626" |
||||
foreground = "#BBA590" |
||||
frame_color = "#FF5050" |
||||
timeout = 0 |
||||
# Icon for notifications with critical urgency, uncomment to enable |
||||
#icon = /path/to/icon |
||||
|
@ -0,0 +1,30 @@ |
||||
|
||||
|
||||
#urlbar, #navigator-toolbox #searchbar {border: none !important;} |
||||
|
||||
|
||||
#navigator-toolbox { |
||||
border: none !important; |
||||
} |
||||
|
||||
|
||||
toolbox { |
||||
z-index: 10; |
||||
margin-top: 0px !important; |
||||
margin-bottom: -30px !important; |
||||
height: 0 !important; |
||||
pointer-events: none; |
||||
} |
||||
vbox {pointer-events: all;} |
||||
|
||||
|
||||
#nav-bar { |
||||
opacity: 0; |
||||
pointer-events: none; |
||||
transition: transform, ease-in-out 0.2s, opacity 0.2s ease-in-out !important; |
||||
} |
||||
/* All the states in which the URL bar is visible */ |
||||
vbox:hover ~ #nav-bar, toolbox:focus-within > #nav-bar, #nav-bar:hover, #mainPopupSet:hover ~ box #nav-bar, #mainPopupSet:focus-within ~ box #nav-bar { |
||||
opacity: 1; |
||||
pointer-events: all; |
||||
} |
@ -0,0 +1,11 @@ |
||||
@-moz-document url("about:newtab"), url("about:home"), url("about:blank") { |
||||
body { |
||||
--newtab-background-color: #2A2A2E !important; |
||||
--newtab-text-primary-color: #CCCCCC !important; |
||||
--newtab-search-dropdown-color: #2A2A2E !important; |
||||
--newtab-search-dropdown-header-color: #2A2A2E !important; |
||||
--newtab-search-icon-color: rgba(255, 255, 255, 0.95) !important; |
||||
--newtab-topsites-background-color: #373737 !important; |
||||
--newtab-textbox-background-color: #373737 !important; |
||||
} |
||||
} |
@ -0,0 +1,298 @@ |
||||
# 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 https://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 |
||||
|
||||
# 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 urxvt |
||||
|
||||
# kill focused window |
||||
bindsym $mod+Shift+q kill |
||||
|
||||
# start dmenu (a program launcher) |
||||
#bindsym $mod+d exec dmenu_run |
||||
bindsym $mod+d exec rofi -show drun -theme meli-dark |
||||
|
||||
# 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+ograve 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+ograve 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 |
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on. |
||||
# We use variables to avoid repeating the names in multiple places. |
||||
set $ws1 "1" |
||||
set $ws2 "2" |
||||
set $ws3 "3" |
||||
set $ws4 "4" |
||||
set $ws5 "5" |
||||
set $ws6 "6" |
||||
set $ws7 "7" |
||||
set $ws8 "8" |
||||
set $ws9 "9" |
||||
set $ws10 "10" |
||||
|
||||
# switch to workspace |
||||
bindsym $mod+1 workspace $ws1 |
||||
bindsym $mod+2 workspace $ws2 |
||||
bindsym $mod+3 workspace $ws3 |
||||
bindsym $mod+4 workspace $ws4 |
||||
bindsym $mod+5 workspace $ws5 |
||||
bindsym $mod+6 workspace $ws6 |
||||
bindsym $mod+7 workspace $ws7 |
||||
bindsym $mod+8 workspace $ws8 |
||||
bindsym $mod+9 workspace $ws9 |
||||
bindsym $mod+0 workspace $ws10 |
||||
|
||||
# move focused container to workspace |
||||
bindsym $mod+Shift+1 move container to workspace $ws1 |
||||
bindsym $mod+Shift+2 move container to workspace $ws2 |
||||
bindsym $mod+Shift+3 move container to workspace $ws3 |
||||
bindsym $mod+Shift+4 move container to workspace $ws4 |
||||
bindsym $mod+Shift+5 move container to workspace $ws5 |
||||
bindsym $mod+Shift+6 move container to workspace $ws6 |
||||
bindsym $mod+Shift+7 move container to workspace $ws7 |
||||
bindsym $mod+Shift+8 move container to workspace $ws8 |
||||
bindsym $mod+Shift+9 move container to workspace $ws9 |
||||
bindsym $mod+Shift+0 move container to workspace $ws10 |
||||
|
||||
# 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 ograve 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 or $mod+r |
||||
bindsym Return mode "default" |
||||
bindsym Escape mode "default" |
||||
bindsym $mod+r mode "default" |
||||
} |
||||
|
||||
bindsym $mod+r mode "resize" |
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status |
||||
# finds out, if available) |
||||
#bar { |
||||
# status_command i3status |
||||
#} |
||||
|
||||
#bar { |
||||
# status_command i3blocks |
||||
#} |
||||
|
||||
bar { |
||||
i3bar_command $HOME/.config/polybar/launch.sh |
||||
} |
||||
|
||||
default_border pixel 1 |
||||
default_floating_border normal |
||||
|
||||
# Status Control |
||||
# `dm-tool` works with lightdm greeters only |
||||
bindsym XF86ScreenSaver exec "dm-tool lock" |
||||
|
||||
# Screenshot |
||||
# (it deletes the screenshot file in `/tmp/` right after copying it to the clipboard) |
||||
# Note1: `scrot` doesn't work well with `compton` |
||||
# Note2: `gnome-screenshot` has problems too when runs in CLI mode |
||||
# Note3: `deepin-screenshot` ignores the `--no-notification` option |
||||
##bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -zq 100 -e '$(xclip -selection c -t image/png < $f); rm $f'" |
||||
##bindsym Print --release exec gnome-screenshot -ac -d 0 |
||||
bindsym Print --release exec "screenshot_image=$(date +%F_%T).png && deepin-screenshot --no-notification -s /tmp/$screenshot_image && xclip -selection c -t image/png < /tmp/$screenshot_image && rm /tmp/$screenshot_image && unset screenshot_image" |
||||
|
||||
# Speakers and Mic Controls |
||||
##bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% |
||||
##bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% |
||||
##bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle |
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle |
||||
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volumeControl.sh up |
||||
bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volumeControl.sh down |
||||
bindsym XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volumeControl.sh mute |
||||
|
||||
# Screen brightness controls |
||||
##bindsym XF86MonBrightnessUp exec "xbacklight -inc 10" |
||||
##bindsym XF86MonBrightnessDown exec "xbacklight -dec 10" |
||||
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/brightnessControl.sh up |
||||
bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/brightnessControl.sh down |
||||
|
||||
# Turn screen off |
||||
bindsym XF86Launch1 exec --no-startup-id xset dpms force off |
||||
|
||||
# Webcam 1 dropdown |
||||
for_window [title="video0 - mpv"] floating enable |
||||
for_window [title="video0 - mpv"] sticky enable |
||||
for_window [title="video0 - mpv"] border none |
||||
|
||||
# WebCam Toggle |
||||
bindsym XF86WebCam exec ~/.config/i3/scripts/webcam-toggle.sh |
||||
|
||||
# Numlock |
||||
exec_always --no-startup-id numlockx on |
||||
|
||||
# Background |
||||
exec --no-startup-id feh --bg-fill $HOME/Scaricati/northern_lights_by_aenami_dbbx471.png |
||||
|
||||
# Compositor |
||||
exec --no-startup-id compton --config $HOME/.config/compton/config |
||||
|
||||
# Notification Manager |
||||
exec --no-startup-id dunst --config $HOME/.config/dunst/dunstrc |
||||
|
||||
# Pulseaudio |
||||
## Necessary if you have no DE (gnome, xfce, etc...) under i3. |
||||
exec pulseaudio --kill && pulseaudio --start |
||||
|
||||
# Nextcloud Desktop |
||||
#exec --no-startup-id nextcloud |
||||
|
||||
## Use `xprop` to determine windows paramenters. Guide below: |
||||
## https://i3wm.org/docs/userguide.html#list_of_commands |
||||
# Calculators |
||||
for_window [instance=qalc] floating enable |
||||
for_window [instance=qalc] border normal |
||||
for_window [instance=gnome-calculator] floating enable |
||||
for_window [instance=gnome-calculator] border normal |
||||
|
||||
# Firefox |
||||
for_window [class=Firefox window_role="page-info"] floating enable |
||||
for_window [class=Firefox window_role="page-info"] border normal |
||||
for_window [class=Firefox window_role="About"] floating enable |
||||
for_window [class=Firefox window_role="About"] border normal |
||||
for_window [class=Firefox window_role="Organizer"] floating enable |
||||
for_window [class=Firefox window_role="Organizer"] border normal |
||||
|
||||
# Teamspeak 3 |
||||
for_window [class="TeamSpeak 3" title="File Transfers"] floating enable |
||||
for_window [class="TeamSpeak 3" title="File Transfers"] border normal |
||||
for_window [class="TeamSpeak 3" title="File Browser -"] floating enable |
||||
for_window [class="TeamSpeak 3" title="File Browser -"] border normal |
||||
for_window [class="TeamSpeak 3" title="Bookmarks"] floating enable |
||||
for_window [class="TeamSpeak 3" title="Bookmarks"] border normal |
||||
|
||||
# Blueberry |
||||
for_window [class="Blueberry.py"] floating enable |
||||
for_window [class="Blueberry.py"] border normal |
||||
|
||||
# Pavucontrol (PulseAudio Volume Control) |
||||
for_window [class="Pavucontrol"] floating enable |
||||
for_window [class="Pavucontrol"] border normal |
||||
|
||||
# Gnome System Monitor |
||||
for_window [instance="gnome-system-monitor"] floating enable |
||||
for_window [instance="gnome-system-monitor"] border normal |
||||
|
||||
# Steam |
||||
for_window [instance="Steam" title="Steam Guard - Computer Authorization Required"] floating enable |
||||
for_window [instance="Steam" title="Steam Guard - Computer Authorization Required"] border normal |
||||
for_window [instance="Steam" title="Friends List"] floating enable |
||||
for_window [instance="Steam" title="Friends List"] border normal |
||||
for_window [instance="Steam" title="Trade offer with"] floating enable |
||||
for_window [instance="Steam" title="Trade offer with"] border normal |
||||
for_window [instance="Steam" title="Allow game launch?"] floating enable |
||||
for_window [instance="Steam" title="Allow game launch?"] border normal |
||||
for_window [instance="Steam" title="Screenshot Uploader"] floating enable |
||||
for_window [instance="Steam" title="Screenshot Uploader"] border normal |
||||
|
||||
|
||||
|
||||
## Custom Keybindings |
||||
# Swap Two Windows Places |
||||
bindsym $mod+Mod1+x mark --add quickswap |
||||
bindsym $mod+x swap container with mark quickswap; [con_mark="quickswap"] focus |
@ -0,0 +1,41 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# You can call this script like this: |
||||
# $ ./brightnessControl.sh up |
||||
# $ ./brightnessControl.sh down |
||||
|
||||
# Script inspired by these wonderful people: |
||||
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh |
||||
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a |
||||
|
||||
function get_brightness { |
||||
xbacklight -get | cut -d '.' -f 1 |
||||
} |
||||
|
||||
function send_notification { |
||||
icon="preferences-system-brightness-lock" |
||||
brightness=$(get_brightness) |
||||
# Make the bar with the special character ─ (it's not dash -) |
||||
# https://en.wikipedia.org/wiki/Box-drawing_character |
||||
bar=$(seq -s "─" 0 $((brightness / 5)) | sed 's/[0-9]//g') |
||||
# Send the notification |
||||
dunstify -i "$icon" -r 5555 -u normal " $bar" |
||||
} |
||||
|
||||
case $1 in |
||||
up) |
||||
# increase the backlight by 5% |
||||
##xbacklight -inc 5 |
||||
brightnessctl s +5% |
||||
send_notification |
||||
;; |
||||
down) |
||||
# decrease the backlight by 5% |
||||
##xbacklight -dec 5 |
||||
brightnessctl s 5%- |
||||
send_notification |
||||
;; |
||||
esac |
||||
|
||||
# Note: Seems that `xbacklight` doesn't work without a proper DE under i3. |
||||
# `brightnessctl` seems an interesting alternative. :) |
@ -0,0 +1,53 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# You can call this script like this: |
||||
# $ ./volumeControl.sh up |
||||
# $ ./volumeControl.sh down |
||||
# $ ./volumeControl.sh mute |
||||
|
||||
# Script modified from these wonderful people: |
||||
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh |
||||
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a |
||||
|
||||
function get_volume { |
||||
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1 |
||||
} |
||||
|
||||
function is_mute { |
||||
amixer get Master | grep '%' | grep -oE '[^ ]+$' | grep off > /dev/null |
||||
} |
||||
|
||||
function send_notification { |
||||
iconSound="audio-volume-high" |
||||
iconMuted="audio-volume-muted" |
||||
if is_mute ; then |
||||
dunstify -i $iconMuted -r 2593 -u normal "mute" |
||||
else |
||||
volume=$(get_volume) |
||||
# Make the bar with the special character ─ (it's not dash -) |
||||
# https://en.wikipedia.org/wiki/Box-drawing_character |
||||
bar=$(seq --separator="─" 0 "$((volume / 5))" | sed 's/[0-9]//g') |
||||
# Send the notification |
||||
dunstify -i $iconSound -r 2593 -u normal " $bar" |
||||
fi |
||||
} |
||||
|
||||
case $1 in |
||||
up) |
||||
# set the volume on (if it was muted) |
||||
amixer -D pulse set Master on > /dev/null |
||||
# up the volume (+ 5%) |
||||
amixer -D pulse sset Master 5%+ > /dev/null |
||||
send_notification |
||||
;; |
||||
down) |
||||
amixer -D pulse set Master on > /dev/null |
||||
amixer -D pulse sset Master 5%- > /dev/null |
||||
send_notification |
||||
;; |
||||
mute) |
||||
# toggle mute |
||||
amixer -D pulse set Master 1+ toggle > /dev/null |
||||
send_notification |
||||
;; |
||||
esac |
@ -0,0 +1,2 @@ |
||||
#!/bin/sh |
||||
pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null -vo=gpu --geometry=-0-0 --autofit=30% av://v4l2:/dev/video0 |
@ -0,0 +1,41 @@ |
||||
[Added Associations] |
||||
application/octet-stream=org.gnome.gedit.desktop; |
||||
image/gif=mpv.desktop; |
||||
text/x-python3=org.gnome.gedit.desktop; |
||||
image/png=feh.desktop;gimp.desktop; |
||||
image/svg+xml=org.inkscape.Inkscape.desktop;org.gnome.gedit.desktop;inkscape.desktop;gimp.desktop;feh.desktop; |
||||
application/pdf=org.gnome.Evince.desktop;org.inkscape.Inkscape.desktop;org.pwmt.zathura-pdf-poppler.desktop; |
||||
text/html=firefox.desktop; |
||||
image/jpeg=feh.desktop;gimp.desktop;org.gnome.eog.desktop; |
||||
application/xml=org.gnome.gedit.desktop; |
||||
text/plain=org.gnome.gedit.desktop; |
||||
text/x-tex=org.gnome.latexila.desktop;org.gnome.gedit.desktop; |
||||
text/x-bibtex=org.gnome.latexila.desktop; |
||||
text/csv=libreoffice-calc.desktop;org.gnome.gedit.desktop; |
||||
video/mp4=mpv.desktop;vlc.desktop; |
||||
application/zip=org.gnome.Nautilus.desktop; |
||||
video/mpeg=vlc.desktop;mpv.desktop; |
||||
text/markdown=org.gnome.gedit.desktop; |
||||
audio/x-vorbis+ogg=mpv.desktop; |
||||
x-scheme-handler/rdp=org.remmina.Remmina.desktop; |
||||
x-scheme-handler/spice=org.remmina.Remmina.desktop; |
||||
x-scheme-handler/vnc=org.remmina.Remmina.desktop; |
||||
x-scheme-handler/remmina=org.remmina.Remmina.desktop; |
||||
application/x-remmina=org.remmina.Remmina.desktop; |
||||
video/x-matroska=mpv.desktop;vlc.desktop; |
||||
video/x-flv=mpv.desktop; |
||||
audio/flac=mpv.desktop; |
||||
text/vcard=org.gnome.gedit.desktop; |
||||
|
||||
[Default Applications] |
||||
text/plain=org.gnome.gedit.desktop |
||||
image/svg+xml=inkscape.desktop |
||||
inode/directory=org.gnome.Nautilus.desktop; |
||||
application/pdf=org.pwmt.zathura-pdf-poppler.desktop; |
||||
x-scheme-handler/http=firefox.desktop; |
||||
x-scheme-handler/https=firefox.desktop; |
||||
x-scheme-handler/rdp=org.remmina.Remmina.desktop |
||||
x-scheme-handler/spice=org.remmina.Remmina.desktop |
||||
x-scheme-handler/vnc=org.remmina.Remmina.desktop |
||||
x-scheme-handler/remmina=org.remmina.Remmina.desktop |
||||
application/x-remmina=org.remmina.Remmina.desktop |
@ -0,0 +1,20 @@ |
||||
|
||||
## Limits Youtube's videos resolution and picks the best audio quality available |
||||
## See: https://github.com/mpv-player/mpv/issues/4241#issuecomment-327033395 |
||||
## NOTE: pick only one of these two lines below! |
||||
|
||||
#ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9]+bestaudio/best |
||||
ytdl-format=bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best |
||||
|
||||
|
||||
# In order to communicate to the Polybar's mpv module |
||||
input-ipc-server=/tmp/mpvsocket |
||||
|
||||
# Enable hardware acceleration (Intel specific) |
||||
## See: |
||||
## https://github.com/mpv-player/mpv/wiki/Hardware-decoding-on-Linux |
||||
## https://wiki.archlinux.org/index.php/Mpv#Hardware_video_acceleration |
||||
hwdec=vaapi |
||||
|
||||
|
||||
save-position-on-quit |
@ -0,0 +1,21 @@ |
||||
#!/bin/bash |
||||
|
||||
# Terminate already running bar instances |
||||
killall -q polybar |
||||
|
||||
# Wait until the processes have been shut down |
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done |
||||
|
||||
# Launch polybar |
||||
#polybar main -c $HOME/.config/polybar/config & |
||||
|
||||
# Set Monitors |
||||
#xrandr --output HDMI1 --auto --left-of LVDS1 |
||||
|
||||
if type "xrandr"; then |
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do |
||||
MONITOR=$m polybar main --reload -c $HOME/.config/polybar/config & |
||||
done |
||||
else |
||||
polybar main --reload -c $HOME/.config/polybar/config & |
||||
fi |
@ -0,0 +1,122 @@ |
||||
#!/bin/bash |
||||
|
||||
## Note: In order to use this script you have to tell to mpv to enable a socket. |
||||
## Two ways are possible to achieve this: |
||||
## 1) Use the argument --input-ipc-server when you launch it. For example: |
||||
## `mpv --input-ipc-server=/tmp/mpvsocket Your.Video.File.mkv` |
||||
## 2) Add the line below when in the `mpv.conf` file: |
||||
## `input-ipc-server=/tmp/mpvsocket` |
||||
|
||||
time_to_human(){ |
||||
if [ $API_OUTPUT -gt 3600 ]; then |
||||
API_OUTPUT=$(printf '%d:%02d:%02d' $(($API_OUTPUT/3600)) $(($API_OUTPUT%3600/60)) $(($API_OUTPUT%60))) |
||||
else |
||||
if [ $API_OUTPUT -gt 60 ]; then |
||||
API_OUTPUT=$(printf '%02d:%02d' $(($API_OUTPUT%3600/60)) $(($API_OUTPUT%60))) |
||||
else |
||||
API_OUTPUT=$(printf '%02d' $(($API_OUTPUT%60))) |
||||
fi |
||||
fi |
||||
} |
||||
|
||||
|
||||
OUTPUT="" |
||||
|
||||
if pidof mpv > /dev/null; then |
||||
|
||||
# The "16) Connection refused" error happens at the row below |
||||
# See: https://github.com/deterenkelt/Nadeshiko/wiki/Known-issues-for-Nadeshiko%E2%80%91mpv#----connection-refused |
||||
TIME=$(echo '{ "command": ["get_property", "time-pos"] }' | socat - /tmp/mpvsocket) |
||||
if [[ $(echo $TIME | jq -r .error) == "success" ]]; then |
||||
while [ $# -gt 0 ]; do |
||||
COMMAND=$1 |
||||
VALID_COMMAND=true |
||||
case $COMMAND in |
||||
"time-pos") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "time-pos"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"time-remaining") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "time-remaining"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"duration") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "duration"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"media-title") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "media-title"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"playlist-pos") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "playlist-pos"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"playlist-pos-1") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "playlist-pos-1"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"playlist-count") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "playlist-count"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
"core-idle" | "play-pause-btn") |
||||
API_OUTPUT=$(echo '{ "command": ["get_property", "core-idle"] }' | socat - /tmp/mpvsocket) |
||||
;; |
||||
*) |
||||
VALID_COMMAND=false |
||||
;; |
||||
esac |
||||
|
||||
if $VALID_COMMAND; then |
||||
if [[ $(echo $API_OUTPUT | jq -r .error) == "success" ]]; then |
||||
case $COMMAND in |
||||
"time-pos") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data | cut -d'.' -f 1) |
||||
time_to_human |
||||
;; |
||||
"time-remaining") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data | cut -d'.' -f 1) |
||||
time_to_human |
||||
;; |
||||
"duration") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data | cut -d'.' -f 1) |
||||
time_to_human |
||||
;; |
||||
"media-title") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data | cut -c 1-35) |
||||
;; |
||||
"playlist-pos") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data) |
||||
API_OUTPUT="$API_OUTPUT" |
||||
;; |
||||
"playlist-pos-1") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data) |
||||
API_OUTPUT="$API_OUTPUT" |
||||
;; |
||||
"playlist-count") |
||||
API_OUTPUT=$(echo $API_OUTPUT | jq -r .data) |
||||
API_OUTPUT="$API_OUTPUT" |
||||
;; |
||||
"core-idle"| "play-pause-btn") |
||||
shift; |
||||
if [[ $(echo $API_OUTPUT | jq -r .data) == "false" ]]; then |
||||
API_OUTPUT=$1 #Play icon |
||||
shift; |
||||
else |
||||
shift; |
||||
API_OUTPUT=$1 #Pause icon |
||||
fi |
||||
;; |
||||
esac |
||||
else |
||||
API_OUTPUT="API error!" |
||||
fi |
||||
else |
||||
API_OUTPUT="$COMMAND" |
||||
fi |
||||
OUTPUT="$OUTPUT$API_OUTPUT" |
||||
shift; |
||||
done |
||||
|
||||
else |
||||
OUTPUT="Loading..." |
||||
fi |
||||
else |
||||
exit |
||||
fi |
||||
|
||||
printf "$OUTPUT" |
@ -0,0 +1,7 @@ |
||||
#!/bin/sh |
||||
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ] |
||||
then |
||||
bluetoothctl power on |
||||
else |
||||
bluetoothctl power off |
||||
fi |
@ -0,0 +1,8 @@ |
||||
rofi.combi-modi: window,drun,ssh |
||||
;rofi.theme: solarized |
||||
rofi.font: Ubuntu Nerd Fonts 13 |
||||
rofi.modi: drun,calc |
||||
rofi.show: drun,calc |
||||
rofi.show-icons: true |
||||
rofi.sidebar-mode: true |
||||
|
@ -0,0 +1,19 @@ |
||||
# Config for rofi-wifi-menu |
||||
|
||||
# position values: |
||||
# 1 2 3 |
||||
# 8 0 4 |
||||
# 7 6 5 |
||||
POSITION=3 |
||||
|
||||
#y-offset |
||||
YOFF=17 |
||||
|
||||
#x-offset |
||||
XOFF=0 |
||||
|
||||
#fields to be displayed |
||||
FIELDS=SSID,SECURITY,BARS |
||||
|
||||
#font |
||||
FONT="UbuntuMono Nerd Font 8" |
@ -0,0 +1,100 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
# Starts a scan of available broadcasting SSIDs |
||||
# nmcli dev wifi rescan |
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
||||
|
||||
FIELDS=SSID,SECURITY |
||||
POSITION=0 |
||||
YOFF=0 |
||||
XOFF=0 |
||||
FONT="DejaVu Sans Mono 8" |
||||
|
||||
if [ -r "$DIR/config" ]; then |
||||
source "$DIR/config" |
||||
elif [ -r "$HOME/.config/rofi/wifi" ]; then |
||||
source "$HOME/.config/rofi/wifi" |
||||
else |
||||
echo "WARNING: config file not found! Using default values." |
||||
fi |
||||
|
||||
LIST=$(nmcli --fields "$FIELDS" device wifi list | sed '/^--/d') |
||||
# For some reason rofi always approximates character width 2 short... hmmm |
||||
RWIDTH=$(($(echo "$LIST" | head -n 1 | awk '{print length($0); }')+2)) |
||||
# Dynamically change the height of the rofi menu |
||||
LINENUM=$(echo "$LIST" | wc -l) |
||||
# Gives a list of known connections so we can parse it later |
||||
KNOWNCON=$(nmcli connection show) |
||||
# Really janky way of telling if there is currently a connection |
||||
CONSTATE=$(nmcli -fields WIFI g) |
||||
|
||||
CURRSSID=$(LANGUAGE=C nmcli -t -f active,ssid dev wifi | awk -F: '$1 ~ /^yes/ {print $2}') |
||||
|
||||
if [[ ! -z $CURRSSID ]]; then |
||||
HIGHLINE=$(echo "$(echo "$LIST" | awk -F "[ ]{2,}" '{print $1}' | grep -Fxn -m 1 "$CURRSSID" | awk -F ":" '{print $1}') + 1" | bc ) |
||||
fi |
||||
|
||||
# HOPEFULLY you won't need this as often as I do |
||||
# If there are more than 8 SSIDs, the menu will still only have 8 lines |
||||
if [ "$LINENUM" -gt 8 ] && [[ "$CONSTATE" =~ "enabled" ]]; then |
||||
LINENUM=8 |
||||
elif [[ "$CONSTATE" =~ "disabled" ]]; then |
||||
LINENUM=1 |
||||
fi |
||||
|
||||
|
||||
if [[ "$CONSTATE" =~ "enabled" ]]; then |
||||
TOGGLE="toggle off" |
||||
elif [[ "$CONSTATE" =~ "disabled" ]]; then |
||||
TOGGLE="toggle on" |
||||
fi |
||||
|
||||
|
||||
|
||||
CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | rofi -dmenu -p "Wi-Fi SSID: " -lines "$LINENUM" -a "$HIGHLINE" -location "$POSITION" -yoffset "$YOFF" -xoffset "$XOFF" -font "$FONT" -width -"$RWIDTH") |
||||
#echo "$CHENTRY" |
||||
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}') |
||||
#echo "$CHSSID" |
||||
|
||||
# If the user inputs "manual" as their SSID in the start window, it will bring them to this screen |
||||
if [ "$CHENTRY" = "manual" ] ; then |
||||
# Manual entry of the SSID and password (if appplicable) |
||||
MSSID=$(echo "enter the SSID of the network (SSID,password)" | rofi -dmenu -p "Manual Entry: " -font "$FONT" -lines 1) |
||||
# Separating the password from the entered string |
||||
MPASS=$(echo "$MSSID" | awk -F "," '{print $2}') |
||||
|
||||
#echo "$MSSID" |
||||
#echo "$MPASS" |
||||
|
||||
# If the user entered a manual password, then use the password nmcli command |
||||
if [ "$MPASS" = "" ]; then |
||||
nmcli dev wifi con "$MSSID" |
||||
else |
||||
nmcli dev wifi con "$MSSID" password "$MPASS" |
||||
fi |
||||
|
||||
elif [ "$CHENTRY" = "toggle on" ]; then |
||||
nmcli radio wifi on |
||||
|
||||
elif [ "$CHENTRY" = "toggle off" ]; then |
||||
nmcli radio wifi off |
||||
|
||||
else |
||||
|
||||
# If the connection is already in use, then this will still be able to get the SSID |
||||
if [ "$CHSSID" = "*" ]; then |
||||
CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}') |
||||
fi |
||||
|
||||
# Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process |
||||
if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then |
||||
nmcli con up "$CHSSID" |
||||
else |
||||
if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then |
||||
WIFIPASS=$(echo "if connection is stored, hit enter" | rofi -dmenu -p "password: " -lines 1 -font "$FONT" ) |
||||
fi |
||||
nmcli dev wifi con "$CHSSID" password "$WIFIPASS" |
||||
fi |
||||
|
||||
fi |
@ -0,0 +1,2 @@ |
||||
set window-title-home-tilde true |
||||
set statusbar-home-tilde true |
Loading…
Reference in new issue