First c ommit ever
This commit is contained in:
7
private_dot_config/i3/autostart.conf
Normal file
7
private_dot_config/i3/autostart.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
exec --no-startup-id ~/bin/autostart
|
||||
exec --no-startup-id /usr/lib/gnome-settings-daemon/gnome-settings-daemon
|
||||
#notifications
|
||||
exec killall -q notify-osd
|
||||
exec bash ~/scripts/res.sh
|
||||
exec_always --no-startup-id dunst -config ~/.config/dunst/dunstrc
|
||||
exec redshift -l $(curl -s "https://location.services.mozilla.com/v1/geolocate?key=geoclue" | jq -r '"\(.location.lat):\(.location.lng)"')
|
||||
24
private_dot_config/i3/bar
Normal file
24
private_dot_config/i3/bar
Normal file
@@ -0,0 +1,24 @@
|
||||
# font used by i3 for titles and bars
|
||||
font pango:Hack 8
|
||||
|
||||
#start of bar section
|
||||
bar {
|
||||
position top
|
||||
status_command i3blocks -c ~/.config/i3/i3blocks.conf
|
||||
colors {
|
||||
# bar background color
|
||||
background $bg
|
||||
# text color used for blocks that do not have a color specified.
|
||||
statusline $yellow
|
||||
# workspaces section
|
||||
# border backgr. text
|
||||
focused_workspace $aqua $green $black
|
||||
inactive_workspace $darkgray $black $orange
|
||||
active_workspace $darkgray $black $orange
|
||||
urgent_workspace $red $red $bg
|
||||
}
|
||||
}
|
||||
#end of bar section
|
||||
|
||||
#start of window title bars & borders section
|
||||
|
||||
17
private_dot_config/i3/colors.conf
Normal file
17
private_dot_config/i3/colors.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
# set primary gruvbox colorscheme colors
|
||||
set $bg #282828
|
||||
set $red #cc241d
|
||||
set $green #98971a
|
||||
set $yellow #d79921
|
||||
set $blue #458588
|
||||
set $purple #b16286
|
||||
set $aqua #689d68
|
||||
set $gray #a89984
|
||||
set $darkgray #1d2021
|
||||
set $white #ffffff
|
||||
|
||||
# class border|backgr|text|indicator|child_border
|
||||
client.focused $green $green $darkgray $purple $green
|
||||
client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray
|
||||
client.unfocused $darkgray $darkgray $yellow $purple $darkgray
|
||||
client.urgent $red $red $white $red $red
|
||||
250
private_dot_config/i3/config
Normal file
250
private_dot_config/i3/config
Normal file
@@ -0,0 +1,250 @@
|
||||
# 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!
|
||||
|
||||
#I split my conf so I don't lose my sanity
|
||||
include colors.conf
|
||||
include misc.conf
|
||||
# include bar
|
||||
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
#font pango:Source Code Pro 10
|
||||
|
||||
# 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 10
|
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -i ~/Pictures/lockscreen.png
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec kitty
|
||||
bindsym $mod+Shift+Return exec i3-sensible-terminal
|
||||
|
||||
# kill focused window
|
||||
#bindsym $mod+F4 kill
|
||||
bindsym $mod+shift+Q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec rofi -show drun -modi drun
|
||||
bindsym $alt+Tab exec rofi -show window -modi window
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l 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+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l 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+y 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 $Terminal "1"
|
||||
set $Browsers "2"
|
||||
set $Youtube "3"
|
||||
set $IRC "4"
|
||||
set $Game "5"
|
||||
set $College "6"
|
||||
set $Mail "7"
|
||||
set $Steam "8"
|
||||
set $Vm "9"
|
||||
set $10 "10"
|
||||
set $Work "11"
|
||||
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace number $Terminal
|
||||
bindsym $mod+2 workspace number $Browsers
|
||||
bindsym $mod+3 workspace number $Youtube
|
||||
bindsym $mod+4 workspace number $IRC
|
||||
bindsym $mod+5 workspace number $Game
|
||||
bindsym $mod+6 workspace number $College
|
||||
bindsym $mod+7 workspace number $Mail
|
||||
bindsym $mod+c workspace number $College
|
||||
bindsym $mod+8 workspace number $Steam
|
||||
bindsym $mod+g workspace number $Game
|
||||
bindsym $mod+9 workspace number $Vm
|
||||
bindsym $mod+m workspace number $Mail
|
||||
bindsym $mod+0 workspace number $10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $Terminal
|
||||
bindsym $mod+Shift+2 move container to workspace number $Browsers
|
||||
bindsym $mod+Shift+3 move container to workspace number $Youtube
|
||||
bindsym $mod+Shift+4 move container to workspace number $IRC
|
||||
bindsym $mod+Shift+5 move container to workspace number $Game
|
||||
bindsym $mod+Shift+6 move container to workspace number $College
|
||||
bindsym $mod+Shift+7 move container to workspace number $Mail
|
||||
bindsym $mod+Shift+8 move container to workspace number $Steam
|
||||
bindsym $mod+Shift+9 move container to workspace number $Vm
|
||||
bindsym $mod+Shift+0 move container to workspace number $10
|
||||
bindsym $mod+Shift+g move container to workspace number $Game
|
||||
bindsym $mod+Shift+m move container to workspace number $Mail
|
||||
|
||||
|
||||
# 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 h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l 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"
|
||||
}
|
||||
mode "switch"{
|
||||
# Can't decide if I want it to jump double time or not so I'm adding both
|
||||
bindsym h workspace prev
|
||||
bindsym l workspace next
|
||||
bindsym Shift+h workspace prev;workspace prev
|
||||
bindsym Shift+l workspace next;workspace next
|
||||
# My finger do not like reaching for the numbers
|
||||
bindsym a workspace number $Terminal
|
||||
bindsym s workspace number $Browsers
|
||||
bindsym d workspace number $Youtube
|
||||
bindsym f workspace number $IRC
|
||||
bindsym g workspace number $Game
|
||||
bindsym c workspace number $College
|
||||
bindsym q workspace number $Steam
|
||||
bindsym v workspace number $Vm
|
||||
bindsym m workspace number $Mail
|
||||
bindsym w workspace number $10
|
||||
bindsym e workspace number $Work
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+semicolon mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
||||
bindsym $mod+semicolon mode "switch"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
|
||||
# Only enable gaps on a workspace when there is at least one container
|
||||
#smart_gaps on
|
||||
smart_borders on
|
||||
|
||||
# Only enable outer gaps when there is exactly one container
|
||||
smart_gaps inverse_outer
|
||||
|
||||
|
||||
#gaps
|
||||
for_window [class="^.*"] border pixel 1
|
||||
gaps inner 1
|
||||
gaps outer 1
|
||||
|
||||
#Screenshot
|
||||
#bindsym $mod+shift+s exec --no-startup-id flameshot gui
|
||||
exec_always --no-startup-id flameshot
|
||||
|
||||
#Actually TouchPad Tap-To-Click
|
||||
#exec xinput --set-prop "SynPS/2 Synaptics TouchPad" 287 1 1 1 1 1 1 1
|
||||
#Gap Size changing
|
||||
bindsym $mod+F9 gaps inner current plus 2
|
||||
bindsym $mod+F10 gaps inner current minus 2
|
||||
|
||||
#fancylock
|
||||
bindsym $mod+shift+F11 exec --no-startup-id i3lock -i ~/Pictures/lockscreen.png
|
||||
|
||||
#bindsym $mod+shift+s ~/scripts/screenshot.sh
|
||||
bindsym $mod+shift+s exec flameshot gui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#This Is night colors
|
||||
exec redshift
|
||||
|
||||
include window_rules.conf
|
||||
include autostart.conf
|
||||
182
private_dot_config/i3/config.save
Normal file
182
private_dot_config/i3/config.save
Normal file
@@ -0,0 +1,182 @@
|
||||
# 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
|
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3status killall -SIGUSR1 i3status
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
# 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 dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec rofi -modi drun,run -show drun
|
||||
# There also is 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+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+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 number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $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 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 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
|
||||
}
|
||||
224
private_dot_config/i3/config.save.1
Normal file
224
private_dot_config/i3/config.save.1
Normal file
@@ -0,0 +1,224 @@
|
||||
# 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 Mod1
|
||||
|
||||
# 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
|
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
# set $refresh_i3status killall -SIGUSR1 i3status
|
||||
# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
|
||||
# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
|
||||
# bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
# bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec alacritty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+f4 kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id rofi -show run
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec rofi -modi drun,run -show drun
|
||||
# There also is 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+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+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 number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $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 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 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)
|
||||
|
||||
# This is Wallpaper
|
||||
exec --no-startup-id nitrogen --restore
|
||||
|
||||
#This Is night shift
|
||||
exec --no-startup-id redshift -O 3000K
|
||||
|
||||
#Just for RGB keybOARD
|
||||
#exec --no-startup-id xset led named "Scroll Lock"
|
||||
|
||||
# Only enable gaps on a workspace when there is at least one container
|
||||
smart_gaps on
|
||||
smart_borders on
|
||||
# Only enable outer gaps when there is exactly one container
|
||||
#smart_gaps inverse_outer
|
||||
|
||||
|
||||
# Media Controls
|
||||
bindsym $mod+F3 exec --no-startup-id playerctl next
|
||||
bindsym $mod+F2 exec --no-startup-id playerctl play-pause
|
||||
bindsym $mod+F1 exec --no-startup-id playerctl previous
|
||||
|
||||
#gaps pls work
|
||||
|
||||
for_window [class="^.*"] border pixel 4
|
||||
gaps inner 14
|
||||
gaps outer 0
|
||||
|
||||
#Screenshot
|
||||
bindsym F12 exec --no-startup-id flameshot gui
|
||||
|
||||
#touchpad clicking :D
|
||||
exec --nostartup-id "xinput set-prop 11 281 1"
|
||||
|
||||
#resolution Script
|
||||
exec xrandr --newmode "1368x768" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
|
||||
exec xrandr --addmode LVDS-1 1368x768
|
||||
exec xrandr --addmode VGA-1 1368x768
|
||||
exec xrandr --output LVDS-1 --mode 1368x768
|
||||
exec xrandr --output VGA-1 --mode 1368x768
|
||||
|
||||
#polybar
|
||||
#exec "polybar -c /home/linly/.config/polybar/config.ini main"
|
||||
exec ~/.config/polybar/launch.sh
|
||||
exec "xinput set-prop "SynPS/2 Synaptics TouchPad" 292 1 1 1 1 1 1 1 "
|
||||
189
private_dot_config/i3/executable_i3blocks.conf
Normal file
189
private_dot_config/i3/executable_i3blocks.conf
Normal file
@@ -0,0 +1,189 @@
|
||||
# align
|
||||
# color
|
||||
# command
|
||||
# full_text
|
||||
# instance
|
||||
# interval
|
||||
# label
|
||||
# min_width
|
||||
# name
|
||||
# separator
|
||||
# separator_block_width
|
||||
# short_text
|
||||
# signal
|
||||
# urgent
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
# Each block command defaults to the script name to avoid boilerplate.
|
||||
|
||||
# Global properties
|
||||
#
|
||||
# The top properties below are applied to every block, but can be overridden.
|
||||
# Each block command defaults to the script name to avoid boilerplate.
|
||||
command=~/.config/i3/i3blocks/$BLOCK_NAME
|
||||
separator_block_width=20
|
||||
markup=none
|
||||
separator=false
|
||||
|
||||
# Find your own networking interfaces by typing
|
||||
# 'ip link' or 'ifconfig' in a terminal window.
|
||||
# Yours are probably different than mine!
|
||||
|
||||
#my ethernet interface is eno1
|
||||
#most people is eth0
|
||||
[bandwidth]
|
||||
instance=enp37s0
|
||||
interval=5
|
||||
color=#fabd2f
|
||||
label= ETH
|
||||
|
||||
#my wifi interface is wlp2s0
|
||||
[wifi]
|
||||
instance=wlp2s0
|
||||
interval=10
|
||||
color=#b8bb26
|
||||
label= WIFI
|
||||
separator_block_width=5
|
||||
|
||||
[bandwidth]
|
||||
instance=wlp2s0
|
||||
interval=5
|
||||
color=#b8bb26
|
||||
|
||||
########################
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
########################
|
||||
|
||||
|
||||
# CPU usage
|
||||
#
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[cpu_usage]
|
||||
label= CPU
|
||||
interval=10
|
||||
min_width=CPU: 100.00%
|
||||
color=#fb4934
|
||||
|
||||
|
||||
########################
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
########################
|
||||
|
||||
|
||||
# Temperature
|
||||
#
|
||||
# Support multiple chips, though lm-sensors.
|
||||
# The script may be called with -w and -c switches to specify thresholds,
|
||||
# see the script for details.
|
||||
[temperature]
|
||||
label= TEMP
|
||||
interval=10
|
||||
color=#fabd2f
|
||||
|
||||
|
||||
########################
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
########################
|
||||
|
||||
|
||||
|
||||
|
||||
# Memory usage
|
||||
#
|
||||
# The type defaults to "mem" if the instance is not specified.
|
||||
[memory]
|
||||
label= FREE
|
||||
interval=30
|
||||
color=#b8bb26
|
||||
|
||||
########################
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
########################
|
||||
|
||||
|
||||
|
||||
# Disk usage
|
||||
#
|
||||
# The directory defaults to $HOME if the instance is not specified.
|
||||
# The script may be called with a optional argument to set the alert
|
||||
# (defaults to 10 for 10%).
|
||||
[disk]
|
||||
label= HD /home
|
||||
interval=30
|
||||
color=#fb4934
|
||||
separator_block_width=10
|
||||
|
||||
# my root / partition
|
||||
[disk]
|
||||
label=/
|
||||
instance=/dev/sda3
|
||||
interval=30
|
||||
color=#fb4934
|
||||
|
||||
|
||||
########################
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
########################
|
||||
|
||||
|
||||
|
||||
# Battery indicator
|
||||
#
|
||||
# The battery instance defaults to 0.
|
||||
#[battery]
|
||||
#label=BATT
|
||||
#label= BATT
|
||||
#instance=1
|
||||
#interval=30
|
||||
#color=#fabd2f
|
||||
|
||||
|
||||
########################
|
||||
separator_block_width=10
|
||||
[spacer]
|
||||
separator_block_width=10
|
||||
full_text=
|
||||
color=#b16286
|
||||
########################
|
||||
|
||||
|
||||
|
||||
[date]
|
||||
command=date
|
||||
interval=1
|
||||
label=
|
||||
color=#b8bb26
|
||||
|
||||
#lightred #fb4934
|
||||
#red #cc241d
|
||||
#green #98971a
|
||||
#lightgreen #b8bb26
|
||||
#yellow #d79921
|
||||
#lightyellow #fabd2f
|
||||
#blue #458588
|
||||
#purple #b16286
|
||||
#aqua #689d68
|
||||
#
|
||||
|
||||
8
private_dot_config/i3/i3.code-workspace
Normal file
8
private_dot_config/i3/i3.code-workspace
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
90
private_dot_config/i3/i3blocks/executable_bandwidth
Normal file
90
private_dot_config/i3/i3blocks/executable_bandwidth
Normal file
@@ -0,0 +1,90 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>
|
||||
# Copyright (C) 2014 kaueraal
|
||||
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Use the provided interface, otherwise the device used for the default route.
|
||||
if [[ -n $BLOCK_INSTANCE ]]; then
|
||||
INTERFACE=$BLOCK_INSTANCE
|
||||
else
|
||||
INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')
|
||||
fi
|
||||
|
||||
# Issue #36 compliant.
|
||||
if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ]
|
||||
then
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# path to store the old results in
|
||||
path="/dev/shm/$(basename $0)-${INTERFACE}"
|
||||
|
||||
# grabbing data for each adapter.
|
||||
read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes"
|
||||
read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes"
|
||||
|
||||
# get time
|
||||
time=$(date +%s)
|
||||
|
||||
# write current data if file does not exist. Do not exit, this will cause
|
||||
# problems if this file is sourced instead of executed as another process.
|
||||
if ! [[ -f "${path}" ]]; then
|
||||
echo "${time} ${rx} ${tx}" > "${path}"
|
||||
chmod 0666 "${path}"
|
||||
fi
|
||||
|
||||
# read previous state and update data storage
|
||||
read old < "${path}"
|
||||
echo "${time} ${rx} ${tx}" > "${path}"
|
||||
|
||||
# parse old data and calc time passed
|
||||
old=(${old//;/ })
|
||||
time_diff=$(( $time - ${old[0]} ))
|
||||
|
||||
# sanity check: has a positive amount of time passed
|
||||
[[ "${time_diff}" -gt 0 ]] || exit
|
||||
|
||||
# calc bytes transferred, and their rate in byte/s
|
||||
rx_diff=$(( $rx - ${old[1]} ))
|
||||
tx_diff=$(( $tx - ${old[2]} ))
|
||||
rx_rate=$(( $rx_diff / $time_diff ))
|
||||
tx_rate=$(( $tx_diff / $time_diff ))
|
||||
|
||||
# shift by 10 bytes to get KiB/s. If the value is larger than
|
||||
# 1024^2 = 1048576, then display MiB/s instead
|
||||
|
||||
# incoming
|
||||
echo -n "IN "
|
||||
rx_kib=$(( $rx_rate >> 10 ))
|
||||
if [[ "$rx_rate" -gt 1048576 ]]; then
|
||||
printf '%sM' "`echo "scale=1; $rx_kib / 1024" | bc`"
|
||||
else
|
||||
echo -n "${rx_kib}K"
|
||||
fi
|
||||
|
||||
echo -n " "
|
||||
|
||||
# outgoing
|
||||
echo -n "OUT "
|
||||
tx_kib=$(( $tx_rate >> 10 ))
|
||||
if [[ "$tx_rate" -gt 1048576 ]]; then
|
||||
printf '%sM' "`echo "scale=1; $tx_kib / 1024" | bc`"
|
||||
else
|
||||
echo -n "${tx_kib}K"
|
||||
fi
|
||||
74
private_dot_config/i3/i3blocks/executable_battery
Normal file
74
private_dot_config/i3/i3blocks/executable_battery
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||
#
|
||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||
#
|
||||
# This script is meant to use with i3blocks. It parses the output of the "acpi"
|
||||
# command (often provided by a package of the same name) to read the status of
|
||||
# the battery, and eventually its remaining time (to full charge or discharge).
|
||||
#
|
||||
# The color will gradually change for a percentage below 85%, and the urgency
|
||||
# (exit code 33) is set if there is less that 5% remaining.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
|
||||
my $acpi;
|
||||
my $status;
|
||||
my $percent;
|
||||
my $full_text;
|
||||
my $short_text;
|
||||
my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
|
||||
|
||||
# read the first line of the "acpi" command output
|
||||
open (ACPI, "acpi -b | grep 'Battery $bat_number' |") or die;
|
||||
$acpi = <ACPI>;
|
||||
close(ACPI);
|
||||
|
||||
# fail on unexpected output
|
||||
if ($acpi !~ /: (\w+), (\d+)%/) {
|
||||
die "$acpi\n";
|
||||
}
|
||||
|
||||
$status = $1;
|
||||
$percent = $2;
|
||||
$full_text = "$percent%";
|
||||
|
||||
if ($status eq 'Discharging') {
|
||||
$full_text .= ' DIS';
|
||||
} elsif ($status eq 'Charging') {
|
||||
$full_text .= ' CHR';
|
||||
}
|
||||
|
||||
$short_text = $full_text;
|
||||
|
||||
if ($acpi =~ /(\d\d:\d\d):/) {
|
||||
$full_text .= " ($1)";
|
||||
}
|
||||
|
||||
# print text
|
||||
print "$full_text\n";
|
||||
print "$short_text\n";
|
||||
|
||||
# consider color and urgent flag only on discharge
|
||||
if ($status eq 'Discharging') {
|
||||
|
||||
if ($percent < 20) {
|
||||
print "";
|
||||
} elsif ($percent < 40) {
|
||||
print "";
|
||||
} elsif ($percent < 60) {
|
||||
print "";
|
||||
} elsif ($percent < 85) {
|
||||
print "";
|
||||
}
|
||||
|
||||
if ($percent < 5) {
|
||||
exit(33);
|
||||
}
|
||||
}
|
||||
|
||||
exit(0);
|
||||
55
private_dot_config/i3/i3blocks/executable_cpu_usage
Normal file
55
private_dot_config/i3/i3blocks/executable_cpu_usage
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
||||
#
|
||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Getopt::Long;
|
||||
|
||||
# default values
|
||||
my $t_warn = 50;
|
||||
my $t_crit = 80;
|
||||
my $cpu_usage = -1;
|
||||
|
||||
sub help {
|
||||
print "Usage: cpu_usage [-w <warning>] [-c <critical>]\n";
|
||||
print "-w <percent>: warning threshold to become yellow\n";
|
||||
print "-c <percent>: critical threshold to become red\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
GetOptions("help|h" => \&help,
|
||||
"w=i" => \$t_warn,
|
||||
"c=i" => \$t_crit);
|
||||
|
||||
# Get CPU usage
|
||||
$ENV{LC_ALL}="en_US"; # if mpstat is not run under en_US locale, things may break, so make sure it is
|
||||
open (MPSTAT, 'mpstat 1 1 |') or die;
|
||||
while (<MPSTAT>) {
|
||||
if (/^.*\s+(\d+\.\d+)\s+$/) {
|
||||
$cpu_usage = 100 - $1; # 100% - %idle
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(MPSTAT);
|
||||
|
||||
$cpu_usage eq -1 and die 'Can\'t find CPU information';
|
||||
|
||||
# Print short_text, full_text
|
||||
printf "%.2f%%\n", $cpu_usage;
|
||||
printf "%.2f%%\n", $cpu_usage;
|
||||
|
||||
# Print color, if needed
|
||||
if ($cpu_usage >= $t_crit) {
|
||||
print "#FF0000\n";
|
||||
exit 33;
|
||||
} elsif ($cpu_usage >= $t_warn) {
|
||||
print "#FFFC00\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
41
private_dot_config/i3/i3blocks/executable_disk
Normal file
41
private_dot_config/i3/i3blocks/executable_disk
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
DIR="${BLOCK_INSTANCE:-$HOME}"
|
||||
ALERT_LOW="${1:-10}" # color will turn red under this value (default: 10%)
|
||||
|
||||
df -h -P -l "$DIR" | awk -v alert_low=$ALERT_LOW '
|
||||
/\/.*/ {
|
||||
# full text
|
||||
print $4
|
||||
|
||||
# short text
|
||||
print $4
|
||||
|
||||
use=$5
|
||||
|
||||
# no need to continue parsing
|
||||
exit 0
|
||||
}
|
||||
|
||||
END {
|
||||
gsub(/%$/,"",use)
|
||||
if (100 - use < alert_low) {
|
||||
# color
|
||||
print "#FF0000"
|
||||
}
|
||||
}
|
||||
'
|
||||
61
private_dot_config/i3/i3blocks/executable_iface
Normal file
61
private_dot_config/i3/i3blocks/executable_iface
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# Use the provided interface, otherwise the device used for the default route.
|
||||
if [[ -n $BLOCK_INSTANCE ]]; then
|
||||
IF=$BLOCK_INSTANCE
|
||||
else
|
||||
IF=$(ip route | awk '/^default/ { print $5 ; exit }')
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
|
||||
# connection (think desktop), the corresponding block should not be displayed.
|
||||
[[ ! -d /sys/class/net/${IF} ]] && exit
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
if [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
|
||||
echo down # full text
|
||||
echo down # short text
|
||||
echo \#FF0000 # color
|
||||
exit
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
-4)
|
||||
AF=inet ;;
|
||||
-6)
|
||||
AF=inet6 ;;
|
||||
*)
|
||||
AF=inet6? ;;
|
||||
esac
|
||||
|
||||
# if no interface is found, use the first device with a global scope
|
||||
IPADDR=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$1 and exit")
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) echo -n "$IPADDR" | xclip -q -se c ;;
|
||||
esac
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
echo "$IPADDR" # full text
|
||||
echo "$IPADDR" # short text
|
||||
70
private_dot_config/i3/i3blocks/executable_keyindicator
Normal file
70
private_dot_config/i3/i3blocks/executable_keyindicator
Normal file
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright 2014 Marcelo Cerri <mhcerri at gmail dot com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Getopt::Long;
|
||||
use File::Basename;
|
||||
|
||||
# Default values
|
||||
my $indicator = $ENV{BLOCK_INSTANCE} || "CAPS";
|
||||
my $color_on = "#00FF00";
|
||||
my $color_off = "#222222";
|
||||
|
||||
sub help {
|
||||
my $program = basename($0);
|
||||
printf "Usage: %s [-c <color on>] [-C <color off>]\n", $program;
|
||||
printf " -c <color on>: hex color to use when indicator is on\n";
|
||||
printf " -C <color off>: hex color to use when indicator is off\n";
|
||||
printf "\n";
|
||||
printf "Note: environment variable \$BLOCK_INSTANCE should be one of:\n";
|
||||
printf " CAPS, NUM (default is CAPS).\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
Getopt::Long::config qw(no_ignore_case);
|
||||
GetOptions("help|h" => \&help,
|
||||
"c=s" => \$color_on,
|
||||
"C=s" => \$color_off) or exit 1;
|
||||
|
||||
# Key mapping
|
||||
my %indicators = (
|
||||
CAPS => 0x00000001,
|
||||
NUM => 0x00000002,
|
||||
);
|
||||
|
||||
# Retrieve key flags
|
||||
my $mask = 0;
|
||||
open(XSET, "xset -q |") or die;
|
||||
while (<XSET>) {
|
||||
if (/LED mask:\s*([0-9]+)/) {
|
||||
$mask = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(XSET);
|
||||
|
||||
# Output
|
||||
printf "%s\n", $indicator;
|
||||
printf "%s\n", $indicator;
|
||||
if (($indicators{$indicator} || 0) & $mask) {
|
||||
printf "%s\n", $color_on;
|
||||
} else {
|
||||
printf "%s\n", $color_off;
|
||||
}
|
||||
exit 0
|
||||
34
private_dot_config/i3/i3blocks/executable_load_average
Normal file
34
private_dot_config/i3/i3blocks/executable_load_average
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
load="$(cut -d ' ' -f1 /proc/loadavg)"
|
||||
cpus="$(nproc)"
|
||||
|
||||
# full text
|
||||
echo "$load"
|
||||
|
||||
# short text
|
||||
echo "$load"
|
||||
|
||||
# color if load is too high
|
||||
awk -v cpus=$cpus -v cpuload=$load '
|
||||
BEGIN {
|
||||
if (cpus <= cpuload) {
|
||||
print "#FF0000";
|
||||
exit 33;
|
||||
}
|
||||
}
|
||||
'
|
||||
76
private_dot_config/i3/i3blocks/executable_mediaplayer
Normal file
76
private_dot_config/i3/i3blocks/executable_mediaplayer
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright (C) 2014 Tony Crisci <tony@dubstepdish.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Requires playerctl binary to be in your path (except cmus)
|
||||
# See: https://github.com/acrisci/playerctl
|
||||
|
||||
# Set instance=NAME in the i3blocks configuration to specify a music player
|
||||
# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your
|
||||
# DBus session).
|
||||
|
||||
use Env qw(BLOCK_INSTANCE);
|
||||
|
||||
my @metadata = ();
|
||||
my $player_arg = "";
|
||||
|
||||
if ($BLOCK_INSTANCE) {
|
||||
$player_arg = "--player='$BLOCK_INSTANCE'";
|
||||
}
|
||||
|
||||
if ($ENV{'BLOCK_BUTTON'} == 1) {
|
||||
system("playerctl $player_arg previous");
|
||||
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
|
||||
system("playerctl $player_arg play-pause");
|
||||
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
|
||||
system("playerctl $player_arg next");
|
||||
}
|
||||
|
||||
if ($player_arg eq '' or $player_arg =~ /cmus$/) {
|
||||
# try cmus first
|
||||
my @cmus = split /^/, qx(cmus-remote -Q);
|
||||
if ($? == 0) {
|
||||
foreach my $line (@cmus) {
|
||||
my @data = split /\s/, $line;
|
||||
if (shift @data eq 'tag') {
|
||||
my $key = shift @data;
|
||||
my $value = join ' ', @data;
|
||||
|
||||
@metadata[0] = $value if $key eq 'artist';
|
||||
@metadata[1] = $value if $key eq 'title';
|
||||
}
|
||||
}
|
||||
|
||||
if (@metadata) {
|
||||
# metadata found so we are done
|
||||
print(join ' - ', @metadata);
|
||||
exit 0;
|
||||
}
|
||||
}
|
||||
|
||||
# if cmus was given, we are done
|
||||
exit 0 unless $player_arg eq '';
|
||||
}
|
||||
|
||||
my $artist = qx(playerctl $player_arg metadata artist);
|
||||
# exit status will be nonzero when playerctl cannot find your player
|
||||
exit(0) if $?;
|
||||
push(@metadata, $artist) if $artist;
|
||||
|
||||
my $title = qx(playerctl $player_arg metadata title);
|
||||
exit(0) if $?;
|
||||
push(@metadata, $title) if $title;
|
||||
|
||||
print(join(" - ", @metadata)) if @metadata;
|
||||
49
private_dot_config/i3/i3blocks/executable_memory
Normal file
49
private_dot_config/i3/i3blocks/executable_memory
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
TYPE="${BLOCK_INSTANCE:-mem}"
|
||||
|
||||
awk -v type=$TYPE '
|
||||
/^MemTotal:/ {
|
||||
mem_total=$2
|
||||
}
|
||||
/^MemFree:/ {
|
||||
mem_free=$2
|
||||
}
|
||||
/^Buffers:/ {
|
||||
mem_free+=$2
|
||||
}
|
||||
/^Cached:/ {
|
||||
mem_free+=$2
|
||||
}
|
||||
/^SwapTotal:/ {
|
||||
swap_total=$2
|
||||
}
|
||||
/^SwapFree:/ {
|
||||
swap_free=$2
|
||||
}
|
||||
END {
|
||||
# full text
|
||||
if (type == "swap")
|
||||
printf("%.1fG\n", (swap_total-swap_free)/1024/1024)
|
||||
else
|
||||
printf("%.1fG\n", mem_free/1024/1024)
|
||||
|
||||
# TODO: short text
|
||||
|
||||
# TODO: color (if less than X%)
|
||||
}
|
||||
' /proc/meminfo
|
||||
149
private_dot_config/i3/i3blocks/executable_openvpn
Normal file
149
private_dot_config/i3/i3blocks/executable_openvpn
Normal file
@@ -0,0 +1,149 @@
|
||||
#!/usr/bin/perl
|
||||
# Made by Pierre Mavro/Deimosfr <deimos@deimos.fr>
|
||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
||||
# Version: 0.2
|
||||
|
||||
# Usage:
|
||||
# 1. The configuration name of OpenVPN should be familiar for you (home,work...)
|
||||
# 2. The device name in your configuration file should be fully named (tun0,tap1...not only tun or tap)
|
||||
# 3. When you launch one or multiple OpenVPN connexion, be sure the PID file is written in the correct folder (ex: --writepid /run/openvpn/home.pid)
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Getopt::Long;
|
||||
|
||||
my $openvpn_enabled='/dev/shm/openvpn_i3blocks_enabled';
|
||||
my $openvpn_disabled='/dev/shm/openvpn_i3blocks_disabled';
|
||||
|
||||
# Print output
|
||||
sub print_output {
|
||||
my $ref_pid_files = shift;
|
||||
my @pid_files = @$ref_pid_files;
|
||||
my $change=0;
|
||||
|
||||
# Total pid files
|
||||
my $total_pid = @pid_files;
|
||||
if ($total_pid == 0) {
|
||||
print "VPN: down\n"x2;
|
||||
# Delete OpenVPN i3blocks temp files
|
||||
if (-f $openvpn_enabled) {
|
||||
unlink $openvpn_enabled or die "Can't delete $openvpn_enabled\n";
|
||||
# Colorize if VPN has just went down
|
||||
print '#FF0000\n';
|
||||
}
|
||||
unless (-f $openvpn_disabled) {
|
||||
open(my $shm, '>', $openvpn_disabled) or die "Can't write $openvpn_disabled\n";
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# Check if interface device is present
|
||||
my $vpn_found=0;
|
||||
my $pid;
|
||||
my $cmd_line;
|
||||
my @config_name;
|
||||
my @config_path;
|
||||
my $interface;
|
||||
my $current_config_path;
|
||||
my $current_config_name;
|
||||
foreach (@pid_files) {
|
||||
# Get current PID
|
||||
$pid=0;
|
||||
open(PID, '<', $_);
|
||||
while(<PID>) {
|
||||
chomp $_;
|
||||
$pid = $_;
|
||||
}
|
||||
close(PID);
|
||||
# Check if PID has been found
|
||||
if ($pid ==0) {
|
||||
print "Can't get PID $_: $!\n";
|
||||
}
|
||||
|
||||
# Check if PID is still alive
|
||||
$cmd_line='/proc/'.$pid.'/cmdline';
|
||||
if (-f $cmd_line) {
|
||||
# Get config name
|
||||
open(CMD_LINE, '<', $cmd_line);
|
||||
while(<CMD_LINE>) {
|
||||
chomp $_;
|
||||
if ($_ =~ /--config\s*(.*\.conf)/) {
|
||||
# Get interface from config file
|
||||
$current_config_path = $1;
|
||||
# Remove unwanted escape chars
|
||||
$current_config_path =~ s/\x{00}//g;
|
||||
$interface = 'null';
|
||||
# Get configuration name
|
||||
if ($current_config_path =~ /(\w+).conf/) {
|
||||
$current_config_name=$1;
|
||||
} else {
|
||||
$current_config_name='unknow';
|
||||
}
|
||||
# Get OpenVPN interface device name
|
||||
open(CONFIG, '<', $current_config_path) or die "Can't read config file '$current_config_path': $!\n";
|
||||
while(<CONFIG>) {
|
||||
chomp $_;
|
||||
if ($_ =~ /dev\s+(\w+)/) {
|
||||
$interface=$1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(CONFIG);
|
||||
# check if interface exist
|
||||
unless ($interface eq 'null') {
|
||||
if (-d "/sys/class/net/$interface") {
|
||||
push @config_name, $current_config_name;
|
||||
$vpn_found=1;
|
||||
# Write enabled file
|
||||
unless (-f $openvpn_enabled) {
|
||||
open(my $shm, '>', $openvpn_enabled) or die "Can't write $openvpn_enabled\n";
|
||||
$change=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
close(CMD_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
# Check if PID found
|
||||
my $names;
|
||||
my $short_status;
|
||||
if ($vpn_found == 1) {
|
||||
$names = join('/', @config_name);
|
||||
$short_status='up';
|
||||
} else {
|
||||
$short_status='down';
|
||||
$names = $short_status;
|
||||
}
|
||||
|
||||
print "VPN: $names\n";
|
||||
print "VPN: $short_status\n";
|
||||
|
||||
# Print color if there were changes
|
||||
print "#00FF00\n" if ($change == 1);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
sub check_opts {
|
||||
# Vars
|
||||
my @pid_file=glob '/run/openvpn/*.pid';
|
||||
|
||||
# Set options
|
||||
GetOptions( "help|h" => \&help,
|
||||
"p=s" => \@pid_file);
|
||||
|
||||
print_output(\@pid_file);
|
||||
}
|
||||
|
||||
sub help {
|
||||
print "Usage: openvpn [-d pid folder files]\n";
|
||||
print "-d : pid folder files (default /run/openvpn/*.pid)\n";
|
||||
print "Note: devices in configuration file should be named with their number (ex: tun0, tap1)\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
&check_opts;
|
||||
69
private_dot_config/i3/i3blocks/executable_temperature
Normal file
69
private_dot_config/i3/i3blocks/executable_temperature
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
||||
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use utf8;
|
||||
use Getopt::Long;
|
||||
|
||||
binmode(STDOUT, ":utf8");
|
||||
|
||||
# default values
|
||||
my $t_warn = 70;
|
||||
my $t_crit = 90;
|
||||
my $chip = "";
|
||||
my $temperature = -9999;
|
||||
|
||||
sub help {
|
||||
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
|
||||
print "-w <percent>: warning threshold to become yellow\n";
|
||||
print "-c <percent>: critical threshold to become red\n";
|
||||
print "--chip <chip>: sensor chip\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
GetOptions("help|h" => \&help,
|
||||
"w=i" => \$t_warn,
|
||||
"c=i" => \$t_crit,
|
||||
"chip=s" => \$chip);
|
||||
|
||||
# Get chip temperature
|
||||
open (SENSORS, "sensors -u $chip |") or die;
|
||||
while (<SENSORS>) {
|
||||
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
|
||||
$temperature = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(SENSORS);
|
||||
|
||||
$temperature eq -9999 and die 'Cannot find temperature';
|
||||
|
||||
# Print short_text, full_text
|
||||
print "$temperature°C\n" x2;
|
||||
|
||||
# Print color, if needed
|
||||
if ($temperature >= $t_crit) {
|
||||
print "#FF0000\n";
|
||||
exit 33;
|
||||
} elsif ($temperature >= $t_warn) {
|
||||
print "#FFFC00\n";
|
||||
}
|
||||
|
||||
exit 0;
|
||||
70
private_dot_config/i3/i3blocks/executable_volume
Normal file
70
private_dot_config/i3/i3blocks/executable_volume
Normal file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# The second parameter overrides the mixer selection
|
||||
# For PulseAudio users, use "pulse"
|
||||
# For Jack/Jack2 users, use "jackplug"
|
||||
# For ALSA users, you may use "default" for your primary card
|
||||
# or you may use hw:# where # is the number of the card desired
|
||||
MIXER="default"
|
||||
[ -n "$(lsmod | grep pulse)" ] && MIXER="pulse"
|
||||
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
|
||||
MIXER="${2:-$MIXER}"
|
||||
|
||||
# The instance option sets the control to report and configure
|
||||
# This defaults to the first control of your selected mixer
|
||||
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
|
||||
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
|
||||
sed -n "s/Simple mixer control '\([A-Za-z ]*\)',0/\1/p" |
|
||||
head -n1
|
||||
)}"
|
||||
|
||||
# The first parameter sets the step to change the volume by (and units to display)
|
||||
# This may be in in % or dB (eg. 5% or 3dB)
|
||||
STEP="${1:-5%}"
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
capability() { # Return "Capture" if the device is a capture device
|
||||
amixer -D $MIXER get $SCONTROL |
|
||||
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
|
||||
}
|
||||
|
||||
volume() {
|
||||
amixer -D $MIXER get $SCONTROL $(capability)
|
||||
}
|
||||
|
||||
format() {
|
||||
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
|
||||
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
|
||||
# If dB was selected, print that instead
|
||||
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
|
||||
perl_filter+='"; exit}'
|
||||
perl -ne "$perl_filter"
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
3) amixer -q -D $MIXER sset $SCONTROL $(capability) toggle ;; # right click, mute/unmute
|
||||
4) amixer -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
|
||||
5) amixer -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
|
||||
esac
|
||||
|
||||
volume | format
|
||||
46
private_dot_config/i3/i3blocks/executable_wifi
Normal file
46
private_dot_config/i3/i3blocks/executable_wifi
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
|
||||
# connection (think desktop), the corresponding block should not be displayed.
|
||||
[[ ! -d /sys/class/net/${INTERFACE}/wireless ]] ||
|
||||
[[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
echo $QUALITY% # full text
|
||||
echo $QUALITY% # short text
|
||||
|
||||
# color
|
||||
if [[ $QUALITY -ge 80 ]]; then
|
||||
echo ""
|
||||
elif [[ $QUALITY -lt 80 ]]; then
|
||||
echo ""
|
||||
elif [[ $QUALITY -lt 60 ]]; then
|
||||
echo ""
|
||||
elif [[ $QUALITY -lt 40 ]]; then
|
||||
echo ""
|
||||
fi
|
||||
64
private_dot_config/i3/i3status/config
Normal file
64
private_dot_config/i3/i3status/config
Normal file
@@ -0,0 +1,64 @@
|
||||
# i3status configuration file.
|
||||
# see "man i3status" for documentation.
|
||||
|
||||
# It is important that this file is edited as UTF-8.
|
||||
# The following line should contain a sharp s:
|
||||
# ß
|
||||
# If the above line is not correctly displayed, fix your editor first!
|
||||
|
||||
general {
|
||||
colors = true
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "wireless _first_"
|
||||
order += "ethernet _first_"
|
||||
order += "ipv6"
|
||||
order += "battery all"
|
||||
order += "disk /"
|
||||
order += "disk /home"
|
||||
order += "load"
|
||||
order += "memory"
|
||||
order += "tztime local"
|
||||
|
||||
wireless _first_ {
|
||||
format_up = "W: (%quality at %essid) %ip"
|
||||
format_down = "W: down"
|
||||
}
|
||||
|
||||
ethernet _first_ {
|
||||
format_up = "E: %ip (%speed)"
|
||||
format_down = "E: down"
|
||||
}
|
||||
|
||||
battery all {
|
||||
format = "%status %percentage %remaining"
|
||||
format_down = ""
|
||||
}
|
||||
|
||||
disk "/" {
|
||||
format = "/:%avail"
|
||||
}
|
||||
|
||||
disk "/home" {
|
||||
format = "h:%avail"
|
||||
}
|
||||
|
||||
load {
|
||||
format = "%1min"
|
||||
}
|
||||
|
||||
cpu_temperature 0 {
|
||||
format = "C0: %degrees°C"
|
||||
max_threshold = 75
|
||||
}
|
||||
|
||||
memory {
|
||||
format = "%used | %available"
|
||||
threshold_degraded = "1G"
|
||||
format_degraded = "MEMORY < %available"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
format = "%Y-%m-%d %H:%M:%S"
|
||||
}
|
||||
72
private_dot_config/i3/misc.conf
Normal file
72
private_dot_config/i3/misc.conf
Normal file
@@ -0,0 +1,72 @@
|
||||
#The best hot key ever
|
||||
bindsym ctrl+$mod+v exec firefox https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
||||
|
||||
#disable mouse binds
|
||||
#bindsym $mod+shift+a exec ~/scripts/mouse.sh -0.5 0
|
||||
#bindsym $mod+shift+b exec ~/scripts/mouse.sh -0.5 1
|
||||
|
||||
# This is Wallpaper
|
||||
exec_always --no-startup-id nitrogen --restore
|
||||
|
||||
#This Is night colors
|
||||
#exec redshift
|
||||
|
||||
#Just for RGB keybOARD
|
||||
#exec --no-startup-id xset led named "Scroll Lock"
|
||||
|
||||
# Media Controls
|
||||
bindsym $mod+F3 exec --no-startup-id playerctl next
|
||||
bindsym $mod+F2 exec --no-startup-id playerctl play-pause
|
||||
bindsym $mod+F1 exec --no-startup-id playerctl previous
|
||||
|
||||
#polybar
|
||||
exec_always ~/.config/polybar/launch.sh --blocks
|
||||
|
||||
#bar {
|
||||
# status_command i3status
|
||||
# tray_output primary
|
||||
# }
|
||||
|
||||
#picom
|
||||
# exec_always picom
|
||||
|
||||
#Turns caps lock to an extra escape
|
||||
exec_always --no-startup-id xmodmap -e "clear lock"
|
||||
exec_always --no-startup-id xmodmap -e "keysym Caps_Lock = Escape"
|
||||
|
||||
#Resolution and Mouse sense scripts
|
||||
#exec_always ~/scripts/res.sh
|
||||
exec ~/scripts/mouse.sh -0.5 1
|
||||
|
||||
# move focused workspace between monitors
|
||||
bindsym $mod+Ctrl+Right layout toggle split, move workspace to output right
|
||||
bindsym $mod+Ctrl+l layout toggle split, move workspace to output right
|
||||
bindsym $mod+Ctrl+Left layout toggle split, move workspace to output left
|
||||
bindsym $mod+Ctrl+h layout toggle split, move workspace to output left
|
||||
|
||||
# Compose key
|
||||
exec setxkbmap -option "compose:ralt"
|
||||
|
||||
#Useful thing to switch back when you press same switcher key
|
||||
workspace_auto_back_and_forth yes
|
||||
|
||||
# dunstctl binds
|
||||
bindsym Ctrl+space exec --no-startup-id dunstctl close-all
|
||||
bindsym Ctrl+shift+semicolon exec --no-startup-id dunstctl history-pop
|
||||
|
||||
|
||||
#wacom tablet thingss
|
||||
exec --no-startup-id xsetwacom set 'Wacom One by Wacom M Pen stylus' MaptoOutput HEAD-0
|
||||
exec --no-startup-id xinput --set-prop 'Wacom One by Wacom M Pen stylus' 'Wacom Rotation' 3
|
||||
|
||||
|
||||
# Useful for laptops
|
||||
# media keys
|
||||
bindsym XF86AudioMute exec --no-startup-id "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||
bindsym XF86LowerAudio exec --no-startup-id "pactl set-sink-volume @DEFAULT_SINK@ -5% && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
|
||||
bindsym XF86RaiseAudio exec --no-startup-id "pactl set-sink-volume @DEFAULT_SINK@ +5% && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id "pactl set-sink-volume @DEFAULT_SINK@ -5% && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id "pactl set-sink-volume @DEFAULT_SINK@ +5% && paplay /usr/share/sounds/freedesktop/stereo/bell.oga"
|
||||
#adjust this according to how many mics you got
|
||||
#bindsym XF86AduioMicMute exec --no-startup-id "pactl set-source-mute 0 toggle"
|
||||
bindsym ctrl+Shift+m exec --no-startup-id "pactl set-source-mute 0 toggle"
|
||||
115
private_dot_config/i3/window_rules.conf
Normal file
115
private_dot_config/i3/window_rules.conf
Normal file
@@ -0,0 +1,115 @@
|
||||
|
||||
#Workspaces to monitors
|
||||
workspace $Terminal output DP-0 primary HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
workspace $Browsers output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0
|
||||
workspace $Terminal output primary HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
workspace $Youtube output primary HDMI-0 DP-3 DVI-D-0 DVI-I-1 DP-0
|
||||
workspace $Generic output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
workspace $IRC output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0
|
||||
workspace $College output DP-0 primary HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
workspace $Steam output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0
|
||||
workspace $Game output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
workspace $Mail output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0
|
||||
workspace $Vm output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
workspace $10 output HDMI-0 DP-3 DVI-D-0 DVI-I-1 primary DP-0
|
||||
workspace $Work output primary DP-0 HDMI-0 DP-3 DVI-D-0 DVI-I-1
|
||||
|
||||
#Window Rules
|
||||
|
||||
|
||||
#Terminal
|
||||
assign [class = "kitty"] $Terminal
|
||||
assign [class = "jetbrains-idea"] $Terminal
|
||||
assign [class = "jetbrains-studio"] $Terminal
|
||||
assign [class = "Code"] $Terminal
|
||||
assign [class = "qutebrowser"] $Terminal
|
||||
|
||||
|
||||
#Browsers
|
||||
assign [class = "firefox"] $Browsers
|
||||
assign [class = "Microsoft-edge"] $Browsers
|
||||
assign [class = "Nemo"] $Browsers
|
||||
assign [class = "Google-chrome"] $Browsers
|
||||
assign [class ="Pavucontrol"] $Browsers
|
||||
|
||||
|
||||
|
||||
#Youtube/Vidyas
|
||||
assign [class = "FreeTube"] $Youtube
|
||||
assign [class = "mpv"] $Youtube
|
||||
|
||||
|
||||
#Ircs
|
||||
assign [class = "discord"] $IRC
|
||||
assign [class = "Telegram"] $IRC
|
||||
|
||||
#College
|
||||
assign [class = "obsidian"] $College
|
||||
assign [class = "^.*libreoffice"] $College
|
||||
#assign [class = "wpsoffice"] $College #Gave up on WPS LOL
|
||||
assign [class = "Trello Desktop"] $College
|
||||
|
||||
#10
|
||||
assign [class = "Zathura"] $10
|
||||
|
||||
#Work
|
||||
assign [class = "krita"] $Work
|
||||
assign [class = "Scenarist"] $Work
|
||||
assign [class = "Inkscape"] $Work
|
||||
|
||||
#Game Launchers
|
||||
assign [class = "heroic"] $Steam
|
||||
assign [class = "Steam"] $Steam
|
||||
assign [class = "Lutris"] $Steam
|
||||
assign [class = "r2modman"] $Steam
|
||||
assign [class = "MultiMC"] $Steam
|
||||
assign [class = "Artix Game Launcher"] $Steam
|
||||
assign [class = "battle.net.exe"] $Steam
|
||||
|
||||
#Games
|
||||
assign [class = "csgo_linux64"] $Game
|
||||
assign [class = "steam_proton"] $Game
|
||||
assign [class = "steam_app^.*"] $Game
|
||||
assign [class = "^.*Minecraft"] $Game
|
||||
assign [class = "^.*steam"] $Game
|
||||
assign [class = "overwatch.exe"] $Game
|
||||
|
||||
#Mail
|
||||
assign [class = "Evolution"] $Mail
|
||||
assign [class = "thunderbird"] $Mail
|
||||
|
||||
|
||||
assign [class = "Virt-manager"] $Vm
|
||||
|
||||
|
||||
#More Rules
|
||||
#Classes
|
||||
for_window [class = "Spotify"] move to workspace $IRC
|
||||
for_window [class = "AppRun.wrapped"] floating enabled
|
||||
for_window [class = "Soundux"] floating enabled
|
||||
for_window [class = "Nemo"] floating enabled
|
||||
for_window [class = "Thunar"] floating enabled
|
||||
for_window [class = "Pavucontrol"] floating enabled
|
||||
for_window [class = "GUI"] floating enabled
|
||||
for_window [class = "NoiseTorch"] floating enabled
|
||||
for_window [class = "flameshot"] floating enabled
|
||||
|
||||
#Workspaces
|
||||
|
||||
for_window [workspace = $Browsers] layout split horizontal
|
||||
#for_window [workspace = $Steam] floating enabled
|
||||
for_window [workspace = $Steam] layout split horizontal
|
||||
#for_window [workspace = $Youtube] floating enabled
|
||||
for_window [workspace = $IRC] layout split horizontal
|
||||
# for_window [workspace = $Terminal] layout tabbed
|
||||
for_window [class = ".*"] title_format "<b>%class</b>"
|
||||
for_window [class = "XTerm"] floating enabled
|
||||
for_window [class = "org.opensuse.YaST"] floating enabled
|
||||
|
||||
#Names
|
||||
for_window [title = "ani-cli"] move to workspace $Youtube
|
||||
#for_window [title = "manga-cli"] move to workspace $Youtube
|
||||
|
||||
# Roles (Thanks greyfade :D)
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="task_dialog"] floating enable
|
||||
Reference in New Issue
Block a user