├── .config
├── awesome
│ ├── configuration
│ │ ├── init.lua
│ │ ├── apps.lua
│ │ └── keys.lua
│ ├── icon-hulk2.png
│ ├── scripts
│ │ ├── toggle_picom.sh
│ │ ├── colors.rasi
│ │ ├── wallpaper.sh
│ │ ├── colors.lua
│ │ ├── generate-colors.sh
│ │ ├── generate-colors.py
│ │ ├── autostart.sh
│ │ └── rofi.rasi
│ ├── mytheme.lua
│ ├── widgets
│ │ └── calendar-widget
│ │ │ └── calendar.lua
│ └── rc.lua
├── neofetch
│ ├── arch.png
│ ├── arch
│ └── config.conf
├── kitty
│ ├── color.ini
│ └── kitty.conf
├── ncmpcpp
│ └── config
├── mpd
│ └── mpd.conf
├── picom
│ └── picom.conf
└── starship
│ └── starship.toml
├── desktop.png
├── desktop1.png
├── desktop2.jpg
├── .zshrc
└── README.md
/.config/awesome/configuration/init.lua:
--------------------------------------------------------------------------------
1 |
2 |
3 | require(... .. ".keys")
--------------------------------------------------------------------------------
/desktop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/camilof99/dotfiles-awesome/HEAD/desktop.png
--------------------------------------------------------------------------------
/desktop1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/camilof99/dotfiles-awesome/HEAD/desktop1.png
--------------------------------------------------------------------------------
/desktop2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/camilof99/dotfiles-awesome/HEAD/desktop2.jpg
--------------------------------------------------------------------------------
/.config/neofetch/arch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/camilof99/dotfiles-awesome/HEAD/.config/neofetch/arch.png
--------------------------------------------------------------------------------
/.config/awesome/icon-hulk2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/camilof99/dotfiles-awesome/HEAD/.config/awesome/icon-hulk2.png
--------------------------------------------------------------------------------
/.config/awesome/scripts/toggle_picom.sh:
--------------------------------------------------------------------------------
1 | #!/bin/env bash
2 | # Enable/disable compositor
3 |
4 | SERVICE="picom"
5 | if pgrep -x "$SERVICE" >/dev/null
6 | then
7 | kill $(pgrep -x "$SERVICE")
8 | else
9 | picom &
10 | #picom &
11 | fi
--------------------------------------------------------------------------------
/.config/awesome/scripts/colors.rasi:
--------------------------------------------------------------------------------
1 | * {
2 | background: #1E2127FF;
3 | background-alt: #282B31FF;
4 | foreground: #FFFFFFFF;
5 | selected: #8a2b45;
6 | active: #98C379FF;
7 | urgent: #E06C75FF;
8 | }
9 |
10 | * {
11 | font: "Hack Nerd Font 9";
12 | }
13 |
--------------------------------------------------------------------------------
/.config/awesome/scripts/wallpaper.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #!/usr/bin/env bash
3 | #!/usr/bin/python
4 | #!/bin/env bash
5 |
6 | NITCONF='$HOME/.config/nitrogen/bg-saved.cfg'
7 | IMG="cat $NITCONF | grep "file" | cut -d'=' -f2 | tail -1"
8 | NITIMG=$(eval "$IMG")
9 |
10 | wal -i $NITIMG
11 |
12 | ./generate-colors.sh
13 |
--------------------------------------------------------------------------------
/.config/neofetch/arch:
--------------------------------------------------------------------------------
1 | ${c2}⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
2 | ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
3 | ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
4 | ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀
5 | ⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣦⣽⣻⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀
6 | ⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀
7 | ⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀
8 | ⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⠟⠁⠀⠈⠹⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀
9 | ⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⢻⣿⣿⣿⡿⢷⡀⠀⠀⠀
10 | ⠀⠀⢀⣼⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣶⣅⡀⠀⠀
11 | ⠀⢀⣾⣿⠿⠛⠋⠉⠁⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠛⠿⣿⣷⣄⠀
12 | ⠠⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠄
13 |
--------------------------------------------------------------------------------
/.zshrc:
--------------------------------------------------------------------------------
1 | export _JAVA_AWT_WM_NONREPARENTING=1
2 | export PATH=$HOME/bin:/usr/local/bin:$PATH
3 |
4 | export ZSH="$HOME/.oh-my-zsh"
5 |
6 | HISTSIZE=1000
7 | SAVEHIST=1000
8 | HISTFILE=~/.zsh_history
9 |
10 | autoload -Uz compinit
11 | compinit
12 |
13 | plugins=(
14 | git
15 | zsh-autosuggestions
16 | zsh-syntax-highlighting
17 | sudo
18 | )
19 |
20 | source $ZSH/oh-my-zsh.sh
21 |
22 | alias zshconfig="code ~/.zshrc"
23 | alias la="lsd -a --group-dirs=first"
24 | alias ls='lsd --group-dirs=first'
25 |
26 | eval "$(starship init zsh)"
27 |
28 | export STARSHIP_CONFIG=$HOME/.config/starship/starship.toml
29 |
30 | # PYWAL
31 | (cat ~/.cache/wal/sequences &)
32 | cat ~/.cache/wal/sequences
33 |
34 | export PATH=~/.npm-global/bin:$PATH
35 |
--------------------------------------------------------------------------------
/.config/awesome/configuration/apps.lua:
--------------------------------------------------------------------------------
1 | local filesystem = require("gears.filesystem")
2 | local config_dir = filesystem.get_configuration_dir()
3 |
4 | -- Credits rxyhn
5 |
6 | return {
7 | --- Default ApplicationsR
8 | default = {
9 | --- Default terminal emulator
10 | terminal = "kitty",
11 | code_editor = "code",
12 | web_browser = "firefox",
13 | music_player = "kitty ncmpcpp",
14 | file_manager = "nautilus",
15 | app_launcher = "rofi -no-lazy-grab -show drun -modi drun -theme " .. config_dir .. "scripts/rofi.rasi",
16 | color_picker = "xcolor -s --scale 6 --preview-size 100",
17 | telegram = "telegram-desktop",
18 | picom_kill = "~/.config/awesome/scripts/toggle_picom.sh",
19 | wallpaper = "~/.config/awesome/scripts/wallpaper.sh",
20 | },
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/.config/kitty/color.ini:
--------------------------------------------------------------------------------
1 | cursor_shape Underline
2 | cursor_underline_thickness 1
3 | window_padding_width 15
4 |
5 | # Special
6 | #foreground #a9b1d6
7 | #background #1a1b26
8 | #
9 | ## Black
10 | #color0 #414868
11 | #color8 #414868
12 | #
13 | ## Red
14 | #color1 #f7768e
15 | #color9 #f7768e
16 | #
17 | ## Green
18 | #color2 #73daca
19 | #color10 #73daca
20 | #
21 | ## Yellow
22 | #color3 #e0af68
23 | #color11 #e0af68
24 | #
25 | ## Blue
26 | #color4 #7aa2f7
27 | #color12 #7aa2f7
28 | #
29 | ## Magenta
30 | #color5 #bb9af7
31 | #color13 #bb9af7
32 | #
33 | ## Cyan
34 | #color6 #7dcfff
35 | #color14 #7dcfff
36 | #
37 | ## White
38 | #color7 #c0caf5
39 | #color15 #c0caf5
40 | #
41 | ## Cursor
42 | #cursor #c0caf5
43 | #cursor_text_color #1a1b26
44 | #
45 | ## Selection highlight
46 | #election_foreground #7aa2f7
47 | #election_background #28344a
--------------------------------------------------------------------------------
/.config/kitty/kitty.conf:
--------------------------------------------------------------------------------
1 | enable_audio_bell no
2 |
3 | include color.ini
4 |
5 | font_family HackNerdFont
6 | font_size 14
7 |
8 | disable_ligatures never
9 |
10 | url_color #61afef
11 | url_style curly
12 |
13 | map ctrl+left neighboring_window left
14 | map ctrl+right neighboring_window right
15 | map ctrl+up neighboring_window up
16 | map ctrl+down neighboring_window down
17 |
18 | map f1 copy_to_buffer a
19 | map f2 paste_from_buffer a
20 | map f3 copy_to_buffer a
21 | map f4 paste_from_buffer a
22 |
23 | cursor_shape beam
24 | cursor_beam_thickness 1.8
25 |
26 | mouse_hide_wait 3.0
27 | detect_urls yes
28 |
29 | repaint_delay 10
30 | input_delay 3
31 | sync_to_monitor yes
32 |
33 | map ctrl+shift+z toggle_layout stack
34 | tab_bar_style powerline
35 |
36 | map ctrl+shift+enter new_window_with_cwd
37 | map ctrl+shift+t new_tab_with_cwd
38 |
39 | background_opacity 0.85
40 |
41 | shell zsh
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/.config/awesome/scripts/colors.lua:
--------------------------------------------------------------------------------
1 | local awesome = awesome
2 | local round = require('gears.math').round
3 | local gears_debug = require('gears.debug')
4 | local xresources = {}
5 | local fallback = {
6 | color0 = '#030302',
7 | color1 = '#774e24',
8 | color2 = '#9c421d',
9 | color3 = '#725539',
10 | color4 = '#556739',
11 | color5 = '#967627',
12 | color6 = '#7a6e43',
13 | color7 = '#818180',
14 | color8 = '#424241',
15 | color9 = '#9F6831',
16 | color10 = '#D05827',
17 | color11 = '#99724D',
18 | color12 = '#728A4D',
19 | color13 = '#C89E34',
20 | color14 = '#A3935A',
21 | color15 = '#c0c0bf',
22 | }
23 |
24 | function xresources.get_current_theme()
25 | local keys = { 'background', 'foreground' }
26 | for i=0,15 do table.insert(keys, 'color'..i) end
27 | local colors = {}
28 | for _, key in ipairs(keys) do
29 | local color = awesome.xrdb_get_value('', key)
30 | color = fallback[key]
31 | colors[key] = color
32 | end
33 | return colors
34 | end
35 | return xresources
36 |
--------------------------------------------------------------------------------
/.config/ncmpcpp/config:
--------------------------------------------------------------------------------
1 | ncmpcpp_directory = ~/.config/ncmpcpp
2 | lyrics_directory = ~/.config/ncmpcpp/lyrics
3 |
4 | [mpd]
5 | mpd_music_dir = "~/Music"
6 | mpd_host = "localhost"
7 | mpd_port = "6600"
8 | mpd_connection_timeout = "5"
9 | mpd_crossfade_time = "5"
10 |
11 | visualizer_output_name = "my_fifo"
12 | visualizer_sync_interval = "30"
13 | visualizer_in_stereo = "yes"
14 | visualizer_type = spectrum
15 | visualizer_look = "◆▋"
16 | visualizer_color = red, cyan, white, green, yellow, magenta, blue, red, cyan, white,green, yellow, magenta, blue
17 |
18 | autocenter_mode = "yes"
19 | centered_cursor = "yes"
20 | user_interface = "alternative"
21 | current_item_prefix = ->
22 |
23 | header_window_color = white
24 | volume_color = yellow
25 | state_line_color = green
26 | state_flags_color = yellow
27 | progressbar_color = magenta
28 | statusbar_color = blue
29 |
30 | song_columns_list_format = (6f)[red]{NE} (50)[white]{t|f:Title} (15)[]{a} (20)[cyan]{b} (7f)[green]{l}
31 |
32 | startup_slave_screen = "visualizer"
33 |
34 | display_volume_level = no
--------------------------------------------------------------------------------
/.config/mpd/mpd.conf:
--------------------------------------------------------------------------------
1 | bind_to_address "127.0.0.1"
2 | port "6600"
3 |
4 | auto_update "yes"
5 | restore_paused "yes"
6 |
7 | music_directory "~/Music"
8 | playlist_directory "~/Music"
9 | db_file "~/.config/mpd/mpd.db"
10 | log_file "syslog"
11 | pid_file "/tmp/mpd.pid"
12 | state_file "~/.config/mpd/mpd.state"
13 |
14 | audio_output {
15 | type "pipewire"
16 | name "PipeWire Sound Server"
17 | buffer_time "100000"
18 | }
19 |
20 | audio_output {
21 | type "fifo"
22 | name "Visualizer"
23 | format "44100:16:2"
24 | path "/tmp/mpd.fifo"
25 | }
26 |
27 | audio_output {
28 | type "httpd"
29 | name "lossless"
30 | encoder "flac"
31 | port "8000"
32 | max_client "8"
33 | mixer_type "software"
34 | format "44100:16:2"
35 | }
36 |
--------------------------------------------------------------------------------
/.config/awesome/scripts/generate-colors.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #!/usr/bin/env bash
3 | #!/bin/env bash
4 |
5 | file_json='$HOME/.cache/wal/colors.json'
6 | colors="cat $file_json | grep "color" | cut -d':' -f2 | tail -16"
7 | color=$(eval "$colors")
8 |
9 | declare -a data
10 |
11 | rm colors.lua && touch colors.lua
12 |
13 | for i in ${color[@]}
14 | do
15 | data+=(${i//[$;,:*%()\#&\/\"]/})
16 | done
17 |
18 | VAR0="""local awesome = awesome\nlocal round = require('gears.math').round\nlocal gears_debug = require('gears.debug')\nlocal xresources = {}\nlocal fallback = {"""
19 |
20 | echo -e $VAR0 >> colors.lua
21 |
22 | for ((i = 0 ; i < 16 ; i++))
23 | do
24 | VAR1="\tcolor$i = '#${data[$i]}',"
25 | echo -e $VAR1 >> colors.lua
26 | done
27 |
28 | echo -e '}\n' >> colors.lua
29 |
30 | VAR2="""function xresources.get_current_theme()\n\tlocal keys = { 'background', 'foreground' }\n\tfor i=0,15 do table.insert(keys, 'color'..i) end\n\tlocal colors = {}\n\tfor _, key in ipairs(keys) do\n\t\tlocal color = awesome.xrdb_get_value('', key)\n\t\tcolor = fallback[key]\n\t\tcolors[key] = color\n \tend\n\treturn colors\nend\nreturn xresources"""
31 |
32 | echo -e $VAR2 >> colors.lua
33 |
--------------------------------------------------------------------------------
/.config/awesome/scripts/generate-colors.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import json
4 |
5 | def main():
6 |
7 | with open('/home/kaneki99/.cache/wal/colors.json') as archivo:
8 | data = json.load(archivo)
9 |
10 | arch = open("colors.lua", "w")
11 | arch.write('local awesome = awesome\n'
12 | +'local round = require("gears.math").round\n'
13 | +'local gears_debug = require("gears.debug")\n'
14 | +'local xresources = {}\n'
15 | +"local fallback = {\n")
16 |
17 | for x in range(len(data['colors'])):
18 | value = "color" + '{}'.format(x)
19 | arch.write(" " + value + " = '" + data['colors'][value] + "',\n")
20 |
21 | arch.write("}\n")
22 | arch.write("function xresources.get_current_theme()\n"
23 | + " local keys = { 'background', 'foreground' }\n"
24 | + ' for i=0,15 do table.insert(keys, "color"..i) end\n'
25 | + " local colors = {}\n"
26 | + " for _, key in ipairs(keys) do\n"
27 | + ' local color = awesome.xrdb_get_value("", key)\n'
28 | + " color = fallback[key]\n"
29 | + " colors[key] = color\n"
30 | + " end\n"
31 | + " return colors\n"
32 | + "end\n"
33 | + "return xresources")
34 |
35 | if __name__ == "__main__":
36 | main()
37 |
--------------------------------------------------------------------------------
/.config/awesome/scripts/autostart.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #!/usr/bin/env bash
3 | #!/usr/bin/python
4 | #!/bin/env bash
5 |
6 | # Launch Apps when AwesomeWM starts.
7 |
8 | function run {
9 | if ! pgrep -f $1 ;
10 | then
11 | $@&
12 | fi
13 | }
14 |
15 | # List the apps you wish to run on startup below preceded with "run"
16 |
17 | # Policy kit (needed for GUI apps to ask for password)
18 | run /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
19 | # xrandr layout for AwesomeWM
20 | run ~/.scripts/awesome/awe#!/usr/bin/env bash
21 |
22 | # Policy kit (needed for GUI apps to ask for password)
23 | run /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
24 |
25 | # sxhkd Hotkeys
26 | #run sxhkd &
27 | # Start compositor
28 | picom &
29 | # Nitrogen wallpaper
30 | run nitrogen --restore &
31 | # pywal
32 | wal -R &
33 | # Start Volume Control applet
34 | run volctl &
35 | # Start Network Manager Applet
36 | run nm-applet &
37 | # Set Numlock key to active.
38 | run numlockx &
39 | # Start Guake terminal
40 | run guake &
41 | # Greenclip for Rofi
42 | run greenclip daemon &
43 | # Pamac system update notifications
44 | run pamac-tray &
45 | # Unclutter - (hides mouse pointer after 5 seconds of inactivity)
46 | run unclutter &
47 | # Start Volume Control applet
48 | run volctl &
49 | # Start Guake terminal
50 | run guake &
51 | # Greenclip for Rofi
52 | run greenclip daemon &
53 | # Pamac system update notifications
54 | run pamac-tray &
55 | # MPD
56 | run mpd ~/.config/mpd/mpd.conf &
57 |
--------------------------------------------------------------------------------
/.config/picom/picom.conf:
--------------------------------------------------------------------------------
1 | # Corners
2 | corner-radius = 10
3 | rounded-corners-exclude = [
4 |
5 | ];
6 | round-borders = 1;
7 | round-borders-exclude = [
8 |
9 | ];
10 |
11 | # Shadows
12 | shadow = true;
13 | shadow-radius = 10;
14 | shadow-opacity = 0.75;
15 | shadow-offset-x = -4;
16 | shadow-offset-y = -4;
17 |
18 | shadow-color = "#000000";
19 |
20 | shadow-exclude = [
21 | "_GTK_FRAME_EXTENTS@:c",
22 | "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
23 | ];
24 |
25 | # Animations
26 | transition-length = 200
27 | transition-pow-x = 0.05
28 | transition-pow-y = 0.05
29 | transition-pow-w = 0.05
30 | transition-pow-h = 0.05
31 | size-transition = true
32 |
33 | # Fading
34 | fading = true;
35 | fade-in-step = 0.03;
36 | fade-out-step = 0.03;
37 | fade-delta = 5
38 | fade-exclude = [
39 | "window_type = 'dock'",
40 | "window_type = 'desktop'",
41 | "class_g = 'Albion-Online'",
42 | ]
43 |
44 | # Transparency / Opacity
45 |
46 | inactive-opacity = 0.7;
47 | popup_menu = { opacity = 0.8; }
48 | dropdown_menu = { opacity = 0.8; }
49 | inactive-opacity-override = false;
50 | active-opacity = 1;
51 |
52 | focus-exclude = [
53 | "window_type = 'desktop'",
54 | ];
55 |
56 | opacity-rule = [
57 | "100:fullscreen",
58 | "100:class_g = 'mpv'",
59 | "100:class_g = 'gl'",
60 | "100:class_g = 'Code'",
61 | "100:class_g = 'firefox'",
62 | "100:class_g = 'Microsoft-edge'",
63 | "100:class_g = 'kitty'",
64 | "75:class_g = 'rofi'",
65 | ];
66 |
67 | ### Background-Blurring
68 |
69 | blur: {
70 | method = "dual_kawase";
71 | strength = 10;
72 | background = false;
73 | background-frame = false;
74 | background-fixed = false;
75 | }
76 |
77 | blur-background-exclude = [ #
78 | "window_type = 'desktop'",
79 | ];
80 |
81 | #### General Settings
82 |
83 | experimental-backends = false;
84 | backend = "glx";
85 |
86 | vsync = true
87 |
88 | mark-wmwin-focused = true;
89 | mark-ovredir-focused = false
90 |
91 | detect-rounded-corners = true;
92 | detect-client-opacity = true;
93 | detect-transient = true
94 | detect-client-leader = true
95 |
96 | refresh-rate = 0
97 |
98 | use-damage = false
99 |
100 | xrender-sync-fence = true
101 |
102 | log-level = "warn";
103 |
104 | wintypes:
105 | {
106 | normal = { fade = false; shadow = true; }
107 | tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false };
108 | dnd = { shadow = false; opacity = 1; fade = false }
109 | popup_menu = { opacity = 0.85 }
110 | dropdown_menu = { opacity = 0.85 }
111 | };
--------------------------------------------------------------------------------
/.config/neofetch/config.conf:
--------------------------------------------------------------------------------
1 | # See this wiki page for more info:
2 | # https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
3 | print_info() {
4 |
5 | info " " distro
6 | info "├─ " kernel
7 | info "├─ " de
8 | info "├─ " wm
9 | info "├─ " shell
10 | info "├─ " term
11 | info "├─ " packages
12 | info "└─ " uptime
13 |
14 | prin "\n"
15 |
16 | info " " cpu
17 | #info "├─ " gpu
18 | info "├─ 塞" memory
19 | info "└─ " resolution
20 | info cols
21 | }
22 |
23 | # Title
24 | title_fqdn="off"
25 |
26 | # Kernel
27 | kernel_shorthand="off"
28 |
29 | # Distro
30 | distro_shorthand="off"
31 |
32 | os_arch="on"
33 |
34 | uptime_shorthand="on"
35 |
36 | # Memory
37 | memory_percent="on"
38 |
39 | memory_unit="mib"
40 |
41 | # Example:
42 | # on: '998 (pacman), 8 (flatpak), 4 (snap)'
43 | # tiny: '908 (pacman, flatpak, snap)'
44 | # off: '908'
45 | package_managers="on"
46 |
47 | # Shell
48 | shell_path="off"
49 |
50 | shell_version="on"
51 |
52 | # CPU
53 | speed_type="bios_limit"
54 |
55 | speed_shorthand="off"
56 |
57 | cpu_brand="on"
58 |
59 | cpu_speed="off"
60 |
61 | cpu_cores="logical"
62 |
63 | cpu_temp="on"
64 |
65 | gpu_brand="on"
66 |
67 | gpu_type="all"
68 |
69 | refresh_rate="off"
70 |
71 | gtk_shorthand="off"
72 |
73 | gtk2="on"
74 |
75 | gtk3="on"
76 |
77 | public_ip_host="http://ident.me"
78 |
79 | public_ip_timeout=2
80 |
81 | de_version="on"
82 |
83 | disk_show=('/')
84 |
85 | disk_subtitle="mount"
86 |
87 | disk_percent="on"
88 |
89 | music_player="auto"
90 |
91 | song_format="%artist% - %album% - %title%"
92 |
93 | song_shorthand="off"
94 |
95 | mpc_args=()
96 |
97 | colors=(distro)
98 |
99 | bold="on"
100 |
101 | underline_enabled="on"
102 |
103 | underline_char="-"
104 |
105 | separator=":"
106 |
107 | block_range=(0 15)
108 |
109 | color_blocks="on"
110 |
111 | block_width=3
112 |
113 | block_height=1
114 |
115 | col_offset="auto"
116 |
117 | # Progress Bars
118 |
119 | bar_char_elapsed="-"
120 | bar_char_total="="
121 |
122 | bar_border="on"
123 |
124 | bar_length=15
125 |
126 | bar_color_elapsed="distro"
127 | bar_color_total="distro"
128 |
129 | cpu_display="off"
130 | memory_display="off"
131 | battery_display="off"
132 | disk_display="off"
133 |
134 | image_backend='kitty'
135 |
136 | image_source="$HOME/.config/neofetch/arch.png"
137 |
138 | ascii_distro="auto"
139 |
140 | ascii_colors=(distro)
141 |
142 | ascii_bold="on"
143 |
144 | image_loop="off"
145 |
146 | thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
147 |
148 | crop_mode="normal"
149 |
150 | crop_offset="center"
151 |
152 | image_size="270px"
153 |
154 | gap=1
155 |
156 | yoffset=1
157 | xoffset=0
158 |
159 | background_color=
160 |
161 | stdout="off"
162 |
--------------------------------------------------------------------------------
/.config/starship/starship.toml:
--------------------------------------------------------------------------------
1 | format = """
2 | [](#818181)\
3 | [ ](fg:#000000 bg:#818181)\
4 | [\uE0BA](fg:#6f282e bg:#818181)\
5 | $directory\
6 | [\uE0BA](fg:#3a454e bg:#6f282e)\
7 | $git_branch\
8 | [](fg:#3a454e bg:#86BBD8)\
9 | $c\
10 | $elixir\
11 | $elm\
12 | $golang\
13 | $haskell\
14 | $java\
15 | $julia\
16 | $nodejs\
17 | $nim\
18 | $rust\
19 | [](fg:#86BBD8 bg:#06969A)\
20 | $docker_context\
21 | [](fg:#06969A bg:#2a3e63)\
22 | [\uE0C0 ](fg:#2a3e63)\
23 | $character\
24 | """
25 | #$time\
26 | #$username\
27 | #[\uE0BA](fg:#6f282e bg:#3a454e)\
28 | #$git_status\
29 |
30 | add_newline = true
31 | right_format = "$cmd_duration"
32 |
33 | [character]
34 | success_symbol = "[](#395385)"
35 | error_symbol = " [](#df5b61)"
36 | vicmd_symbol = "[ ](#78b892)"
37 |
38 | [cmd_duration]
39 | min_time = 1
40 | format = """
41 | [](fg:#818181 bg:none)
42 | [$duration]($style)
43 | [](fg:#818181 bg:#818181)
44 | [](fg:#2a3e63 bg:#818181)
45 | [](fg:#000000 bg:#2a3e63)
46 | [](fg:#2a3e63 bg:none) """
47 | disabled = false
48 | style = "fg:#000000 bg:#818181"
49 |
50 | [username]
51 | show_always = true
52 | style_user = "bg:#3a454e"
53 | style_root = "bg:#3a454e"
54 | format = '[ $user ]($style)'
55 |
56 | [directory]
57 | style = "bg:#6f282e"
58 | format = "[ $path ]($style)"
59 | truncation_length = 2
60 | truncation_symbol = "…/"
61 |
62 | [directory.substitutions]
63 | "Documents" = " "
64 | "Documentos" = " "
65 | "Downloads" = " "
66 | "Descargas" = " "
67 | "Music" = " "
68 | "Pictures" = " "
69 | "Imágenes" = " "
70 |
71 | [c]
72 | symbol = " "
73 | style = "bg:#86BBD8 fg:#000000"
74 | format = '[ $symbol ]($style)'
75 |
76 | [docker_context]
77 | symbol = " "
78 | style = "bg:#06969A fg:#000000"
79 | format = '[ $symbol $context ]($style) $path'
80 |
81 | [elixir]
82 | symbol = " "
83 | style = "bg:#86BBD8 fg:#000000"
84 | format = '[ $symbol ]($style)'
85 |
86 | [elm]
87 | symbol = " "
88 | style = "bg:#86BBD8 fg:#000000"
89 | format = '[ $symbol ]($style)'
90 |
91 | [git_branch]
92 | symbol = ""
93 | style = "bg:#3a454e fg:#000000"
94 | format = '[ $symbol $branch ]($style)'
95 |
96 | #[git_status]
97 | #style = "bg:#FCA17D fg:#000000"
98 | #format = '[$all_status$ahead_behind ]($style)'
99 |
100 | [golang]
101 | symbol = " "
102 | style = "bg:#86BBD8 fg:#000000"
103 | format = '[ $symbol ($version) ]($style)'
104 |
105 | [haskell]
106 | symbol = " "
107 | style = "bg:#86BBD8 fg:#000000"
108 | format = '[ $symbol ($version) ]($style)'
109 |
110 | [java]
111 | symbol = " "
112 | style = "bg:#86BBD8 fg:#000000"
113 | format = '[ $symbol ]($style)'
114 |
115 | [julia]
116 | symbol = " "
117 | style = "bg:#86BBD8 fg:#000000"
118 | format = '[ $symbol ]($style)'
119 |
120 | [nodejs]
121 | symbol = ""
122 | style = "bg:#86BBD8 fg:#000000"
123 | format = '[ $symbol ]($style)'
124 |
125 | [nim]
126 | symbol = " "
127 | style = "bg:#86BBD8 fg:#000000"
128 | format = '[ $symbol ($version) ]($style)'
129 |
130 | [rust]
131 | symbol = ""
132 | style = "bg:#86BBD8 fg:#000000"
133 | format = '[ $symbol ($version) ]($style)'
134 |
135 | [time]
136 | disabled = false
137 | time_format = "%R" # Hour:Minute Format
138 | style = "bg:#2a3e63"
139 | format = '[ 羽HackNerdFont $time ]($style)'
140 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Mi actual desktop
2 |
7 |
8 | ## My rice :3
9 |
10 | * **Window Manager** • AwesomeWM
11 | * **Shell** • Zsh
12 | * **Terminal** • Kitty
13 | * **Bar** • Wibar
14 | * **Compositor** • Picom
15 | * **Launcher** • Rofi
16 | * **Generator Colors** • Pywal
17 |
18 | ## Dependencies
19 |
20 | **Install:**
21 | * AwesomeWM
22 | ```
23 | paru -S awesome-git
24 | ```
25 | * Picom
26 | ```
27 | paru -S picom-ibhagwan-git
28 | ```
29 | * Pywal
30 | ```
31 | paru -S pywal
32 | ```
33 | * Kitty
34 | ```
35 | paru -S kitty
36 | ```
37 | * ZSH and dependencies
38 | ```
39 | paru -S zsh
40 | paru -S zsh-syntax-highlighting
41 | paru -S zsh-autosuggestions
42 | ```
43 | ```
44 | pacman -S starship
45 | ```
46 | ```
47 | cd /usr/share
48 | sudo su
49 | mkdir zsh-sudo
50 | chown 'youUser' zsh-sudo/
51 | cd zsh-sudo
52 | wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/plugins/sudo/sudo.plugin.zsh
53 | ```
54 | * Rofi
55 | ```
56 | sudo pacman -S rofi
57 | ```
58 | * Neofetch
59 | ```
60 | paru -S neofetch
61 | ```
62 | * Nitrogen
63 | ```
64 | paru -S nitrogen
65 | ```
66 | * MPD and Ncmpcpp
67 | ```
68 | paru -S ncmpcpp mpv mpd mpc
69 | systemctl --user enable mpd.service
70 | systemctl --user start mpd.service
71 | ```
72 | * Neofetch~/.fonts or ~/.local/share/fonts
73 | * Download zip Hack Nerd Font here
74 | ```
75 | cp Hack.zip ~/.fonts or ~/.local/share/fonts
76 | cd ~/.fonts or ~/.local/share/fonts
77 | unzip Hack.zip
78 | rm Hack.zip
79 | fc-cache -fv
80 | ```
81 |
82 | **Later:**
83 | ```
84 | git clone https://github.com/camilof99/dotfiles-awesome
85 | ```
86 | ```
87 | cd dotfiles-awesome
88 | cp .zshrc /home/'youUser'
89 | cp -r .config/* ~/.config/
90 | ```
91 | ```
92 | cd .config/awesome
93 | git clone https://github.com/streetturtle/awesome-wm-widgets
94 | git clone https://github.com/streetturtle/awesome-buttons
95 | ```
96 | ```
97 | reboot
98 | ```
99 | **Note:**
100 |
101 | * To change the wallpaper and generate the colors automatically, I use Nitrogen and Pywal.
102 | * Choose your wallpaper with Nitrogen
103 | * Later:
104 | ```
105 | cd .config/awesome/scripts
106 |
107 | ./wallpaper.sh
108 |
109 | Later keyboard super + ctrl + r
110 | ```
111 |
112 | * To see the keyboard shortcuts press super + s // Feel free to change them
113 |
114 | ***I hope you enjoy :)***
115 |
116 | ***If there are errors, report them here.***
117 |
118 |
119 | ## Credits
120 | * Credits to rxyhn for inspiration.
121 | * Credits to adi1090x for the base of rofi.
122 | * To the reddit community of r/unixporn.
123 | * To the Arch Linux group (Telegram).
124 |
--------------------------------------------------------------------------------
/.config/awesome/scripts/rofi.rasi:
--------------------------------------------------------------------------------
1 |
2 | /*****----- Configuration -----*****/
3 | configuration {
4 | modi: "drun";
5 | show-icons: true;
6 | display-drun: "";
7 | drun-display-format: "{name}";
8 | }
9 |
10 | /*****----- Global Properties -----*****/
11 | @import "colors.rasi"
12 |
13 | /*****----- Main Window -----*****/
14 | window {
15 | transparency: "real";
16 | location: west;
17 | anchor: west;
18 | fullscreen: false;
19 | width: 400;
20 | x-offset: 12px;
21 | y-offset: -138px;
22 |
23 | enabled: true;
24 | margin: 0px;
25 | padding: 0px;
26 | border: 1px solid;
27 | border-radius: 8px;
28 | border-color: @selected;
29 | background-color: black / 70%;
30 | cursor: "default";
31 | }
32 |
33 | /*****----- Main Box -----*****/
34 | mainbox {
35 | enabled: true;
36 | spacing: 15px;
37 | margin: 0px;
38 | padding: 20px;
39 | border: 0px solid;
40 | border-radius: 0px 0px 0px 0px;
41 | border-color: @selected;
42 | background-color: transparent;
43 | children: [ "inputbar", "listview" ];
44 | }
45 |
46 | /*****----- Inputbar -----*****/
47 | inputbar {
48 | enabled: true;
49 | spacing: 9%;
50 | margin: 5px;
51 | padding: 12px 20px;
52 | border: 0px 0px 2px 0px;
53 | border-radius: 10px;
54 | border-color: @selected;
55 | background-color: @background-alt;
56 | text-color: @foreground;
57 | children: [ "prompt", "entry" ];
58 | }
59 | prompt {
60 | enabled: true;
61 | background-color: transparent;
62 | text-color: inherit;
63 | }
64 |
65 | textbox-prompt-colon {
66 | enabled: true;
67 | expand: false;
68 | str: "::";
69 | background-color: inherit;
70 | text-color: inherit;
71 | }
72 | entry {
73 | enabled: true;
74 | background-color: inherit;
75 | text-color: inherit;
76 | cursor: text;
77 | placeholder: "Buscar apps";
78 | placeholder-color: inherit;
79 | }
80 |
81 | /*****----- Listview -----*****/
82 | listview {
83 | enabled: true;
84 | columns: 4;
85 | lines: 4;
86 | cycle: true;
87 | dynamic: true;
88 | scrollbar: false;
89 | layout: vertical;
90 | reverse: false;
91 | fixed-height: true;
92 | fixed-columns: true;
93 |
94 | spacing: 2px;
95 | margin: 0px;
96 | padding: 0px;
97 | border: 0px solid;
98 | border-radius: 0px;
99 | border-color: @selected;
100 | background-color: transparent;
101 | text-color: @foreground;
102 | cursor: "default";
103 | }
104 | scrollbar {
105 | handle-width: 5px ;
106 | handle-color: @selected;
107 | border-radius: 0px;
108 | background-color: @background-alt;
109 | }
110 |
111 | /*****----- Elements -----*****/
112 | element {
113 | enabled: true;
114 | spacing: 5px;
115 | margin: 0px;
116 | padding: 8px;
117 | border: 0px solid;
118 | border-radius: 0px;
119 | border-color: @selected;
120 | background-color: transparent;
121 | text-color: @foreground;
122 | orientation: vertical;
123 | cursor: pointer;
124 | }
125 | element normal.normal {
126 | background-color: transparent;
127 | text-color: @foreground;
128 | }
129 | element selected.normal {
130 | border: 0px 0px 2px 0px;
131 | border-radius: 8px;
132 | border-color: @selected;
133 | background-color: @background-alt;
134 | text-color: @foreground;
135 | }
136 | element-icon {
137 | background-color: transparent;
138 | text-color: inherit;
139 | size: 30px;
140 | cursor: inherit;
141 | }
142 | element-text {
143 | background-color: transparent;
144 | text-color: inherit;
145 | highlight: inherit;
146 | cursor: inherit;
147 | vertical-align: 0.5;
148 | horizontal-align: 0.5;
149 | }
150 |
151 | /*****----- Message -----*****/
152 | error-message {
153 | padding: 50px;
154 | border: 0px solid;
155 | border-radius: 0px;
156 | border-color: @selected;
157 | background-color: black / 10%;
158 | text-color: @foreground;
159 | }
160 | textbox {
161 | background-color: transparent;
162 | text-color: @foreground;
163 | vertical-align: 0.5;
164 | horizontal-align: 0.0;
165 | highlight: none;
166 | }
--------------------------------------------------------------------------------
/.config/awesome/mytheme.lua:
--------------------------------------------------------------------------------
1 | ---------------------------
2 | -- Default awesome theme --
3 | ---------------------------
4 |
5 | local theme_assets = require("beautiful.theme_assets")
6 | local xresources = require("beautiful.xresources")
7 |
8 | local xcolors = require("scripts/colors")
9 | local colors = xcolors.get_current_theme()
10 |
11 | local rnotification = require("ruled.notification")
12 | local dpi = xresources.apply_dpi
13 |
14 | local gfs = require("gears.filesystem")
15 | local themes_path = gfs.get_themes_dir()
16 |
17 | local theme = {}
18 |
19 | theme.font = "CascadiaCode 8"
20 |
21 | theme.bg_normal = "#222222"
22 | theme.bg_focus = "#535d6c"
23 | theme.bg_urgent = "#ff0000"
24 | theme.bg_minimize = "#444444"
25 | theme.bg_systray = theme.bg_normal
26 |
27 | theme.fg_normal = "#aaaaaa"
28 | theme.fg_focus = "#ffffff"
29 | theme.fg_urgent = "#ffffff"
30 | theme.fg_minimize = "#ffffff"
31 |
32 | theme.useless_gap = dpi(6)
33 | theme.border_width = dpi(1)
34 | theme.border_radius = dpi(10)
35 | theme.client_radius = theme.border_radius
36 | theme.dashboard_radius = theme.border_radius
37 | theme.widget_radius = theme.border_radius
38 |
39 | theme.border_color_normal = colors.color1
40 | theme.border_color_active = colors.color2
41 | theme.border_color_marked = "#91231c"
42 | theme.taglist_fg_focus = colors.color0
43 | theme.taglist_fg_occupied = colors.color5
44 | theme.taglist_fg_urgent = "#ED7572"
45 | theme.taglist_fg_empty = colors.color1
46 | theme.taglist_spacing = 3
47 | theme.taglist_font = "CascadiaCode 10 25"
48 | theme.tasklist_font = "CascadiaCode 7"
49 | theme.taglist_bg_focus = colors.color4
50 | theme.tasklist_bg_focus = colors.color4
51 |
52 | theme.bg_systray = "#061A23"
53 | theme.systray_icon_spacing = 5
54 |
55 | -- There are other variable sets
56 | -- overriding the default one when
57 | -- defined, the sets are:
58 | -- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
59 | -- tasklist_[bg|fg]_[focus|urgent]
60 | -- titlebar_[bg|fg]_[normal|focus]
61 | -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
62 | -- prompt_[fg|bg|fg_cursor|bg_cursor|font]
63 | -- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
64 | -- Example:
65 | --theme.taglist_bg_focus = "#ff0000"
66 |
67 | -- Generate taglist squares:
68 | --local taglist_square_size = dpi(0)
69 | --theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
70 | -- taglist_square_size, theme.fg_normal
71 | --)
72 | --theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
73 | -- taglist_square_size, theme.fg_normal
74 | --)
75 |
76 | -- Variables set for theming notifications:
77 | -- notification_font
78 | -- notification_[bg|fg]
79 | -- notification_[width|height|margin]
80 | -- notification_[border_color|border_width|shape|opacity]
81 |
82 | -- Variables set for theming the menu:
83 | -- menu_[bg|fg]_[normal|focus]
84 | -- menu_[border_color|border_width]
85 | theme.menu_submenu_icon = themes_path.."default/submenu.png"
86 | theme.menu_height = dpi(15)
87 | theme.menu_width = dpi(100)
88 |
89 | -- You can add as many variables as
90 | -- you wish and access them by using
91 | -- beautiful.variable in your rc.lua
92 | --theme.bg_widget = "#cc0000"
93 |
94 | -- Define the image to load
95 | theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png"
96 | theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png"
97 |
98 | theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png"
99 | theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png"
100 |
101 | theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png"
102 | theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png"
103 | theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png"
104 | theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png"
105 |
106 | theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png"
107 | theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png"
108 | theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png"
109 | theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png"
110 |
111 | theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png"
112 | theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png"
113 | theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png"
114 | theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png"
115 |
116 | theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png"
117 | theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png"
118 | theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
119 | theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
120 |
121 | --theme.wallpaper = themes_path.."default/background.png"
122 |
123 | -- You can use your own layout icons like this:
124 | theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
125 | theme.layout_fairv = themes_path.."default/layouts/fairvw.png"
126 | theme.layout_floating = themes_path.."default/layouts/floatingw.png"
127 | theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png"
128 | theme.layout_max = themes_path.."default/layouts/maxw.png"
129 | theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png"
130 | theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png"
131 | theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png"
132 | theme.layout_tile = themes_path.."default/layouts/tilew.png"
133 | theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png"
134 | theme.layout_spiral = themes_path.."default/layouts/spiralw.png"
135 | theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png"
136 | theme.layout_cornernw = themes_path.."default/layouts/cornernww.png"
137 | theme.layout_cornerne = themes_path.."default/layouts/cornernew.png"
138 | theme.layout_cornersw = themes_path.."default/layouts/cornersww.png"
139 | theme.layout_cornerse = themes_path.."default/layouts/cornersew.png"
140 |
141 | -- Generate Awesome icon:
142 | theme.awesome_icon = theme_assets.awesome_icon(
143 | theme.menu_height, theme.bg_focus, theme.fg_focus
144 | )
145 |
146 | -- Define the icon theme for application icons. If not set then the icons
147 | -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
148 | theme.icon_theme = nil
149 |
150 | -- Set different colors for urgent notifications.
151 | rnotification.connect_signal('request::rules', function()
152 | rnotification.append_rule {
153 | rule = { urgency = 'critical' },
154 | properties = { bg = '#ff0000', fg = '#ffffff' }
155 | }
156 | end)
157 |
158 | return theme
159 |
160 | -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
--------------------------------------------------------------------------------
/.config/awesome/widgets/calendar-widget/calendar.lua:
--------------------------------------------------------------------------------
1 | -------------------------------------------------
2 | -- Calendar Widget for Awesome Window Manager
3 | -- Shows the current month and supports scroll up/down to switch month
4 | -- More details could be found here:
5 | -- https://github.com/streetturtle/awesome-wm-widgets/tree/master/calendar-widget
6 |
7 | -- @author Pavel Makhov
8 | -- @copyright 2019 Pavel Makhov
9 | -------------------------------------------------
10 |
11 | local awful = require("awful")
12 | local beautiful = require("beautiful")
13 | local wibox = require("wibox")
14 | local gears = require("gears")
15 | local naughty = require("naughty")
16 |
17 | local xcolors = require("scripts/colors")
18 | local colors = xcolors.get_current_theme()
19 |
20 | local calendar_widget = {}
21 |
22 | local function worker(user_args)
23 |
24 | local calendar_themes = {
25 | default = {
26 | bg = '#000000',
27 | fg = '#D8DEE9',
28 | focus_date_bg = colors.color4,
29 | focus_date_fg = colors.color0,
30 | weekend_day_bg = colors.color8,
31 | weekday_fg = colors.color10,
32 | header_fg = '#E5E9F0',
33 | border = colors.color3
34 | },
35 | nord = {
36 | bg = '#2E3440',
37 | fg = '#D8DEE9',
38 | focus_date_bg = '#88C0D0',
39 | focus_date_fg = '#000000',
40 | weekend_day_bg = '#3B4252',
41 | weekday_fg = '#88C0D0',
42 | header_fg = '#E5E9F0',
43 | border = '#4C566A'
44 | },
45 | outrun = {
46 | bg = '#0d0221',
47 | fg = '#D8DEE9',
48 | focus_date_bg = '#650d89',
49 | focus_date_fg = '#2de6e2',
50 | weekend_day_bg = '#261447',
51 | weekday_fg = '#2de6e2',
52 | header_fg = '#f6019d',
53 | border = '#261447'
54 | },
55 | dark = {
56 | bg = '#000000',
57 | fg = '#ffffff',
58 | focus_date_bg = '#ffffff',
59 | focus_date_fg = '#000000',
60 | weekend_day_bg = '#444444',
61 | weekday_fg = '#ffffff',
62 | header_fg = '#ffffff',
63 | border = '#333333'
64 | },
65 | light = {
66 | bg = '#ffffff',
67 | fg = '#000000',
68 | focus_date_bg = '#000000',
69 | focus_date_fg = '#ffffff',
70 | weekend_day_bg = '#AAAAAA',
71 | weekday_fg = '#000000',
72 | header_fg = '#000000',
73 | border = '#CCCCCC'
74 | },
75 | monokai = {
76 | bg = '#272822',
77 | fg = '#F8F8F2',
78 | focus_date_bg = '#AE81FF',
79 | focus_date_fg = '#ffffff',
80 | weekend_day_bg = '#75715E',
81 | weekday_fg = '#FD971F',
82 | header_fg = '#F92672',
83 | border = '#75715E'
84 | },
85 | naughty = {
86 | bg = beautiful.notification_bg or beautiful.bg,
87 | fg = beautiful.notification_fg or beautiful.fg,
88 | focus_date_bg = beautiful.notification_fg or beautiful.fg,
89 | focus_date_fg = beautiful.notification_bg or beautiful.bg,
90 | weekend_day_bg = beautiful.bg_focus,
91 | weekday_fg = beautiful.fg,
92 | header_fg = beautiful.fg,
93 | border = beautiful.border_normal
94 | }
95 |
96 | }
97 |
98 | local args = user_args or {}
99 |
100 | if args.theme ~= nil and calendar_themes[args.theme] == nil then
101 | naughty.notify({
102 | preset = naughty.config.presets.critical,
103 | title = 'Calendar Widget',
104 | text = 'Theme "' .. args.theme .. '" not found, fallback to default'})
105 | args.theme = 'default'
106 | end
107 |
108 | local theme = args.theme or 'default'
109 | local placement = args.placement or 'top_right'
110 | local radius = args.radius or 8
111 | local next_month_button = args.next_month_button or 4
112 | local previous_month_button = args.previous_month_button or 5
113 | local start_sunday = args.start_sunday or false
114 |
115 | local styles = {}
116 | local function rounded_shape(size)
117 | return function(cr, width, height)
118 | gears.shape.rounded_rect(cr, width, height, size)
119 | end
120 | end
121 |
122 | styles.month = {
123 | padding = 4,
124 | bg_color = calendar_themes[theme].bg,
125 | border_width = 0,
126 | }
127 |
128 | styles.normal = {
129 | markup = function(t) return t end,
130 | shape = rounded_shape(4)
131 | }
132 |
133 | styles.focus = {
134 | fg_color = calendar_themes[theme].focus_date_fg,
135 | bg_color = calendar_themes[theme].focus_date_bg,
136 | markup = function(t) return '' .. t .. '' end,
137 | shape = rounded_shape(4)
138 | }
139 |
140 | styles.header = {
141 | fg_color = calendar_themes[theme].header_fg,
142 | bg_color = calendar_themes[theme].bg,
143 | markup = function(t) return '' .. t .. '' end
144 | }
145 |
146 | styles.weekday = {
147 | fg_color = calendar_themes[theme].weekday_fg,
148 | bg_color = calendar_themes[theme].bg,
149 | markup = function(t) return '' .. t .. '' end,
150 | }
151 |
152 | local function decorate_cell(widget, flag, date)
153 | if flag == 'monthheader' and not styles.monthheader then
154 | flag = 'header'
155 | end
156 |
157 | -- highlight only today's day
158 | if flag == 'focus' then
159 | local today = os.date('*t')
160 | if not (today.month == date.month and today.year == date.year) then
161 | flag = 'normal'
162 | end
163 | end
164 |
165 | local props = styles[flag] or {}
166 | if props.markup and widget.get_text and widget.set_markup then
167 | widget:set_markup(props.markup(widget:get_text()))
168 | end
169 | -- Change bg color for weekends
170 | local d = { year = date.year, month = (date.month or 1), day = (date.day or 1) }
171 | local weekday = tonumber(os.date('%w', os.time(d)))
172 | local default_bg = (weekday == 0 or weekday == 6)
173 | and calendar_themes[theme].weekend_day_bg
174 | or calendar_themes[theme].bg
175 | local ret = wibox.widget {
176 | {
177 | {
178 | widget,
179 | halign = 'center',
180 | widget = wibox.container.place
181 | },
182 | margins = (props.padding or 2) + (props.border_width or 0),
183 | widget = wibox.container.margin
184 | },
185 | shape = props.shape,
186 | shape_border_color = props.border_color or '#000000',
187 | shape_border_width = props.border_width or 0,
188 | fg = props.fg_color or calendar_themes[theme].fg,
189 | bg = props.bg_color or default_bg,
190 | widget = wibox.container.background
191 | }
192 |
193 | return ret
194 | end
195 |
196 | local cal = wibox.widget {
197 | date = os.date('*t'),
198 | font = 'CascadiaCode 10',
199 | fn_embed = decorate_cell,
200 | long_weekdays = true,
201 | start_sunday = start_sunday,
202 | widget = wibox.widget.calendar.month
203 | }
204 |
205 | local popup = awful.popup {
206 | ontop = true,
207 | visible = false,
208 | shape = rounded_shape(radius),
209 | offset = { y = 5 },
210 | border_width = 1,
211 | border_color = calendar_themes[theme].border,
212 | widget = cal
213 | }
214 |
215 | popup:buttons(
216 | awful.util.table.join(
217 | awful.button({}, next_month_button, function()
218 | local a = cal:get_date()
219 | a.month = a.month + 1
220 | cal:set_date(nil)
221 | cal:set_date(a)
222 | popup:set_widget(cal)
223 | end),
224 | awful.button({}, previous_month_button, function()
225 | local a = cal:get_date()
226 | a.month = a.month - 1
227 | cal:set_date(nil)
228 | cal:set_date(a)
229 | popup:set_widget(cal)
230 | end)
231 | )
232 | )
233 |
234 | function calendar_widget.toggle()
235 |
236 | if popup.visible then
237 | -- to faster render the calendar refresh it and just hide
238 | cal:set_date(nil) -- the new date is not set without removing the old one
239 | cal:set_date(os.date('*t'))
240 | popup:set_widget(nil) -- just in case
241 | popup:set_widget(cal)
242 | popup.visible = not popup.visible
243 | else
244 | if placement == 'top' then
245 | awful.placement.top(popup, { margins = { top = 30 }, parent = awful.screen.focused() })
246 | elseif placement == 'top_right' then
247 | awful.placement.top_right(popup, { margins = { top = 56, right = 12}, parent = awful.screen.focused() })
248 | elseif placement == 'top_left' then
249 | awful.placement.top_left(popup, { margins = { top = 30, left = 10}, parent = awful.screen.focused() })
250 | elseif placement == 'bottom_right' then
251 | awful.placement.bottom_right(popup, { margins = { bottom = 30, right = 10},
252 | parent = awful.screen.focused() })
253 | elseif placement == 'bottom_left' then
254 | awful.placement.bottom_left(popup, { margins = { bottom = 30, left = 10},
255 | parent = awful.screen.focused() })
256 | else
257 | awful.placement.top(popup, { margins = { top = 30 }, parent = awful.screen.focused() })
258 | end
259 |
260 | popup.visible = true
261 |
262 | end
263 | end
264 |
265 | return calendar_widget
266 |
267 | end
268 |
269 | return setmetatable(calendar_widget, { __call = function(_, ...)
270 | return worker(...)
271 | end })
272 |
--------------------------------------------------------------------------------
/.config/awesome/rc.lua:
--------------------------------------------------------------------------------
1 |
2 | pcall(require, "luarocks.loader")
3 |
4 | local gears = require("gears")
5 | local awful = require("awful")
6 | require("awful.autofocus")
7 | local wibox = require("wibox")
8 | local beautiful = require("beautiful")
9 | local naughty = require("naughty")
10 | local menubar = require("menubar")
11 |
12 | local xcolors = require("scripts/colors")
13 | local colors = xcolors.get_current_theme()
14 |
15 | local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
16 | local net_speed_widget = require("awesome-wm-widgets.net-speed-widget.net-speed")
17 | local logout_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup")
18 |
19 | local calendar_widget = require("widgets.calendar-widget.calendar")
20 | local cw = calendar_widget({
21 | theme = 'default',
22 | placement = 'top_right',
23 | start_sunday = false,
24 | radius = 8,
25 | -- with customized next/previous (see table above)
26 | previous_month_button = 1,
27 | next_month_button = 3,
28 | })
29 |
30 | naughty.connect_signal("request::display_error", function(message, startup)
31 | naughty.notification {
32 | urgency = "critical",
33 | title = "Oops, an error happened"..(startup and " during startup!" or "!"),
34 | message = message
35 | }
36 | end)
37 |
38 | -- {{{ Wallpaper
39 | screen.connect_signal("request::wallpaper", function(s)
40 | awful.wallpaper {
41 | screen = s,
42 | widget = {
43 | {
44 | image = beautiful.wallpaper,
45 | upscale = true,
46 | downscale = true,
47 | widget = wibox.widget.imagebox,
48 | },
49 | valign = "center",
50 | halign = "center",
51 | tiled = false,
52 | widget = wibox.container.tile,
53 | }
54 | }
55 | end)
56 | -- }}}
57 |
58 | -- Credits forum reddit...
59 | --[[ awesome.connect_signal('exit', function(reason_restart)
60 | if not reason_restart then return end
61 |
62 | local file = io.open('/tmp/awesomewm-last-selected-tags', 'w+')
63 |
64 | for s in screen do
65 | file:write(s.selected_tag.index, '\n')
66 | end
67 |
68 | file:close()
69 | end) ]]
70 |
71 | --[[ awesome.connect_signal('startup', function()
72 | local file = io.open('/tmp/awesomewm-last-selected-tags', 'r')
73 | if not file then return end
74 |
75 | local selected_tags = {}
76 |
77 | for line in file:lines() do
78 | table.insert(selected_tags, tonumber(line))
79 | end
80 |
81 | for s in screen do
82 | local i = selected_tags[s.index]
83 | local t = s.tags[i]
84 | t:view_only()
85 | end
86 |
87 | file:close()
88 | end) ]]
89 |
90 | --beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
91 | beautiful.init(gears.filesystem.get_configuration_dir() .. "mytheme.lua")
92 |
93 | modkey = "Mod4"
94 |
95 | --mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
96 | -- menu = mymainmenu })
97 | mylauncher = awful.widget.launcher({ image = gears.filesystem.get_configuration_dir() .. "icon-hulk2.png", command = "rofi -no-lazy-grab -show drun -modi drun -theme " .. gears.filesystem.get_configuration_dir() .. "scripts/rofi.rasi" })
98 |
99 | tag.connect_signal("request::default_layouts", function()
100 | awful.layout.append_default_layouts({
101 | awful.layout.suit.tile,
102 | awful.layout.suit.floating,
103 | -- awful.layout.suit.tile.left,
104 | -- awful.layout.suit.tile.bottom,
105 | awful.layout.suit.tile.top,
106 | awful.layout.suit.fair,
107 | -- awful.layout.suit.fair.horizontal,
108 | awful.layout.suit.spiral,
109 | -- awful.layout.suit.spiral.dwindle,
110 | -- awful.layout.suit.max,
111 | awful.layout.suit.max.fullscreen,
112 | -- awful.layout.suit.magnifier,
113 | -- awful.layout.suit.corner.nw,
114 | })
115 | end)
116 |
117 | screen.connect_signal("request::wallpaper", function(s)
118 | awful.wallpaper {
119 | screen = s,
120 | widget = {
121 | {
122 | image = beautiful.wallpaper,
123 | upscale = true,
124 | downscale = true,
125 | widget = wibox.widget.imagebox,
126 | },
127 | valign = "center",
128 | halign = "center",
129 | tiled = false,
130 | widget = wibox.container.tile,
131 | }
132 | }
133 | end)
134 |
135 | mykeyboardlayout = awful.widget.keyboardlayout()
136 |
137 | mytextclock = wibox.widget.textclock()
138 |
139 | screen.connect_signal("request::desktop_decoration", function(s)
140 | -- Each screen has its own tag table.
141 |
142 | awful.tag({ "", "", "", "", "", "", "", "" }, s, awful.layout.layouts[1])
143 |
144 | -- Create a promptbox for each screen
145 | s.mypromptbox = awful.widget.prompt()
146 |
147 | -- Create an imagebox widget which will contain an icon indicating which layout we're using.
148 | -- We need one layoutbox per screen.
149 | s.mylayoutbox = awful.widget.layoutbox {
150 | screen = s,
151 | buttons = {
152 | awful.button({ }, 1, function () awful.layout.inc( 1) end),
153 | awful.button({ }, 3, function () awful.layout.inc(-1) end),
154 | awful.button({ }, 4, function () awful.layout.inc(-1) end),
155 | awful.button({ }, 5, function () awful.layout.inc( 1) end),
156 | }
157 | }
158 |
159 | -- Create a taglist widget
160 | s.mytaglist = awful.widget.taglist {
161 | screen = s,
162 | filter = awful.widget.taglist.filter.all,
163 | style = {
164 | spacing = 4,
165 | shape = function(cr,w,h)
166 | gears.shape.rounded_rect(cr,w,h,4)
167 | end,
168 | },
169 | buttons = {
170 | awful.button({ }, 1, function(t) t:view_only() end),
171 | awful.button({ modkey }, 1, function(t)
172 | if client.focus then
173 | client.focus:move_to_tag(t)
174 | end
175 | end),
176 | awful.button({ }, 3, awful.tag.viewtoggle),
177 | awful.button({ modkey }, 3, function(t)
178 | if client.focus then
179 | client.focus:toggle_tag(t)
180 | end
181 | end),
182 | awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
183 | awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
184 | },
185 | }
186 |
187 | s.mytasklist = awful.widget.tasklist {
188 | screen = s,
189 | filter = awful.widget.tasklist.filter.currenttags,
190 |
191 | style = {
192 | spacing = 5,
193 | shape = function(cr,w,h)
194 | gears.shape.rounded_rect(cr,w,h,5)
195 | end,
196 | },
197 |
198 | buttons = {
199 | awful.button({ }, 1, function (c)
200 | c:activate { context = "tasklist", action = "toggle_minimization" }
201 | end),
202 | awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250, } } end),
203 | awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
204 | awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
205 | },
206 | }
207 |
208 | mytaglistcontainer = wibox.container.margin (s.mytaglist, 4, 4, 3, 3)
209 | mylaunchercontainer = wibox.container.margin (mylauncher, 7, 2, 2, 2)
210 | mytasklistcontainer = wibox.container.margin (s.mytasklist, 4, 4, 4, 4)
211 | mylayoutboxcontainer = wibox.container.margin (s.mylayoutbox, 4, 4, 4, 4)
212 |
213 | local container =
214 | wibox.widget {
215 | net_speed_widget(),
216 | widget = wibox.container.background,
217 | shape = function(cr, width, height)
218 | gears.shape.rounded_rect(cr, width, height, 4)
219 | end,
220 | bg = colors.color4,
221 | fg = colors.color0,
222 | border_width = (2),
223 | border_color = '#1b1d2488',
224 | forced_width = 158
225 | }myvolumecontainer = wibox.container.margin (
226 | volume_widget{
227 | widget_type = 'arc',
228 | main_color = colors.color7,
229 | }, 6, 6, 4, 4)
230 |
231 | local container2 =
232 | wibox.widget {
233 | myvolumecontainer,
234 | forced_width = 35,
235 | widget = wibox.container.background,
236 | shape = function(cr, width, height)
237 | gears.shape.rounded_rect(cr, width, height, 4)
238 | end,
239 | --bg = colors.color4,
240 | --border_width = (2),
241 | --border_color = '#1b1d2488'
242 | }
243 |
244 | local container3 =
245 | wibox.widget {
246 | mylayoutboxcontainer,
247 | widget = wibox.container.background,
248 | shape = function(cr, width, height)
249 | gears.shape.rounded_rect(cr, width, height, 4)
250 | end,
251 | bg = colors.color4,
252 | border_width = (2),
253 | border_color = '#1b1d2488',
254 | }
255 |
256 | local container4 =
257 | wibox.widget {
258 | logout_popup.widget{},
259 | widget = wibox.container.background,
260 | shape = function(cr, width, height)
261 | gears.shape.rounded_rect(cr, width, height, 4)
262 | end,
263 | bg = colors.color4,
264 | border_width = (2),
265 | border_color = '#1b1d2488',
266 | }
267 |
268 | local clock = wibox.widget({
269 | font = "HackNerdFont Bold 11",
270 | format = "%H:%M",
271 | align = "center",
272 | valign = "center",
273 | widget = wibox.widget.textclock,
274 | })
275 |
276 | clock:connect_signal("button::press",
277 | function(_, _, _, button)
278 | if button == 1 then cw.toggle() end
279 | end)
280 |
281 | local container5 =
282 | wibox.widget {
283 | clock,
284 | widget = wibox.container.background,
285 | shape = function(cr, width, height)
286 | gears.shape.rounded_rect(cr, width, height, 4)
287 | end,
288 | bg = colors.color4,
289 | fg = colors.color0,
290 | border_width = (2),
291 | border_color = '#1b1d2488',
292 | forced_width = 60
293 | }
294 |
295 | local systray = wibox.widget.systray()
296 | systray:set_base_size(28)
297 |
298 | mylayoutcontainer1 = wibox.container.margin (container3, 0, 1.5, 1.5, 1.5)
299 | mylayoutcontainer2 = wibox.container.margin (container4, 0, 0, 1.5, 1.5)
300 | clockcontainer = wibox.container.margin (container5, 1.5, 0, 1.5, 1.5)
301 | myvolumecontainer1 = wibox.container.margin (container2, 0, 0, 1.5, 1.5)
302 | myspeedcontainer = wibox.container.margin (container, 1.5, 0, 1.5, 1.5)
303 |
304 | s.mywibox0 = awful.wibar {
305 | position = "top",
306 | visible = true,
307 | stretch = false,
308 | width = 40,
309 | bg = "#061A25",
310 | border_color = colors.color3,
311 | border_width = 1,
312 | height = 30,
313 | margins = {
314 | top = 12,
315 | left = 14,
316 | },
317 | align = "left",
318 | widget = {
319 | layout = wibox.layout.align.horizontal,
320 | { -- Left widgets
321 | layout = wibox.layout.fixed.horizontal,
322 | mylaunchercontainer
323 | },
324 | { -- Right widgets
325 | layout = wibox.layout.fixed.horizontal
326 | }
327 | },
328 | }
329 |
330 | s.mywibox1 = awful.wibar {
331 | position = "top",
332 | visible = true,
333 | stretch = false,
334 | width = 236,
335 | bg = "#061A25",
336 | border_color = colors.color3,
337 | border_width = 1,
338 | height = 30,
339 | margins = {
340 | top = -18,
341 | left = 62,
342 | },
343 | align = "left",
344 | widget = {
345 | layout = wibox.layout.align.horizontal,
346 | {
347 | layout = wibox.layout.fixed.horizontal,
348 | },
349 | mytaglistcontainer,
350 | {
351 | layout = wibox.layout.fixed.horizontal
352 | },
353 | },
354 | }
355 |
356 | s.mywibox2 = awful.wibar {
357 | position = "top",
358 | visible = true,
359 | stretch = false,
360 | bg = "#061A25",
361 | border_color = colors.color3,
362 | border_width = 1,
363 | width = 120,
364 | height = 30,
365 | margins = {
366 | top = -48,
367 | left = 306,
368 | },
369 | align = "left",
370 | widget = {
371 | align = "center",
372 | widget = mytasklistcontainer
373 | },
374 | }
375 |
376 | s.mywibox3 = awful.wibar {
377 | position = "top",
378 | visible = true,
379 | stretch = false,
380 | width = 116,
381 | bg = "#061A25",
382 | border_color = colors.color3,
383 | border_width = 1,
384 | height = 30,
385 | margins = {
386 | top = -78,
387 | right = 14
388 | },
389 | align = "right",
390 | widget = {
391 | layout = wibox.layout.align.horizontal,
392 | {
393 | layout = wibox.layout.fixed.horizontal,
394 | clockcontainer,
395 | },
396 | layout = wibox.layout.fixed.horizontal,
397 | mylayoutcontainer2,
398 | {
399 | layout = wibox.layout.fixed.horizontal,
400 | mylayoutcontainer1,
401 | },
402 | }
403 | }
404 |
405 | s.mywibox4 = awful.wibar {
406 | position = "top",
407 | visible = true,
408 | stretch = false,
409 | width = 192,
410 | bg = "#061A25",
411 | border_color = colors.color3,
412 | border_width = 1,
413 | height = 30,
414 | margins = {
415 | top = -108,
416 | right = 138
417 | },
418 | align = "right",
419 | widget = {
420 | layout = wibox.layout.align.horizontal,
421 | {
422 | layout = wibox.layout.fixed.horizontal,
423 | },
424 | layout = wibox.layout.fixed.horizontal,
425 | myspeedcontainer,
426 | {
427 | layout = wibox.layout.fixed.horizontal,
428 | myvolumecontainer1
429 | }
430 | }
431 | }
432 | s.mywibox5 = awful.wibar {
433 | position = "top",
434 | visible = false,
435 | stretch = false,
436 | width = 100,
437 | bg = "#061A25",
438 | border_color = colors.color3,
439 | border_width = 1,
440 | height = 30,
441 | margins = {
442 | top = -138,
443 | right = 338
444 | },
445 | align = "right",
446 | widget = {
447 | layout = wibox.layout.align.horizontal,
448 | {
449 | layout = wibox.layout.fixed.horizontal,
450 | },
451 | layout = wibox.layout.fixed.horizontal,
452 | systray,
453 | {
454 | layout = wibox.layout.fixed.horizontal,
455 | }
456 | }
457 | }
458 | end)
459 |
460 | client.connect_signal("manage",
461 | function(c)
462 | if c.first_tag.index == 7 then
463 | c.floating = true
464 | c.width = 680
465 | c.height = 440
466 | c.x = 650
467 | c.y = 300
468 | end
469 | end
470 | )
471 |
472 | -- {{{ Key bindings
473 | -- General Awesome keys
474 |
475 | require("configuration")
476 |
477 | -- Autostart Apps
478 | awful.spawn.with_shell("~/.config/awesome/scripts/autostart.sh")
--------------------------------------------------------------------------------
/.config/awesome/configuration/keys.lua:
--------------------------------------------------------------------------------
1 | local awful = require("awful")
2 | local hotkeys_popup = require("awful.hotkeys_popup")
3 | local beautiful = require("beautiful")
4 | local dpi = beautiful.xresources.apply_dpi
5 | local naughty = require("naughty")
6 | local ruled = require("ruled")
7 |
8 | local logout_popup = require("awesome-wm-widgets.logout-popup-widget.logout-popup")
9 |
10 | local calendar_widget = require("widgets.calendar-widget.calendar")
11 | local cw = calendar_widget({
12 | theme = 'default',
13 | placement = 'top_right',
14 | start_sunday = false,
15 | radius = 8,
16 | -- with customized next/previous (see table above)
17 | previous_month_button = 1,
18 | next_month_button = 3,
19 | })
20 |
21 | require("awful.hotkeys_popup.keys")
22 |
23 | local volume_widget = require("awesome-wm-widgets.volume-widget.volume")
24 | local apps = require("configuration.apps")
25 |
26 | awful.keyboard.append_global_keybindings({
27 |
28 | --- Music
29 | awful.key({ modkey, "Shift" }, "p", function()
30 | awful.spawn.with_shell('mpc pause')
31 | end, { description = "Pause music", group = "Música" }),
32 | awful.key({ modkey, "Shift" }, "o", function()
33 | awful.spawn.with_shell('mpc play')
34 | end, { description = "Play music", group = "Música" }),
35 | awful.key({ modkey, "Shift" }, "s", function()
36 | awful.spawn.with_shell('mpc stop')
37 | end, { description = "Stop music", group = "Música" }),
38 | awful.key({ modkey, "Shift" }, "Left", function()
39 | awful.spawn.with_shell('mpc prev')
40 | end, { description = "Previous music", group = "Música" }),
41 | awful.key({ modkey, "Shift" }, "Right", function()
42 | awful.spawn.with_shell('mpc next')
43 | end, { description = "next music", group = "Música" }),
44 |
45 | -- Volume
46 | awful.key({ modkey, "Shift" }, "Up", function() volume_widget:inc(5) end),
47 | awful.key({ modkey, "Shift" }, "Down", function() volume_widget:dec(5) end),
48 | awful.key({ modkey }, "\\", function() volume_widget:toggle() end),
49 |
50 | awful.key({ modkey }, "o", function() logout_popup.launch() end, {description = "Show logout screen", group = "custom"}),
51 |
52 | -- Apps
53 | awful.key({}, "Print", function () awful.spawn("flameshot gui") end ),
54 | awful.key({ modkey, }, "s", hotkeys_popup.show_help,
55 | {description="show help", group="awesome"}),
56 |
57 | awful.key({ modkey, "Control" }, "r", awesome.restart,
58 | {description = "reload awesome", group = "awesome"}),
59 |
60 | awful.key({ modkey, "Shift" }, "q", awesome.quit,
61 | {description = "quit awesome", group = "awesome"}),
62 |
63 | awful.key({ modkey }, "Return", function ()
64 | awful.spawn(apps.default.terminal)
65 | end, {description = "open a terminal", group = "launcher"}),
66 |
67 | awful.key({ modkey }, "e", function()
68 | awful.spawn(apps.default.web_browser)
69 | end, { description = "open web browser", group = "launcher" }),
70 |
71 | awful.key({ modkey }, "v", function()
72 | awful.spawn(apps.default.code_editor)
73 | end, { description = "open code", group = "launcher" }),
74 |
75 | awful.key({ modkey }, "d", function()
76 | awful.spawn(apps.default.app_launcher)
77 | end, { description = "open rofi", group = "launcher" }),
78 |
79 | awful.key({ modkey, 'Control' }, 'w', function()
80 | awful.spawn.easy_async_with_shell(apps.default.wallpaper,
81 | function(output) end)
82 | end),
83 |
84 | awful.key({ modkey, "Control" }, "p", function()
85 | awful.spawn.with_shell(apps.default.picom_kill)
86 | end, { description = "status picom", group = "launcher" }),
87 |
88 | awful.key({ modkey, "Shift" }, "x", function()
89 | awful.spawn(apps.default.color_picker)
90 | end, { description = "color picker", group = "launcher" }),
91 |
92 | awful.key({ modkey }, "t", function()
93 | awful.spawn(apps.default.telegram)
94 | end, { description = "Telegram", group = "launcher" }),
95 |
96 | awful.key({ modkey }, "f", function()
97 | awful.spawn(apps.default.file_manager)
98 | end, { description = "File Manager", group = "launcher" }),
99 |
100 | awful.key({ modkey }, "u", function()
101 | awful.spawn(apps.default.music_player)
102 | end, { description = "Open music", group = "launcher" }),
103 |
104 | awful.key({ modkey }, "c", function()
105 | cw.toggle()
106 | end, { description = "Show/Hide Calendar", group = "launcher" }),
107 |
108 | -- Hide wibar 5
109 | awful.key({ modkey }, "b", function ()
110 | for s in screen do
111 | s.mywibox5.visible = not s.mywibox5.visible
112 | end
113 | end,
114 | { description = "Ocultar barra apps segundo plano.", group = "awesome" }),
115 |
116 | -- Hide wibar 5
117 | awful.key({ modkey, "Shift" }, "b", function ()
118 | for s in screen do
119 | if s.mywibox0.visible == true then
120 | if s.mywibox5.visible == true then
121 | s.mywibox5.visible = not s.mywibox5.visible
122 | end
123 | s.mywibox4.visible = not s.mywibox4.visible
124 | s.mywibox3.visible = not s.mywibox3.visible
125 | s.mywibox2.visible = not s.mywibox2.visible
126 | s.mywibox1.visible = not s.mywibox1.visible
127 | s.mywibox0.visible = not s.mywibox0.visible
128 | else
129 | s.mywibox0.visible = not s.mywibox0.visible
130 | s.mywibox1.visible = not s.mywibox1.visible
131 | s.mywibox2.visible = not s.mywibox2.visible
132 | s.mywibox3.visible = not s.mywibox3.visible
133 | s.mywibox4.visible = not s.mywibox4.visible
134 | end
135 | end
136 | end,
137 | { description = "Hide wibar", group = "awesome" }),
138 |
139 | })
140 |
141 | -- Tags related keybindings
142 | awful.keyboard.append_global_keybindings({
143 | awful.key({ modkey, }, "Left", awful.tag.viewprev,
144 | {description = "view previous", group = "tag"}),
145 | awful.key({ modkey, }, "Right", awful.tag.viewnext,
146 | {description = "view next", group = "tag"}),
147 | awful.key({ modkey, }, "Escape", awful.tag.history.restore,
148 | {description = "go back", group = "tag"}),
149 | })
150 |
151 | -- Focus related keybindings
152 | awful.keyboard.append_global_keybindings({
153 | awful.key({ modkey, }, "j",
154 | function ()
155 | awful.client.focus.byidx( 1)
156 | end,
157 | {description = "focus next by index", group = "client"}
158 | ),
159 | awful.key({ modkey, }, "k",
160 | function ()
161 | awful.client.focus.byidx(-1)
162 | end,
163 | {description = "focus previous by index", group = "client"}
164 | ),
165 | awful.key({ modkey, }, "Tab",
166 | function ()
167 | awful.client.focus.history.previous()
168 | if client.focus then
169 | client.focus:raise()
170 | end
171 | end,
172 | {description = "go back", group = "client"}),
173 | awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
174 | {description = "focus the next screen", group = "screen"}),
175 | awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
176 | {description = "focus the previous screen", group = "screen"}),
177 | awful.key({ modkey, "Control" }, "n",
178 | function ()
179 | local c = awful.client.restore()
180 | -- Focus restored client
181 | if c then
182 | c:activate { raise = true, context = "key.unminimize" }
183 | end
184 | end,
185 | {description = "restore minimized", group = "client"}),
186 | })
187 |
188 | -- Layout related keybindings
189 | awful.keyboard.append_global_keybindings({
190 | awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
191 | {description = "swap with next client by index", group = "client"}),
192 | awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
193 | {description = "swap with previous client by index", group = "client"}),
194 | awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
195 | {description = "jump to urgent client", group = "client"}),
196 | awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
197 | {description = "increase master width factor", group = "layout"}),
198 | awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
199 | {description = "decrease master width factor", group = "layout"}),
200 | awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
201 | {description = "increase the number of master clients", group = "layout"}),
202 | awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
203 | {description = "decrease the number of master clients", group = "layout"}),
204 | awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
205 | {description = "increase the number of columns", group = "layout"}),
206 | awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
207 | {description = "decrease the number of columns", group = "layout"}),
208 | awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
209 | {description = "select next", group = "layout"}),
210 | awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
211 | {description = "select previous", group = "layout"}),
212 | })
213 |
214 | awful.keyboard.append_global_keybindings({
215 | awful.key {
216 | modifiers = { modkey },
217 | keygroup = "numrow",
218 | description = "only view tag",
219 | group = "tag",
220 | on_press = function (index)
221 | local screen = awful.screen.focused()
222 | local tag = screen.tags[index]
223 | if tag then
224 | tag:view_only()
225 | end
226 | end,
227 | },
228 | awful.key {
229 | modifiers = { modkey, "Control" },
230 | keygroup = "numrow",
231 | description = "toggle tag",
232 | group = "tag",
233 | on_press = function (index)
234 | local screen = awful.screen.focused()
235 | local tag = screen.tags[index]
236 | if tag then
237 | awful.tag.viewtoggle(tag)
238 | end
239 | end,
240 | },
241 | awful.key {
242 | modifiers = { modkey, "Shift" },
243 | keygroup = "numrow",
244 | description = "move focused client to tag",
245 | group = "tag",
246 | on_press = function (index)
247 | if client.focus then
248 | local tag = client.focus.screen.tags[index]
249 | if tag then
250 | client.focus:move_to_tag(tag)
251 | end
252 | end
253 | end,
254 | },
255 | awful.key {
256 | modifiers = { modkey, "Control", "Shift" },
257 | keygroup = "numrow",
258 | description = "toggle focused client on tag",
259 | group = "tag",
260 | on_press = function (index)
261 | if client.focus then
262 | local tag = client.focus.screen.tags[index]
263 | if tag then
264 | client.focus:toggle_tag(tag)
265 | end
266 | end
267 | end,
268 | },
269 | awful.key {
270 | modifiers = { modkey },
271 | keygroup = "numpad",
272 | description = "select layout directly",
273 | group = "layout",
274 | on_press = function (index)
275 | local t = awful.screen.focused().selected_tag
276 | if t then
277 | t.layout = t.layouts[index] or t.layout
278 | end
279 | end,
280 | }
281 | })
282 |
283 | client.connect_signal("request::default_mousebindings", function()
284 | awful.mouse.append_client_mousebindings({
285 | awful.button({ }, 1, function (c)
286 | c:activate { context = "mouse_click" }
287 | end),
288 | awful.button({ modkey }, 1, function (c)
289 | c:activate { context = "mouse_click", action = "mouse_move" }
290 | end),
291 | awful.button({ modkey }, 3, function (c)
292 | c:activate { context = "mouse_click", action = "mouse_resize"}
293 | end),
294 | })
295 | end)
296 |
297 | client.connect_signal("request::default_keybindings", function()
298 | awful.keyboard.append_client_keybindings({
299 | awful.key({ modkey, }, "f",
300 | function (c)
301 | c.fullscreen = not c.fullscreen
302 | c:raise()
303 | end,
304 | {description = "toggle fullscreen", group = "client"}),
305 | awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,
306 | {description = "close", group = "client"}),
307 | awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
308 | {description = "toggle floating", group = "client"}),
309 | awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
310 | {description = "move to master", group = "client"}),
311 | awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
312 | {description = "move to screen", group = "client"}),
313 | awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
314 | {description = "toggle keep on top", group = "client"}),
315 | awful.key({ modkey, }, "n",
316 | function (c)
317 | -- The client currently has the input focus, so it cannot be
318 | -- minimized, since minimized clients can't have the focus.
319 | c.minimized = true
320 | end ,
321 | {description = "minimize", group = "client"}),
322 | awful.key({ modkey, }, "m",
323 | function (c)
324 | c.maximized = not c.maximized
325 | c:raise()
326 | end ,
327 | {description = "(un)maximize", group = "client"}),
328 | awful.key({ modkey, "Control" }, "m",
329 | function (c)
330 | c.maximized_vertical = not c.maximized_vertical
331 | c:raise()
332 | end ,
333 | {description = "(un)maximize vertically", group = "client"}),
334 | awful.key({ modkey, "Shift" }, "m",
335 | function (c)
336 | c.maximized_horizontal = not c.maximized_horizontal
337 | c:raise()
338 | end ,
339 | {description = "(un)maximize horizontally", group = "client"}),
340 | })
341 | end)
342 |
343 | -- }}}
344 |
345 | -- {{{ Rules
346 | -- Rules to apply to new clients.
347 | ruled.client.connect_signal("request::rules", function()
348 | -- All clients will match this rule.
349 | ruled.client.append_rule {
350 | id = "global",
351 | rule = { },
352 | properties = {
353 | focus = awful.client.focus.filter,
354 | raise = true,
355 | screen = awful.screen.preferred,
356 | placement = awful.placement.no_overlap+awful.placement.no_offscreen
357 | }
358 | }
359 |
360 | -- Floating clients.
361 | --[[ ruled.client.append_rule {
362 | id = "floating",
363 | rule_any = {
364 | instance = { "copyq", "pinentry" },
365 | class = {
366 | "Arandr", "Blueman-manager", "Gpick", "Kruler", "Sxiv",
367 | "Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer"
368 | },
369 | -- Note that the name property shown in xprop might be set slightly after creation of the client
370 | -- and the name shown there might not match defined rules here.
371 | name = {
372 | "Event Tester", -- xev.
373 | },
374 | role = {
375 | "AlarmWindow", -- Thunderbird's calendar.
376 | "ConfigManager", -- Thunderbird's about:config.
377 | "pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
378 | }
379 | },
380 | properties = { floating = true }
381 | } ]]
382 |
383 | -- Add titlebars to normal clients and dialogs
384 | ruled.client.append_rule {
385 | id = "titlebars",
386 | rule_any = { type = { "normal", "dialog" } },
387 | properties = { titlebars_enabled = true }
388 | }
389 |
390 | end)
391 |
392 | -- }}}
393 |
394 | ---- {{{ Titlebars
395 | ---- Add a titlebar if titlebars_enabled is set to true in the rules.
396 | --client.connect_signal("request::titlebars", function(c)
397 | -- -- buttons for the titlebar
398 | -- local buttons = {
399 | -- awful.button({ }, 1, function()
400 | -- c:activate { context = "titlebar", action = "mouse_move" }
401 | -- end),
402 | -- awful.button({ }, 3, function()
403 | -- c:activate { context = "titlebar", action = "mouse_resize"}
404 | -- end),
405 | -- }
406 | --
407 | -- awful.titlebar(c).widget = {
408 | -- { -- Left
409 | -- awful.titlebar.widget.iconwidget(c),
410 | -- buttons = buttons,
411 | -- layout = wibox.layout.fixed.horizontal
412 | -- },
413 | -- { -- Middle
414 | -- { -- Title
415 | -- align = "center",
416 | -- widget = awful.titlebar.widget.titlewidget(c)
417 | -- },
418 | -- buttons = buttons,
419 | -- layout = wibox.layout.flex.horizontal
420 | -- },
421 | -- { -- Right
422 | -- awful.titlebar.widget.floatingbutton (c),
423 | -- awful.titlebar.widget.maximizedbutton(c),
424 | -- awful.titlebar.widget.stickybutton (c),
425 | -- awful.titlebar.widget.ontopbutton (c),
426 | -- awful.titlebar.widget.closebutton (c),
427 | -- layout = wibox.layout.fixed.horizontal()
428 | -- },
429 | -- layout = wibox.layout.align.horizontal
430 | -- }
431 | --end)
432 |
433 | -- {{{ Notifications
434 |
435 | ruled.notification.connect_signal('request::rules', function()
436 | -- All notifications will match this rule.
437 | ruled.notification.append_rule {
438 | rule = { },
439 | properties = {
440 | screen = awful.screen.preferred,
441 | implicit_timeout = 5,
442 | }
443 | }
444 | end)
445 |
446 | naughty.connect_signal("request::display", function(n)
447 | naughty.layout.box { notification = n }
448 | end)
449 |
450 | -- }}}
451 |
452 | -- Enable sloppy focus, so that focus follows mouse.
453 | client.connect_signal("mouse::enter", function(c)
454 | c:activate { context = "mouse_enter", raise = false }
455 | end)
456 |
--------------------------------------------------------------------------------