From 66fc6071f8ebf4b7c5a8c5ac698271c7b7710fdb Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 8 Mar 2020 16:46:00 +1100 Subject: [PATCH] First commit, added i3,i3status,dunst --- dunst/dunstrc | 52 ++++++++++++++++ i3/config | 153 ++++++++++++++++++++++++++++++++++++++++++++++++ i3status/config | 72 +++++++++++++++++++++++ idempotent.sh | 4 ++ 4 files changed, 281 insertions(+) create mode 100755 dunst/dunstrc create mode 100644 i3/config create mode 100644 i3status/config create mode 100644 idempotent.sh diff --git a/dunst/dunstrc b/dunst/dunstrc new file mode 100755 index 0000000..5df67b7 --- /dev/null +++ b/dunst/dunstrc @@ -0,0 +1,52 @@ +[global] +monitor = 0 +follow = mouse +geometry = "250x50-24+24" +indicate_hidden = yes +shrink = no +separator_height = 0 +padding = 16 +horizontal_padding = 24 +frame_width = 2 +sort = no +idle_threshold = 120 +font = Noto Sans 8 +line_height = 4 +markup = full +format = "%s\n%b" +alignment = left +show_age_threshold = 60 +word_wrap = yes +ignore_newline = no +stack_duplicates = false +hide_duplicate_count = yes +show_indicators = no +icon_position = off +sticky_history = yes +history_length = 20 +browser = /usr/bin/firefox -new-tab +always_run_script = true +title = Dunst +class = Dunst + +[shortcuts] +close = ctrl+space +close_all = ctrl+shift+space +history = ctrl+grave +context = ctrl+shift+period + +[urgency_low] +background = "#2f343f" +foreground = "#d8dee8" +timeout = 2 + +[urgency_normal] +background = "#2f343f" +foreground = "#d8dee8" +timeout = 4 + +[urgency_critical] +background = "#2f343f" +foreground = "#d8dee8" +frame_color = "#bf616a" +timeout = 0 diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..caa9385 --- /dev/null +++ b/i3/config @@ -0,0 +1,153 @@ +# set modifier +set $super Mod4 +set $alt Mod1 + +# set font +font pango: Noto Sans 8 + +# Use Mouse+$super to drag floating windows to their wanted position +floating_modifier $super + +#autostart +exec --no-startup-id hsetroot -center ~/.wallpaper.png +exec --no-startup-id xsettingsd & +exec --no-startup-id compton -b + +# start a terminal +bindsym $super+Return exec i3-sensible-terminal + +# start dmenu (a program launcher) +bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'" +bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8' + +# common apps keybinds +bindsym Print exec scrot 'Cheese_%a-%d%b%y_%H.%M.png' -e 'viewnior ~/$f' +bindsym $super+l exec i3lock -i ~/.wallpaper.png +bindsym $super+Shift+w exec firefox +bindsym $super+Shift+f exec thunar;workspace 3;focus +#bindsym $super+Shift+g exec geany + +#change volume +# bindsym XF86AudioRaiseVolume exec amixer -q set Master +# bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- +# bindsym XF86AudioMute exec amixer set Master toggle +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5% +bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle + +# music control +#bindsym XF86AudioNext exec mpc next +#bindsym XF86AudioPrev exec mpc prev +#bindsym XF86AudioPlay exec mpc toggle +#bindsym XF86AudioStop exec mpc stop +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous +bindsym XF86AudioPlay exec playerctl play-pause + +# brightness control +bindsym XF86MonBrightnessUp exec xbacklight -inc 10 +bindsym XF86MonBrightnessDown exec xbacklight -dec 10 + +# kill focused window +bindsym $super+c kill +# bindsym $alt+F4 kill + +# change focus +bindsym $super+Left focus left +bindsym $super+Down focus down +bindsym $super+Up focus up +bindsym $super+Right focus right + +# move focused window +bindsym $super+Shift+Left move left +bindsym $super+Shift+Down move down +bindsym $super+Shift+Up move up +bindsym $super+Shift+Right move right + +# split in horizontal orientation +bindsym $super+h split h + +# split in vertical orientation +bindsym $super+v split v + +# enter fullscreen mode for the focused container +bindsym $super+f fullscreen toggle + +# change container layout split +bindsym $super+s layout toggle split + +# toggle tiling / floating +bindsym $super+space floating toggle + +# change focus between tiling / floating windows +bindsym $super+Shift+space focus mode_toggle + +# switch to workspace +bindsym $alt+Control+Right workspace next +bindsym $alt+Control+Left workspace prev +bindsym $super+1 workspace 1 +bindsym $super+2 workspace 2 +bindsym $super+3 workspace 3 +bindsym $super+4 workspace 4 +bindsym $super+5 workspace 5 +bindsym $super+6 workspace 6 + +# move focused container to workspace +bindsym $super+Shift+1 move container to workspace 1 +bindsym $super+Shift+2 move container to workspace 2 +bindsym $super+Shift+3 move container to workspace 3 +bindsym $super+Shift+4 move container to workspace 4 +bindsym $super+Shift+5 move container to workspace 5 +bindsym $super+Shift+6 move container to workspace 6 + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $super+Shift+r restart + +# exit i3 +bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + bindsym Left resize shrink width 5 px or 5 ppt + bindsym Down resize grow height 5 px or 5 ppt + bindsym Up resize shrink height 5 px or 5 ppt + bindsym Right resize grow width 5 px or 5 ppt + bindsym Return mode "default" +} +bindsym $super+r mode "resize" + +# panel +bar { + colors { + background #2f343f + statusline #2f343f + separator #4b5262 + + # colour of border, background, and text + focused_workspace #2f343f #bf616a #d8dee8 + active_workspace #2f343f #2f343f #d8dee8 + inactive_workspace #2f343f #2f343f #d8dee8 + urgent_workspacei #2f343f #ebcb8b #2f343f + } + status_command i3status +} + +# window rules, you can find the window class using xprop +for_window [class=".*"] border pixel 4 +assign [class=URxvt] 1 +assign [class=Firefox|Transmission-gtk] 2 +assign [class=Thunar|File-roller] 3 +assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4 +assign [class=Audacity|Vlc|mpv|Ghb|Xfburn|Gimp*|Inkscape] 5 +assign [class=Lxappearance|System-config-printer.py|Lxtask|GParted|Pavucontrol|Exo-helper*|Lxrandr|Arandr] 6 +for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable +for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus +for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus + +# colour of border, background, text, indicator, and child_border +client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8 +client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.background #2f343f diff --git a/i3status/config b/i3status/config new file mode 100644 index 0000000..dc000bb --- /dev/null +++ b/i3status/config @@ -0,0 +1,72 @@ +general { + output_format = "i3bar" + colors = false + markup = pango + interval = 5 + color_good = '#2f343f' + color_degraded = '#ebcb8b' + color_bad = '#ba5e57' +} + +order += "load" +order += "cpu_temperature 0" +order += "disk /" +order += "disk /home" +# order += "ethernet eno1" +order += "wireless wlo1" +order += "volume master" +order += "battery 0" +order += "tztime local" + +load { + format = "  %5min Load " +} + +cpu_temperature 0 { + format = "  %degrees °C " + path = "/sys/class/thermal/thermal_zone0/temp" +} + +disk "/" { + format = "  %free Free " +} + +disk "/home" { + format = "  %free Free " +} + +ethernet eno1 { + format_up = "  %ip " + format_down = "  Disconnected " +} + +wireless wlo1 { + format_up = "  %essid " + format_down = "  Disconnected " +} + +volume master { + format = "  %volume " + format_muted = "  Muted " + device = "default" + mixer = "Master" + mixer_idx = 0 +} + +battery 0 { + last_full_capacity = true + format = "  %status %percentage " + format_down = "No Battery" + status_chr = "Charging" + status_bat = "Battery" + status_unk = "Unknown" + status_full = "Charged" + path = "/sys/class/power_supply/BAT%d/uevent" + low_threshold = 10 +} + +tztime local { + format = " %time " + format_time = " %a %-d %b %H:%M" +} + diff --git a/idempotent.sh b/idempotent.sh new file mode 100644 index 0000000..c4df103 --- /dev/null +++ b/idempotent.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ln -s ${BASEDIR}/i3 ~/.config/i3